Skip to main content

Equipment status parameters

Use this method for getting different statuses of the equipment.

Getting equipment status

A request to obtain data related to current status of the detector is formed as follows:

Url_Smartroad/api/integration/status?login=user_login&password=user_password

Without specifying the sensor_id parameter, the resource will return the status of all project detectors available to the user.

Description of additional parameters for requesting equipment status

ParameterParameter typeDescription
sensor_idstringUnique detector identifier. One or more UUIDs are specified, separated by commas. Restriction: all detectors must belong to user-accessible projects
project_idstringA unique identifier of the project for whose detectors information about statuses is requested. One or more UUIDs are specified, separated by commas. Restriction: The user must have access to the projects specified in the query string.
fromstringOptional parameter. Defines the beginning of the time period from which data is requested in ISO 8601 format (YYYY-MM-DD HH:MM:SS). An input period that is a multiple of one minute is allowed. Entering seconds is not allowed. Only used in conjunction with the to parameter
tostringOptional parameter. to – date and time of the end of the interval (inclusive) in ISO 8601 format (YYYY-MM-DD HH:MM: SS). An input period that is a multiple of one minute is allowed. Entering seconds is not allowed. Only used in conjunction with the from parameter.
time_zonestringOptional parameter. Time zone. The recording format is TZ identifiers. Instead of the slash character, you can use the underscore “_”. By default, the parameter value from the user profile is substituted. Example: Europe/Moscow. Used only in conjunction with the from and to parameters .

The detail of the response, depending on the set of parameters in the request, is as follows:

Parameter / AvailabilitySpecifiedAbsent
from..to..A binary status of equipment operation for a specified period of time is generatedA binary work status is generated at the time of the request
POSSIBLE STATUSES

0 – DT does not work;
1 – DT is working.

Receiving data

When a valid request is received, the Resource generates a response message in JSON format.

An example of a response message when requesting status at the current time (without specifying from, to):

[
{
"name" : "Р-297 км 773+980", "sensor_id": "399f9315-b7b4-439a-83c3-f81988d29761",
"status": {"sensor_id": "399f9315-b7b4-439a-83c3-f81988d29761", "current_status_code": 0, "current_status_list": "ACTIVE, READING, NO_PVR, DEAD_ADAPTER"}
},
{
"name" : "Av_DT_3_388FA", "sensor_id": "e9a722ce-1a96-459d-b25a-01cc15cdf1ca",
"status": {"sensor_id": "e9a722ce-1a96-459d-b25a-01cc15cdf1ca", "current_status_code": 1, "current_status_list": "ACTIVE, READING, NO_PVR, DEAD_ADAPTER"}
},
{
"name" : "Kaluga 2", "sensor_id": "ecafc593-871b-46dc-b58c-79d3f11fd77b",
"status": {"sensor_id": "ecafc593-871b-46dc-b58c-79d3f11fd77b", "current_status_code": 1, "current_status_list": "ACTIVE, NO_PVR, DEAD_ADAPTER"}
}
]

If the from and to parameters are additionally specified, the response structure changes to the following:

{
"message_id": "1e1050a2-138c-cd8c-69e7-5d3b0979f7c5",
"time_zone": "Europe/Moscow",
"message_data": {
"range_start": "2024-10-28T08:00:00+03:00",
"range_end": "2024-10-28T09:00:00+03:00",
"sensors": [
{
"sensor_id": "2ca11ec8-ef1f-4eac-89e8-18ee8b64680b",
"name": "Virtual",
"statuses": [
{
"status_code": 0,
"status_list": [
"ACTIVE",
"CONNECTED",
"DEAD_ADAPTER",
"NO_PVR",
"READING"
],
"status_duration": "0000-00-00 01:00:00",
"status_duration_percent": 100.00
}
]
},
{
"sensor_id": "516b294e-4435-4aed-9c8f-be4b5bae9c38",
"name": "Virtual2",
"statuses": [
{
"status_code": 0,
"status_list": [
"ACTIVE",
"CONNECTED",
"DEAD_ADAPTER",
"NO_PVR",
"READING"
],
"status_duration": "0000-00-00 01:00:00",
"status_duration_percent": 100.00
}
]
}
]
}
}

Description of response message parameters

ParameterDescription
nameDetector name specified in the System
sensor_idUnique detector identifier
status, statusesInformation block containing the answer
status_code
current_status_code
Current equipment status code. Possible values:
- 0 - equipment is not working;
- 1 - equipment is working
status_list
current_status_list
List of statuses. Combinations of the following statuses are possible:
- ACTIVE
- READING
- HARDWARE_ERROR
- BLIND
- INTERFERENCE
- RAIN
- CONNECTING
- CONNECTION_ERROR
- CONNECTED
- TIMEOUT
- EXTENDED_MODE
- BOOTLOADER_MODE
- NO_PVR
- DEAD_ADAPTER
- NO DATA
message_idUnique response identifier
time_zoneTime zone. The recording format is TZ identifiers. Instead of the slash character, you can use the underscore “_”. By default, the parameter value from the user profile is substituted. Example: Europe/Moscow. Only used in conjunction with the from parameters, to
message_dataInformation block containing the answer
range_startThe initial value of a time period with date, time and time offset
range_endThe end value of a time interval with date, time and time offset
status_durationDuration of the time period during which the DT was in the specified status (for the selected period between from and to)
status_duration_percentDuration of the time period during which the DT was in the specified status (in relative units)

DT statuses coming from DT and adapter

StatusDescription
ACTIVEIndicates that the detector is included in the survey. Set when configuring the adapter in the multiadapter.json file, in the SENSORS[].active parameter
BLINDBlinding due to the formation of snow or ice deposits on the DT antenna, possible obstruction of the DT by foreign objects
BOOTLOADER_MODEBootloader mode. In this mode, the detector does not send objects and PVR
CONNECTEDThe adapter successfully connected to the DT, but the data has not yet begun to be transmitted to the System
CONNECTINGThe adapter attempts to connect to the DT
CONNECTION_ERRORError when connecting adapter to DT
DEAD_ADAPTERThe adapter does not receive data about the vehicle for a certain interval, by default 2 minutes
EXTENDED_MODEDT operates in extended mode, the adapter receives data from it. From the user's point of view, this status is similar to the ACTIVE status
HARDWARE_ERRORAn error has been detected in the DT hardware, which may negatively affect the correct operation of the DT.
INTERFERENCEInterference was detected on the frequency channel of the DT, affecting the detection of objects (as a rule, interference occurs due to the signal of another DT located or installed nearby)
NO DATAThe status is not related to the state of the DT and means the absence of data in the database for the selected period
NO_PVRThe detector does not receive data about the vehicle for a certain interval, by default 10 minutes
RAINThe presence of precipitation (rain) has been detected, which may affect the effectiveness of object detection
READINGReceiving data from the detector
TIMEOUTThe time for connecting the adapter to the DT has expired. The connection time is set when configuring the Adapter in the multiadapter.json file, in the SENSORS[].timeout parameter by default it is 100 ms