Page 1 of 1

How to force an alarm via the web interface that turns off?

Posted: Mon Aug 13, 2012 2:26 am
by summetj
I have a camera that uses inbuilt motion detection (monitor number 20 on my setup). I have it set up to make a call to the zoneminder webserver to force an alarm when it detects motion using:
192.168.1.15/zm/index.php?view=request&request=alarm&id=20&command=forceAlarm

However, the camera doesn't have a way to make a call to the corresponding cancelForcedAlarm when the motion is over.

My question: Is their any way I can use HTTP to enable an alarm on my camera for a set length of time? (or tell ZM to start doing it's own motion detection and turn off the alarm when the motion ends?)

I know that zmtrigger.pl accepts telnet connections, but I'd like to use HTTP calls via the ZM webserver....

Thanks for any tips...
Jay

Re: How to force an alarm via the web interface that turns o

Posted: Mon Aug 20, 2012 8:39 pm
by summetj
Bump....anybody?

Re: How to force an alarm via the web interface that turns o

Posted: Mon Aug 27, 2012 7:17 pm
by Carrier82
Make a custom cgi script. I use cgi script like this one that my acti camera calls on camera based motion detection. Must have opt_triggers enabled in options. But this is using zmtrigger & "telnet"...
#!/bin/bash
echo Content-type: text/plain
echo "$1|on+10|255|AMotion" >/dev/tcp/localhost/6802

Re: How to force an alarm via the web interface that turns o

Posted: Tue Aug 28, 2012 12:05 am
by summetj
That's for the reply....I think I could get the camera to use zmtrigger directly, but I wanted to avoid having to start up another process and make sure it was running. I think you are pointing me in the right direction however. I can simply make a CGI script that the camera can call which will use wget to force an alarm via the web interface, and pause for X amount of time and then cancel the alarm... Or, perhaps I should just use zmtrigger...