Skip to content

13: Heartbeat

A message sent to let the receiver know the sender is still active/alive. Can also be used to check if a connection is still active, as the message should be ACKed. Devices currently default to sending a heartbeat every 15 seconds on open links. Arbitrary fields can be added in fields payload 200+

Payload

FieldNameDescriptionTypeUnit
6Battery PercentDevices send battery percentage in heartbeatsuint8

Examples

Basic
The most basic heartbeat to keep a connection active. It has no header fields and no payload fields.
Including battery %
Devices will automatically add battery % to heartbeats
With message ID 2456632031
Message IDs can be added to heartbeats to increase traceability, but they are not required
With arbitrary data in payload field 202
If you are sending a heartbeat between systems you control You can add arbitrary data in payload fields 200 and above, Such as these additional bytes, which are "hello" in ascii.

Code

For convenience, the following constants can be used to reference this message type.