Difference between revisions of "Bash dce knx"
(Added note about needing debhelper) |
|||
Line 59: | Line 59: | ||
== Configure == | == Configure == | ||
− | Go into the pluto-admin website, in Interfaces, and add a EIB device | + | #Go into the pluto-admin website, in Interfaces, and add a EIB device |
− | Edit the EIB device template, and make the command line field say KNX.sh | + | ##Edit the EIB device template, and make the command line field say KNX.sh |
− | Set the serial port to the corresponding USB port (last time there was just one serial usb adaptor: that of the SIM-KNX device). | + | ##Set the serial port to the corresponding USB port (last time there was just one serial usb adaptor: that of the SIM-KNX device). |
− | + | #Go in Lights, add a on/off light. Set its room. Write "$00 $03" (w/o the quotes) in the "Port/Channel number" Device Data | |
− | Go in Lights, add a on/off light. Set its room. Write "$00 $03" (w/o the quotes) in the "Port/Channel number" Device Data | + | #Go in Climate, add a Generic Thermostat. Set its room. Write "$$ $32" (double dollar sign is correct, w/o the quotes) in the "Port/Channel number" Device Data |
− | + | #Setup the floorplans. | |
− | Go in Climate, add a Generic Thermostat. Set its room. Write "$$ $32" (double dollar sign is correct, w/o the quotes) in the "Port/Channel number" Device Data | + | #Reboot, (regen?) and it should work ;-) |
− | + | ||
− | Setup the floorplans. | + | |
− | + | ||
− | Reboot, (regen?) and it should work ;-) | + | |
[[User:Totallymaxed|Totallymaxed]] 06:52, 16 September 2008 (PDT) | [[User:Totallymaxed|Totallymaxed]] 06:52, 16 September 2008 (PDT) |
Revision as of 07:42, 3 April 2009
This page describes how to use the bash based DCE-KNX software to communicate with KNX devices attached to EIB Bus that has been interfaced to your Core. Its fully bi-directional and can be easily extended as apart from a small C program it is written totally in bash. The docs here are far from complete but should enable you to add this capability to your Core and interface to the EIB bus. More docs to follow ;-)
This code currently only works with SIM-KNX (Serial Interface Module for KNX) and you will need one of these interfaces attached to the EIB bus you want your Core to communicate with.
Install the packages
Make a directory for bash-dce-knx
cd /home <return> mkdir bash-dce-knx <return> cd bash-dce-knx <return> wget http://diapub.com/files/bash-dce-knx.tgz <return> tar -xzvf bash-dce-knx.tgz <return>
cd into the bash-dce-knx directory;
Now go and get the LinuxMCE sources...from the console type;
mkdir sources <return> cd sources <return> svn co http://svn.linuxmce.org/svn/branches/LinuxMCE-0710/src/ <return>
posde Someone please verify, that this works with TRUNK. If not, replace trunk with branch/LinuxMCE-0710
cp /usr/pluto/lib/* src/lib <return>
To compile the DCE whisperer, you have to set, and export, the DCE_PATH variable first to the location of the pluto/src directory on your system.
export DCE_PATH=/home/bash-dce-knx/pluto/src <return>
if using the charonmedia trunk use;
export DCE_PATH=/home/bash-dce-knx/trunk/src <return>
After DCE_PATH is set, and exported, you can build the package with this command, in the DCE-whisperer directory:
sudo apt-get install debhelper <return> dpkg-buildpackage -rfakeroot -b -us -uc <return>
The DCE-whisperer package is used by the sample KNX device to talk to the DCE framework. It still has some problems: it is unable to reply to messages. Their also isn't any bash framework in place, so the KNX.sh script, in the dianemo-knx directory, implements a crude framework for talking to DCE and the serial bus. KNX.sh also makes use of the fdselect program, so it can do something that other programming languages did for ages: test file descriptor status and know exactly which one requires attension. It only implements the "read fd" parameter of the select(2) C function, as the rest are not needed for this application.
Other requirements: socat
apt-get install socat <return>
Configure
- Go into the pluto-admin website, in Interfaces, and add a EIB device
- Edit the EIB device template, and make the command line field say KNX.sh
- Set the serial port to the corresponding USB port (last time there was just one serial usb adaptor: that of the SIM-KNX device).
- Go in Lights, add a on/off light. Set its room. Write "$00 $03" (w/o the quotes) in the "Port/Channel number" Device Data
- Go in Climate, add a Generic Thermostat. Set its room. Write "$$ $32" (double dollar sign is correct, w/o the quotes) in the "Port/Channel number" Device Data
- Setup the floorplans.
- Reboot, (regen?) and it should work ;-)
Totallymaxed 06:52, 16 September 2008 (PDT)