Check if camera is active
Opened this issue · 1 comments
stijnvanhoey commented
Activity is not provided by the traffic
api call, whereas the activity of the camera is given by e.g. https://telraam-api.net/v1/cameras/segment/9000002436:
{"status_code": 200, "message": "ok", "camera": [{"instance_id": 3921, "mac": 202481589178412, "user_id": 4274, "segment_id": 9000002436, "direction": false, "status": "active", "manual": false, "time_added": "2021-07-02T11:43:03.769Z", "time_end": null, "last_data_package": "2021-11-22T21:19:01.682Z", "first_data_package": "2021-07-02T12:00:00.000Z", "pedestrians_left": false, "pedestrians_right": true, "bikes_left": true, "bikes_right": true, "cars_left": true, "cars_right": true, "is_calibration_done": "yes"}, {"instance_id": 3919, "mac": 202481589178412, "user_id": 4274, "segment_id": 9000002436, "direction": false, "status": "non_active", "manual": false, "time_added": "2021-07-01T16:07:24.280Z", "time_end": "2021-07-02T11:43:03.769Z", "last_data_package": "2021-07-02T11:42:39.183Z", "first_data_package": null, "pedestrians_left": false, "pedestrians_right": false, "bikes_left": true, "bikes_right": true, "cars_left": true, "cars_right": true, "is_calibration_done": "no"}]}
Although I'm not sure how to actually extract the activity of a camera/segment (i.e. working but not measuring) , the docs say
status: The status of the camera (active, sending good data / non_active, not sending data / problematic, active but not sending good data)
Need to check this out and make sure these are filtered out as currently the data defines 0 values.
stijnvanhoey commented
As discussed with Davy, having an automatic alert on non-functioning cameras would help the support as participants won't always check the activity them selve.