avl_evts
The avl_evts request returns information about the events that have occurred since the last execution of this request.
http://<host>/avl_evts?sid="<text>"
Parameters
| Name | Description |
|---|---|
sid | Session ID. |
Response
{
"tm":<uint>, // server time
"events":[ // events
{
"i":<long>, // item ID
"t":"<text>", // event type: m - message, u - update, d - delete
"d":{ // event description, depends on the event type
...
}
}
]
"sensors": [
{
"i": <uint>, // Unit ID
"d": { // Sensor data object
"<sensor_id>": {
"value": <double|text>, // Raw sensor value (numeric or text)
"format": {
"value": <text>, // Formatted sensor value
"custom_value": <text> // Custom label from the "Intervals and colors" setting (for text sensors)
},
"text_value": <text> // Present only for text sensors
}
}
}
]
}
The sensors field contains calculated sensor values for units that have received new messages since the last avl_evts request. This field provides real-time sensor value updates without requiring separate sensor calculation requests.
- If no units have new sensor values, the sensors field returns an empty array.
- Each object in the array represents one unit (identified by
i- unit ID). - The
dobject contains sensor data, where keys are sensor IDs.
Sensor value formats
Sensor value formats in the response depend on whether it is text sensor or a numeric one. Text sensors include custom sensors with the “Text parameters” option enabled, and sensors of the Driver assignment, Trailer assignment, and Passenger sensor types.
| Parameter | Numeric analog sensor | Text sensor |
|---|---|---|
value |
Contains the raw numeric value (for example, 16.749812) or -348201.3876 if no data has been received. |
Contains the text value (for example, "Active"). |
format.value |
Contains the formatted value with units (for example, "0 km", "62.15 °F") or "---" if no data has been received. |
Duplicates the text_value (for example, "Active"). |
format.custom_value |
Not included in the response. | Contains the custom text defined in the Intervals and colors setting (for example, "Device is active"). |
text_value |
Not included in the response. | Contains the text value or "---" if no data has been received. |