Difference between revisions of "EIB/KNX with eibd"

From LinuxMCE
Jump to: navigation, search
(Use EIBd)
(note on problematic IP gates and the need for eibd 0.0.5 and --no-tunnel-client-queuing)
Line 24: Line 24:
 
** Add a multicast route: route add 224.0.23.12 dev eth0 (eth0 is the network the KNX/IP interface is connected to
 
** Add a multicast route: route add 224.0.23.12 dev eth0 (eth0 is the network the KNX/IP interface is connected to
 
** Start eibd with /usr/bin/eibd -D -T -R -S -i -u --daemon=/var/log/eibd.log ipt:10.1.2.179 (10.1.2.179 is the IP address of the KNX/IP interface
 
** Start eibd with /usr/bin/eibd -D -T -R -S -i -u --daemon=/var/log/eibd.log ipt:10.1.2.179 (10.1.2.179 is the IP address of the KNX/IP interface
 +
=== Problems with some KNX/IP gates ===
 +
If you have a problem with multiple commands not getting through, make sure you run at least eibd 0.0.5 AND add --no-tunnel-client-queuing to the startup script for eibd.
  
 
=== Use ETS to talk to the KNX in parallel with LinuxMCE ===
 
=== Use ETS to talk to the KNX in parallel with LinuxMCE ===

Revision as of 17:08, 11 April 2011

Version Status Date Updated Updated By
710 Unknown N/A N/A
810 Unknown N/A N/A
1004 Unknown N/A N/A
1204 Unknown N/A N/A
1404 Unknown N/A N/A
Usage Information

what

this page is an help one, made up to install the version of EIB that i started to make
the aim is to install an EIB version which can be uses several devices: ip, usb,...
the physical part issupported by the eibd program.

Hardware Compatibility

The eibd project has a wiki with lots of hardware compatibility information.

installing eibd

look here:

http://www.auto.tuwien.ac.at/~mkoegler/index.php/eibdeb

i link the page in case they want to modify it.. thus this page doesn't have to be modified too

  • Add the sources.list entry highlighted above
  • apt-get install bcusdk
  • Executing eibd --help will give a list of commandline options
  • To have eibd talk to a KNX/IP interface two things need to happen
    • Add a multicast route: route add 224.0.23.12 dev eth0 (eth0 is the network the KNX/IP interface is connected to
    • Start eibd with /usr/bin/eibd -D -T -R -S -i -u --daemon=/var/log/eibd.log ipt:10.1.2.179 (10.1.2.179 is the IP address of the KNX/IP interface

Problems with some KNX/IP gates

If you have a problem with multiple commands not getting through, make sure you run at least eibd 0.0.5 AND add --no-tunnel-client-queuing to the startup script for eibd.

Use ETS to talk to the KNX in parallel with LinuxMCE

The good thing about the eibd daemon is its routing capabilities. This allows multiple clients to talk to the eibd, and the eibd talks to the KNX interface. In ETS you have to configure a communication interface of type KNXnet/IP, name it however you like, and put the IP address of the machine eibd is running on.

installation of EIB

LinuxMCE 0810 alpha

No device data needed but you need to make sure that eibd is running. The driver is in the src/EIB-eibd directory of the 0810 branch.

linuxmce 710

you first need to get a partially compiled version of linuxmce 710, and its sources. you may have problems doing so, but if the libs are compiled there is no actual matter. see Compiling from 710 sources to get one.
when it's done, grab the file at

http://mantis.linuxmce.org/view.php?id=4299

(you need to create an account, until someone releases it )
then untar it and copy it instead of the former EIB sources.(rename them to be able to get them later, just in case).

then you must connect to lmce webadmin, and go in advanced=> templates. here modify the EIB template, so it has the following parameters:

bus type
bus address

both must be string. type must be one of:

  • ft12
  • bcu1
  • tpuart24
  • tpuart
  • ip
  • ipt
  • bcu1s
  • tpuarts
  • usb

address is required for ip, ipt and usb
(type in console eibd --help for details.)

now you must compile and run sql2cpp: place yourself in the source folder, run

cd sql2cpp; make; ./sql2cpp

and you template modifications are recorded you just have to place yourself in the EIB source folder, type

make

to get the EIB programm. rename the former one in /usr/pluto/bin (such as old_EIB) and move the one you compiled instead. restart your lmce router

dont forget to modify the existing EIB so that it has good launching parameters!

Use EIBd

  • Add the EIB device to your device tree
  • Don't use the EIB Submenu to add devices, but use the regular lighting etc devices.
  • Start the eibd - for example if you use a KNX/IP gate the following line in /etc/rc.local is helpful
/usr/bin/eibd -D -T -R -S -i -u --eibaddr=0.0.1 --daemon=/var/log/eibd.log ipt:10.1.2.179 

Adding a light switch

For a regular on/off light this is device template 37

  • In ETS you need to create two new group addresses.
    • One group address to on/off the device (let's assume 0/0/1)
    • One group address to read the status of the device (let's assume 0/0/2)
  • In the newly added device of device template 37, the channel has to be on-off-GA|status-GA, i.e. in our example it would be 0/0/1|0/0/2.

Adding drape control

For a drapes switch we use the device template 68 (the drapes switch is also under lights)

  • In ETS you need to create four new group addresses.
    • One group address to open the drapes a specific percentage (let's assume 0/0/3)
    • One group address to read the open percentage (let's assume 0/0/4)
    • One group address to open/close the drapes (let's assume 0/0/5)
    • One group address to stop the drapes movements (let's assume 0/0/6)
  • In the newly added device of device template 68, the channel has to be open%-GA|open-amount-status-GA|open-close-GA|stop-movement-GA, i.e. in our example it would be 0/0/3|0/0/4|0/0/5|0/0/6

Adding a motion sensor (or any type of sensor)

All sensors basically work the same way. But specifying the right sensor type allows some LinuxMCE magic to happen.

  • In ETS create a new group that gets the information from the sensor
  • Create a new device using any of the device templates in the sensor group
  • Put GA address into the channel. The format is again x/x/x
  • Done

Send time/date to KNX

http://www.hoerndlein.de/cms/attachments/eibtime.pl

Links

https://www.auto.tuwien.ac.at/%7Emkoegler/index.php/eibd