Working with Sleepy ZWave Devices

What is the proper way to work with "sleepy" zwave devices.

For example, if I want to set some parameters on it, sending the command will not reach the device because its sleeping.

Instead, should I create a cmd queue and when then wakeupNotification is triggered then send the commands in the queue, a delay of maybe 30s (to wait on responses) and then the wakeUpNoMoreInformation at the end?

Is this the proper way?

This works, store it and wait

https://raw.githubusercontent.com/Mark-C-uk/Hubitat/master/Danfoss%20Living%20Connect%20and%20POPP%20Radiator%20Thermostat

1 Like

Yes, although some devices don't send a wakeupNotification if they are manually woken up (for example some button / scene controllers).

What I usually do is queue the config commands in a state variable and then on any activity into parse() check to see if there's anything in the queue to send and send it. Then clear the queue. If the incoming communication was actually a wakeup then I tag on a wakeUpNoMoreInformation on the end of the commands.

You do have to be careful to account for race conditions though, since the responses to the config commands can trigger the queue again if they come in before the first instance of the driver has persisted the cleared queue back to state!

1 Like

Download the Hubitat app