Disconnected
This event is fired when the station disconnects from the network. Combined with connected event, it allow to track the availability of the station.
Body parameters
event
: disconnectedstation
(integer): The identifier of the station.reason
(string): Why the station is disconnected:AUTH_ERROR
,CLIENT_INITIATED_DISCONNECT
,CLIENT_ERROR
,CONNECTION_LOST
,DUPLICATE_CLIENTID
,FORBIDDEN_ACCESS
,MQTT_KEEP_ALIVE_TIMEOUT
,SERVER_ERROR
orSERVER_INITIATED_DISCONNECT
.error
(boolean): Indicate if this disconnection is abnormal. (for example, false if you ask the station to reboot, true if the station loose the network)
Body example
{
"event": "disconnected",
"station": 156,
"error": true,
"reason": "MQTT_KEEP_ALIVE_TIMEOUT"
}
{
"event": "disconnected",
"station": 156,
"error": false,
"reason": "CLIENT_INITIATED_DISCONNECT"
}