Open flatsiedatsie opened 4 years ago
I think a "per child" timeout is a bit excessive, and usually most nodes force sending after x sleep loops without data change, so it would not be very efficient.
It would seem logical to me to tie this to the heartbeat functionality, and to have it sent together with the I_HEARTBEAT_REQUEST command ? We could have an optional parameter to the sendHeartbeat() method to send the timeout duration ?
Current controllers, like Domoticz, have a universal 'timeout' period. If the node does not communicate for a certain time period, the device should be set to 'offline'.
However, the actual transmission frequency for nodes may very greatly, making the universal period quite unwieldy. For example, a temperature sensor may transmit every minute, while a soil moisture sensor may transmit every 24 hours.
It would be useful if a node could tell the controller its intended transmission frequency / optimal timeout period during the presentation phase. Then, if the node doesn't transmit for a while, the node could be set to offline.
I don't know what the best way to implement this would be.
#define
tag with an I_Type?sendSketchInfo
?This period could even be communicated per child. Then if a single sensor is faulty and no new values are communicated (because the value doesn't change), then this could raise the alarm.
present()
?See also: https://forum.mysensors.org/topic/10674/mysensor-things-show-up-as-active-when-they-are-unplugged