State event
This messages are coming from server if client is subscribed to the state events of the specific tracker and this tracker is not blocked. It's occur in the cases:
- Tracker stated is changed.
- Immediately after subscription.
- Immediately after unblocking.
Message fields:
- type - "event".
- event - "state".
- data - source state.
- user_time - current time in user's timezone.
Message sample:
{
"type": "event",
"event": "state",
"user_time": "2018-10-17 12:51:55",
"data": {
"source_id": 10284,
"gps": {
"updated": "2018-10-17 12:51:43",
"signal_level": 100,
"location": {
"lat": 14.330065796228606,
"lng": -90.99037259141691
},
"heading": 248,
"speed": 0,
"alt": 431
},
"connection_status": "active",
"movement_status": "parked",
"gsm": null,
"last_update": "2018-10-17 12:51:46",
"battery_level": null,
"battery_update": null,
"inputs": [false, false, false, false, false, false, false, false],
"inputs_update": "2018-10-17 12:51:43",
"outputs": [false, false, false, false, false, false, false, false],
"outputs_update": "2018-10-17 12:51:43",
"actual_track_update": "2018-10-04 22:47:07"
}
}
Note: source_id is not a tracker_id.