Configuration
EyesOnIt supports configuration files in a folder named config. This folder is located within the EyesOnIt Docker container and can be accessed outside the container by mapping a Docker volume from the local system to the container folder. To do that, add the following to the docker run command:
-v <local server folder>:/home/config
A complete docker run command would look like this:
docker run -d -p 8000:8000 --gpus all -e EOI_LICENSE_KEY='<EyesOnIt license key>' -e EOI_AUTHORIZATION_TOKEN='<EyesOnIt auth token>' -v <local server EyesOnIt data folder>:/home/eyesonit_data -v <local server EyesOnIt config folder>:/home/config eyesonit/eyesonit_v2:latest
EyesOnIt will read .yml files from the config folder as follows:
vms_config.yml
This is a special file containing configuration data for integration with your Video Management System and for other REST API integration.
Genetec Configuration
For Genetec VMS systems, the format of the vms_config.yml file should be like this:
genetec:
web_sdk_ip: <the Genetec Web SDK IP address>
web_sdk_port: <the Genetec Web SDK port number>
web_sdk_base_uri: <the Genetec Web SDK base URL path>
use_ssl: True to use SSL, False otherwise
ssl_certificate: <the .pem certificate file for the Genetec self-signed certificate. The .pem file should be in the config folder.>
genetec_username: <the Genetec Web SDK username>
genetec_password: <the Genetec Web SDK password>
Here is an example of the Genetec configuration section with actual values:
genetec:
web_sdk_ip: 192.168.0.10
web_sdk_port: 4590
web_sdk_base_uri: WebSdk
use_ssl: False
ssl_certificate: certificate.pem
genetec_username: my_username
genetec_password: my_password
When EyesOnIt sends an alert to Genetec, it combines the fields from the config file with the webhook_event_id and webhook_camera_uuid fields provided to the add_stream method and constructs the alert URL as follows:
https://<web_sdk_ip>:<web_sdk_port>/<web_sdk_base_uri>/events/RaiseCustomEvent/<webhook_event_id>/<webhook_camera_uuid>
Note that you will need configure Genetec to handle events from EyesOnIt by creating custom events through the Genetec Config Tool. The settings for custom events can be found in the Genetec Config Tool under System / General Settings / Events. The event number assigned to your custom event can be specified in the alert settings in the EyesOnIt Genetec Plugin.
Generic REST API Configuration
EyesOnIt is also able to make REST calls to generic REST APIs. For these generic REST calls, the authentication parameters must be specified in vms_config.yml. The format of these parameters is as follows:
rest:
ssl_certificate: <certificate .pem file if needed. The .pem file should be in the config folder.>
auth_type: <the auth type: none, basic, digest, or bearer>
username: <the username for basic or digest auth>
password: <the password for basic or digest auth>
bearer_token: <the bearer token for bearer auth>
Here is an example of the REST configuration section with actual values:
rest:
ssl_certificate:
auth_type: digest
username: my_username
password: my_password
bearer_token:
When EyesOnIt sends a generic REST alert, it will use the POST method to send data to the rest_url provided in the alerting parameters of the add_stream method. The body of the request will contain data similar to the last_detection section of the alerting element:
{
"image": null,
"prompt_values": {
"vehicle": 95,
"landscape": 4
},
"alerting_prompt": "vehicle",
"alert_time": "2024-08-07 18:39:22",
"stream_url": "rtsp://192.168.1.54/live0",
"name": "Street Camera"
}
REST POST Body Attributes
Name | Type | Description |
---|---|---|
image | string | this will always be null in the REST post. Call get_last_detection_info after the detection to get the image. |
prompt_values | object | confidence levels for each object description when the detection occurred |
alerting_prompt | string | the object description whose alert threshold was exceeded to generate the detection |
alert_time | string | the time (UTC) of the last detection |
stream_url | string | the url of the video stream that generated the alert |
name | string | the friendly name of the video stream that generated the alert |
Stream definition yml files
The config folder can contain one or more stream definition yml files. These file names end in .yml and can have any valid file name other than vms_config.yml. Here is an example of a stream definition yml file:
load_this_stream_on_startup: False
stream_url: rtsp://192.0.27.36:654/00000001-0000-babe-0000-b8a44f754706/live
name: construction site camera
frame_rate: 5
prompts:
- text: person
threshold: 95
background_prompt: False
- text: door
threshold:
background_prompt: True
regions:
- top_left_x: 680
top_left_y: 97
width: 815
height: 833
alerting:
alert_seconds_count: .5
reset_seconds_count: 2
phone_number: null
image_notification: False
genetec:
webhook_event_id: null
webhook_camera_uuid: null
rest_url: https://192.168.1.52:5000/alerts/handleAlertBasicAuth
efficient_detection:
periodic_check_enabled: True
periodic_check_seconds: 3
motion_detection_enabled: True
motion_detection_threshold: 5000
motion_detection_seconds: 0.5
bounding_box:
bounding_box_enabled: True
detect_people: True
detect_vehicles: False
detect_bags: False
person_confidence_threshold: 30
vehicle_confidence_threshold: 30
bag_confidence_threshold: 30
For more details about the fields above, see the add_stream method.