Page 1 of 1

Change function onDemand

Posted: Tue Oct 29, 2019 6:18 am
by girkers
I have a few cameras and some are in day to day places in my house and I don't want to have to go through all recordings and have to delete them. Is there a way for me to easily change the function from Modetect to Monitor and back again simply enough, such as a button on an app or a webscript?

Couldn't imagine someone else has not had to do this before me, so love to hear how other people get around this.

Cheers

Girkers

Re: Change function onDemand

Posted: Tue Oct 29, 2019 11:21 am
by kitkat
I think that you may be able to do this using Run States.

Set things up as you want them for a particular scenario.
Click the State button at the top-right of the Console page (it usually says 'Running' when the system is active).
Enter a name for your current setup/state and click 'Save'.

Re: Change function onDemand

Posted: Sun Nov 03, 2019 11:21 am
by girkers
Cheers kitkat but not quite what I was after.

I think what I need to do is "disable" the mode "Modetect", but to do this manually is very onerous. I also did see when you are viewing the camera there is a link to "Disable Alarms" but I don't see a link to "Enable Alarms".

Still looking for options and suggestions.

Cheers

Girkers

Re: Change function onDemand

Posted: Tue Nov 12, 2019 5:19 pm
by mythedoff
Perhaps this:

change-state-to-modect.sh

Code: Select all

#! /bin/bash
curl -XPOST -d "user=<username>&pass=<password>" -c cookies.txt  http://<ip>/zm/api/host/login.json

curl -b cookies.txt -XPOST http://<ip>/zm/api/monitors/2.json -d "Monitor[Function]=Modect&Monitor[Enabled]=2"

curl -b cookies.txt  http://<ip>/zm/api/host/logout.json
Create a second script to change state to Monitor.
This worked with the Android app "SSH Button" which has a home screen widget.
Ref.: https://zoneminder.readthedocs.io/en/stable/api.html