KNX Binding mit knxd auf Raspberry Pi 3

Hi,
i shortly updated my OH to OH 2.2 stable with openhabian image. From there i also installed KNXD with TUL stick. What works fine is:

  • knxtool groupswrite --> fine
  • ETS access to bus from my PC --> fine (reading & writing from/to bus)
  • accessing bus for reading (KNX weather station data) in basic UI --> fine

what does not work:

  • accessing bus from OH2.2 (via Basic UI) for switching rollershutters, lights and so on

several months ago all worked fine, then it stopped (of course i have no idea why). With the new OH release i hoped that it will work again. I set the logging to DEBUG (calimero and KNX Binding), but i could not see any trouble.

Any ideas?

Christian

so you can receive data from KNX world (since your OH2 weather items are getting updates) but you can’t send data from OH2 to the KNX world…

post your knx.cfg and your relevant items configs please. Also, post some info on how you have configured knxd (and any relevant log entries from both OH2 and/or knxd)

yes, that is right.

please find my config informations:

knx.cfg:

ip=224.0.23.12
ignorelocalevents=true
type=ROUTER
localIp=192.168.178.47

knxd-config:

KNXD_OPTIONS="--eibaddr=1.1.128 --client-addrs=1.1.129:8 -d -D -T -R -S -i --listen-local=/tmp/knx -b tpuarts:/dev/knx1"

systemctl status knxd.service gives:

knxd.service - KNX Daemon
   Loaded: loaded (/lib/systemd/system/knxd.service; enabled)
   Active: active (running) since Do 2017-11-16 21:06:03 CET; 1 months 10 days ago
 Main PID: 10621 (knxd)
   CGroup: /system.slice/knxd.service
           └─10621 /usr/local/bin/knxd -p /run/knxd/knxd.pid --eibaddr=1.1.128 --client-addrs=1.1.129:8 -d -D -T -R -S -i --listen-local=/tmp/knx -b t...

Nov 16 21:06:03 openHABianPi systemd[1]: Started KNX Daemon.
Nov 16 21:06:04 openHABianPi knxd[10621]: F00000051: [20:router] internal error: send_more is not set

items example:

Rollershutter R_Essen_OG_S "Roll Essen OG Süd [%d %%]" (gRolladen,gKNXRoll) { knx="1/0/12, 1/0/11, 5.001:1/0/14+<1/0/15" }
Switch Nachtautomatik "KNX-Nachtautomatik" <night> {knx="1.001:0/0/6"}

log after pressing “up” of rollershutter:

2017-12-27 17:31:01.872 [ome.event.ItemCommandEvent] - Item 'R_Essen_OG_S' received command UP

==> /var/log/openhab2/openhab.log <==

2017-12-27 17:31:01.876 [INFO ] [tuwien.auto.calimero                ] - calimero.link.127.0.0.1:3671: send message to 1/0/12, wait for confirmation
2017-12-27 17:31:01.890 [DEBUG] [tuwien.auto.calimero                ] - calimero.link.127.0.0.1:3671: cEMI L-Data.req from 1.1.128 to 1/0/12, low priority hop count 6 repeat tpdu 00 80
2017-12-27 17:31:01.891 [DEBUG] [tuwien.auto.calimero                ] - KNXnet/IP Tunneling 127.0.0.1:3671: sending cEMI frame seq 193, wait for cEMI.con, attempt 1 (channel 2) 06 10 04 20 00 15 04 02 c1 00 11 00 bc e0 11 80 08 0c 01 00 80
2017-12-27 17:31:01.893 [DEBUG] [.binding.knx.internal.bus.KNXBinding] - Wrote value 'UP' to datapoint 'command DP 1/0/12 R_Essen_OG_S, DPT main 0 id 1.008, low priority'
2017-12-27 17:31:01.894 [DEBUG] [tuwien.auto.calimero                ] - KNXnet/IP Tunneling 127.0.0.1:3671: received cEMI L-Data.con with req 103
2017-12-27 17:31:01.895 [DEBUG] [tuwien.auto.calimero                ] - calimero.link.127.0.0.1:3671: confirmation of 1/0/12
2017-12-27 17:31:01.896 [DEBUG] [tuwien.auto.calimero                ] - calimero.link.127.0.0.1:3671: send to 1/0/12 succeeded
2017-12-27 17:31:01.898 [DEBUG] [tuwien.auto.calimero                ] - process 127.0.0.1:3671: group write to 1/0/12 succeeded

please let me know if i can provide additional information…

I can’t identify any mistakes… all looks good… (calimero even reports that you get confirmations)

try to remove the status GA (from the item config in OH2) to see if the command succeeds

similar situation here:

Ps: Are you 100% sure that this GA (1/0/12) is the correct one for Up/Down?

(edit) Ps2: I see that OH2 is using PA 1.1.28 (cEMI L-Data.req from 1.1.128 to 1/0/12) while this is the PA of the knxd process and the clients should start from 1.1.129. Maybe try to define the PA (1.1.129) in your knx.cfg file?

(edit) Ps3: which version of knxd are you running? I saw that this internal error: send_more is not set has been fixed in the latest release. Maybe try the newest version of knxd?

Ok thanks a lot. I will try all the ideas on the weekend when I am back home.
The address should be the right one because several months ago that item config worked fine.
How can I find out which version of Knxd is running? Can I make the update via openhab—config tool?

now i did the following:

  • changing PA to 1.1.129, the debug log shows the change
  • checking the knxd version (0.14.19-2), seems the latest one
  • after rebooting the pi, the error message from knxd was gone
  • also removed the items GA from item definition

but unfortunately it still does not work…

Christian

after some more tries it works :smile: !!!

i changed the address areas (found a very old knx.cfg) beginning at 0.0.1:

[13:26:01] openhabian@openHABianPi:~$ sudo systemctl status knxd.service
● knxd.service - KNX Daemon
   Loaded: loaded (/lib/systemd/system/knxd.service; enabled)
   Active: active (running) since So 2017-12-31 13:26:01 CET; 3s ago
 Main PID: 3416 (knxd)
   CGroup: /system.slice/knxd.service
           └─3416 /usr/local/bin/knxd -p /run/knxd/knxd.pid --eibaddr=0.0.1 --client-addrs=0.0.2:8 -d -D -T -R -S -b tpuarts:/dev/knx1

Dez 31 13:26:01 openHABianPi systemd[1]: Started KNX Daemon.

also changed knx.cfg to TUNNEL:

ip=127.0.0.1
ignorelocalevents=true
type=TUNNEL
localIp=192.168.178.47

Thanks a lot for all hints.

Christian

1 Like

Unfortunately that problem is not solved. at least i am running in a different issue (discussed in some forums, but i could not find a final solution).
after about two hours knxd stops with following error:

Jan 05 11:48:50 openHABianPi knxd[30607]: E00000055: [15:C.tpuarts] Driver timed out trying to send (C.tpuarts)
Jan 05 11:48:50 openHABianPi knxd[30607]: E00000000: [17:C.tpuarts] send timeout: too many retries

Then i tried the following:
restart knxd, but stop openhab2 and see what happens. knxd is still running fine after several days.
but with openhab2 running too, knxd will stop after about 2 hours.

Christian

I looks like that there are some issues with newer versions of knxd and OH knx binding.
Please see the german knxd posts on the german knx-user-forum.

I faced the same issues and I downgraded to knxd version 0.11.18. worked for me.