simplest alarm visualization possible -4 LEDs on serial port
- krzys31337
- Posts: 65
- Joined: Wed Jul 06, 2005 7:43 pm
- Location: Poland,Warsaw N 52°09'10" E 20°55'09"
simplest alarm visualization possible -4 LEDs on serial port
Just to show some posiblle external alarming usage:
1) Make a DB9 (serial port) adaptor with cabling like bellow:
2) Configure ZM to execute external script:
3) have /root/alarm.sh set with program like sled from http://www.linuxfocus.org/English/Janua ... e186.shtml.
4) and you will get 2 sets of Green/Red led. The idea is "Green -- OK" , "RED -- motion detected"...
1) Make a DB9 (serial port) adaptor with cabling like bellow:
2) Configure ZM to execute external script:
3) have /root/alarm.sh set with program like sled from http://www.linuxfocus.org/English/Janua ... e186.shtml.
4) and you will get 2 sets of Green/Red led. The idea is "Green -- OK" , "RED -- motion detected"...
--
Best Regards and sorry for my poor english...
Best Regards and sorry for my poor english...
- krzys31337
- Posts: 65
- Joined: Wed Jul 06, 2005 7:43 pm
- Location: Poland,Warsaw N 52°09'10" E 20°55'09"
If anyone will be interested: i'm working on simple keyboard interface (proably 3-5 microswitches) connecting to the same serial port.
Any proposal for button functions?
1-"force alarm"
2-"restart zm local interface" (some montage) ???
3-switch to antother montage/cycle option ???
4..
5..
Any proposal for button functions?
1-"force alarm"
2-"restart zm local interface" (some montage) ???
3-switch to antother montage/cycle option ???
4..
5..
--
Best Regards and sorry for my poor english...
Best Regards and sorry for my poor english...
-
- Posts: 5111
- Joined: Wed Jun 08, 2005 8:07 pm
- Location: Midlands UK
i think a full screen button ie keep pressing full screen and get cam 1 cam 2 etc. a cycle button , a montage button a show status button (current load hard disk use etc etc)
what would be killer is play pause fast forward and rewind
ie press play sytem would play back a montage of the earliest event, press fast forward it would play at 2* press ff again it would play at 5* etc.
James
what would be killer is play pause fast forward and rewind
ie press play sytem would play back a montage of the earliest event, press fast forward it would play at 2* press ff again it would play at 5* etc.
James
- krzys31337
- Posts: 65
- Joined: Wed Jul 06, 2005 7:43 pm
- Location: Poland,Warsaw N 52°09'10" E 20°55'09"
Yeap that WOULD BE a killer app.
Right now i'm thinking about something really simple. Maybe even instead of using paraller port (aka lpt) i will do some research on the simplest serila (/dev/ttyS0) port. having 2/4 LEDS and one button for price of nothing (2 leds + one microstich + 1 DB9 + 5 cables) sounds good.
Maybe i will find some 12/16 button general purpouse keyboard (10 digits #* or ABCDEF) and 2/4 digits with dots (like on clocks 88:88).
That will be superb when having may monitors (let's say 9-10) and predefined (ABCDEF) views on localhost.
Also numbers on display could say "C8 90" meaning Camera 8 score 90%.
Right now i'm thinking about something really simple. Maybe even instead of using paraller port (aka lpt) i will do some research on the simplest serila (/dev/ttyS0) port. having 2/4 LEDS and one button for price of nothing (2 leds + one microstich + 1 DB9 + 5 cables) sounds good.
Maybe i will find some 12/16 button general purpouse keyboard (10 digits #* or ABCDEF) and 2/4 digits with dots (like on clocks 88:88).
That will be superb when having may monitors (let's say 9-10) and predefined (ABCDEF) views on localhost.
Also numbers on display could say "C8 90" meaning Camera 8 score 90%.
--
Best Regards and sorry for my poor english...
Best Regards and sorry for my poor english...
- zoneminder
- Site Admin
- Posts: 5215
- Joined: Wed Jul 09, 2003 2:07 pm
- Location: Bristol, UK
- Contact:
Very interesting post.
We are some needing to connect inputs or output interfaced with ZM.
For example, a button to start / stop recording, a button to shutdown zm server, an entry to launch some script (record all or some cameras in case of external alarm for example)
Also, following modect detection, light a lamp for example or launch a siren... etc.
I read it's simple, just a simple script could do it.
But I never really understand how to do that.
If someone could take few minutes to explain, It would be very mush appreciate.
Thanks
Pascal
We are some needing to connect inputs or output interfaced with ZM.
For example, a button to start / stop recording, a button to shutdown zm server, an entry to launch some script (record all or some cameras in case of external alarm for example)
Also, following modect detection, light a lamp for example or launch a siren... etc.
I read it's simple, just a simple script could do it.
But I never really understand how to do that.
If someone could take few minutes to explain, It would be very mush appreciate.
Thanks
Pascal
This is very nice ,but usage is minimal.
This can only direct 2 led for 1 com port.
I found something more promising over here :
http://ontrak.net/linux.htm
You can control up to eight leds per com port.
More over here : http://llg.cubic.org/
Please share your findings ...
This one is even better : http://www.arduino.cc/en/Tutorial/ShiftOut
Price is very cheap : 26,18 EUR
http://www.eztronics.nl/webshop/catalog ... 0b1c2e939b
Programming seems very simple (C/C++) : http://www.arduino.cc/en/Main/Software
The set of instructions available (so no need to create machinelanguage yourself):
http://www.arduino.cc/en/Reference/HomePage
And it seems easely extendable (16 leds example here : http://www.arduino.cc/en/Tutorial/ShiftOut
How get Perl to talk to this device (easy):
http://www.windmeadow.com/node/38
This way you can output for example the condition of each and every camera ,the load of the machine ,wether or not the disk is almost full ,if temperature exceed a certain level ,etc. .
This can only direct 2 led for 1 com port.
I found something more promising over here :
http://ontrak.net/linux.htm
You can control up to eight leds per com port.
More over here : http://llg.cubic.org/
Please share your findings ...
This one is even better : http://www.arduino.cc/en/Tutorial/ShiftOut
Price is very cheap : 26,18 EUR
http://www.eztronics.nl/webshop/catalog ... 0b1c2e939b
Programming seems very simple (C/C++) : http://www.arduino.cc/en/Main/Software
The set of instructions available (so no need to create machinelanguage yourself):
http://www.arduino.cc/en/Reference/HomePage
And it seems easely extendable (16 leds example here : http://www.arduino.cc/en/Tutorial/ShiftOut
How get Perl to talk to this device (easy):
http://www.windmeadow.com/node/38
This way you can output for example the condition of each and every camera ,the load of the machine ,wether or not the disk is almost full ,if temperature exceed a certain level ,etc. .
Last edited by ktheking on Mon Jan 14, 2008 2:04 pm, edited 1 time in total.
Any idea if any of these solutions, in this topic, would work through a Tibbo Serial Device Server?ktheking wrote:...something more promising...
I wrote some details in the Hardware Queries:
http://www.zoneminder.com/forums/viewto ... 8211#38211
v1.25.0 + Ubuntu Linux 12.04 Server
For starting of scripts from a button I first considered using X10 protocol to achieve this. But after having read that X10 close a PC's power supply might generate bad x10 traffic ,I won't go further with this.
My next idea is to use the lirc project.
To my opinion , the easiest way to generate rs-232 code that the pc easely can understand is to use the lirc deamon which watched the com port.
Downside is that you actually need a IR led to transfer the communication ,but if you build this inside a little box , this will be the cheapest easiest way to achive this.
My plan of attack :
1. create lirc serial or usb connector (receiver)
build serial : http://stuff.nekhbet.ro/2006/07/10/make ... or-pc.html
or buy usb or serial : http://www.ir2pc.com/
2. buy tv remote control that can work with lirc
list of supported remote controls : http://lirc.sourceforge.net/remotes/
3. install lirc and irexec on pc
lirc and ubuntu : https://wiki.ubuntu.com/LircHowto
irexec and ubuntu :
4. configure lirc and irexec in order that the whole bunch works,and trigger script when a key is pressed on the remote control.
This is only a raw sketch ,how I would create it.
Once it all works ,all can be integrated inside the pc where the zoneminder resides.
Then you can just make the cabling towards from the buttons mounted in the case towards the tvremote mounted inside the case.
But the whole setup then comes very very cheap ,and rather easy compared to the usage of external microcontrollers.
Simplicity is the key.
However it is yet to be tested but I'm optimistic about it.
example :
http://www.mythpvr.com/mythtv/frontend/ ... power.html
Source :
http://www.lirc.org/
My next idea is to use the lirc project.
To my opinion , the easiest way to generate rs-232 code that the pc easely can understand is to use the lirc deamon which watched the com port.
Downside is that you actually need a IR led to transfer the communication ,but if you build this inside a little box , this will be the cheapest easiest way to achive this.
My plan of attack :
1. create lirc serial or usb connector (receiver)
build serial : http://stuff.nekhbet.ro/2006/07/10/make ... or-pc.html
or buy usb or serial : http://www.ir2pc.com/
2. buy tv remote control that can work with lirc
list of supported remote controls : http://lirc.sourceforge.net/remotes/
3. install lirc and irexec on pc
lirc and ubuntu : https://wiki.ubuntu.com/LircHowto
irexec and ubuntu :
4. configure lirc and irexec in order that the whole bunch works,and trigger script when a key is pressed on the remote control.
This is only a raw sketch ,how I would create it.
Once it all works ,all can be integrated inside the pc where the zoneminder resides.
Then you can just make the cabling towards from the buttons mounted in the case towards the tvremote mounted inside the case.
But the whole setup then comes very very cheap ,and rather easy compared to the usage of external microcontrollers.
Simplicity is the key.
However it is yet to be tested but I'm optimistic about it.
example :
http://www.mythpvr.com/mythtv/frontend/ ... power.html
Source :
http://www.lirc.org/
yep ...
Although usb ports can be used as well. Both for the arduino and the lirc.
But if you want to use the solution of 'krzys31337' -the one with the direct single serial port- ,then your limited to 2-3 leds ,with 2 buttons max.
The arduino and lirc solution can offer more then enough buttons and outputs.
Flexibility is needed. And remember that the com port won't be available forever.
Mobo's with com port are getting harder to find.
Although usb ports can be used as well. Both for the arduino and the lirc.
But if you want to use the solution of 'krzys31337' -the one with the direct single serial port- ,then your limited to 2-3 leds ,with 2 buttons max.
The arduino and lirc solution can offer more then enough buttons and outputs.
Flexibility is needed. And remember that the com port won't be available forever.
Mobo's with com port are getting harder to find.