Reliability of the MySensors network

August 26, 2017 // Tagged in: mySensors

My plan is to use MySensors library to automate my home. The intention is to do implement sensors as well as actuators and a Linux based controller which implements the ruleset between sensors and actuators. The network should be as reliable as possible. Messages have to be deliverd with nearly 100% certainty, otherwise it becomes frustating for the user when the home doesn't execute the intended commands. With MySensors network it isn't as simple as it seems at first glance. Basic functionality like end to end acknowledgement and ping need to partially handled within custom sensor sketches and are not part of the MySensors implementation.

End to End Acknowledgment

bool send(MyMessage &msg, bool ack);

Software ack is what I get when using send(msg, true) (and is also supported by some other functions like present(), sendSketchInfo() and sendBatteryLevel()

Source: MySensors Forum

Ping Nodes

Since the acknowledge messages are handled by the network, the online status for each node isn't transparent for the controller. Happily the network protocol provides the possibility to ping a network node. But be careful, the protocol provides multiple internal sub-types which seem to provide the same functionality. There are:

The ping and pong sub type is used by the network. It figures out how many hops are between two nodes. It is not exposed by the network. So when a controller wants to know if a node is alive, the ping/pong want provide any feedback. The heartbeat request can be send to a node and this can respond with heartbeat response, which can be evaluated by the controller.