added additional light in our e-lab

This commit is contained in:
Florian Schlegel 2017-03-11 00:04:46 +01:00
parent 93d1b4727a
commit 85c0c3cc0e
1 changed files with 12 additions and 13 deletions

View File

@ -12,17 +12,17 @@ sign() {
ROOM_COUNT=3
DFAULT_LIGHT_STATE=0
STATE_0="a\x00\x03\x00\x00\x00|000000000000000000;\
000000000000000000;\
000000000000000000"
a\x00\x03\x00\x00\x00|;\
000000000000000000"
STATE_1="a\x00\x03\xff\xff\xff|255255255255255255;\
000000000000000000;\
000000000000000000"
a\x00\x03\xff\xff\xff|;\
000000000000000000"
STATE_2="n\x00\x02\x01\x00|!;\
000000000000000000;\
000000000000000000"
n\x00\x02\x01\x00|;\
000000000000000000"
STATE_3="!/usr/bin/python3 /home/automation/fensterbogenbeleuchtung_animations/animations.py|!;\
000000000000000000;\
000000000000000000"
a\x00\x03\xff\xff\xff|;\
000000000000000000"
get_room_color_string() {
case "$ROOM_NUMBER" in
@ -32,7 +32,8 @@ case "$ROOM_NUMBER" in
echo "a\x00\x03$COLOR_A|$COLOR_B$COLOR_B"
;;
2)
echo ""
COLOR_A="$(echo "$COLOR" | sed "s/\(..\)\(..\)\(..\)/\\\x\2\\\x\1\\\x\3/g")"
echo "a\x00\x03$COLOR_A"
;;
3)
echo ""
@ -80,12 +81,10 @@ case "$ROOM_NUMBER" in
fi
;;
2)
# COLOR_A="$(echo "$STATE" | cut -d";" -f2 | cut -d"|" -f1)"
COLOR_A="$(echo "$STATE" | cut -d";" -f2 | cut -d"|" -f1)"
# COLOR_B="$(echo "$STATE" | cut -d";" -f2 | cut -d"|" -f2)"
# echo -en "$COLOR_A" > /dev/null
echo -en "$COLOR_A" > /dev/udp/172.23.92.18/49152 &
# echo -en "$COLOR_B" > /dev/null
echo "not implemented" >&1
exit 1
;;
3)
# COLOR_A="$(echo "$STATE" | cut -d";" -f3 | cut -d"|" -f1)"