-
Notifications
You must be signed in to change notification settings - Fork 130
EIBHowTo
If you want to communicate with the EIB, you have two main possibilities.
You can install a BCU1 kernel driver (http://www.auto.tuwien.ac.at/%7Emkoegler/index.php/eibdriver) on your Linux machine and talk directly to that driver. For that you have to set the configuration parameter eib_device to the name of the device file: eib_device = /dev/eib
Or you can install somewhere (in the net) an eibd (http://www.auto.tuwien.ac.at/%7Emkoegler/index.php/eibd) and talk to this deamon via network. Set eib_device = ip:localhost to talk to an eibd on the same machine where MH runs. This way you can also run MH under MS-Windows and eibd on another machine under Linux.
eibd can use several backends, i.e. ways to communicate with the EIB. The most important here is the PEI16 communication which uses the same kernel driver as above or the PEI10 communication which needs a BCU2, but works very reliable.
Please see the documentation on http://www.auto.tuwien.ac.at/%7Emkoegler/index.php/eibd for more information about eibd and its backends.
The protocol "local" is not implemented.
The bcusdk is made to develop software for BCUs. If you only want to use eibd please follow the following guide to create eibd only. Do everything as root.
- Download pthsem: wget http://www.auto.tuwien.ac.at/%7Emkoegler/pth/pthsem-2.0.5.tar.gz
- Unpack it: tar xvzf pthsem-2.0.5.tar.gz
- Build it: ( cd pthsem-2.0.5 ; ./configure ; make install)
- Download bcusdk: wget http://www.auto.tuwien.ac.at/%7Emkoegler/eib/bcusdk-0.0.1.tar.gz
- Unpack it: tar xvzf bcusdk-0.0.1.tar.gz
- Build it: ( cd bcusdk-0.0.1 ; ./configure --enable-onlyeibd --enable-ft12 --enable-pei16 --enable-eibnetip --enable-eibnetipserver ; make install )
To start eibd to allow connections via network; using ft12 backend (BCU2 only): eibd -i ft12:/dev/ttyS1 -S -D Be aware that it may be unsecure to allow connections to eibd from the internet!
To define EIB_Items follow the instructions in code/examples/eib_items.mht. You can also add EIB items via the normal item editor http://localhost:8080/bin/items.pl.
You could check the functionallity of your EIB from the command line through the following command:
- Display any received EIB Messages on Console:
- vbusmonitor1 ip:127.0.0.1 (IP of the host of your eibd daemon)
- Set a group address (use one of your actors)
- groupswrite ip:127.0.0.1 1/2/3 0 (1/2/3 is the Group Address) (0/1is on or off)
- If you dont get the current status (or any messages) back from the EIB Bus (if you connecting to a USB EIB Interface) the following commands may help to fix it:
- Stop "eibd" deamon
- bcuaddrtab -w 0 usb:2:3 (you have to use your USB address of the EIB connection)
- Start "eibd" daemon