send ASCII string over serial Port after alarm was triggered

Support and queries relating to all previous versions of ZoneMinder
Locked
Ternitzer
Posts: 14
Joined: Sat Dec 02, 2006 10:20 pm

send ASCII string over serial Port after alarm was triggered

Post by Ternitzer »

Hi,

I have been using ZM for a full 24 Hrs and I love it. It does everything that I have been looking for. I installed from the 1.22.2 LiveCD and I am using 3 cameras with a 4-port Haupauge capture card. No problems there.

I am looking for some advice on how to send an ASCII string over the serial port when an alarm has been triggered. I want to capture the string from my home automation controller and use it to trigger events from there. I don't need the X10 interface since my ZM box and HA controller are sitting on the same shelf.

I know HTML and some PHP/MySQL but have no clue when it comes to perl.
I have looked at the " How can I use ZoneMinder to trigger something else when there is an alarm?" in the readme, but I don't know how to open a com port or write to it in perl, or where to save this script to and ensure that it will be running. Is it activated through a filter?

If I asked anything I shouldn't have. I apologize. Like I said, I am a complete N00b.

Thanks for any help,

Ternitzer
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

There ae a few examples of how others have utlized zmtrigger.pl but it depends on what you are going to interface it too as to how it should be used so because of this, it's a bit generic to make it usable across many deferent requirements.
Here are a few examples:
http://www.zoneminder.com/forums/viewto ... =zmtrigger
http://www.zoneminder.com/forums/viewto ... =zmtrigger
http://www.zoneminder.com/forums/viewto ... =zmtrigger

A search for zmtrigger.pl will return a few pages to review through as well as the README and maybe some entries in the Wiki.

Regards,
Corey
Ternitzer
Posts: 14
Joined: Sat Dec 02, 2006 10:20 pm

Thanks

Post by Ternitzer »

I got it figured out. I used the sample script from tht faq and used the open() method to write the information to the serial port.

Thanks for the reply.

Patrick
Locked