Page 1 of 1
Disable auto back to sleep
Posted: 07 Feb 2015 16:16
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
Re: Disable auto back to sleep
Posted: 08 Feb 2015 03:55
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.
Re: Disable auto back to sleep
Posted: 08 Feb 2015 13:04
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.
Re: Disable auto back to sleep
Posted: 09 Feb 2015 04:31
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.
Re: Disable auto back to sleep
Posted: 09 Feb 2015 22:49
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.