|
|
| (5 intermediate revisions by one user not shown) |
| Line 1: |
Line 1: |
| − | The EIB / KNX bus can be accessed in multiple ways. | + | The EIB / KNX bus can be accessed in multiple ways: |
| − | I use a [http://www.tapko.de/sim-knx.html Tapko EIB/KNX to RS232 converter].
| + | * a [https://www.tapko.de/products/detail/sim-knx-devices Tapko EIB/KNX to RS232 converter] allows to control the bus [[Install EIB Tapko|via a serial port]]. |
| − | It requires following connections:
| + | * a [https://hit.sbt.siemens.com/HIT/fs_global.aspx?&MODULE=Catalog&ACTION=ShowProduct&KEY=5WG1146-1AB02 Siemens EIB/KNX IP Router] allows to control the bus [[Install EIB eibd|via Ethernet]]. |
| − | RxD (pin 2), TxD (pin 3), DTR (pin 4, powers the device), Gnd (pin 5).
| + | |
| | | | |
| − | Before all, make sure you have installed an [[install xpl hub|xPL hub]] and an [[install serial port|xPL serial port device]].
| + | Links: |
| | + | * [https://sarwiki.informatik.hu-berlin.de/KNXD_Tutorial Humboldt Universität KNXD Tutorial] |
| | | | |
| − | = Install xPL EIB bridge =
| + | [[Category: all]] [[Category: install]] [[Category: xPL]] |
| − | | + | |
| − | Download the [http://www.dspc.ch/xPL/Downloads/xpl-eib-Tapko.pl Tapko EIB bridge] script.
| + | |
| − | | + | |
| − | Move the script to xPL scripts directory:
| + | |
| − | SCRIPTS_BASE_DIR=/home/control/Documents/Controls
| + | |
| − | mv xpl-eib-Tapko.pl $SCRIPTS_BASE_DIR
| + | |
| − | chown control:users $SCRIPTS_BASE_DIR/*.pl
| + | |
| − | chmod 775 $SCRIPTS_BASE_DIR/*.pl
| + | |
| − | | + | |
| − | = Test xPL EIB bridge =
| + | |
| − | | + | |
| − | The test is shown here on a Linux machine such as a [[install BeagleBone|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 [[install serial port|xPL serial port device]] isn't running, launch it in a second window:
| + | |
| − | su control
| + | |
| − | SCRIPTS_BASE_DIR=/home/control/Documents/Controls
| + | |
| − | ll /dev/ttyO*
| + | |
| − | $SCRIPTS_BASE_DIR/xpl-serial_port.pl -h
| + | |
| − | $SCRIPTS_BASE_DIR/xpl-serial_port.pl -v -n eib -e '\x0A\x0D' /dev/ttyO1 baudrate 9600 databits 8 parity none stopbits 1 handshake none
| + | |
| − | | + | |
| − | Open a further terminal window and start the xPL EIB bridge:
| + | |
| − | SCRIPTS_BASE_DIR=/home/control/Documents/Controls
| + | |
| − | $SCRIPTS_BASE_DIR/xpl-eib-Tapko.pl -v -n home -s dspc-serPort.eib -v
| + | |
| − | | + | |
| − | Open yet another terminal and send a message to the EIB bridge:
| + | |
| − | 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 <code>1/1/1</code>.
| + | |
| − | The monitor window should show how the EIB budge message triggered a serial port message
| + | |
| − | for the [http://www.tapko.de/sim-knx.html Tapko EIB/KNX to RS232 converter].
| + | |
| − | | + | |
| − | = Launch the xPL serial port device at startup =
| + | |
| − | | + | |
| − | The EIB bridge is to be launched after the xPL serial port device
| + | |
| − | which in turn is to be launched after the xPL hub.
| + | |
| − | | + | |
| − | Installing the serial port device to launch at system boot is described in the
| + | |
| − | [[install serial port#Launch the xPL serial port device at startup|xPL serial port]] page.
| + | |
| − | | + | |
| − | == Ubuntu ==
| + | |
| − | | + | |
| − | On Ubuntu, the xPL serial port device emits <code>xpl-eibSerialPort_started</code> at startup.
| + | |
| − | This will be used to state-up the xPL EIB bridge.
| + | |
| − | | + | |
| − | Edit <code>/etc/init/xpl-eib.conf</code>:
| + | |
| − | ################################################################################
| + | |
| − | # xPL EIB bridge, interfaves to a Tapko serial port
| + | |
| − | #
| + | |
| − | description "xPL EIB bridge"
| + | |
| − | version "1.0"
| + | |
| − | author "Francois Corthay"
| + | |
| − |
| + | |
| − | #-------------------------------------------------------------------------------
| + | |
| − | # Configuration variables
| + | |
| − | #
| + | |
| − | env SCRIPTS_DIR='/home/control/Documents/Controls'
| + | |
| − | env SCRIPT_NAME='xpl-eib-Tapko.pl'
| + | |
| − | env PARAMETERS='-n home -s dspc-serPort.eib'
| + | |
| − |
| + | |
| − | #-------------------------------------------------------------------------------
| + | |
| − | # Start and stop conditions
| + | |
| − | #
| + | |
| − | start on xpl-eibSerialPort_started
| + | |
| − | stop on shutdown
| + | |
| − | respawn
| + | |
| − | setuid control
| + | |
| − | setgid users
| + | |
| − |
| + | |
| − | #-------------------------------------------------------------------------------
| + | |
| − | # Start daemon
| + | |
| − | #
| + | |
| − | exec $SCRIPTS_DIR/$SCRIPT_NAME $PARAMETERS
| + | |
| − | | + | |
| − | Start the device and test it:
| + | |
| − | su root
| + | |
| − | service xpl-eib status
| + | |
| − | initctl emit xpl-eibSerialPort_started
| + | |
| − | service xpl-eib status
| + | |
| − |
| + | |
| − | 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
| + | |
| − | | + | |
| − | == Mac OS ==
| + | |
| − | | + | |
| − | On Mac OS, the xPL EIB bridge starts-up later than the xPL serial port.
| + | |
| − | | + | |
| − | Edit <code>/Library/LaunchDaemons/eib.plist</code>:
| + | |
| − | <?xml version="1.0" encoding="UTF-8"?>
| + | |
| − | <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
| + | |
| − | <plist version="1.0">
| + | |
| − | <dict>
| + | |
| − | <key>Label</key>
| + | |
| − | <string>xPL EIB bridge</string>
| + | |
| − | <key>OnDemand</key>
| + | |
| − | <false/>
| + | |
| − | <key>UserName</key>
| + | |
| − | <string>control</string>
| + | |
| − | <key>ProgramArguments</key>
| + | |
| − | <array>
| + | |
| − | <string>/Users/control/Documents/Controls/xpl-eib-Tapko.pl</string>
| + | |
| − | <string>-n</string>
| + | |
| − | <string>home</string>
| + | |
| − | <string>-s</string>
| + | |
| − | <string>dspc-serPort.eib</string>
| + | |
| − | <string>-w</string>
| + | |
| − | <string>30</string>
| + | |
| − | </array>
| + | |
| − | </dict>
| + | |
| − | </plist>
| + | |
| − | | + | |
| − | Start the device and test it:
| + | |
| − | su root
| + | |
| − | launchctl load /Library/LaunchDaemons/xpl-eib.plist
| + | |
| − |
| + | |
| − | SCRIPTS_BASE_DIR=/Users/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 Mac and check for the daemons:
| + | |
| − | ps ax | grep -i xpl | grep -v grep
| + | |
| − | launchctl list | grep xPL
| + | |
| − | | + | |
| − | [[Category: install]] [[Category: xPL]] | + | |