Skip to main content

Detector settings

Use this method for interacting with the settings of Detectors.

Requesting data

If you want to obtain information about the basic settings of the DT, the external client must initiate a request as follows:

url_smartroad/api/integration/sensors?login=user_login&password=user_password

Additional parameters can be entered sensor_id And project_id, where sensor_id–unique detector identifiers (one or more), and project_id–the ID of the project whose detectors you want to get settings for.

Description of additional (optional) request address parameters

ParameterParameter typeDescription
sensor_idstringUnique detector identifiers (one or more).
project_idstringID of the project for whose detectors you want to get settings.

Receiving data

When a correct request is received, the System generates a response message in JSON format.

Example of a response message:

  [
{
"sensor_id": "dcd11dc8-dfdf-dedc-8de8-1deadb646a0b",
"name": "Test_sensor",
"ip": "127.0.0.1",
"place_name": "Test",
"picket_name": "15+453",
"gps_latitude": 55.72767,
"gps_longitude": 37.45782,
"gps_latitude_x": 56.10927,
"gps_longitude_x": 37.95879,
"serial_number": "test01",
"lanes_count": 2,
"lanes": [
{
"lane_index": 0,
"lane_width": 3.5,
"lane_direction_sensor": -1,
"lane_direction_zkm": 0,
"zones": [
{
"zone_index": 0,
"zone_width": 3.5,
"zone_direction_sensor": -1,
"zone_classes": 15,
"zone_segments_count": 2,
"zone_segments": [
{
"x": 80,
"and": 4,
"index": 0
},
{
"x": 84,
"and": 4,
"index": 1
}
]
}
]
},
{
"lane_index": 1,
"lane_width": 3.5,
"lane_direction_sensor": -1,
"lane_direction_zkm": 0,
"zones": [
{
"zone_index": 1,
"zone_width": 3.5,
"zone_direction_sensor": -1,
"zone_classes": 15,
"zone_segments_count": 2,
"zone_segments": [
{
"x": 80,
"and": 4,
"index": 0
},
{
"x": 84,
"and": 4,
"index": 1
}
]
}
]
}
]
}
]

Description of JSON message parameters regarding events

ParameterData typeDescription
namestringDetector name on the System
ipstringDetector IP address
placestringSite name (detector location)
gps_latitudestringGeographic coordinate of the detector (latitude)
gps_longitudestringGeographic coordinate of the detector (longitude)
gps_latitude_xstringX-point coordinates (latitude)
gps_longitude_xstringX-point coordinates (longitude)
lanes_countintNumber of lanes
lanesgroupStripes
lane_indexintLane number
lane_widthintBandwidth
zonegroupZone
zone_indexintZone number
lengthintZone length
widthintZone width
directionintZone direction
zone_offsetintDistance from detector