Hi
doc says "...camera to be enabled or disabled by external triggers or scripts."
I have seen mention of x10 enabling monitors. Is this the only way or is there some way I can enable/disable monitors using Python?
When I say enable disable I really mean enable/disable motion detection as I still want the monitor working as just a monitor.
thanks
Keith
Enable/disable monitor via script
-
- Posts: 139
- Joined: Tue Dec 09, 2014 10:20 pm
Re: Enable/disable monitor via script
I have a single line in my crontab:
# Start monitoring on Monitor 3
0 22 * * * root /usr/bin/curl -XPOST http://localhost/zm/api/monitors/3.json -d "Monitor[Function]=Modect&Monitor[Enabled]=1"
# Stop monmitoring on monitor 3
0 6 * * * root /usr/bin/curl -XPOST http://localhost/zm/api/monitors/3.json -d "Monitor[Function]=Monitor&Monitor[Enabled]=1"
# Start monitoring on Monitor 3
0 22 * * * root /usr/bin/curl -XPOST http://localhost/zm/api/monitors/3.json -d "Monitor[Function]=Modect&Monitor[Enabled]=1"
# Stop monmitoring on monitor 3
0 6 * * * root /usr/bin/curl -XPOST http://localhost/zm/api/monitors/3.json -d "Monitor[Function]=Monitor&Monitor[Enabled]=1"
-
- Posts: 14
- Joined: Wed Jun 07, 2023 3:11 pm
Re: Enable/disable monitor via script
That's great, Thank you.
I guess that html post is what happens when we change the settings on the monitor settings pages. So the same mechanism could be used to change anything?
I guess that html post is what happens when we change the settings on the monitor settings pages. So the same mechanism could be used to change anything?
Re: Enable/disable monitor via script
There are docs for the API if you want to dig in https://zoneminder.readthedocs.io/en/stable/api.html
-
-
- Posts: 139
- Joined: Tue Dec 09, 2014 10:20 pm
Re: Enable/disable monitor via script
Those lines use the Zoneminder API.fluffykeith wrote: ↑Fri Sep 15, 2023 9:39 pm That's great, Thank you.
I guess that html post is what happens when we change the settings on the monitor settings pages. So the same mechanism could be used to change anything?