Page 1 of 1
External Alarm trigger from COM port
Posted: Thu Sep 06, 2007 10:07 am
by sipi
Hi,
somebody can I help me?
I'd like make an external Alarm trigger from COM port because I must installed a home alarm alarm system and a small ZM server config in my home. There is a burglary
( I made from my PC a video server with 4 analog video input 4 panel camera. HDD is small 80GB because I'd like make external alarm trigger from dry contact of my DSC alarm system.
My problem is I don't know what I can make. I'm not a "programer" I don't know what is php. I saw zmtrigger.pl but I don't understand it and I don't know where I connect the dry contact to COM port connector.
Somebody can writes me what I modify and etc.?
Please its very important for me and I can't made it without yours help.
Thanks for everything.
sipi
Posted: Fri Sep 07, 2007 8:42 am
by Laevi
It's not that hard.
Just write an external program to send a trigger on the right port to the machine where u installed zoneminder in the form u can see in the readme, so like
zmtrigger will catch it and activate the camera's u want for how long u want u just need to modify ur own external script to what u want them to do.
U can even build an external programm if you connect directly to the database and do you stuff there, but i think only sending triggers will do just fine.
Posted: Fri Sep 07, 2007 4:51 pm
by sipi
Sorry, but it's to hard for me because I'd like get some help and example for somebody who uses external trigger for zoneminder. I use an Provideo card with GPIO interface. It's useful to zoneminder? Has somebody application example and necessary files for this problem?
Thanks
sipi
Posted: Tue Sep 11, 2007 1:53 pm
by sipi
Hello,
anybody can't help me? I hope somebody will be help me. It's very important for me but I think a lot of people has same problem and it's a useful help and information for zoneminder community.
Thanks
sipi
Posted: Fri Sep 14, 2007 4:58 am
by AlienTesticle
Do you already have something that is sending data to the com port or do you need to know how to get some input into the com port and then software to trigger on the that data.
If there is something already hooked up.. what type of data is it sending.
Is it some kind of system that will notify you of what zone the trigger is in so we can trigger the right camera... etc
If you have nothing yet as an external trigger physically hooked up. I have a small project that I was planning on doing with the parallel port and some motion detectors.
Sorry though. Its currently not on the top of my list but things change all the time. But since there is interest I will see if I can shift some projects around.
Posted: Fri Sep 14, 2007 2:18 pm
by advancedalarmtec
I don't know much about what's required for a trigger through the com port for zoneminder, but I am familiar with alarm panels. If you want it to trigger when there's an alarm from the panel you can hook up a Positive and a Negative wire from the siren output of the panel and that will give you a 12vdc output. If 12vdc isn't sufficient for a trigger through the com port then you can use the 12vdc to trip a form c relay for a NO or NC connection which ought to be sufficient for a trigger. I don't know if this helps, but those are the options for output from an alarm panel.
PS. If the siren is on silent you can program pgm1 or pgm2 on DSC panels to give a 12vdc output when there's an alarm as well.
Posted: Thu Oct 11, 2007 7:49 am
by sipi
Thanks, it's correct. I'd like controll it PGM and a relay. I don't know where I connect on COM port the relay contact and what setup it ZM.
Has somebody an idea or correct example?
Thanks.
Posted: Mon Jul 13, 2009 1:03 pm
by master.kiu
Hi AlienTesticle,
I'm also working on that issue.
I have prepared a test board to send or read TTL signals to/from the parallel port.
But I have some troubles to access the port on the linux platform.
Can you help me with your implementation? Or if its not ready yet maybe we can share the project and do it together?
Thanks in advance
ANSWER:
Posted: Mon Jul 05, 2010 1:46 pm
by TaoHawaii
Ok, so to talk to a serial port you need something a little more intelligent than a wire or a switch. You must actually send data meaning syncronized ones and zeros/on off's. To do this you need a microprocessor or a very elaborate integrated circuit and a standard UART. (Don't stop reading here!)
Luckily this is not nearly as bad as it sounds. Check out Arduino. You can get them for $20-$30 and they already have a hardware serial controller built in. It also converts the serial to a kind of virtual serial using a USB connector (pretty standard called FTDI) so you don't really even have to have a serial port. (Like if you've got a netbook.) You don't need anything special to program the Arduino, just a PC and a USB port. (There are tons of built in example programs. You just have to copy parts from each and piece together what you need.)
Arduino is perfect for this, it already has both analog and digital input/output pins, an FTDI IC, and a voltage regulator. You can actually use it AS an alarm controller if you want (or anything else). Or you can have it talk to your alarm (if your alarm supports this I.E. Has an interface and sends alarm states at all.) and tell your PC (zoneminder) what's up. Or if you're really sharp you can run this in parallel with your alarm system but there are issues with doing this... (With most modern alarm systems it is difficult to have two Alarm panels connected to the same sensors without them interfering.)
There are lots of examples of programs for arduino including how to read switch states (like alarm sensors, how to use the serial port, and you can even use any or all of the 13 IO pins as "software" serial ports. You could in theory talk to 13 different serial ports if you wanted.
Ok, ok. I'm stepping down from my Arduino branded soap box. Just love the arduino. Nothing you can't do with it.
The reason you can't just plug in 12V to PC serial port is because it has a UART chip controlling the port. The UART is expecting BYTES. in other words, precisely timed pulses of 12 volts which must be done the correct number of times in the correct sequence. Once the UART has received enough bits (pulses) it "chunks" the "data" (BYTE) and sends it on for use by the rest of the computer (zoneminder). If you don't speak using the correct vocabulary (rs232) with the right dialect (port settings, baud/parrity/stopbit/flowcontrol) you are just making sounds at the port and it will ignore you as though you were a mumbling idiot.
In conclusion. Get an arduino. Connectone of it's many input pins to your alarm panel speaker (or whatever you already had in mind). Use the example code for reading button pushes and the example code for send ing serial data to send the string the other user posted above. Plug in the Arduino to your USB port (this will automatically create another "com port") and change the zoneminder setting for com port to point to the new com port that was created for your arduino. Simple!