-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathget_analytics_list.py
More file actions
33 lines (27 loc) · 1.01 KB
/
get_analytics_list.py
File metadata and controls
33 lines (27 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
"""
Path: examples/get_analytics_list.py
Author: @kaburagisec
Created: September 18, 2025
Tested devices: EZVIZ H8C (https://www.ezviz.com/inter/product/h8c/43162)
This script connects to an ONVIF-compliant device and retrieves the list of supported
analytics modules using the Analytics service.
"""
from onvif import ONVIFClient
HOST = "192.168.1.3"
PORT = 80
USERNAME = "admin"
PASSWORD = "admin123"
try:
client = ONVIFClient(HOST, PORT, USERNAME, PASSWORD)
profile = client.media().GetProfiles()[0] # use the first profile
analytics = client.analytics()
analytics_modules = analytics.GetAnalyticsModules(
ConfigurationToken=profile.VideoAnalyticsConfiguration.token
)
print("Analytics Modules:\n{}".format(analytics_modules))
supported_analytics_modules = analytics.GetSupportedAnalyticsModules(
ConfigurationToken=profile.VideoAnalyticsConfiguration.token
)
print("Supported Analytics Modules:\n{}".format(supported_analytics_modules))
except Exception as e:
print(e)