Loops on KNX bus

My setup:

  • openHAB 2 (via openHABian) running on RPI3 (192.168.178.8)
  • TUL-Stick (busware.de) plugged into RPI3 and connected to KNX bus
  • latest knxd running on RPI3
  • KNX Binding 1.9

My KNX config:

ip=192.168.178.8
busaddr=8.8.8
ignorelocalevents=true
type=TUNNEL
localIp=192.168.178.8

My items:

Switch WZ_Deckenleuchte {knx="1/0/20"}
Switch WZ_Downlights {knx="1/0/24"}
  • 1/0/20 is the GA associated with a plain light switch and a switch actor (1.1.1)
  • 1/0/24 is the GA associated with a dimmable light switch and a dim actor (1.1.6)
  • I know, that I could/should use item type Dimmer for 1/0/24. But that should not matter here.

Problem:

When I switch on WZ_Deckenleuchte (1/0/20) via HABPanel the light is turned on and I get this log output:

17:27:42.298 [INFO ] [smarthome.event.ItemCommandEvent    ] - Item 'WZ_Deckenleuchte' received command ON
17:27:42.303 [INFO ] [tuwien.auto.calimero                ] - calimero.link.192.168.178.8:3671: send message to 1/0/20, wait for confirmation
17:27:42.304 [DEBUG] [tuwien.auto.calimero                ] - calimero.link.192.168.178.8:3671: cEMI L-Data.req from 8.8.8 to 1/0/20, low priority hop count 6 repeat tpdu 00 81
17:27:42.305 [DEBUG] [tuwien.auto.calimero                ] - KNXnet/IP Tunneling 192.168.178.8:3671: sending cEMI frame seq 86, wait for cEMI.con, attempt 1 (channel 1) 06 10 04 20 00 15 04 01 56 00 11 00 bc e0 88 08 08 14 01 00 81
17:27:42.305 [DEBUG] [tuwien.auto.calimero                ] - KNXnet/IP Tunneling 192.168.178.8:3671: received cEMI L-Data.con with req 160
17:27:42.306 [DEBUG] [tuwien.auto.calimero                ] - calimero.link.192.168.178.8:3671: confirmation of 1/0/20
17:27:42.306 [DEBUG] [tuwien.auto.calimero                ] - calimero.link.192.168.178.8:3671: send to 1/0/20 succeeded
17:27:42.307 [INFO ] [marthome.event.ItemStateChangedEvent] - WZ_Deckenleuchte changed from OFF to ON
17:27:42.308 [DEBUG] [tuwien.auto.calimero                ] - process 192.168.178.8:3671: group write to 1/0/20 succeeded
17:27:42.309 [INFO ] [tuwien.auto.calimero                ] - calimero.link.192.168.178.8:3671: send message to 1/0/20, wait for confirmation
17:27:42.309 [DEBUG] [tuwien.auto.calimero                ] - calimero.link.192.168.178.8:3671: cEMI L-Data.req from 8.8.8 to 1/0/20, low priority hop count 6 repeat tpdu 00 81
17:27:42.310 [DEBUG] [tuwien.auto.calimero                ] - KNXnet/IP Tunneling 192.168.178.8:3671: sending cEMI frame seq 87, wait for cEMI.con, attempt 1 (channel 1) 06 10 04 20 00 15 04 01 57 00 11 00 bc e0 88 08 08 14 01 00 81
17:27:42.310 [DEBUG] [tuwien.auto.calimero                ] - KNXnet/IP Tunneling 192.168.178.8:3671: received cEMI L-Data.con with req 161
17:27:42.311 [DEBUG] [tuwien.auto.calimero                ] - calimero.link.192.168.178.8:3671: confirmation of 1/0/20
17:27:42.311 [DEBUG] [tuwien.auto.calimero                ] - calimero.link.192.168.178.8:3671: send to 1/0/20 succeeded
17:27:42.312 [DEBUG] [tuwien.auto.calimero                ] - process 192.168.178.8:3671: group write to 1/0/20 succeeded

Looks good. Everything okay.

But when I switch on WZ_Downlights (1/0/24) via HABPanel the light is turned on (sometimes flashing, HABPanel button “flashes” as well) and I get a looping log output:

17:28:16.764 [INFO ] [smarthome.event.ItemCommandEvent    ] - Item 'WZ_Downlights' received command ON
17:28:16.769 [INFO ] [marthome.event.ItemStateChangedEvent] - WZ_Downlights changed from OFF to ON
17:28:16.770 [INFO ] [tuwien.auto.calimero                ] - calimero.link.192.168.178.8:3671: send message to 1/0/24, wait for confirmation
17:28:16.770 [DEBUG] [tuwien.auto.calimero                ] - calimero.link.192.168.178.8:3671: cEMI L-Data.req from 8.8.8 to 1/0/24, low priority hop count 6 repeat tpdu 00 81
17:28:16.771 [DEBUG] [tuwien.auto.calimero                ] - KNXnet/IP Tunneling 192.168.178.8:3671: sending cEMI frame seq 88, wait for cEMI.con, attempt 1 (channel 1) 06 10 04 20 00 15 04 01 58 00 11 00 bc e0 88 08 08 18 01 00 81
17:28:16.771 [DEBUG] [tuwien.auto.calimero                ] - KNXnet/IP Tunneling 192.168.178.8:3671: received cEMI L-Data.con with req 162
17:28:16.772 [DEBUG] [tuwien.auto.calimero                ] - calimero.link.192.168.178.8:3671: confirmation of 1/0/24
17:28:16.773 [INFO ] [tuwien.auto.calimero                ] - calimero.link.192.168.178.8:3671: send message to 1/0/24, wait for confirmation
17:28:16.773 [DEBUG] [tuwien.auto.calimero                ] - calimero.link.192.168.178.8:3671: cEMI L-Data.req from 8.8.8 to 1/0/24, low priority hop count 6 repeat tpdu 00 81
17:28:16.774 [DEBUG] [tuwien.auto.calimero                ] - calimero.link.192.168.178.8:3671: send to 1/0/24 succeeded
17:28:16.774 [DEBUG] [tuwien.auto.calimero                ] - process 192.168.178.8:3671: group write to 1/0/24 succeeded
17:28:16.775 [DEBUG] [tuwien.auto.calimero                ] - KNXnet/IP Tunneling 192.168.178.8:3671: sending cEMI frame seq 89, wait for cEMI.con, attempt 1 (channel 1) 06 10 04 20 00 15 04 01 59 00 11 00 bc e0 88 08 08 18 01 00 81
17:28:16.776 [DEBUG] [tuwien.auto.calimero                ] - KNXnet/IP Tunneling 192.168.178.8:3671: received cEMI L-Data.con with req 163
17:28:16.777 [DEBUG] [tuwien.auto.calimero                ] - calimero.link.192.168.178.8:3671: confirmation of 1/0/24
17:28:16.777 [DEBUG] [tuwien.auto.calimero                ] - calimero.link.192.168.178.8:3671: send to 1/0/24 succeeded
17:28:16.778 [DEBUG] [tuwien.auto.calimero                ] - process 192.168.178.8:3671: group write to 1/0/24 succeeded
17:28:16.841 [DEBUG] [tuwien.auto.calimero                ] - calimero.link.192.168.178.8:3671: indication from 1.1.6
17:28:16.844 [INFO ] [smarthome.event.ItemCommandEvent    ] - Item 'WZ_Downlights' received command ON
17:28:16.846 [INFO ] [tuwien.auto.calimero                ] - calimero.link.192.168.178.8:3671: send message to 1/0/24, wait for confirmation
17:28:16.847 [DEBUG] [tuwien.auto.calimero                ] - calimero.link.192.168.178.8:3671: cEMI L-Data.req from 8.8.8 to 1/0/24, low priority hop count 6 repeat tpdu 00 81
17:28:16.847 [DEBUG] [tuwien.auto.calimero                ] - KNXnet/IP Tunneling 192.168.178.8:3671: sending cEMI frame seq 90, wait for cEMI.con, attempt 1 (channel 1) 06 10 04 20 00 15 04 01 5a 00 11 00 bc e0 88 08 08 18 01 00 81
17:28:16.847 [DEBUG] [tuwien.auto.calimero                ] - KNXnet/IP Tunneling 192.168.178.8:3671: received cEMI L-Data.con with req 165
17:28:16.848 [DEBUG] [tuwien.auto.calimero                ] - calimero.link.192.168.178.8:3671: confirmation of 1/0/24
17:28:16.848 [DEBUG] [tuwien.auto.calimero                ] - calimero.link.192.168.178.8:3671: send to 1/0/24 succeeded
17:28:16.848 [DEBUG] [tuwien.auto.calimero                ] - process 192.168.178.8:3671: group write to 1/0/24 succeeded
17:28:16.868 [DEBUG] [tuwien.auto.calimero                ] - calimero.link.192.168.178.8:3671: indication from 1.1.6
17:28:16.871 [INFO ] [smarthome.event.ItemCommandEvent    ] - Item 'WZ_Downlights' received command ON
17:28:16.873 [INFO ] [tuwien.auto.calimero                ] - calimero.link.192.168.178.8:3671: send message to 1/0/24, wait for confirmation
17:28:16.874 [DEBUG] [tuwien.auto.calimero                ] - calimero.link.192.168.178.8:3671: cEMI L-Data.req from 8.8.8 to 1/0/24, low priority hop count 6 repeat tpdu 00 81
17:28:16.874 [DEBUG] [tuwien.auto.calimero                ] - KNXnet/IP Tunneling 192.168.178.8:3671: sending cEMI frame seq 91, wait for cEMI.con, attempt 1 (channel 1) 06 10 04 20 00 15 04 01 5b 00 11 00 bc e0 88 08 08 18 01 00 81
17:28:16.875 [DEBUG] [tuwien.auto.calimero                ] - KNXnet/IP Tunneling 192.168.178.8:3671: received cEMI L-Data.con with req 167
17:28:16.875 [DEBUG] [tuwien.auto.calimero                ] - calimero.link.192.168.178.8:3671: confirmation of 1/0/24
17:28:16.875 [DEBUG] [tuwien.auto.calimero                ] - calimero.link.192.168.178.8:3671: send to 1/0/24 succeeded
17:28:16.875 [DEBUG] [tuwien.auto.calimero                ] - process 192.168.178.8:3671: group write to 1/0/24 succeeded
17:28:16.936 [DEBUG] [tuwien.auto.calimero                ] - calimero.link.192.168.178.8:3671: indication from 1.1.6
17:28:16.938 [INFO ] [smarthome.event.ItemCommandEvent    ] - Item 'WZ_Downlights' received command ON

... [ommitted around 300 equal blocks of log output]

17:29:13.747 [INFO ] [smarthome.event.ItemCommandEvent    ] - Item 'WZ_Downlights' received command ON
17:29:13.749 [INFO ] [tuwien.auto.calimero                ] - calimero.link.192.168.178.8:3671: send message to 1/0/24, wait for confirmation
17:29:13.750 [DEBUG] [tuwien.auto.calimero                ] - calimero.link.192.168.178.8:3671: cEMI L-Data.req from 8.8.8 to 1/0/24, low priority hop count 6 repeat tpdu 00 81
17:29:13.753 [DEBUG] [tuwien.auto.calimero                ] - KNXnet/IP Tunneling 192.168.178.8:3671: sending cEMI frame seq 233, wait for cEMI.con, attempt 1 (channel 1) 06 10 04 20 00 15 04 01 e9 00 11 00 bc e0 88 08 08 18 01 00 81
17:29:13.754 [DEBUG] [tuwien.auto.calimero                ] - KNXnet/IP Tunneling 192.168.178.8:3671: received cEMI L-Data.con with req 195
17:29:13.754 [DEBUG] [tuwien.auto.calimero                ] - calimero.link.192.168.178.8:3671: confirmation of 1/0/24
17:29:13.756 [DEBUG] [tuwien.auto.calimero                ] - calimero.link.192.168.178.8:3671: send to 1/0/24 succeeded
17:29:13.758 [DEBUG] [tuwien.auto.calimero                ] - process 192.168.178.8:3671: group write to 1/0/24 succeeded

Seems like my dim actor (1.1.6) notifies openHAB about the change and then openHAB sends it again which of course result in a loop that only stops after around 300 of such code blocks. This is obviously not optimal.

Question:

What causes this loop? Is it …

  • A bug in KNX binding 1.9 related to those issues?
  • OH2 - KNX - infinite command loop
  • [KNX] binding in OpenHAB2 generates lots of bus traffic
  • An error in my KNX config?
  • Maybe because openhab 2 and knxd is running on the same device (ip == localIp ???)
  • A misconfiguration of my items?
  • Do I have to use item type Dimmer
  • Do I have to use listeningGAs
    • By the way: I did not understand listeningGAs so far. Could someone enlighten me about their usage. The docs I found so far are very limited and not understandable for a beginner like me.
  • A misconfiruation of my dim actor (1.1.6)?
  • Should it not send back status changes (apparently like the switch actor on 1.1.1)

Thank you. Any help or links to further docs are very welcome.

Cheers.
Stephan

I don’t think that it’s mandatory to use listening GAs but it may help with your setup.
If you don’t use them: Then openHAB will not get updates from the KNX Bus and the Status of the item will not be “synchronized” with the real status. Example: If you turn on the light using your push button, the Status update/info will not be transmitted to OH.

They will provide status information to openHAB. One example from a regular (not dimming) actuator is below:

/* First Floor Lights (syntax: knx=On/Off+<State) */
Switch	E04a_Mirror		"E04a Mirror"		(FF_E04a_MBath,gFF_Lights)	{knx="1/1/0+<1/2/20"}

So in this example, I use the first GA (1/1/0) as the command GA (to send ON/OFF from OH2 to KNX) and the second GA (1/2/20) to read status info from KNX.
You need to create these status GAs in your KNX implementation (using ETS) and link them to the Status channels of the KNX respective Actuators

Another example from a Roller Shutter Actuator (I don’t have a dimmer actuator):

/* Ground Floor Rollershutters (syntax:  knx=Up/Down,Step/Stop,GoTo,Status) */
Rollershutter	P11_J1		"P11_J1"		<rollershutter>	(GF_P11_Living,Shutters)	{knx="2/0/0,2/0/1,2/3/0+<2/2/0"}

By the way: your setup looks good… I can’t see what could be causing this loop.
Try setting up the Status (listening) GAs and see if the loop goes away.