Skip to content
This repository has been archived by the owner on Feb 24, 2021. It is now read-only.

Turning off switch briefly reports it as back on in homeassistant, before showing off [question] #838

Open
vvuk opened this issue Nov 22, 2020 · 4 comments
Assignees
Labels
question Further information is requested

Comments

@vvuk
Copy link

vvuk commented Nov 22, 2020

I've got a Zooz ZEN15 power switch for a high-wattage device. When I turn the device off via homeassistant, the device's state flicks back to on.. and only some seconds later goes back off. If I look at the zwave2mqtt logs I see this:

z2m:Mqtt Message received on zwave2mqtt/5/37/1/0/set +1m
z2m:Zwave zwave node 5: changed: 50-1-2:Electric - W:4.692 -> 0 +2s
z2m:Zwave zwave node 5: changed: 50-1-256:Exporting:false -> false +1ms
z2m:Zwave zwave node 5: changed: 50-1-2:Electric - W:0 -> 0 +23ms
z2m:Zwave zwave node 5: changed: 50-1-256:Exporting:false -> false +4ms
z2m:Zwave Notification from node 5: Notification - TimeOut (1) +9s
z2m:Zwave zwave node 5: changed: 37-1-0:Switch:true -> false +692ms
z2m:Zwave zwave node 5: changed: 37-1-0:Switch:false -> false +23ms

I'm guessing what's happening is hass sends the mqtt message to set the device to off. Homeassistant then refreshes the state of the device, and sees that it's still on -- or that the persistent state is still on (I need to go actually look at the physical switch to see how quickly the device responds). Some seconds later, there's a zwave timeout, and then the switch finally responds with the new state. Note that the power draw went to 0 watts within 2 seconds, so I think the switch actually responds fairly quickly; just the state doesn't get communicated.

I'm fairly new to doing zwave through mqtt -- I'm not even quite sure where to begin here. Any suggestions would be appreciated. Thanks!

@vvuk vvuk added the question Further information is requested label Nov 22, 2020
@idlezombie
Copy link

Have you set the qos in z2m?

I saw similar behavior in hass with my aeotec dual nanos, they all started behaving a lot better after setting z2m config for mqtt to retain and qos 2.

https://assetwolf.com/learn/mqtt-qos-understanding-quality-of-service#:~:text=Quality%20of%20Service%20%28QoS%29%20in%20MQTT%20messaging%20is,at%20these%20in%20more%20detail%20in%20a%20moment.

@robertsLando
Copy link
Member

I would suggest to set the qos to 0 and enable retain flag

@vvuk
Copy link
Author

vvuk commented Dec 4, 2020

QoS is set to 0 and retain is enabled. I saw in the z-wave log that there are some timeouts from this device; will dig into that too.

@robertsLando
Copy link
Member

@vvuk Also keep an eye to: https://github.com/zwave-js/zwavejs2mqtt. It's very close to a first release

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants