smartSleep possible bug and/or missing documentation (2.2.0)
-
I am putting my node to sleep with
smartSleepto let the controller request the node to redo its presentation.
While experimenting I set theMY_SMART_SLEEP_WAIT_DURATION_MSto 2000 to let me fire the request by hand.
I notice that the time smartSleep(5000) sleeps seems to be the value given plus the 2000, which totals at 7 seconds, and not the 5 seconds I expected. Is this a bug or have I misunderstood something?Second, looking at the communication on the other side of my ESP8266 based MQTT gateway I see the heartbeats as
mygateway1-out/121/255/3/0/33 5000 mygateway1-out/121/255/3/0/32 2000decoding the MQTT topic using https://www.mysensors.org/download/serial_api_2 I get:
cmd 3 : Internal
but the internal command table ends with number 28, not covering 32 and 33 I got.
Anywhere else I should lookup those? -
I am putting my node to sleep with
smartSleepto let the controller request the node to redo its presentation.
While experimenting I set theMY_SMART_SLEEP_WAIT_DURATION_MSto 2000 to let me fire the request by hand.
I notice that the time smartSleep(5000) sleeps seems to be the value given plus the 2000, which totals at 7 seconds, and not the 5 seconds I expected. Is this a bug or have I misunderstood something?Second, looking at the communication on the other side of my ESP8266 based MQTT gateway I see the heartbeats as
mygateway1-out/121/255/3/0/33 5000 mygateway1-out/121/255/3/0/32 2000decoding the MQTT topic using https://www.mysensors.org/download/serial_api_2 I get:
cmd 3 : Internal
but the internal command table ends with number 28, not covering 32 and 33 I got.
Anywhere else I should lookup those?#define MY_SMART_SLEEP_WAIT_DURATION_MS (500ul) The wait period (in ms) before going to sleep when using smartSleep-functions.frrom https://www.mysensors.org/apidocs/group__SleepSettingGrpPub.html#gaf353bf3627ebd8f15e200b320e2e065d (I know we're not very good at advertising this documentation)
If you set this to 2000, the node will wait 2 seconds before going to sleep, and then sleep for the amount if time you have requested, so the total time will be the sum.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login