Using a Sick WS15-D1130 Infrared Diode pair to act as a hardware motion detection sensor for Zoneminder. Also testing out an Omrom photo electric sensor, the E3F2-R2C4. This is a tripwire alarm sensor. When the beam is blocked, the alarm is activated.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

26 lines
710 B

#!/bin/bash
IPADDRESS=192.168.78.50
CAMERAMODECTLOC=bay4hfs
TMPFILE=bay4tmp
TELNETSERVER=127.0.0.1
PORT=6802
MONITORNUMBER=12
wget $IPADDRESS -O $CAMERAMODECTLOC && cat $CAMERAMODECTLOC | grep Temp > $TMPFILE
RESULT=$(cat $TMPFILE)
telnet $TELNETSERVER $PORT <<EOF
$MONITORNUMBER|show||||$RESULT
EOF
#successful results will be viewable in INFO level syslogs (devuan):
#Jan 19 04:15:01 server CRON[27503]: (root) CMD (/home/cam/scripts/telnet_bay4.sh)
#Jan 19 04:15:01 server CRON[27504]: (root) CMD (/home/cam/scripts/telnet_dispatch.sh)
#Jan 19 04:15:01 server zmtrigger[15315]: INF [Updated show text to 'Temp:59#015
#Jan 19 04:15:01 server zmtrigger[15315]: INF [Updated show text to 'Temp:75#015