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

Forum for questions and support relating to the 1.24.x releases only.
Locked
summetj
Posts: 11
Joined: Sat Jan 01, 2011 12:48 pm

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

Post 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
summetj
Posts: 11
Joined: Sat Jan 01, 2011 12:48 pm

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

Post by summetj »

Bump....anybody?
Carrier82
Posts: 96
Joined: Sat Jul 28, 2012 8:30 pm

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

Post 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
summetj
Posts: 11
Joined: Sat Jan 01, 2011 12:48 pm

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

Post 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...
Locked