Page 1 of 1

zmHasAlarmed Perl script only works during testing

Posted: Tue Jan 21, 2014 9:23 pm
by tgice
Hi, I've been running a pretty stable ZoneMinder 1.25.0 installation on Ubuntu 12.04 KVM guest (of another, earlier version of Ubuntu -- 11.04, I think).

I've got a single Foscam network camera running on it. It regularly detects motion events properly when in Modetect, both during testing and at night when I walk through a room and have forgotten to disable the alarm.

Here's my problem: it's important to me to have the script I've written (from the one that's available in the:

How can I use ZoneMinder to trigger something else when there is an alarm?

section at this link: http://www.zoneminder.com/wiki/index.php/FAQ

) to always work. Whenever there's an alarm, I have to trigger some script actions.

The frustrating part is it works whenever I test it. If I setup a test, during the day, when I set the camera to Modetect (where it's normally just monitoring), I trigger the test, my script properly executes the alarm actions as you'd expect, and ZM sends me emails with the alarms.

Frustratingly, I never once (since I wrote that script and run it all of the time, in a 'screen' session on my ZM virtual machine guest) have had the script trigger actions happen during an alarm. I always get the emails, so ZM is obviously seeing the alarm, but the script fails to pick up on this. I have the check frequency set to about 1s, and that shouldn't matter anyway, b/c of how that example script is written with zmHasAlarmed, I think.

Does anyone have any idea why this might happen? That my script seems to just sit there asleep while the rest of ZM appears to be functioning properly. Could it have something to do with my KVM/qemu guest setup? Ugh. It's frustrating. I'd rather keep this as a VM guest for now for convenience, but if I don't get anywhere on it, I guess I'll have to look at just migrating the install to a native Linux and see if that solve the issue. Seems like I really shouldn't have to do that though.

Thanks for any suggestions for troubleshooting, etc.

Re: zmHasAlarmed Perl script only works during testing

Posted: Thu Jan 23, 2014 9:37 pm
by Gibby13
Post your script. I am also using that script and it is working for me, however I am trying to get it to use zmInAlarm since I don't want it to trigger while still in the same alarm.