FreeBSD and controlling an alarm via relay

Ian Smith smithi at nimnet.asn.au
Mon Jul 18 09:45:16 UTC 2011


On Mon, 18 Jul 2011, Achilleas Mantzios wrote:
 > Hello again, It worked!

Excellent!

 > Just to recap on the hardware used and the architecture of the whole setup:
 > 
 > Camera ( simple analog wired (coaxial cable)) is sending video to Kodicom KMC-4400R video card
 > the video is analyzed via Zoneminder, and a separate deamon in perl polls the shared memory
 > with zoneminder to check for alarm/alert caused by motion detection.
 > Upon motion detection, the daemon drives this USB relay board:
 > http://cgi.ebay.co.uk/USB-8-Channel-Relay-Board-RS232-Serial-controlled-/280591766649?_trksid=p5197.m7&_trkparms=algo%3DLVI%26itu%3DUCI%26otn%3D1%26po%3DLVI%26ps%3D63%26clkid%3D1423565781848187460
 > (FTDI based), using simple echo commands like:
 > #!/usr/local/bin/bash
 > echo -e "\xFF\x01\x01" > /dev/cuaU0
 > sleep 1
 > echo -e "\xFF\x01\x00" > /dev/cuaU0
 > However, the above when tested with Ubuntu 11, didnt work out of the 
 > box until i set baudrate explicitly to 9600.
 > In FreeBSD worked at once, just by running the above script.

That'll be because FreeBSD uses 9600 baud as the default serial rate.

 > Now, two of the relay board NC outputs (circuits) are connected to the two inputs (loops) in 
 > http://www.visonic.com/Products/Wireless-Property-Protection/Universal-transmitter-mct-100
 > (the two circuits are defined as being "EOL" type, not NC)
 > which in turn talks to 
 > http://www.visonic.com/Products/Wireless-Property-Protection/PowerMaxPlus
 > 
 > I have two cameras, and i use them as two separate zones. I think it works good,
 > and at least for interior spaces, i think motion detection via video is more reliable
 > than IR detectors, because in the summer IR struggle to detect motion when
 > ambient temperature is close to the human temperature.

Indeed, in late summer here the humans would show up as cool spots :)

 > (In exterior  spaces, video motion detection is problematic due to large birds, insects, etc,
 > while exterior IR motion detection is by default unreliable)
 > 
 > Thank you all!

Thanks for news and feedback.  Good to know that those relay boards work 
erll with FreeBSD .. I have an upcoming project that could use these.

cheers, Ian


More information about the freebsd-multimedia mailing list