openhab / openhab1-addons

Add-ons for openHAB 1.x
Eclipse Public License 2.0
3.43k stars 1.7k forks source link

KNX-Binding: Reliably switch KNX devices #5136

Open staehler opened 7 years ago

staehler commented 7 years ago

Sometimes KNX devices don't switch although the regarding event happens. OH doesn't handle the missing state change.

My observation:

Expected Behavior

The normal behavior is, that in the event.log a correct switching action looks like this

  1. command received
  2. state changed Items defintion: Switch MusikWCBalkonSchalten "Verstärker WC/Balkon" <audio> (gWC,gBalkon) { knx="1/5/10+<3/5/10" }
    
    2017-02-14 05:17:36.756 [ItemCommandEvent          ] - Item 'MusikWCBalkonSchalten' received command ON
    2017-02-14 05:17:37.064 [ItemStateChangedEvent     ] - MusikWCBalkonSchalten changed from OFF to ON

## Current Behavior
Sometimes (I'ld say 5-7 times a week) the switching action does send the command, but never receives the confirmation on its status GA, which means KNX hasn't switched. This might be OK, when I manually switch on a visu, but in rules it not acceptable - I can not rely on the rules. The logline **changed from OFF to ON** misses.

`2017-02-14 05:17:36.756 [ItemCommandEvent          ] - Item 'MusikWCBalkonSchalten' received command ON`

I don't know the real reason for this errors: this could be in OH or the KNX-binding, on the connection to the IP gateway or in KNX itself or maybe another reason.

## Possible Solution
The solution could be, that every item, which is connected to a status GA, should re-trigger the action if the regarding status confirmation misses within a timeout.

## Steps to Reproduce (for bugs)
As it is not reproducible, I can't unfortunately give any recipe.

## Context
The above described behavior leads to unreliable automatism's - and of course reduces the WAF ;-) 
Finally I cannot rely on my rules in my home automation. Obviously I'm not the only with this reliability problem ([german forum](https://knx-user-forum.de/forum/supportforen/openhab/1032170-knx-ein-objekt-schaltet-manchmal-nicht))

## Your Environment
Latest debian jessie, latest java
OH2 snapshot 06. march 2017
BUSCH-JAEGER 6186 USB Interface
J-N-K commented 6 years ago

I can confirm that this happens sometimes. During debugging #4547, i saw that, too. As far as I can tell, the KNX binding receives the command from OH, but somehow the write action to the KNX bus is not performed.

juelicher commented 6 years ago

I am not sure, f this is related: Sometimes I observe a huge delay between the orginitating event (e.g. switching in the ui or through a rule and sending the command to the KNX bus. I have described my observations in this posting: https://community.openhab.org/t/knx-binding-sends-commands-with-a-big-delay/37679