Disable auto back to sleep

Discussions about Z-Way software and Z-Wave technology in general
Post Reply
skiv71
Posts: 124
Joined: 01 May 2014 13:46
Location: United Kingdom
Contact:

Disable auto back to sleep

Post by skiv71 »

Hi,

I'd like my system to issue the 'go back to sleep' command, as on wake, I have task's to perform.

Quite often, I'm seeing the 'back to sleep' command coming into play before my command has had chance to hit the queue, so then the command only takes place on the next wake.

Is this hardcoded somewhere, or can I make a change myself?

Thanks

Neil
pofs
Posts: 688
Joined: 25 Mar 2011 19:03

Re: Disable auto back to sleep

Post by pofs »

The idea is to send sleep command after all the queued commands are executed. If you're queuing a new command, previous sleep command is deleted, and the new one is added in the end of queue, so all the commands are executed when device wakes up.
It is a hard-coded behavior, and you can't change it.
skiv71
Posts: 124
Joined: 01 May 2014 13:46
Location: United Kingdom
Contact:

Re: Disable auto back to sleep

Post by skiv71 »

Yea I understand that, it's just hit and miss on whether I can get the command in the queue after discovering a device.*.isAwake before z-way has sent it back to sleep.

Quite often I cannot.
pofs
Posts: 688
Joined: 25 Mar 2011 19:03

Re: Disable auto back to sleep

Post by pofs »

Yes, the JS callbacks are executed asynchronously, so it is possible device has already went sleeping when you get the notification.
Why bothering monitoring isAwake value at all? You can just enqueue your command, and it will be executed when device awakes.
mMarcVD
Posts: 3
Joined: 25 Jan 2015 19:25

Re: Disable auto back to sleep

Post by mMarcVD »

Reading all this, I would like to emphasize that some adaptation (e.g. of the used timeout value) would be very nice.

I have a Aeon labs sensor (updated software some weeks ago) that will send three values when awake (temperature, humidity and luminance), and those communications interfere with the sleep command, with as end result that the sensor gets blocked (blinking led = out of network). I'm convinced that with a somewhat larger timeout, this would work well.
Post Reply