Raspberry PI: EIB/KNX IP Gateway and Router

Hi,

this Post is a tutorial to build an IP EIB/KNX Gateway based on a Raspberry Pi completely from the scratch. The core components are the eib daemon from the bcusdk in conjunction with the TPUART EIB Bustranceiver module.

The Hardware

3 components are needed:

  • A Raspberry PI
  • A EIB Buscoupling Unit
  • Adapter Board to connecting both

You can use A or the B Model of Raspberry Pi. The eibd daemon has minimal hardware requirements.

There are two possibilities for connecting a computer to the EIB/KNX Bus over a RS232 serial interface. Both are supported by eibd.

  • Buscoupler 2 with FT12 protocol
  • TPUART module


I use the second one. It has the best price and is stablest solution.  You can buy the TPUART modul decretely for about 40€ or you order a Siemens Bustranceiver Module BTM UP117 5WG1117-2AB11 where a TPUART module is inside and which is available for about 25€ :-).

Siemens Bus Tranceiver Module BTM BU117
Siemens Bus Tranceiver Module BTM BU117
Advertisment to support michlstechblog.info

For connecting the TPUART module to the fruit I developed a adapter board which also provides galvanic isolation between EIB bus and Ethernet Network.
The galvanic isolation is done by a ADUM1201 Analog devices dual-channel digital isolator.
The board has a 10 Pin header which is pin compatible with the Raspberry and another 10 pin header to plug-on the TPUART.

Raspberry Pi KNX Board Top
Raspberry Pi KNX Board Top

The Schematic and PCB are available in Eagle format and can be downloaded above.

Raspberry Pi KNX Board Schematic
Raspberry Pi KNX Board Schematic
Raspberry Pi KNX Board Layout
Raspberry Pi KNX Board Layout

The part list of the board is very short 🙂 The screwed connection on the board an be used to suppling the Raspberry Pi with 5V.

Part Device Type Costs
IC1 Integrated Circuit ADUM1201 2,50€
C2 Capacitor 1µF 10Cent
C3 Capacitor 10µF 10Cent
J1,J2 Header 10pin header 50Cent

Connect the Raspberry pi KNX Board

Raspberry KNX IP Gateway/Router
Raspberry KNX IP Gateway/Router
Advertisment to support michlstechblog.info

The Software part

Update: eibd is no longer under development please install knxd.
Install Raspbian as operating system for Rasperry Pi. All developing tools to compile the eibd daemon are already included. For the current version you need a SD card with at least 4GB. The installation of rapbian is described here in detail. Its simple:-)

When your operating system is up, login as user pi and set a static IP Address to ensure the gateway is always reachable at the same IP Address.

For Debian 7 Wheezy edit the following files with your favorite editor. For me its vi :-). For Debian 8 and systemd based network configuration scroll down.

pi@raspberry~: $ sudo vi /etc/network/interfaces

comment the following line

# iface eth0 inet dhcp

insert your static TCP/IP parameter.

allow-hotplug eth0
iface eth0 inet static
address 192.168.2.150
netmask 255.255.255.0
gateway 192.168.2.1

On Debian 8 Jessie also add the route to the eibnet mulicast address (in debian wheezy this is set by the init script) and set the interface eth0 from “allow-hotplug” to “auto” so it will not be handled by systemd, to activate the old style debian network config.

auto eth0
iface eth0 inet static
address 192.168.2.150
netmask 255.255.255.0
gateway 192.168.2.1
post-up route add -net 224.0.23.12 netmask 255.255.255.255 eth0
pre-down route del -net 224.0.23.12 netmask 255.255.255.255 eth0

adjust address, subnetmask and gateway. Open /etc/resolv.conf to set a DNS Server. In home environments this is usually the DSL Router.

pi@raspberry~: $ sudo vi /etc/resolv.conf


nameserver 192.168.2.1

Reboot your device and login again. I preferred a remote login over ssh from my workstation.
I wrote a script install_eibd.sh which compiles and installs the eibd daemon. You can download it below. The script needs an active internet connection. Check the connection

Network configuration for Debian 8 Jessie
pi@raspberry~: $ sudo su -
root@raspberry:~#

Create new file /etc/systemd/network/eth0.network. Name is not importend, just the prefix network.

[Match]
# You can also use wildcards. Maybe you want enable dhcp
# an all eth* NICs
Name=eth0
[Network]
#DHCP=v4
# static IP
# 192.168.100.2 netmask 255.255.255.0
Address=192.168.100.2/24
Gateway=192.168.100.1
DNS=192.168.100.1
# Route for Multicast Address EIB/KNX
[Route]
Destination=224.0.23.12/32

Disable the old way to configure the network, enable systemd based network configuration, enable systemd generated resolve.conf (DNS resolution) and disable dhcpcd.

root@raspberry:~# mv /etc/network/interfaces /etc/network/interfaces.save
root@raspberry:~# systemctl enable systemd-networkd.service
root@raspberry:~# systemctl enable systemd-resolved.service
root@raspberry:~# systemctl disable dhcpcd.service

Set an link from the system wide resolve.conf to systemd

root@raspberry:~# mv /etc/resolv.conf /etc/resolv.conf.save
root@raspberry:~# ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf

Reboot to get the config active

root@raspberry:~# reboot
Check the connection.
pi@raspberry~: $  ping -c 2 www.heise.de
PING www.heise.de (193.99.144.85) 56(84) bytes of data
64 bytes from 193.99.144.85: icmp_req=1 ttl=128 time=8.551 ms
64 bytes from 193.99.144.85: icmp_req=2 ttl=128 time=9.680 ms

--- 193.99.144.85 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1002ms
rtt min/avg/max/mdev = 0.551/0.615/0.680/0.069 ms

Note: Some rasbian version has a bug that the permissions for /bin/ping were not set correctly. The following error occurs: “ping: icmp open socket: Operation not permitted”. The setuid on /bin/ping is missing, because only root can open sockets.

pi@raspberry~: $ sudo chmod u+s /bin/ping

Installing eibd
The script must be run as root because some files are copied and modified in locations where only root have the appropriate permissions.

What the script does:

  • Check for root permissions
  • Download and compile pthsem
  • Download bcusdk, but compile eibd only
  • installing eibd binaries to /usr/local/bin
  • create a init script /etc/init.d/eibd
  • Add a user eibd with group membership dialout (to access serial device /dev/ttyAMA0)
  • Disable bootmessages on serial interface /dev/ttyAMA0
  • Disable console on serial interface /dev/ttyAMA0
  • Disable console on serial interface /dev/ttyAMA0
  • On Raspberry Pi 3 it disable the bluetooth module because its uses ttyAMA0 by default

On a Raspberry Pi 3 it is strongly recommended to update to the latest Kernel to addressing some issues with the serial device ttyAMA0

pi@raspberry~: $ sudo su
root@raspberry~: # rpi-update
root@raspberry~: # reboot

Start a root shell, get the script.

pi@raspberry~: $ sudo su
root@raspberry~: #
root@raspberry~: # wget http://michlstechblog.info/blog/download/shell_scripts/install_eibd.sh

The highlighted eibd features are enabled. Alter the script if you need additional features.
–enable-ft12         enable FT1.2 backend
–enable-pei16        enable BCU1 kernel driver backend
–enable-tpuart       enable TPUART kernel driver backend (deprecated)
–enable-pei16s       enable BCU1 user driver backend (very experimental)
–enable-tpuarts      enable TPUART user driver backend
–enable-eibnetip     enable EIBnet/IP routing backend
–enable-eibnetiptunnel       enable EIBnet/IP tunneling backend
–enable-usb                  enable USB backend
–enable-eibnetipserver       enable EIBnet/IP server frontend
–enable-groupcache           enable Group Cache (default: yes)
–enable-java         build java client library

Start the script. This should be run about 20 minutes. Do not execute update-rc.d on debian jessie.

root@raspberry~: # chmod +x ./install_eibd.sh
root@raspberry~: # ./install_eibd.sh && update-rc.d eibd defaults

After the script has finished. eibd, vbusmonitor2, groupwrite and some other stuff should be installed at /usr/local/bin, the init script eibd in /etc/init.d and the startup links in /etc/rc3.d must exists. At the end of the script a warning message “insserv: warning: script ‘mathkernel’ missing LSB tags and overrides” is shown. This can be ignored.

root@raspberry~: # ls -l /usr/local/bin
.....
-rwxr-xr-x 1 root staff 471140 Feb 18 22:14 eibd
-rwxr-xr-x 1 root staff  10788 Feb 18 22:14 vbusmonitor2
.....
root@raspberry~: # ls -l /etc/init.d/eibd
-rwxr--r-- 1 root root 2142 Feb Feb 18 22:14 /etc/init.d/eibd

root@raspberry~: # ls -l /etc/rc3.d/*eibd
lrwxrwxrwx 1 root root 14 Feb 18 22:14 /etc/rc3.d/S18eibd -> ../init.d/eibd

Reboot your device

root@raspberry~: # reboot

The eibd options and features are defined at variable EIBD_OPTIONS in file /etc/init.d/eibd. Currently are defined:

  • EIB Busaddress of the daemon 1.1.128
  • EIBnet/IP server
  • EIBnet/IP Routing
  • EIBnet/IP Tunneling
  • Answer discovery and description requests
  • Listen on UNIX domain socket /tmp/eib
  • Listen on TCP port, default 6720

This gets a detail list of command line parameter

root@raspberry~: # eibd -?

After the reboot and if your Raspberry KNX Board is connected the eibd should running

root@raspberry~: # ps ax|grep eibd
2996 ?        Ss     0:00 /usr/local/bin/eibd -d -D -T -R -S -i -u --eibaddr=1.1.128 tpuarts:/dev/ttyAMA0

If the process is running. Check if you see EIB packets on wire.

pi@raspberry~: # vbusmonitor1 ip:localhost
LPDU: BC 11 17 00 03 C1 00 81 06 :L_Data low from 1.1.23 to 0/0/3 hops: 04 T_DATA_XXX_REQ A_GroupValue_Write (small) 01 LPDU: CC :ACK
LPDU: BC 11 17 00 03 81 00 81 46 :L_Data low from 1.1.23 to 0/0/3 hops: 00 T_DATA_XXX_REQ A_GroupValue_Write (small) 01 LPDU: CC :ACK

Thats it. Comments are welcome!

I’ve writted another post if you want to use Raspberry Pi and eibd with a KNX USB Interface.

Update 09.06.2016: I’ve added the first release of a script to compile and install knxd. knxd is a fork of eibd. Any comments are welcome. Configfile is /etc/default/knxd, Socket /tmp/knx. See this EIB/KNX Router with knxd

Enjoy

Michael

Advertisment to support michlstechblog.info

Raspberry Pi KNX Board Schematic and PCB
Raspberry Pi KNX Board Schematic and PCB
Raspberry-eibd.zip
Version: 1.0
51.4 KiB
2068 Downloads
Details...
Script to compile and install eibd on debian jessie
Script to compile and install eibd on debian jessie
install_eibd_systemd.sh
Version: 1.2.0
7.7 KiB
2460 Downloads
Details...
Script to compile and install eibd on debian wheezy
6.2 KiB
5166 Downloads
Details...

147 thoughts on “Raspberry PI: EIB/KNX IP Gateway and Router”

  1. Thanks for the post!
    I have been looking for some sort of home automation project. Z-wave seems to be most widely spread but I like the idea of the open source available with KNX/EIB.

    I’m keen to know if you have done any implementations of having the RPI control any KNX components?

  2. Hi!

    Thanks for the writeup. I tried it and it installed like a charm.
    Although, when I try to add
    –daemon=/var/log/eibd.log
    I get following error:
    [….] Starting eibd daemon: eibdCan not open file /var/log/eibd.log
    failed!

    Seems to be an issue with the startup permissions.
    Any idea how to resolve this?

    Thanks,
    Alex.

    1. Hi Alex,

      eibd starts as user eibd and therefore the daemon has no permissions to create a new file in /var/log. There are 2 possibilities:
      -Create the file manually and set the permissions to the file that the user eibd has access to it:

      touch /var/log/eibd
      chown eibd:eibd /var/log/eibd

      or place the file in the /tmp directory
      -–daemon=/tmp/eibd.log

  3. Hi Michael.

    Thank you very, very much for the great article.
    Just a confirmation to check if I got it right: This will provide me most of the functionality of a IP-KNX gateway just like for example the MTN680329, but at least will act like KNX/IP router (routing) and I can use it as a programming interface for ETS through LAN (server) or WAN (tunneling), am I correct??
    Last but not least, is it possible to run on the fruit in the same time a visualization server like IRIDIUM or this will conflict with the gateway functionality?
    Thank you in advance!

    1. Hi jetsetter,

      you can program (physical address, application, parameters) your KNX device through eibd with ETS and connection type KNXNet/IP(This is what I use). I do not know all technical details of the Merten interface but routing and tunneling are also possible so I think you can replace your Merten MTN680329 with eibd.

      eibd has a minimum on hardware requierments and therefore it should not be a problem to run some other programs on the same rapsberry, but as far as I know is iRidium a client only solution without any server component so there is nothing to install on the raspberry. Am I wrong?

      Michael

      1. No you are correct. I was just looking at the time for any possible solutions and I mixed up client-only Iridium with other RPi based ones like SmartHome.pi.
        Another question is, while searching to order my 1st RPi (model b) I understand that there are RTC external kits (as RPi don’t have one internal) like this http://www.farnell.com/datasheets/1707587.pdf but they are seem to connect to the same pins… Do you think this can be integrated too in your solution? An updated PCB board version to include also an RTC+batt would be awesome !!!

        1. Hi jetsetter, it’s possible to contect both, the TPUART and a RTC. TPUART uses RS232 interface and a RTC the I2C bus. So there is no conflict.
          Ok, I noticed that there are demands for RTC functions. By the way, an interesting feature of some RTC clocks is an alarm pin. This can be used to start the schedule the start of an Raspberry Pi, usefull if your Raspberry acts as VDR or PVR….I’ll think about it.

  4. Hi Michael, thanks for your post.
    I successfully followed your tutorial and I can see messages with vbusmonitor.
    Now I’m trying to use ETS 4 Demo to communicate with devices but when it send a message it’s try to reach a destination address x.y.z (dots) while if I try to send a command whit groupswrite I should use x/y/z (slash). So I think that ETS can’t reach the button because there is an address mistake (I think).
    Is it possible?
    Do you know how I can force ETS to use X/Y/Z address type?
    Is there a setting to tell EIBD to manage X.Y.Z address type?

    Here is an example with groupswrite

    groupswrite ip:localhost 1/6/49 1 -> OK

    LPDU: BC 11 C8 0E 31 F1 00 81 D5 :L_Data low from 1.1.200 to 1/6/49 hops: 07 T_DATA_XXX_REQ A_GroupValue_Write (small) 01
    LPDU: CC :ACK

    groupswrite ip:localhost 1.6.49 1 -> KO

    LPDU: BC 11 C8 00 01 F1 00 81 EB :L_Data low from 1.1.200 to 0/0/1 hops: 07 T_DATA_XXX_REQ A_GroupValue_Write (small) 01
    LPDU: CC :ACK

    ETS to check device info

    LPDU: B0 11 C8 16 31 51 43 00 A3 :L_Data system from 1.1.200 to 1.6.49 hops: 05 T_DATA_CONNECTED_REQ serno:00 A_DeviceDescriptor_Read Type:00
    LPDU: 90 11 C8 16 31 51 43 00 83 :L_Data (repeated) system from 1.1.200 to 1.6.49 hops: 05 T_DATA_CONNECTED_REQ serno:00 A_DeviceDescriptor_Read Type:00
    LPDU: 90 11 C8 16 31 51 43 00 83 :L_Data (repeated) system from 1.1.200 to 1.6.49 hops: 05 T_DATA_CONNECTED_REQ serno:00 A_DeviceDescriptor_Read Type:00
    LPDU: 90 11 C8 16 31 51 43 00 83 :L_Data (repeated) system from 1.1.200 to 1.6.49 hops: 05 T_DATA_CONNECTED_REQ serno:00 A_DeviceDescriptor_Read Type:00
    LPDU: 0C :NACK

    Thanks, Luca

    1. Hi luca,

      x.x.x => physical address of a device
      x/x/x => Group address where multiple devices can listen respective write to.

      Oh, I see your next post you’ve already found explanation 🙂

      Michael

  5. hi Michael, now I understant the difference between group and single address.
    So my previous question is useless.

    Thanks

  6. Hi Micheal,

    thanks for this great idee- i just ordered the PI and a serial Rs232 Board to test it next week- But your idee is a lot smarter:-)

    But does it work with an KNX Powernet Module (Busch Jäger 6920- i have to look up the siemens product name) ??

    2nd: do you sell /ship the board? I left university some years ago and canot use eagle and the equipment there anymore…

    Thanks, Mart

    1. Hi Mart,

      eibd can also talk to BCUs version 1 (PEI16) or 2 (FT1.2).

      You have to enable the protocols in the install_eibd.sh script.
      –enable-ft12 enable FT1.2 backend. eibd Command line option ft12:/dev/ttyAMA0 instead of tpuarts…
      –enable-pei16 enable BCU1 kernel driver backend. eibd Command line option bcu1s:/dev/ttyAMA0 instead of tpuarts…
      Not sure but the BJ 6920 should be a BCU 1. Source: http://knx-user-forum.de/60990-post3.html

      I have no experience about the stability of those connections.

      Sorry, currently no plans sell any boards :-).

      Michael

  7. Hi Michael,

    First thanks for your blog post, very interesting how to and step-by-step instructions. Just found out a few things though:

    * In your script on line 40 you could use $BUSSDK_SOURCES instead of having the URL again
    * Line 140 doesn’t work with the current Raspbian image as the kgdboc parameter isn’t set anymore (i.e. the script works but it doesn’t have the desired effect). As of today the line should be:
    sed -e’s/ console=ttyAMA0,115200//g’ /boot/cmdline.txt –in-place=.bak

    Thanks!
    Thomas

    1. Hi Thomas,

      thank you for the hints. I splited the sed replacement in two sperate commands in beware of using an older raspbian image.
      Script is released as version 1.1

      Michael

  8. Hello,
    why are there capacitors in the circuit? I have seen cirtuits using the bus coupler and the ADUM1201 without them.

    Thank You,
    Alex

    1. Hi Alex,

      this is a preventiv measure. The capacitors are oscillation damper. Because I have no information about the voltage regulator inside the TPUART module.

      Michael

  9. Hi,

    can you please name the exact description of the capacitors
    (tech. specifications)?

    Thanks in advance.

    Greetings
    Florian

      1. The download on the page does indeed work. It was when I tried to use the wget command.
        But nevermind, it is running now.
        Anyway, thanks for the excellent work!

  10. hi Michael
    can this program send order to other device like on/off or variation …
    can u create an interface web to command system with the rasberry!!
    Thanks!
    khalil

      1. hi Michael
        first thank u for your help . second can u give me an exemple of the function ” groupswrite”
        thanks
        khalil

  11. Hi Michael,

    many thanks for your work. This is the only one script that run correctly from the init to the end and build all need for eibd daemon.
    I have build it in two Raspberry PI.
    A little mistake: the script end with:
    sed: can’t read inplace=.bak: No such file o directory
    but the daemon working fine.
    Best regards.
    Hans

  12. I have done it but I have not succesfully results.
    I want to use a Rasberry like a IP Router, I have change /etc/init.d/eibd options to have 1.1.0.
    I put a the same phisical address in ETSv3 software to the TPUART (ABB). But I have not data transmission between Raspberry an KNX bus.

    I need help, thanks.

      1. Hi Michael,

        the error is still there.

        “WordPress > Error : This file is currently offline.”
        I tried it for install_eibd.sh.

        The script install_eibd_usb.sh is accessable without errors.

        Any ideas?
        Thomas

        1. Perhaps I found the error:
          The link above links to the folder “shell_scripts”, the other links to “electronics”.

          Thomas

  13. hi Micheal !
    i try to understand your tuto so i have some issue . so you connect the rasberry with the knx installation through a Buscoupler 2 with FT12 protocol with the galvanic isolation . you install eibd so you can listen to the bus and groupewrite . first i don’t understand the role of daemon adresse , second can i use this configuration to make a knx web server !!

    1. Hi Issa,

      I connect to the bus using a TPUART module, this is not a BCU2 with FT1.2 or BCU1 with PEI16 protokoll. It has it’s own protocol.

      The daemon address is the KNX address which eibd uses to send.

      Yes you can use it to setup a Webserver for your KNX installation.

      Michael

  14. Bonjour ,
    J’ai un routeur proKNx , une carte raspberry pi et un module TxA213 .Et j suis vraiment bloquer .Comment est ce que je peux lier tout ces composants afin d’assurer un fonctionnement en serveur web du raspberry pi en passant par le routeur ProKNx et contrôler le module Txa213.
    Merci

  15. Thanks for the explanation how to build an interface for Raspberry Pi.
    Have a Q though. May be vary basic but I would like to know.

    1.) Is it true that you can add/insert this into an existing EIB/KNX installation? I mean, in the picture titled “Raspberry KNX IP Gateway/Router” I observed a EIB cable directly attached to your interface board. Is the EIB installation accepting this? Or should additional actions be executed?
    2.) How can you interface with the KNX installation and learn it’s configuration? The electrician didi not leave any EIB/KNX installation about my home. Can the interface board help to reconstruct the configuration? If so, how should I do that?

    Looking forward to your feedback. Keep up the good work.

    best regards,
    Bolko

    1. Hi Bolko,

      1.) Is it true that you can add/insert this into an existing EIB/KNX installation? I mean, in the picture titled “Raspberry KNX IP Gateway/Router” I observed a EIB cable directly attached to your interface board. Is the EIB installation accepting this? Or should additional actions be executed? => Yes this can be integrated in an exiting installation. The TPUART module has/is an BCU with a serial interface for communciation with the KNX bus.

      2.) How can you interface with the KNX installation and learn it’s configuration? The electrician didi not leave any EIB/KNX installation about my home. Can the interface board help to reconstruct the configuration? If so, how should I do that? => You can use ETS, eibd has also some command line tools (groupwrite…), or openhab, giras HomeServer, SmartVisu…..

      Reconstructing of an EIB Installation is very difficult. There should be some tools (EIB Doktor, EIB Reconstruction http://www.it-gmbh.de/en/products/knx-software/it-tools-for-ets3/reconstruction.html) which to the job,but I have no experience about that.

      Michael

  16. Bonjour Michael ,
    I have a proKNx router, raspberry pi card and TXA213 Module .And I am really blocked How can I bind all these components to ensure a functioning web server raspberry pi through the router ProKNx and control unit TXA213.

    1. Hi khali,

      am I right that you want to use the raspberry not as a EIB gateway but as Webserver/Visualisation and for connection to the KNX Bus the ProKNX router should be used? TXA213 is a Hager dimmer module?

      Michael

      1. hi Michael yes the target of this installation is to use the raspberry as webserver /visualition and the proKnx is used like a bridge to ensure the connection with the knx wire ( like a gateway) ! but i m not sure how to bind the raspberry with the proknx !!
        the raspbery and the pro should be connected to a switcher ip which is linked to a modem internet !!

  17. Hi Michael,
    I have successfully installed end on my raspberry, and my ETS could connect.
    I am able to load the device info initiated from the ETS.
    What I am missing is the so called bus monitor – it remains empty.
    It seems, that the bus traffic is not forwarded to the ETS.
    Do you know why?

  18. Nö,
    I am using a Berker USB interface.
    It seems, that ist has something to do with the address filter.
    For my understanding, is the address filter table loaded into the USB interface?

  19. Hi to all,
    I’have a strange problem and I’m going to explane clearly:
    until some days ago I was using a Raspberry Pi with a Busware Rot interface (TPUART) and all worked flawless with smarthome.pi last image.
    Now I have a new Raspberry Pi 2 with the new Busware Pigator TPUART interface. I upgrade the smarhome.pi image using the old Raspberry, putted into the new Raspberry Pi 2 and all work well too, except for one dettail:

    In ETS 4.2.0, when I use the function “download partial” i get this error:
    Code:
    Opening connection interface failed.
    No connection available.
    Any other function in ETS works correctly, the only limitation is that I have to use the “Download all” function each time I need to update a device, so I have to put the device into programming mode an then rewrite the physical address and the application. Group Monitoring also works well.

    Investigating on the problem I try to put the new Pigator TPUART interface into the old Raspberry (the old Rot interface does not fit into the new GPIO connector of Raspberry Pi 2) and the download partial command works well. So the problem should be related to something about the Raspberry hardware, because the knx interface is the same and the eibd software and configuration is identical.

    The parameters of eibd are exactely the same in both setup, this is the reply of ps aux | grep eibd:

    Code:
    admin 1736 0.0 0.1 3988 1848 ? Ss 21:49 0:00 /usr/bin/eibd –daemon –Server –Tunnelling –Discovery –GroupCache –listen-tcp –pid-file=/var/run/eibd.pid –eibaddr=0.1.250 tpuarts:/dev/ttyAMA0
    I can’t find out which is the problem..

    Anyone have some ideas?

    Thank you in advance, bye!

  20. Hello. Thank you for a great tutorial. I am able to connect the PI to the KNX system and I can see data in the vbusmonitor.

    However I have a problem with connecting to the eibd from a remote device. My application can successfully connect to the 6720 port and can send data to the eibd. The problem is, no data are being returned. I am pretty sure the sent packets are in the correct format.

    Is there any chance you know what’s wrong? Any help would be appreciated. Thank you in advance.

    1. Hi Richard,

      what’s about ETS? Does ETS work with your eibd (Groupmonitor, Programming devices…)?

      Which application does not work with eibd?

      Michael

      1. Hey, Michael.

        I will try ETS as soon as possible but it should work. I’ve designed an application which periodically requests data from certain KNX addresses and stores them into a file to be visualised later. My program can successfully connect to the Raspi’s 6720 port and send datagrams to it. The eibd is only responding with keepalive messages (a message with no data – length 0). There must be a problem within the eibd server.

  21. Hi,

    at first. AMAZING Job! Thanks a lot for this 🙂

    i have two questions.

    – is there any script / command which how i can test comminication with TPUART ? i want to be sure my work on adapter has been done correctly.

    – can you upload log from script install_eibd.sh? Maybe it will help me with debuging of my setup.

    thanks again and have a nice day .

    Pavel

    1. Hi Pavel,

      start eibd in a console without daemon mode. May be you have to switch user eibd with
      sudo su eibd
      eibd@pi $ /usr/local/bin/eibd -f 5 –trace=5 -D -T -R -S -i -u –eibaddr=1.1.128 tpuarts:/dev/ttyAMA0

      then send some pakets to an existing eib address and see if eib send an response
      eibd@pi $ groupwrite local:/tmp/eib 1.1.1 4

      Output
      Layer 2(00D7AC00,55A3976C) Open
      Layer 2(00D7AC00,55A3976C) Openend
      Layer 2(00D7AC00,55A3976C) open-reset(001): 01
      Layer 0(00DBCC80,55A3976C) Open
      Layer 0(00DBCC80,55A3976C) Openend
      Layer 2(00D7AC00,55A39856) Send L_Data low from 1.1.128 to 0/0/1 hops: 07 T_DATA_XXX_REQ A_GroupValue_Write 04
      Layer 0(00D7AC00,55A39856) Write(020): 80 BC 81 11 82 80 83 00 84 01 85 F2 86 00 87 80 88 04 49 A5
      Layer 0(00D7AC00,55A39857) Write(020): 80 BC 81 11 82 80 83 00 84 01 85 F2 86 00 87 80 88 04 49 A5
      Layer 0(00D7AC00,55A39858) Write(020): 80 BC 81 11 82 80 83 00 84 01 85 F2 86 00 87 80 88 04 49 A5
      Layer 0(00D7AC00,55A39858) Drop Send
      Layer 2(00D7AC00,55A39858) Watchdog Status(001): 02
      Layer 2(00D7AC00,55A39862) Watchdog Reset(001): 01
      Layer 2(00D7AC00,55A39862) Watchdog Status(001): 02

      In my example the TPUART does not respond (watchdog events occured because TPUART is not connected 😉 )

      – can you upload log from script install_eibd.sh? Maybe it will help me with debuging of my setup. => What do you mean in detail?

      Michael

  22. Hi Michael,

    thank You so much for writing this script. It works perfect and set everything up correctly from the software side of things. The human part on the other side gives me some difficulties but I managed to figure at least one thing:
    The Raspberry has to be physically connected to the router for the eibd to start up successfully.

    But maybe my soldering was not as successful.
    When I send a message on one terminal (e.g. groupwrite ip:localhost 0/2/2 1),
    the other terminal with vbusmonitor1 ip:localhost doesn’t show anything. Also when I try to send messages via ETS, the vbusmonitor doesn’t print any communication.

    Is it correct that the ADuM is mounted on the bottom Side of the board? I soldered mine to the same side as the capacitors etc.
    Can I switch the lanes connected to 2,3 and 6,7 or do I have to flip the sides for all lanes?

    Thanks for Your work, I highly appreciate it!
    Freddy

    1. Hi Freddy,

      yes, by the reason that the layout has just one layer the ADuM is mounted at the bottom site of the board.

      The ADUM has two channels one bidirectional, one unidirectional. You can do the following substitution.

      3 => 7
      6 => 2
      2 => 6
      7 => 3

      Did you use the script for Debian 8 Jessie?

      Michael

      1. Hey Michael,

        seems I overheated the ADuM during one of my numerous resoldering sessions.

        I decided not to trust myself with this and went down the resourceful route, bought a Weinzierl KNX/IP Gateway and reconfigured the eibd to ip tunneling. It worked like a charm on the first attempt.
        Since the daemon can communicate over IP I conclude that the script did a great job and my Raspberry can now talk to KNX and vice versa.

        Lesson of the day: Never trust my soldering with ICs 😛

        Freddy

  23. Hi Michael,
    At the beginning thanks for your job:)
    I and my friend want to install your eibd on two raspberry pi, next we want to create our own Functional Block using DPT and exchange data between this two raspberry by KNXoverIP. Can we do it using your EIBD? and if it is possible to do can you give us some hints how we can make it 🙂 ?

    Thanks in advance

    Pawel

  24. Hallo Michael,

    ich habe da eine frage ich nutze den Rasperry 2 Model B.
    Anschlusse sind die gleichen. Jedoch erkennt er nun das Board nicht mehr.
    K;nntest du mir die Befehle nennen, die ich brauch um den TPUART zu testen.
    sudo su eibd
    klappt bei mir nicht der wechselt nicht auf den user EIBD.

    Ich konnte bis heute im vbusmonitor telegramme sehen. Aber ab heute geht nichts mehr. Hast du etwas an dem Skript geandert?

    Danke im Vorraus

    1. Hallo Alegro,

      ein paar Fragen 🙂

      Du hast neu installiert ?
      oder => Aber ab heute geht nichts mehr. Hast du etwas an dem Skript geandert? => Die Installation bzw eibd lief, Du hast nichts geändert und jetzt geht nichts mehr?
      Raspbian, welche Version?
      Mit welchem meiner Scripts?
      Hat es mit dem selben Raspbbery schon mal funktioniert?
      Bzw. wie hat es schon mal funktioniert?
      Anschlüsse sind die gleichen. Zu was?

      sudo su eibd => Kann nicht funktionieren. Du gibst ihm ja keine Config mit. Du mußt über /etc/init.d/eibd start bei Debian 7 und über systemctl start eibd.service bei Debian 8 starten.

      Viele Grüße Michael

      1. Hallo Michael,
        dein Befehl f[r Debian 7 hat funktioniert.
        Jetyt kann ich Gruppenadressen einschalten jedoch bekomme ich nicht mehr die gewohnte Ausgabe mit 1.1.128 sondern.
        LPDU: BC 81 11 82 80 83 20 84 00 85 D1 :L_Data low INVALID CHECKSUM from 8.1.17 to 16/2/128 hops: 00 Unknown TPDU: 20 84 00 85
        woran kann das liegen ?

        1. Hi Alegro,

          schaut mir nach einem elektrischen Problem aus. INVALID CHECKSUM deutet darauf hin dass das Signal nicht richtig dekodiert werden kann. Kontrolliere doch mal Stecker/Kabel etc.

          Michael

  25. With new instance of raspbian jessie after reboot just getting following status of the EIBD:

    Jan 01 01:00:14 raspberrypi systemd[1]: PID file /run/eibd/eibd.pid not readable (yet?) after start.
    Jan 01 01:00:14 raspberrypi systemd[1]: Failed to start EIB Daemon.
    Jan 01 01:00:14 raspberrypi systemd[1]: Unit eibd.service entered failed state.

    Need to restart he service to get it working but it’s not starting after reboot.
    I have used install_eibd_systemd.sh to install the service for systemd (for D jessie).

    Does anyone know how to fix it?

  26. Hello,

    Few questions:
    1) What I need to change, if I am using PI 2 board?
    2) Is it possible to integrate direct KNX support to for eg. aGocontrol KNXD daemon?

    It would be nice have direct connection to KNX instead of separate IP gateway.
    Thanks!

    BR Antsa

  27. Hi Michael,

    Thank you so much for this post and the other using usb. I have since configured a rpi using a usb as a controller for my knx system and it works great. Thank you!

    However I wanted a new challenge and I have decided to try and make a wall mounted heating controller all powered by the instabus device. I have built the circuit on my breadboard and installed the script, but when I run the vbusmonitor1 I dont see any activity on the bus. I’m using a fresh install on wheezy, on an rpi 2. I have tried all different ways to figure this out but I cannot see anything.
    eibd is working.
    This is an imgur gallery with some images of my breadboad, can you see any obvious errors? red is 5v/3.3v, black GND, White TXD, Green RXD.
    //imgur.com/a/EmSbe
    Can you suggest a way to check the soldering of the ADUM1201?
    Is there a configuration that excludes the ADUM1201 that I could test to see if I have any issues with my soldering – I could barely see the feet to solder.
    Thanks for your time
    With regards
    Mark

    1. Hi Mark,

      have you got an details Schematic of the Adapterboard the ADUM1201 is soldered to?

      In my opinion this is not a 1:1 SMD to DIL8 adapter because it looks like that Pin 4 of the ADMU is connected to Pin 1 of the DIL8 layout.

      Michael

  28. Hi Michael,

    I am pretty sure I got that right, I used the Spark fun SOIC to DIP Adapter – 8-Pin
    Details here…. you can see the dots are adjacent and pin 1 is a square….
    //learn.sparkfun.com/tutorials/8-pin-soic-to-dip-adapter-hookup-guide?_ga=1.174445922.1112797644.1423130072

    Is it possible to miss out the ADUM? like so… //i.imgur.com/BtHbf7a.jpg – just for a small amount of testing?

    Thanks for you time
    Mark

  29. Hi Michael,
    I’m beginning to think that its an issue with the Busankoppler. Its a Merten 6902 99 instabus eib. I have updated its address to be on the system line, but when I look at the device info on ETS5 I see that the device is halted and there is no system program. Here is a .pdf of the device info on google drive.
    //drive.google.com/open?id=0B4QhPBGaaXkYeVhudm5Xeko1Y00
    Any ideas? I have tried updating the device and downloading an new application program to the 6902. Thanks in advance.
    Mark

  30. Great tutorial, thanks.

    Does this work with ETS5 ?
    I read somewhere that ETS5 uses some kind of other protocol which is not compatible with eibd. (sourceforge.net/p/bcusdk/mailman/message/33036418/)

    Is it correct, that I need to use either the ETS EIBlib/IP APP (my.knx.org/en/shop/ets-apps/ets-commissioning) or knxd (fork of eibd) instead of eibd with ETS5?
    (github.com/knxd/knxd/issues/2)

    Thanks

    1. Hi Mawa,

      I haven’t tried eibd with ETS5. But your right, there seems some changes in the way device are programmed in ETS 5 which are not support by eibd yet 🙁 .

      Michael

  31. Hello,

    running fine … thank you so much for the tutorial and the script.
    But when I scan with the ETS4, he show me the name “eibd” for the IP connection … can I change this name?

    Thank you!

    1. Hello Fohnbit,

      sorry, I do not have a ETS version 4. I don’t know if this is possible.

      Michael

  32. Great post. I have some problem on sending data to the eib.
    I put all the together and it will received the message from eib side,

    Layer 0(001748F8,575545B8) Send(018): 06 10 05 30 00 12 29 00 BC D0 11 03 11 06 02 00 80 00
    Layer 0(001A5890,575545B8) RecvB(001): 47
    Layer 0(001A5890,575545B8) RecvWatchdog: 47
    Layer 0(001A5890,575545B8) RecvB(001): 9C
    Layer 0(001A5890,575545B8) RecvB(001): 11
    Layer 0(001A5890,575545B8) RecvB(001): 03
    Layer 0(001A5890,575545B8) RecvB(001): 11
    Layer 0(001A5890,575545B8) RecvB(001): 06
    Layer 0(001A5890,575545B8) RecvB(001): E2
    Layer 0(001A5890,575545B8) RecvB(001): 00
    Layer 0(001A5890,575545B8) RecvB(001): 80
    Layer 0(001A5890,575545B8) RecvB(001): 00
    Layer 0(001A5890,575545B8) RecvB(001): 04
    Layer 0(001A5890,575545B8) SendAck 11
    Layer 0(001A5890,575545B8) RecvB(001): 47
    Layer 0(001A5890,575545B8) RecvWatchdog: 47
    Layer 0(001A5890,575545B8) RecvB(001): 9C
    Layer 0(001A5890,575545B8) RecvB(001): 11
    Layer 0(001A5890,575545B8) RecvB(001): 03
    Layer 0(001A5890,575545B8) RecvB(001): 11
    Layer 0(001A5890,575545B8) RecvB(001): 06
    Layer 0(001A5890,575545B8) RecvB(001): E2
    Layer 0(001A5890,575545B8) RecvB(001): 00
    Layer 0(001A5890,575545B8) RecvB(001): 80
    Layer 0(001A5890,575545B8) RecvB(001): 00
    Layer 0(001A5890,575545B8) RecvB(001): 04
    Layer 0(001A5890,575545B8) SendAck 11
    Layer 0(001A5890,575545B8) RecvB(001): 47
    Layer 0(001A5890,575545B8) RecvWatchdog: 47
    Layer 0(001A5890,575545B8) RecvB(001): 9C
    Layer 0(001A5890,575545B8) RecvB(001): 11
    Layer 0(001A5890,575545B8) RecvB(001): 03
    Layer 0(001A5890,575545B8) RecvB(001): 11
    Layer 0(001A5890,575545B8) RecvB(001): 06
    Layer 0(001A5890,575545B8) RecvB(001): E2
    Layer 0(001A5890,575545B8) RecvB(001): 00
    Layer 0(001A5890,575545B8) RecvB(001): 80
    Layer 0(001A5890,575545B8) RecvB(001): 00
    Layer 0(001A5890,575545B8) RecvB(001): 04
    Layer 0(001A5890,575545B8) SendAck 11
    Layer 0(001A5890,575545B8) RecvB(001): 47
    Layer 0(001A5890,575545B8) RecvWatchdog: 47

    but when I try to groupwrite local:/tmp/eib 1/1/7 4, the log is

    Layer 2(01CF1620,5754D7A8) Send L_Data low from 0.0.1 to 1/1/7 hops: 06 T_DATA_XXX_REQ A_GroupValue_Write FF
    Layer 0(01CF1620,5754D7A8) Write(020): 80 BC 81 00 82 01 83 09 84 07 85 E2 86 00 87 80 88 FF 49 D1
    Layer 0(01CF1620,5754D7A8) RecvB(001): 47
    Layer 0(01CF1620,5754D7A8) RecvWatchdog: 47
    Layer 0(01CF1620,5754D7A9) Drop Send

    Why? I double checked all the wire and config, but it seems can not send, just receive.
    Please advice. Thanks.

  33. Hallo Michael

    Heute hab ich einen PI-2 mit dem neusten System auf gesetzt.
    Leider gibt es Probleme. Da ich Linux Neuling hab ich da Probleme
    Eibd wird nicht automatisch gestartet.
    Hab einiges ausprobiert auch den User im Script geändert.
    Ich muss nach dem booten immer Eibd händisch starten.
    Kannst da weiter helfen ?

    Gruß Herbert

    2 :L_Data low from 1.1.10 to 1/4/30 hops: 02 T_DATA_XXX_REQ A_GroupValue_Write 16 BD
    LPDU: BC 11 0A 0C 1E 83 00 80 16 BD E2 :L_Data low from 1.1.10 to 1/4/30 hops: 00 T_DATA_XXX_REQ A_GroupValue_Write 16 BD
    — Logs begin at Mi 2016-06-08 13:19:00 CEST, end at Mi 2016-06-08 14:10:49 CEST. —
    Jun 08 14:10:19 raspberrypi-2 su[1309]: Successful su for root by root
    Jun 08 14:10:19 raspberrypi-2 su[1309]: + /dev/pts/0 root:root
    Jun 08 14:10:19 raspberrypi-2 su[1309]: pam_unix(su:session): session opened for user root by pi(uid=0)
    Jun 08 14:10:29 raspberrypi-2 systemd[1]: Starting EIB Daemon…
    — Subject: Unit eibd.service has begun with start-up
    — Defined-By: systemd
    — Support: xxxx://lists.freedesktop.org/mailman/listinfo/systemd-devel

    — Unit eibd.service has begun starting up.
    Jun 08 14:10:29 raspberrypi-2 systemd[1]: Ignoring invalid environment ‘export EIBD_OPTIONS=-d -D -T -R -S -i -u –eibaddr=1.1.128 ipt:192.168.178.100’: /etc/default/eibd
    Jun 08 14:10:29 raspberrypi-2 systemd[1]: PID file /run/eibd/eibd.pid not readable (yet?) after start.
    Jun 08 14:10:29 raspberrypi-2 systemd[1]: eibd.service never wrote its PID file. Failing.
    Jun 08 14:10:29 raspberrypi-2 systemd[1]: Failed to start EIB Daemon.
    — Subject: Unit eibd.service has failed
    — Defined-By: systemd
    — Support: xxx://lists.freedesktop.org/mailman/listinfo/systemd-devel

    — Unit eibd.service has failed.

    — The result is failed.
    Jun 08 14:10:29 raspberrypi-2 systemd[1]: Unit eibd.service entered failed state.
    Jun 08 14:10:49 raspberrypi-2 kernel: w1_master_driver w1_bus_master1: Family 0 for 00.1c0000000000.3e is not registered.

    1. Hallo Herbert,

      konnte es nachstellen. Du mußt das export am Zeilenanfang in /etc/default/eibd entfernen. Das export ist von einem Test übrig geblieben.

      Michael

  34. Guten Morgen

    Hab das geändert.
    Trotzdem muss ich eibd händisch starten
    eibd -d -D -T -R -S -i -u –eibaddr=1.1.128 ipt:192.168.178.100

    bei reboot kommt immer das raus
    pi@raspberrypi-2:~ $ ps ax|grep eibd
    738 pts/0 S+ 0:00 grep –color=auto eibd

  35. Guten Morgen
    leider funktioniert es nicht muss immer noch händisch starten
    pi@raspberrypi-2:~ $ ps ax|grep eibd
    738 pts/0 S+ 0:00 grep –color=auto eibd

    1. Hallo Herbert,

      kannst Du den eibd über systemd grundsätzlich starten? Führe mal nach einem reboot

      sudo systemctl start eibd

      aus und poste anschließend mal die Ausgabe von:

      sudo journalctl -xu eibd.service

      Hast Du eine statische IP Adresse konfiguriert?

      Michael

  36. Hallo Michael

    Dieser Befehl “sudo systemctl start eibd” macht garnix. Die Konsole hängt und ich breche mit STRG C ab.

    Mache “sudo journalctl -xu eibd.service” kommt folgendes raus.

    — Logs begin at Sa 2016-06-11 17:59:48 CEST, end at Sa 2016-06-11 18:02:40 CEST. —
    Jun 11 17:59:54 raspberrypi-2 systemd[1]: Starting EIB Daemon…
    — Subject: Unit eibd.service has begun with start-up
    — Defined-By: systemd
    — Support: xpps://lists.freedesktop.org/mailman/listinfo/systemd-devel

    — Unit eibd.service has begun starting up.
    Jun 11 17:59:54 raspberrypi-2 systemd[1]: PID file /run/eibd/eibd.pid not readable (yet?) after start.
    Jun 11 18:02:24 raspberrypi-2 systemd[1]: eibd.service start operation timed out. Terminating.
    Jun 11 18:02:24 raspberrypi-2 systemd[1]: Failed to start EIB Daemon.
    — Subject: Unit eibd.service has failed
    — Defined-By: systemd
    — Support: xttp://lists.freedesktop.org/mailman/listinfo/systemd-devel

    — Unit eibd.service has failed.

    — The result is failed.
    Jun 11 18:02:24 raspberrypi-2 systemd[1]: Unit eibd.service entered failed state.
    ~

    1. Hallo Herbert,

      Wenn du den eibd von Hand startest als welcher User machst Du das?

      Bitte mal folgendes probieren. Den eibd mit dem User eibd starten (was auch systemctl tut):

      sudo su
      su eibd -s /bin/bash

      jetzt den Eibd mal mit Deinen Parametern starten ohne -d (ohne daemon mode) um zusehen ob irgendwelche Fehler auflaufen die mit root nit auftreten.

      Michael

  37. Hi Michael,
    I installed Jessie and the demon eibd with ” install_eibd_systemd.sh ” .
    Now I need to monitored eibd with ” Monit ” but do not understand how to restart the service if the demon crash :.

    check process eibd with pidfile /run/eibd/eibd.pid
    start program = ???
    Stop program = ???
    if failed port 6720 type udp host 127.0.0.1 then restart

    What should I put in place of ???

    thank you

    1. Hi Pete,

      Start daemon
      systemctl start eibd.service

      Stop daemon
      systemctl stop eibd.service

      State of daemon
      systemctl status eibd.service

      Log
      journalctl -xu eibd.service

      Michael

      1. Thanks Michael, I do not understand what information should I provide for Monit this command sequence !.

        the sequence : ” sudo start systemctl eibd.service ” starts the inactive daemon from the command line , but I can not use it in Monit “start program = sudo systemctl start eibd.service ”

        can you be more clear?

        thanks again

        1. Hi Pete,

          why not 🙂

          I never used Monit but if it runs as root you do not need sudo in front of systemctl then just use

          systemctl start eibd.service

          Are there any error messages?

          Michael

          1. Good Morning Michael

            I think I solved .
            This is my solution for monitoring eibd with Monit :

            check process eibd with pidfile /run/eibd/eibd.pid
            start program “/usr/sbin/service eibd start”
            Stop program “/usr/sbin/service eibd stop”
            if failed host 127.0.0.1 port 6720 then restart

            it seems to work

            thank you
            Pete

          2. Hi Pete,

            ok. Good news. “service” is the old style SysV init method to Start/Stop daemons. This is a compatibility mode of systemd and still works.

            May be systemctl is not in search path of Monit, then you have to add the full path. For systemd I think it must looks like

            check process eibd with pidfile /run/eibd/eibd.pid
            start program “/bin/systemctl start eibd.service”
            Stop program “/bin/systemctl stop eibd.service”
            if failed host 127.0.0.1 port 6720 then restart

            Michael

  38. I’m running into some issues (two to be precise) as well.

    1) Knxd service is not starting (see: goo.gl/oZmxDt)
    /etc/systemd/system/multi-user.target.wants/knxd.service is there and configured as mentioned in your article. My initial idea is that there’s something wrong with the KNXD_OPTIONS environment variable, as I am able to get the knxd started by specifying the options manually and calling for instance “/usr/local/bin/knxd -p /run/knxd/knxd.pid –eibaddr=1.1.128 -d -D -T -R -S -i –listen-local=/tmp/knx tpuarts:/dev/ttyAMA0” via the console. Also if I do “export KNXD_OPTIONS –eibaddr=1.1.128 -d -D -T -R -S -i –listen-local=/tmp/knx tpuarts:/dev/ttyAMA0” and then call “/usr/local/bin/knxd -p /run/knxd/knxd.pid ${KNXD_OPTIONS}” through console, the knxd is starting so… Any thoughts / troubleshooting tips to pinpoint what’s happening here? “systemctl status knxd” isn’t really providing much more information other than the generic ERROR: 1/FAILED knxd not being able to start.

    2) Using knxd as an interface in ETS5
    Issue 1 aside, starting knxd manually *briefly* shows the knxd interface under discovered interfaces in ETS5 (along with Qualcomm Atheros? I think it’s the wireless network card of my laptop? weird). However selecting knxd as my interface and clicking the “Test” button results in “The interface is not reachable” (see: goo.gl/emKTDd). What is weird to me as well is that when I kill and restart knxd, the device becomes discoverable again but under a different port number (see: goo.gl/F6mDTg). Adding the interface manually under “Configured Interfaces” by providing the same details and default port 6720 doesn’t help.

    The only thing that I recall now is that I’ve set up the static IP on my raspberry pi as described in your initial article (the eibd one):

    auto eth0
    iface eth0 inet static
    address 192.168.1.31
    netmask 255.255.255.0
    gateway 192.168.1.1
    post-up route add -net 224.0.23.12 netmask 255.255.255.255 eth0
    pre-down route del -net 224.0.23.12 netmask 255.255.255.255 eth0

    It has been working flawlessly for connecting remotely to the pi through Putty. I’ll try the approach as described in the knxd article when I get back home and report back. In the meantime if you have any other suggestions / troubleshooting tips, I would be glad to hear them!

    1. Hi Nick,

      first of all please configure a static ip over systemd. What kind of Raspberry Pi are you using and how much LAN Adapters are configured?

      Can you post the content of /etc/default/knxd please.

      Your PC is in the same network/IP Range? What is the IP Address of your PC?

      What happens you try to start knxd manually

      sudo systemctl start knxd

      sudo journalctl -xn -u knxd

      Michael

      1. Hi Michael,

        Thanks for your reply, having a look at the journalctl helped me get rid of the last few kinks in the configuration and knxd is now started at boot time.

        How do I properly set up the IP router interface in ETS (I’m running version 5, not that it matters I guess). If I select the Qualcomm Atheros (see previous screenshot) and hit the “Test” button it mentions “OK”. Downloading an application to any of my KNX devices however doesn’t seem to work…

        When hitting “Download Application” I get a popup (see screenshot: goo.gl/KYnzVH), where I press “Keep configuration” but after that the download just straight up fails.

        Busmonitor on my pi shows the following output while trying to download the application:
        LPDU: B0 11 7F 11 03 50 80 E3 :L_Data system from 1.1.127 to 1.1.3 hops: 05 T_CONNECT_REQ
        LPDU: B0 11 7F 11 03 51 43 00 21 :L_Data system from 1.1.127 to 1.1.3 hops: 05 T_DATA_CONNECTED_REQ serno:00 A_DeviceDescriptor_Read Type:00
        LPDU: B0 11 7F 11 03 51 43 00 21 :L_Data system from 1.1.127 to 1.1.3 hops: 05 T_DATA_CONNECTED_REQ serno:00 A_DeviceDescriptor_Read Type:00
        LPDU: B0 11 7F 11 03 51 43 00 21 :L_Data system from 1.1.127 to 1.1.3 hops: 05 T_DATA_CONNECTED_REQ serno:00 A_DeviceDescriptor_Read Type:00
        LPDU: B0 11 7F 11 03 51 43 00 21 :L_Data system from 1.1.127 to 1.1.3 hops: 05 T_DATA_CONNECTED_REQ serno:00 A_DeviceDescriptor_Read Type:00
        LPDU: B0 11 7F 11 03 50 81 E2 :L_Data system from 1.1.127 to 1.1.3 hops: 05 T_DISCONNECT_REQ
        LPDU: B0 11 7F 11 03 50 80 E3 :L_Data system from 1.1.127 to 1.1.3 hops: 05 T_CONNECT_REQ
        LPDU: B0 11 7F 11 03 51 43 00 21 :L_Data system from 1.1.127 to 1.1.3 hops: 05 T_DATA_CONNECTED_REQ serno:00 A_DeviceDescriptor_Read Type:00
        LPDU: B0 11 7F 11 03 51 43 00 21 :L_Data system from 1.1.127 to 1.1.3 hops: 05 T_DATA_CONNECTED_REQ serno:00 A_DeviceDescriptor_Read Type:00
        LPDU: B0 11 7F 11 03 51 43 00 21 :L_Data system from 1.1.127 to 1.1.3 hops: 05 T_DATA_CONNECTED_REQ serno:00 A_DeviceDescriptor_Read Type:00
        LPDU: B0 11 7F 11 03 51 43 00 21 :L_Data system from 1.1.127 to 1.1.3 hops: 05 T_DATA_CONNECTED_REQ serno:00 A_DeviceDescriptor_Read Type:00
        LPDU: B0 11 7F 11 03 50 81 E2 :L_Data system from 1.1.127 to 1.1.3 hops: 05 T_DISCONNECT_REQ

        Do I somehow still need to setup the MDT USB interface in the active project or something? I currently don’t have this device added there. It worked before though while I downloaded applications through usb connected directly to my laptop.

        Nick

          1. Hi Michael,

            How do I properly setup the rpi with knxd as an IP router in my knx installation?

            Topology
            goo.gl/SKJy8T
            Backbone setting
            goo.gl/lwh2LH
            Area setting
            goo.gl/hXdDHz
            Line setting
            goo.gl/uyvEbD

            Should I set it as a line coupler in my topology (1.1.0)? Should this be reflected in the interface settings of ETS (goo.gl/578UVa) ? What about the –eibaddr option of knxd (set to 1.1.128 by KNXD_OPTIONS)?

            Seems like the backbone area picks up the interface I configured (224.0.23.12) when I set it to IP. With the Backbone and Area set to IP I’m still getting the same warning / message though when trying to download an application: goo.gl/dxR2SP

            Thanks for your help already 🙂
            Almost there!

            Nick

          2. Hi Nike,

            regarding your last screenshot. Which options are available when you press the “Change interface settings” button?

            Michael

          3. Hi Michael,

            Well, in my entire topology (both backbone, area and the line itself) I can choose knxd there, granted that my raspberry pi is up and the knxd service is running on it. (see: goo.gl/HvrQoJ)

            I can only select it for ONE of my topology elements at a time, e.g. if I set bus connection to knxd for my backbone, knxd is greyed out in the bus connection list of both my area and line. I tried setting it for every topology element individually and then try “Download application” of one of my switching actors, but it doesn’t resolve the problem… Another error message appears (see goo.gl/dkJuuk). Moreover, the knxd service on the raspberry pi crashes after this and I need to restart it again.

            🙁

          4. Hi Michael,

            I just reset al my topology elements to medium type “TP” and have set “bus connection” to knxd. The warning message about incorrect medium type is now gone and ETS goes into downloading mode. The knxd service still crashes after doing this however…

            I looked at the error information with journalctl but it doesn’t provide any specific information:
            Nov 03 14:28:47 raspberrypi systemd[1]: knxd.service: main process exited, code=killed, status=6/ABRT
            Nov 03 14:28:47 raspberrypi systemd[1]: Unit knxd.service entered failed state.

  39. Do not tell me this is something I need to purchase in order for this to work? goo.gl/tKnKLB

    Can we maybe take a step back and could you explain to me how exactly you’ve setup your raspberry pi with knxd in ETS?

  40. Hello,

    Call me stupid… I can’t seem to find the link to download the Eagle file… Has the link disappeared? Can you send it to me?

    Many thanks,

  41. Hi, Michael. Thank you for all your work on this!
    I setup all on Raspberry Pi and see all telegrams on KNX BUS with knxtool busmonitor1 ip:localhost
    If I try to programming knx device or request “Device Info” ETS show me “Device with the individual adress 1.1.14 could not be found” and
    pi@openhab:~ $ knxtool vbusmonitor1 ip:localhost
    LPDU: 90 00 01 11 0E 50 80 A1 :L_Data (repeated) system from 0.0.1 to 1.1.14 hops: 05 T_CONNECT_REQ
    LPDU: 90 00 01 11 0E 51 43 00 63 :L_Data (repeated) system from 0.0.1 to 1.1.14 hops: 05 T_DATA_CONNECTED_REQ serno:00 A_DeviceDescriptor_Read Type:00
    LPDU: 90 00 01 11 0E 51 43 00 63 :L_Data (repeated) system from 0.0.1 to 1.1.14 hops: 05 T_DATA_CONNECTED_REQ serno:00 A_DeviceDescriptor_Read Type:00
    LPDU: 90 00 01 11 0E 51 43 00 63 :L_Data (repeated) system from 0.0.1 to 1.1.14 hops: 05 T_DATA_CONNECTED_REQ serno:00 A_DeviceDescriptor_Read Type:00
    LPDU: 90 00 01 11 0E 51 43 00 63 :L_Data (repeated) system from 0.0.1 to 1.1.14 hops: 05 T_DATA_CONNECTED_REQ serno:00 A_DeviceDescriptor_Read Type:00
    LPDU: 90 00 01 11 0E 51 43 00 63 :L_Data (repeated) system from 0.0.1 to 1.1.14 hops: 05 T_DATA_CONNECTED_REQ serno:00 A_DeviceDescriptor_Read Type:00

    Same trouble with KNXnet/IP Routing.
    Any ideas for this?

  42. Hi Michael. Thanks for this article.

    I’m an electronics noob trying to read the Raspberry Pi KNX Board Schematic above. In the schematic pin 1 of the ADUM is connected to pin 10 of the BTM. But according to the TP-UART spec (PCBA_UP117-12_datasheet.pdf page 2), pin 10 is not connected.

    I am reading this correctly and if so why connect to pin 10 if it’s not connected on the BTM?

    many thanks

    1. Hi Ric,

      I used a standard pin header in the schematic and this has an different pin layout/couterwise then the TPUART Module:

      http://www.hqs.sbt.siemens.com/cps_product_data/gamma-b2b/PCBA_UP117-12_datasheet.pdf

      TPUART layout is

      10 9 8 7 6
       1 2 3 4 5
       | |   | |
      

      while PIN Header is

      2 4 6 8 10
       1 3 5 7 9
      

      And therefore you have to translate
      Pin 1 TPUART is Pin 2 Pin Header
      Pin 2 TPUART is Pin 4 Pin Header
      Pin 4 TPUART is Pin 8 Pin Header
      Pin 5 TPUART is Pin 10 Pin Header

      Also keep in mind that the TPUART Module is connected from the top so you have to see the Pins mirror inverted 🙂

      Michael

  43. Hi Michael,
    die Installationskontrolle nach dem Ausführen des Scriptes liefert der folgende Punkt nicht das gewünschte Ergebnis:

    ls -l /etc/rc3.d/*eibd

    Liefert die Fehlermeldung: “ls: Zugriff auf /ect/rc3.d/*eibd nicht möglich: Datei oder Verzeichnis nicht gefunden”

    Im Ordner /ect/rc3.d/ sind einige Ordner enthalten, aber nichts, was mit eibd zu tun hat.
    Hast du ne Idee, was genau hier nicht stimmt bzw. schief gelaufen ist?

    1. Hi Marcel,

      auf welche raspian Version versucht Du das zu installieren? Auf debian jessie solltest Du die install_eibd_systemd.sh Version verwenden. /etc/rc3.d/* ist noch die SysV init version die wird von eibd mit systemd nicht mehr verwendet. Da ist mal ein Update des Posts notwendig.

      Unabhängig davon nimm doch die stable Version von knxd. Das ist die Weiterentwicklung von eibd und sollte laut den Rückmeldungen die ich erhalte habe stabil laufen.

      Michael

      1. Moin,
        danke für die schnelle Antwort. Ich nutzte folgende Version

        Raspbian Jessie with PIXEL
        Image with PIXEL desktop based on Debian Jessie
        Version: April 2017
        Release date: 2017-04-10
        Kernel version: 4.4

        Das ist die auf der RaspberryPi.org aktuell verfügbare Version.

        Ehrlich gesagt habe ich den Post mit Knxd garnicht gesehen :/ Werde das mal ausprobieren. Schönen Start in die Woche 😉

  44. Hallo Michael,

    ich habe einen Raspi3 mit aktuellem Raspian (Stretch lite) aufgesetzt und eine statische IP vergeben. Das funktioniert soweit.
    Nun wollte ich eibd installieren und bin nach deiner Anleitung vorgegangen.
    Ich habe ein Weinzierl 730 IP-Interface am Laufen.
    Im Skript habe ich die Zeile wie folgt angepasst:
    export EIBD_OPTIONS=”-d -D -T -R -S -i -u –eibaddr=1.1.243 ipt:192.168.170.222 –no-tunnel-client-queuing”

    Die Adressen entsprechen meiner Installation.
    Ausführen von “ps ax|grep eibd” bringt nur:
    749 pts/0 S+ 0:00 grep –color=auto eibd

    Starte ich wie weiter oben geschrieben den eibd von Hand mittels
    “eibd -d -D -T -R -S -i -u –eibaddr=1.1.243 ipt:192.168.178.222”
    funktionert sowohl “ps ax|grep eibd” als auch “vbusmonitor1 ip:localhost”.
    Hier sehe ich Bustelegramme.
    Mittels “groupswrite ip:localhost 2/1/2 1” kann ich auch einen Aktor schalten.
    Getestet hab ich das mit dem User “pi”. Nach einem reboot gehts nicht mehr.
    Weiter oben habe ich gelesen, dass man das mit ” sudo systemctl start eibd” (als User “pi”) probieren sollte. Das funktioniert. Aber wohl nur händisch.

    Kannst Du mir weiterhelfen, wie ich das System zum Laufen kriege?

    Vielen Dank.
    Stefan

  45. Thanks I try this and works well for to read the bus but does not work to write at the bus and nothing happends. Do you know why?. Thanks

    1. Hi grego,

      which daemon have you installed? eibd or knxd?

      How do try the write access? ETS, knxtool, groupwrite …?

      Michael

  46. So thanks for your work. One of my friends have old installation EIB with RS232 interface (not USB). As I understand – this interface have level isolator already? May be you know witch pins for UART and 5 V and ground?

    1. Hi Maxim,

      you can’t using such an old interface with a Raspberry. These devices needs a “real” RS232 Interface with all lines (DTR, DSR, RTS, CTS….). A Raspberry has just the TX and RX Pins.

      Michael

      1. Thanks for answer abor rs232. I have Jung buscoupler 2070. Visually it is similar as Siemens bus coupler connection (10 pins in 2 rows). But I cant find needed pins. Do you know about it anything?
        With bes regards, Maxim

  47. Hi, I can only find a BTM UP117/12 5WG11172AB12 (with a 12 at the end instead of an 11). Is this the part from Siemens also working with knxd?
    Best regards, Ted

  48. Hi,
    Do you know if the “Gira Busankoppler 3 2008 00 / I01” would work in place of the Siemens module? hxxps://imgur.com/a/K9o46lq

    Thanks in advance!

  49. Hi, Is it possible to use gira busankoppler 3 2008 00 / I01 in place of the TM UP117/12 5WG11172AB12?

    regards
    Per

    1. Hi Per-Arne,

      IMHO this would not work. The GIRA Busankoppler doesn’t speak TPUART protocol an AFAIK not fully FT1.2.

      Michael

  50. Siemens BTM UP117/12 5WG11172AB12 works fine for me.

    Who can produce cheap 1 PCB for this project?
    How large is the PCB, I can not find this information.
    Has anyone a redesigned PCB such that the PCB can be mounted directly onto a Raspi?

    1. Hi Ted, where did you buy the Siemens module? Are you using it with knxd or eibd? I’m trying to connect to the knx bus using knxd + usb interface but i didnt have success yet. If I dont make it works with usb i will try with siemens module. For raspberry I have found the module of Weinzierl BAOS 838 kBerry but i dont know if can be used as the siemens.

  51. Hello, very nice article!

    Just two questions:

    – the galvavic insulation via ADUM-1201 is mandatory or is only recomanded for security reasons?

    – the procedure can work also with different bus coupling units, e.g. Siemens 5WG1 110-2AB01?

    Thank You

    1. Hi Marko,

      the galvavic insulation via ADUM-1201 is mandatory or is only recomanded for security reasons? => Not mandatory. But the ADUM-1201 works also as Level shifter, because supply voltage of the Bustransceiver is 5V and the IO Ports of the Raspberry have a max Input Voltage of 3.3V

      the procedure can work also with different bus coupling units, e.g. Siemens 5WG1 110-2AB01? => Not tested yet but may be. knxd device type is then ft12. But I’m not sure if the PIN Layout is the same as the TPUART.

      Michael

    2. Hi Marko,
      does the siemens 5WG1 110-2AB01 work?
      soon I should have one available for a test and I’m curious to know if it can be used.
      Do you confirm that the pins are the same as the 117-2AB11 model used by Michael?

  52. Hello Michael,
    your articles (and your expertise) pushed me to experiment with the use of RPI2 as KNX gateway.
    Can a circuit like this replace the component of your project ?:
    imgur.com/a/y952bzf

    It seems to me that there are already the capacitors on the printed circuit board, so no others are needed. Or am I wrong?

    Thank you
    Silvio

  53. Hello Michael,

    I cannot produce myself the adapter board so I decided to ask someone on the Web.

    Instead of beeing able to open the BRD file you shared us, the guy ask me a PDF scale 1 file… I see two options :
    1. How can I convert the BRD or the PNG files to a scale 1 PDF file ?
    2. Can you share it for me ? (Others…?) 🙂

    Thanks in advance.
    Bruno ECKLE.

  54. Hi Michael,
    thank you for this greate work.
    Does your device support “IP-Multicast”?
    Thank you in advance.
    BR
    Marcus

  55. when should i use ft12 vs uarts driver on a raspberry pi 2b With a baos 832 hat card?

    When I use ft12 I can send group telegram but programming falls (knxd craches) in ets5 when I press The download or program Buttons. If I use Tpuarts I can’t start knxd att all. Is it even possible to use That?

  56. Hello,

    I’ve been struggeling to make it work. Maybe you could help. I’ve got a alarm system with KNX/IP function and i run domotixz in my home I want them to talk to each other. I think i can do it with your sollution. I’ve run the commands but when i proceed with bash i get a error unnexpectet line `’. I’m probobly overlooking something. Can you help? I’m still a noob but learing.

    Very big thank you in advanced

    Kind Reguards
    Sjaak
    Netherlands

  57. Hi Michl,

    great stuff. I’m wondering if the Siemens EIB Busankoppler 5WG1 110-2AB01 would work with your adapter?

    Cheers,
    Jens

    1. Die Nummerierung im Scahltplan für am Pin Header ist etwas ungünstig gewählt (Ging mit Eagle nicht anders oder ich konnte es nicht anderes 😉 ). Aber die Verbindungen passen.

      Michael

Leave a Reply to Maxim Pavlyk Cancel reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.