Battery nodes and communication failure


  • Mod

    If I understand correctly, with the default settings nodes will keep trying forever if they are unable to reach the gateway.

    Therefore, I have set

    #define MY_TRANSPORT_WAIT_READY_MS (30000) // Don't stay awake for more than 30s if communication is broken
    

    in my sketch. Is this a good way to handle temporary communication failures (gw has crashed for example)? Or will there be negative side-effects? Is there a better way to make sure battery-powered nodes don't drain the battery if the gateway becomes unavailable? Will the node be able to reestablish communication next time it wakes up and the gateway is available?



  • Hi, it looks like this constant is used only during the first initialization of the node, when the parent_id and the node_id are being written to the node's eeprom, not during normal operation.

    I tested a method from another suggestion on this forum, to ask the controller for the last value sent by the node, since if you ask for data it do times out and you could then assume that the gateway was offline or some other network error occurred, but this technique did not work all the time.

    I have power outages here that disable the gateway and then the nodes eat up their batteries trying to resend the same message over and over and I would love to find a way to stop this from happening too.


 

246
Online

7.8k
Users

8.7k
Topics

93.0k
Posts