Setting Archived Variable in Python?
-
- Posts: 4
- Joined: Wed Nov 01, 2023 12:20 pm
Setting Archived Variable in Python?
How can I set the 'Archived' variable in my custom Python alert module, which sends alerts based on importance, and utilizes a returned JSON, while struggling to find information on archiving events in the passed URL filter?
Re: Setting Archived Variable in Python?
The API has the index function, and the search function. See: https://github.com/ZoneMinder/zoneminde ... troller.ph
To do this with index, you would use:
Note that this returns the first page of events, and you have to cycle through the pages per:
https://zoneminder.readthedocs.io/en/st ... all-events
So that is not the right way to do this. Instead use search which will return only the events that are archived:
For more details see:
https://zoneminder.readthedocs.io/en/stable/api.html
https://wiki.zoneminder.com/API
To do this with index, you would use:
Code: Select all
curl -X POST -d "user=username&pass=password" http://localhost/zm/api/events/index/Archived:1.json
https://zoneminder.readthedocs.io/en/st ... all-events
So that is not the right way to do this. Instead use search which will return only the events that are archived:
Code: Select all
curl -X POST -d "user=username&pass=password" http://localhost/zm/api/events/search/Archived:1.json
https://zoneminder.readthedocs.io/en/stable/api.html
https://wiki.zoneminder.com/API
fastest way to test streams:
ffmpeg -i rtsp://<user>:<pass>@<ipaddress>:554/path ./output.mp4 (if terminal only)
ffplay rtsp://<user>:<pass>@<ipaddress>:554/path (gui)
find paths on ispydb or in zm hcl
If you are new to security software, read:
https://wiki.zoneminder.com/Dummies_Guide
ffmpeg -i rtsp://<user>:<pass>@<ipaddress>:554/path ./output.mp4 (if terminal only)
ffplay rtsp://<user>:<pass>@<ipaddress>:554/path (gui)
find paths on ispydb or in zm hcl
If you are new to security software, read:
https://wiki.zoneminder.com/Dummies_Guide