How to interface ZoneMinder to external signals?

A place for discussion of topics that are not specific to ZoneMinder. This could include Linux, Video4Linux, CCTV cameras or any other topic.
Post Reply
hamradio
Posts: 1
Joined: Sat Mar 26, 2011 11:00 am

How to interface ZoneMinder to external signals?

Post by hamradio »

Hi,
I'm beginning the project of a home surveillance system based on ZoneMinder running on a Linux headless pc connected to my home lan.
Before beginning, I need to clear the following doubts:
How can ZoneMinder be switched on when I leave my home and switched off when I come back by using an external relay (I mean how could an external relay be interfaced to a Linux system and then to ZoneMinder)?
How can ZoneMinder trigger some external relays which do things like activating buzzers, etc. etc.?
Links to websites with schematics and/or interface cards are appreciated too :)
Thank you in advance for your valuable help and suggestions.
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Re: How to interface ZoneMinder to external signals?

Post by zoneminder »

You will probably need to customise zmtrigger.pl to work with your particular scenario. If you search for zmtrigger you should come up with some examples.
Phil
baekmark
Posts: 30
Joined: Wed Mar 21, 2007 8:31 pm
Location: Denmark

Re: How to interface ZoneMinder to external signals?

Post by baekmark »

Hi hamradio

I have been searching for a solution like the one that you are looking for, and have posted two question on the forum, but to no avail!

Realizing that I was not getting any clues from this forum, I made my own solution!

I startet looking for a card with rs232 and drivers to Linux, but I found this USB card:http://www.velleman.eu/distributor/prod ... ?id=351346
and the drivers are here:http://k8055utils.sourceforge.net/?site ... 8055m#lbAF

Just compile and install, test with the client program.

But what about a keypad, well I got one her:http://www.npc.dk/Default.asp?ID=58 Look for "CTR 1b"

I took the output (relay) and used as input 1 on the k8055.

Then make a small program to read status of input one, and call "/usr/local/bin/zmpkg.pl Active" depending on condition.

I made one that starts by reading the status of ZM (haven't been able to dig that info out of ZM itself, but only on status file I made in /var) and setting that status. Just to align status with reality. Then the program goes into a while - do loop, where it reads the status by calling k8055m, and if the input is activated, then change status of ZM from Active to InActive or the other way around. I turn on output 1 when status is Active and change to output 2 when status is InActive. When I make the call to "/usr/local/bin/zmpkg.pl State" I turn on output 8 to indicate activity, and off when status has changed!

You can have that card to do a million other things, but as with me, I had to start somewhere :P

I hope you and others can use this information!

You can have my script, if you drom me a line!

BR
Lars
Post Reply