Skip to content
Snippets Groups Projects
Commit 343e1c7b authored by dronus's avatar dronus
Browse files

zoneminder to teensy serial feed working

parent 83602e0f
No related branches found
No related tags found
No related merge requests found
#!/bin/bash
cd `dirname $0`
sleep 5
sudo stty -F /dev/ttyACM0 10:0:18b2:0:3:1c:7f:15:4:0:0:0:11:13:1a:0:12:f:17:16:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0
sleep 5
# make fifo, if it doesnt exist
mkfifo image_fifo
......@@ -7,5 +15,9 @@ mkfifo image_fifo
sleep 10000000 >image_fifo &
# start the sender
cat image_fifo | ./sender >/dev/ttyACM0
cat image_fifo | ./sender >/dev/ttyACM0 &
sudo stty -F /dev/ttyACM0 10:0:18b2:0:3:1c:7f:15:4:0:0:0:11:13:1a:0:12:f:17:16:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0
# start the zone minder controller
./zoneminder_controller.sh &
zone_schablone.png

2.93 KiB

#!/bin/bash
$OLDZONES=""
OLDZONES=""
while true
do
ZONES=`wget -O- 'http://localhost/zm/index.php?view=events&page=&reload=0&execute=0&action=&subaction=&line=&fid=&filterName=motion&filter%5Bterms%5D%5B0%5D%5Battr%5D=Cause&filter%5Bterms%5D%5B0%5D%5Bop%5D=%3D&filter%5Bterms%5D%5B0%5D%5Bval%5D=Motion&filter%5Bterms%5D%5B1%5D%5Bcnj%5D=and&filter%5Bterms%5D%5B1%5D%5Battr%5D=DateTime&filter%5Bterms%5D%5B1%5D%5Bop%5D=%3E&filter%5Bterms%5D%5B1%5D%5Bval%5D=15+seconds+ago&sort_field=DateTime&sort_asc=1&limit=1&AutoExecuteCmd=' | grep -o 'zone.'`
ZONES=`wget -O- 'http://localhost/zm/index.php?view=events&page=&reload=0&execute=0&action=&subaction=&line=&fid=&filterName=motion&filter%5Bterms%5D%5B0%5D%5Battr%5D=Cause&filter%5Bterms%5D%5B0%5D%5Bop%5D=%3D&filter%5Bterms%5D%5B0%5D%5Bval%5D=Motion&filter%5Bterms%5D%5B1%5D%5Bcnj%5D=and&filter%5Bterms%5D%5B1%5D%5Battr%5D=DateTime&filter%5Bterms%5D%5B1%5D%5Bop%5D=%3E&filter%5Bterms%5D%5B1%5D%5Bval%5D=15+seconds+ago&sort_field=DateTime&sort_asc=1&limit=1&AutoExecuteCmd=' 2>/dev/null | grep -o 'zone.'`
if [ "$OLDZONES" != "$ZONES" ]
then
OLDZONES="$ZONES"
COMMAND="composite "; for ZONE in $ZONES; do COMMAND+="-compose plus $ZONE.png "; done
COMMAND+=" -compose plus black.png black.png rgba:image_fifo"
COMMAND="convert black.png "; for ZONE in $ZONES; do COMMAND+=" $ZONE.png -compose plus -composite "; done
COMMAND+="rgba:image_fifo"
echo $COMMAND
$COMMAND
sleep 3
# sleep 1
fi
sleep 1
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment