Relay Node with Fallback feature, if network is lost or controller is failing...



  • Hi All,

    Do you have any ideas/hints/best practices or examples on how to make a Relay Node, where the relay will turn off, if the network connection is lost or the controller fails? My starting point is the MySensors Relay sketch.

    The intention is a safety feature that will turn off a relay if "control" is lost... either if the network connection is lost or controller for some reason should fail.

    Thanks,
    Martin.


  • Contest Winner

    To my knowledge MySensors is a stateless connection, so you can not know when the connection is lost after the node has been initialized. Also when a node is connected to a repeater node, I was told you will get an ack from the repeater even if it fails to deliver the message.

    I'm more curious to what you want to achieve, or what you've hooked up to that relay?



  • @monics To know whether the controller was online and working, you could do something simple like request a variable from it, or just check on/request the time every so often. If it responds then things are good, and if it times out then you've got a problem and you can act on it.



  • @monics A simple solution would be to code sketch in a way that it switches off the relay automatically after, let's say, 10 seconds. On the controller side, send a ON message every 9 seconds.

    Regards, Edi


  • Contest Winner

    Depending what's connected to a relay, I wouldn't make it go on or off depending on the controller state. It can lead to dangerous behaviour and it's prohibited by law in my country.

    In all honesty I have my Sensors running for a long long time. It's stable and more reliable than anything else I have running in my home.

    But like @eiten says yo could write a sketch that queries for a variable. But I think I'd go for a controller side solution. That would "ping" my node and send a nottfication to my phone whenever the node can't be reached.


Log in to reply
 

Suggested Topics

  • 1
  • 8
  • 5
  • 16
  • 1
  • 2

74
Online

11.0k
Users

11.0k
Topics

112.4k
Posts