Short screencast to better illustrate issue:
My config:
- OpenHAB 2.3.0 inside a docker container (RancherOS host OS)
- Zwave binding version 2.3.0
Hello community (and chris-jackson),
Recently I started using the Google Home Assistant to control some of my OpenHAB/ZWave devices. Using this integration exposed a problem that I hadn’t previously encountered before since I hardly ever post ItemUpdate or ItemCommand ON to my Zwave appliances.
When using a Dimmer item and sending it the ItemCommand 'ON'
it will switch on the actual dimmer and it will go to it’s previous dim level (i.e. 45%). This is known behavior of the Fibaro dimmers I use. This also works when I manually switch on the dimmer using my wall contact switch (connected to Fibaro dimmer).
When I POST ItemCommand 'ON'
to the dimmer item using the REST API (simulating what Google Home does when I ‘tell’ it to switch on my kitchen table lights), it correctly switches on my lights but the state in OpenHAB always incorrectly shows ‘100’ instead of the actual dim level (‘45’ in this case). Only manually ‘REFRESH’-ing the Item gets the correct item state. For clarification see the screencast in the top of my post)
Is this an issue with the ZWave binding? Should it poll/query the item for a state update after having received the ‘ON’ command?
I see several users reporting that adding autoupdate=false
should fix this problem.
{channel=“zwave:device:controller:node8:switch_dimmer”, autoupdate=“false”}
However, when I add autoupdate=false
to my item definition it will just leave the dimmer item state to ‘0’ after having switched on the lights using ItemCommand 'ON'
. So this does not resolve the issue of not correctly updating that state - it just leaves the state at ‘0’ when the dimmer has been switched ‘ON’ even though that actually dimmer switches on to it’s previous state.
Short event log snippet for kitchen table lights:
ItemStateChangedEvent - GF_Kitchen_Dimmer_KitchenTableSpotlights changed from 0 to 55
ItemCommandEvent - Item ‘GF_Kitchen_Dimmer_KitchenTableSpotlights’ received command 35
ItemStateEvent - GF_Kitchen_Dimmer_KitchenTableSpotlights updated to 35
ItemStateChangedEvent - GF_Kitchen_Dimmer_KitchenTableSpotlights changed from 55 to 35
ItemCommandEvent - Item ‘GF_Kitchen_Dimmer_KitchenTableSpotlights’ received command OFF
ItemStateEvent - GF_Kitchen_Dimmer_KitchenTableSpotlights updated to OFF
ItemStateChangedEvent - GF_Kitchen_Dimmer_KitchenTableSpotlights changed from 35 to 0
ItemCommandEvent - Item ‘GF_Kitchen_Dimmer_KitchenTableSpotlights’ received command ON
ItemStateEvent - GF_Kitchen_Dimmer_KitchenTableSpotlights updated to ON
ItemStateChangedEvent - GF_Kitchen_Dimmer_KitchenTableSpotlights changed from 0 to 100
Update 1:
A workaround for this issue to is create a rule that automatically sends ItemCommand 'REFRESH'
after having received ItemCommand 'ON'
. This is of course just that, a workaround. I would love to see this working straight out of the ZWave binding.
This issue seems related to:
Update 2:
After having updated to a more recent version of OpenHAB and the ZWave binding (2.4.0M6 to be precise) this issue was resolved.