feat(heartbeat): add rssi to heartbeat payload
WiFi signal strength (dBm) now included in every heartbeat message. Docs updated: MQTTDriver README, api-reference, heartbeat feature doc. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -408,7 +408,10 @@ void MQTTDriver::publishHeartbeat() {
|
||||
|
||||
// Uptime in milliseconds
|
||||
payload["uptime_ms"] = uptimeMs;
|
||||
|
||||
|
||||
// WiFi signal strength
|
||||
payload["rssi"] = WiFi.RSSI();
|
||||
|
||||
// Serialize to string
|
||||
String heartbeatMessage;
|
||||
serializeJson(doc, heartbeatMessage);
|
||||
|
||||
@@ -61,7 +61,7 @@ Reconnect attempts are reset to 0 on a successful connection or a new `onNetwork
|
||||
|
||||
## Heartbeat
|
||||
|
||||
Once connected, a heartbeat is published immediately and then every 30 seconds to `vesper/{uid}/status/heartbeat` with `retain = true`. Heartbeat payload includes `device_id`, `firmware_version`, `ip_address`, `gateway`, `uptime_ms`, and an uptime string. The heartbeat timer is stopped on disconnect and restarted on reconnect.
|
||||
Once connected, a heartbeat is published immediately and then every 30 seconds to `vesper/{uid}/status/heartbeat` with `retain = true`. Heartbeat payload includes `device_id`, `firmware_version`, `ip_address`, `gateway`, `uptime_ms`, `rssi`, and an uptime string. The heartbeat timer is stopped on disconnect and restarted on reconnect.
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user