-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
As suggested by @b0661, it would be good to get informed if a device got disconnected. If the device does not send regular statements with e.g. measurement values, one could require it to send a regular heartbeat message.
Message content
The heartbeat message should be a normal statement. The content of the message is yet to be defined.
Possible options:
- The node ID. This is useful to be able to assign e.g. CAN addresses to the node ID without requesting it from the device.
- The uptime of the device in seconds. This would allow a gateway or a cloud service to store the previously received uptime. If the current uptime is less than the previous one, it means that the device has been restarted or disconnected in between, so some of the device data may have to be requested again.
- An update counter (also suggested by @b0661 in Updates for ThingSet Protocol draft v0.5 thingset-device-library#24). This would allow a gateway or cloud service to know if the content of the data objects has been updated. If the counter value doesn't match the one it knows, it may want to request some data again. In addition to that, the counter would also allow to detect if a device has restarted if the received counter value is lower than the known one.
Message frequency
As ThingSet can be used in many different contexts, the message frequency has to be adapted to the underlying protocol. Here is a first suggestion for suitable frequencies of the heartbeat.
- CAN bus: 1 second
- Serial interface: 60 seconds
- LoRaWAN: 1 hour
These are some first ideas for further discussion. I personally think that the uptime and/or the update counter would provide more useful information than the node ID.
Metadata
Metadata
Assignees
Labels
No labels