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