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.
Protocol
3
3
Length
110
11 bytes
Type
130
13 (Heartbeat)
Header Count
00
0
Payload Count
00
0
Checksum
168181
46504
Including battery %
Devices will automatically add battery % to heartbeats
Protocol
3
3
Length
140
14 bytes
Type
130
13 (Heartbeat)
Header Count
00
0
Payload Count
10
1
Payload Types
6
6
Battery Percent
184
84
Checksum
10357
14695
With message ID 2456632031
Message IDs can be added to heartbeats to increase traceability, but they are not required
Protocol
3
3
Length
170
17 bytes
Type
130
13 (Heartbeat)
Header Count
10
1
Header Types
1
1
Message ID
422358109146
2456632031
Payload Count
00
0
Checksum
16255
65296
With arbitrary data in payload field 108
If you are sending a heartbeat between systems you control You can add arbitrary data in payload fields 108-127 (uint8 length), and 236-255 (uint16 length), Such as these additional bytes, which are "hello" in ascii.
Protocol
3
3
Length
180
18 bytes
Type
130
13 (Heartbeat)
Header Count
00
0
Payload Count
10
1
Payload Types
108
108
Field 108
5104101108108111
(bytes) ⚙️
Checksum
18742
10939

Code ​

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