better realtime sending of presency count to doorbuzz dispplay
parent
50f36d9bf1
commit
ae75576910
|
@ -10,7 +10,7 @@ do
|
||||||
fi
|
fi
|
||||||
if [ "$cmd" = "peoplecounter" ]
|
if [ "$cmd" = "peoplecounter" ]
|
||||||
then
|
then
|
||||||
tail -1 /run/peoplecounter
|
tail -1 /run/presencyrt
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$cmd" = "flashon" ]
|
if [ "$cmd" = "flashon" ]
|
||||||
|
|
|
@ -8,13 +8,13 @@ then
|
||||||
fi
|
fi
|
||||||
if [ "$1" = "pushed" ]
|
if [ "$1" = "pushed" ]
|
||||||
then
|
then
|
||||||
aplay '/root/win/Windows XP Critical Error.wav'
|
aplay '/root/win/Windows XP Error.wav'
|
||||||
sleep 1
|
sleep 1
|
||||||
aplay '/root/win/Windows XP Critical Stop.wav'
|
aplay '/root/win/Windows XP Critical Stop.wav'
|
||||||
#espeak -s 130 "Level2 is closing." 2>/dev/null
|
#espeak -s 130 "Level2 is closing." 2>/dev/null
|
||||||
#espeak -s 120 -p 80 "Please wait, until all lights are off." 2>/dev/null
|
#espeak -s 120 -p 80 "Please wait, until all lights are off." 2>/dev/null
|
||||||
sleep 1
|
sleep 1
|
||||||
#espeak -s 120 -p 80 "I will tell you when I am finished." 2>/dev/null
|
#espeak -s 120 -p 80 "I will tell you when I am finished." 2>/dev/null
|
||||||
aplay '/root/win/Windows XP Logoff.wav'
|
aplay '/root/win/Windows XP Logoff Sound.wav'
|
||||||
fi
|
fi
|
||||||
) &
|
) &
|
||||||
|
|
|
@ -13,6 +13,7 @@ SAMPLES=20 # how many records to keep in file
|
||||||
INTERVAL=0 # how long to wait between polls
|
INTERVAL=0 # how long to wait between polls
|
||||||
INTERVALSKIP=20 # poll with INTERVAL but only consider every INTERVALSKIP's for SAMPLES
|
INTERVALSKIP=20 # poll with INTERVAL but only consider every INTERVALSKIP's for SAMPLES
|
||||||
MAXFILE="/var/cache/peoplecountermax$DEV"
|
MAXFILE="/var/cache/peoplecountermax$DEV"
|
||||||
|
PRESENCYRT="/run/presencyrt$DEV"
|
||||||
PRESENCY="/run/presency$DEV" # value shown on website
|
PRESENCY="/run/presency$DEV" # value shown on website
|
||||||
# /run/peoplecounter lists all recent reads, newest at end
|
# /run/peoplecounter lists all recent reads, newest at end
|
||||||
# let's have some management functions instead of a database
|
# let's have some management functions instead of a database
|
||||||
|
@ -87,11 +88,13 @@ do
|
||||||
fi
|
fi
|
||||||
if [ $p -gt $rtoldp ]
|
if [ $p -gt $rtoldp ]
|
||||||
then
|
then
|
||||||
|
echo "$p" > "$PRESENCYRT"
|
||||||
# echo "p($p) -gt rtoldp($rtoldp)" # debug
|
# echo "p($p) -gt rtoldp($rtoldp)" # debug
|
||||||
aplay '/root/win/Windows XP Logon Sound.wav'
|
aplay '/root/win/Windows XP Logon Sound.wav'
|
||||||
fi
|
fi
|
||||||
if [ $p -lt $rtoldp ]
|
if [ $p -lt $rtoldp ]
|
||||||
then
|
then
|
||||||
|
echo "$p" > "$PRESENCYRT"
|
||||||
# echo "p($p) -lt rtoldp($rtoldp)" # debug
|
# echo "p($p) -lt rtoldp($rtoldp)" # debug
|
||||||
aplay '/root/win/Windows XP Logoff Sound.wav'
|
aplay '/root/win/Windows XP Logoff Sound.wav'
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue