Page 1 of 1

How to check the status of a source from Perl?

Posted: Sun Oct 18, 2009 9:36 pm
by markb
Hi,

I'm on ZM 1.24.2 and I've been having some issues with an IP camera. These issues are wireless network related, but it brought me to a question.

I'm looking for a way to get an email alert when a source goes offline for whatever reason - i.e. appears red in the console. I can't seem to find an event filter setting to achieve this, so I've been trying through Perl.

So far I've been using the "zmdc.pl status" for particular sources, checking if it isn't in a running state.

Am I chasing the right direction or is there a better method to go about this, either in Perl or from the ZM console?

Thanks,

Mark.

Posted: Tue Nov 24, 2009 7:36 pm
by nicocam
hey markb; did you find a way to do it? I've searching for a way to do that with the skills of a neebie but no luck

Posted: Tue Nov 24, 2009 7:42 pm
by markb
Yes, I did find a way. It is, as usual, in the docs. Silly me.

I'm going to put out a full example of this on the forums in a little bit, but in the module ZoneMinder::Memory you have zmMemRead

So,
zmMemRead ( $monitor, "shared_data:signal" );

Will give you the current signal status and

zmMemRead ( $monitor, "shared_data:active" );

Will give you the current active/non-active status.

As I say, I'll post a full working example shortly, probably this weekend as I have the luxury of a weekend of this week.