Heartbeat & Online Statusv1.0.0

Version History (Latest: v1.0.0 / 2025-12-18)
Version Update Date Change Description Author
v1.0.0 2025-12-18 1. Added device online/offline notifications Yan Yonglong

1. Description

Because device firmware implementations differ, the method used to determine online and offline status also differs. Some devices support heartbeats, while others support only online/offline events.

2. Event Names and ID Identifiers

Event Name Unique Identifier Description
Device Online online Device Online
Device Offline offline A result calculated from the heartbeat interval and not necessarily exact.

3. Device Status Changes

3.1 Device Report Event Messages

3.1.1、Provide a Publicly Accessible Callback URL

Example: http://127.0.0.1:8080/device/heartbeat

3.1.2 HTTP Method and Module Event Request Example
POSTProduction: https://example.com/DEMO_RESOURCE
Request Example
CURL
curl -XPOST -H "Content-Type: application/json; charset=utf-8" "https://example.com/DEMO_RESOURCE" -d '{
    "did": "DEMO_DEVICE_001",
    "e": "online",
    "t": 18902981762,
    "sign": ""
}'
3.1.3 Callback Example Field Description
Field Description Description
did Unique Device ID device_id and IMEI both identify the device
; provide at least one
e Event alias See the "Event Names and ID Identifiers" table
● online Device Online
● offline Device Offline
t Alarm Time Timestamp when the server received the device alarm
stamp. Because device time may be inaccurate,
this is not the device time. Use the most
recent time.
sign Verification Field Generate a string using an algorithm and compare it with
this field. If they match, the data is
reliable.
Generation rules.
data Pass "e=${Event alias}&deviceId=${deviceId}" e: use the alarm time
deviceId: Unique Device ID
Sign Generation Notes:

See the business-specific data parameters for online/offline status generated by "Sign Generation Examples".