Node wake up from sleep too early

  • Hi,
    I'm on my 16th node with mysensors (2.2.0) library and first time with this kind of issue. I have a sensor on Arduino Nano and in order to save battery, as usual, I use the sleep function:


    the variable value is 900000. The problem is, the node wake ups too early, the debug is:

    Sleep for seconds: 900000
    1116278 MCO:SLP:MS=900000,SMS=0,I1=255,M1=255,I2=255,M2=255
    1116288 TSF:TDI:TSL
    1116399 MCO:SLP:WUP=-1
    1116401 TSF:TRI:TSB

    so according to the log parser, values are correct and the node wakes up by the timer interrupt (1116399 MCO:SLP:WUP=-1), but it happens straight away after the sleep command.

    Any clue? Can be any flag that should be reset used by the timer?

    Thank you for your help.

  • @mortommy

    1. What type of unit is "sleep_seconds_between_measures"?
    2. Post the full code!
    3. Did you select the right type and clock speed when flashing the nano?
    4. 2.2.0 is an older version, current is 2.3.2, I suggest upgrade of all nodes and gateways to this latest standard.

Log in to reply

Suggested Topics