Difference between revisions of "Install EIB eibd"
(→Mac OS) |
(→Test xPL EIB writer) |
||
Line 78: | Line 78: | ||
$SCRIPTS_BASE_DIR/xpl-eib-eibdWrite.pl -v -n home | $SCRIPTS_BASE_DIR/xpl-eib-eibdWrite.pl -v -n home | ||
− | Open yet another terminal and send a message to the EIB | + | Open yet another terminal and send a message to the EIB tunnelling server: |
su control | su control | ||
SCRIPTS_BASE_DIR=/home/control/Documents/Controls | SCRIPTS_BASE_DIR=/home/control/Documents/Controls | ||
Line 85: | Line 85: | ||
This should turn on EIB device <code>1/1/1</code>. | This should turn on EIB device <code>1/1/1</code>. | ||
The <code>groupsocketlisten</code> window should show the <code>eibd</code> write command. | The <code>groupsocketlisten</code> window should show the <code>eibd</code> write command. | ||
+ | |||
+ | = Test xPL EIB reader = | ||
+ | |||
+ | Open a first terminal window (on any machine with xPL installed) and monitor the xPL protocol: | ||
+ | SCRIPTS_BASE_DIR=/home/control/Documents/Controls | ||
+ | $SCRIPTS_BASE_DIR/xpl-monitor.pl -vf | ||
+ | |||
+ | If the <code>eibd</code> daemon isn't running, launch it in a second window: | ||
+ | su control | ||
+ | eibd -S -D -i -d ipt:192.168.1.204 | ||
+ | |||
+ | Then start the xPL EIB reader: | ||
+ | SCRIPTS_BASE_DIR=/home/control/Documents/Controls | ||
+ | groupsocketlisten ip:localhost | $SCRIPTS_BASE_DIR/xpl-eib-eibdRead.pl -v -n home | ||
+ | |||
+ | Push on an EIB button or send a message to the EIB tunnelling server: | ||
+ | su control | ||
+ | SCRIPTS_BASE_DIR=/home/control/Documents/Controls | ||
+ | $SCRIPTS_BASE_DIR/xpl-send.pl -v -t cmnd -d dspc-eib.home -c eib.basic group='1/1/1' data=0x01 | ||
+ | |||
+ | The EIB activity should appear in the <code>xpl-monitor.pl</code> window. | ||
= Launch the xPL EIB writer at startup = | = Launch the xPL EIB writer at startup = |
Revision as of 21:17, 8 December 2014
The EIB / KNX bus can be accessed via the eibd daemon. The original distribution at TU Wien is no longer maintained. The work has been taken over on SourceForge.
Before all, make sure you have installed an xPL hub and a control user.
Contents
[hide]Install eibd
Note: to my experience, this works on x86 machines, but not on armhf boards.
Copy the PGP public key to a local file eibPgp.key
on your computer.
Add it to the list of trusted keys:
su apt-key add path-to/eibPgp.key
Add the repository to the debian package maintenance system: edit /etc/apt/sources.list
and add the lines:
## EIB deb http://www.auto.tuwien.ac.at/~mkoegler/debian eib main deb-src http://www.auto.tuwien.ac.at/~mkoegler/debian eib main
Install the package:
apt-get update apt-get install bcusdk
On the EIB side, the IP Router should be configured as a bus coupler (address nn.nn.0) and be provided a fixed IP address.
In the following description, the address is 192.168.1.204
.
Test it: start the daemon in a terminal window:
su control eibd -S -D -i -d ipt:192.168.1.204
Monitor the traffic:
groupsocketlisten ip:localhost
Pushing on an EIB button should be reported in the last terminal window.
In a 3rd terminal window, light-on a bulb:
su control groupswrite ip:localhost 1/1/1 1
Stop the daemon:
killall eibd
Install xPL EIB bridge
Download the eibd write and eibd read scripts.
Move the script to xPL scripts directory:
SCRIPTS_BASE_DIR=/home/control/Documents/Controls mv xpl-eib-eibdWrite.pl $SCRIPTS_BASE_DIR mv xpl-eib-eibdRead.pl $SCRIPTS_BASE_DIR chown control:users $SCRIPTS_BASE_DIR/*.pl chmod 775 $SCRIPTS_BASE_DIR/*.pl
Test xPL EIB writer
The test is shown here on a Linux machine such as a BeagleBone. It has to be slightly adapted on Mac OS.
Open a first terminal window (on any machine with xPL installed) and monitor the xPL protocol:
SCRIPTS_BASE_DIR=/home/control/Documents/Controls $SCRIPTS_BASE_DIR/xpl-monitor.pl -vf
If the eibd
daemon isn't running, launch it in a second window:
su control eibd -S -D -i -d ipt:192.168.1.204
Then launch the eibd
monitor:
groupsocketlisten ip:localhost
In another terminal window, start the xPL EIB writer:
su control SCRIPTS_BASE_DIR=/home/control/Documents/Controls $SCRIPTS_BASE_DIR/xpl-eib-eibdWrite.pl -v -n home
Open yet another terminal and send a message to the EIB tunnelling server:
su control SCRIPTS_BASE_DIR=/home/control/Documents/Controls $SCRIPTS_BASE_DIR/xpl-send.pl -v -t cmnd -d dspc-eib.home -c eib.basic group='1/1/1' data=0x01
This should turn on EIB device 1/1/1
.
The groupsocketlisten
window should show the eibd
write command.
Test xPL EIB reader
Open a first terminal window (on any machine with xPL installed) and monitor the xPL protocol:
SCRIPTS_BASE_DIR=/home/control/Documents/Controls $SCRIPTS_BASE_DIR/xpl-monitor.pl -vf
If the eibd
daemon isn't running, launch it in a second window:
su control eibd -S -D -i -d ipt:192.168.1.204
Then start the xPL EIB reader:
SCRIPTS_BASE_DIR=/home/control/Documents/Controls groupsocketlisten ip:localhost | $SCRIPTS_BASE_DIR/xpl-eib-eibdRead.pl -v -n home
Push on an EIB button or send a message to the EIB tunnelling server:
su control SCRIPTS_BASE_DIR=/home/control/Documents/Controls $SCRIPTS_BASE_DIR/xpl-send.pl -v -t cmnd -d dspc-eib.home -c eib.basic group='1/1/1' data=0x01
The EIB activity should appear in the xpl-monitor.pl
window.
Launch the xPL EIB writer at startup
The EIB writer is to be launched after the xPL hub.
Ubuntu
Edit /etc/init/xpl-eibWriter.conf
:
################################################################################ # xPL EIB writer, interfaces to an eibd daemon # description "xPL EIB writer" version "1.0" author "Francois Corthay" #------------------------------------------------------------------------------- # Configuration variables # env SCRIPTS_DIR='/home/control/Documents/Controls' env SCRIPT_NAME='xpl-eib-eibdWrite.pl' env PARAMETERS='-n home' #------------------------------------------------------------------------------- # Start and stop conditions # start on xpl-hub_started stop on shutdown respawn setuid control setgid users #------------------------------------------------------------------------------- # Start eibd daemon before the writer # pre-start script /usr/bin/eibd -S -D -i -d ipt:192.168.1.204 end script #------------------------------------------------------------------------------- # Start daemon # exec $SCRIPTS_DIR/$SCRIPT_NAME $PARAMETERS
Start the device and test it:
su root killall eibd service xpl-eibWriter start su control SCRIPTS_BASE_DIR=/home/control/Documents/Controls $SCRIPTS_BASE_DIR/xpl-send.pl -v -t cmnd -d dspc-eib.home -c eib.basic group='1/1/1' data=0x01 $SCRIPTS_BASE_DIR/xpl-send.pl -v -t cmnd -d dspc-eib.home -c eib.basic group='1/1/1' data=0x00
Reboot the PC and check for the daemons:
ps ax | grep -i xpl | grep -v grep initctl list | grep xpl