Skip to content

MQTT API ‐ Heartbeat

QA edited this page Oct 25, 2024 · 1 revision

Heartbeat

Interaction Flow

sequenceDiagram

participant Server as User Application Service
participant MQTT as User MQTT Server
participant Gateway as Cassia Bluetooth Gateway
  
loop
  rect rgba(136, 177, 234,0.4)
    Gateway -) Gateway: Heartbeat Timer
    Gateway --) Server: Heartbeat Request
    Server -) Server: Process Heartbeat Request
    Server --) Gateway: Heartbeat Response
    Gateway -) Gateway: Process Heartbeat Response
  end
end

Loading

Heartbeat Request

Topic action Field
up/{gateway}/heartbeat heartbeat

Message Payload

{
  "id": "35656",
  "action": "heartbeat",
  "timestamp": 1678698297028,
  "gateway": "CC:1B:E0:E2:8F:2C",
  "data": {}
}

Heartbeat Response

Topic action Field
down/{gateway}/heartbeat_reply heartbeat_reply

Message Payload

{
  "id": "35656",
  "action": "heartbeat_reply",
  "timestamp": 1678698297028,
  "gateway": "CC:1B:E0:E2:8F:2C",
  "data": {}
}

Home

Overview
Getting Started
RESTful API
Advanced RESTful API
MQTT API (Beta Version)

Error Messages

Device Integrating

Sample Code

Misc
Clone this wiki locally