mirror of
https://github.com/g4klx/DAPNETGateway.git
synced 2026-08-26 12:32:45 -04:00
DAPNETGateway had no MQTT link status at all, and no retain support in its MQTT layer. Adds a link Kind (linking/unlinked/failed) and publishes it from the places connectivity already changes state but was previously only logged: successful login, a rejected auth key (detected asynchronously from the server's own protocol response, not the initial TCP connect), a dropped connection triggering the existing reconnect loop, a failed startup socket open, and clean shutdown.
23 lines
553 B
JSON
23 lines
553 B
JSON
{
|
|
"$defs": {
|
|
"timestamp": {"type": "string"},
|
|
"action": {"type": "string", "enum": ["linking", "unlinked", "failed"]},
|
|
"reason": {"type": "string", "enum": ["auth", "socket", "lost"]}
|
|
},
|
|
|
|
"status": {
|
|
"type": "object",
|
|
"timestamp": {"$ref": "#/$defs/timestamp"},
|
|
"message": {"type": "string"},
|
|
"required": ["timestamp", "message"]
|
|
},
|
|
|
|
"link": {
|
|
"type": "object",
|
|
"timestamp": {"$ref": "#/$defs/timestamp"},
|
|
"action": {"$ref": "#/$defs/action"},
|
|
"reason": {"$ref": "#/$defs/reason"},
|
|
"required": ["timestamp", "action"]
|
|
}
|
|
}
|
|
|