Sleep vs gw.sleep
-
Hi
This should be a relative easy question for those who know the answer, but I can't find it myself. Neither here, the API or google.
What is the difference between sleep() and gw.sleep(), and when should I use which function?
Thanks
-
Welcome to the MySensors community @bloody2k !
sleep() is for MySensors 2.0 and later. gw.sleep() is for MySensors 1.x.
-
Thank you very much!
That would explain why I couldn't find the difference, since they do the same thing.
-
@bloody2k yup
-
Before opening a new thread I would like to attach my question to this one.
I use sleep quite a lot and got the feeling that quite a lot of the time the first message sent after "waking" up is getting lost .. so here is my question:
What do I have to do after hitting sleep? I already noticed that sleep is a combination of:
transportPowerDown();
and
hwSleep
If there is nothing I have to do this might be pure imagination and I would have to track down the issue further. Thanks in advance!
-
@cimba007 you shouldn't have to do anything else. There is a bug in 2.0 that can cause problems if the node goes back to sleep too soon after sending a message though. https://github.com/mysensors/MySensors/pull/558 It is fixed in the development branch and will be included in 2.0.1.
-
This might be the case. Thanks for the info .. i am looking forward to test it
Suggested Topics
-
Update RF24 library to latest version
Bug Reports • 23 Mar 2014, 23:37 • andriej 24 Mar 2014, 22:52 -
Which device I have to use to connect with accelerometer before connecting to my pc?
General Discussion • 24 Jan 2023, 17:16 • Yada Kijsathan 25 days ago -
No merge into master in the last 5 years, should we use development?
General Discussion • 23 Sept 2024, 17:48 • kiesel 17 days ago -
Why is the output of ACS712 current measurement module unchanged?
General Discussion • 19 Jul 2021, 09:09 • Tessie T 12 days ago -
ESP32 with LoRa
General Discussion • 31 Jan 2023, 11:06 • dhanushmh 8 days ago -
Email notifications received twice
General Discussion • 6 Feb 2023, 16:15 • Jodaille 15 days ago