How to check the status of a source from Perl?

Forum for questions and support relating to the 1.24.x releases only.
Locked
markb
Posts: 2
Joined: Sun Oct 18, 2009 9:24 pm

How to check the status of a source from Perl?

Post 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.
nicocam
Posts: 3
Joined: Mon Oct 05, 2009 1:34 pm
Location: uruguay

Post 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
Debian User
markb
Posts: 2
Joined: Sun Oct 18, 2009 9:24 pm

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