added additional light in our e-lab
This commit is contained in:
parent
93d1b4727a
commit
85c0c3cc0e
25
light.sh
25
light.sh
|
@ -12,17 +12,17 @@ sign() {
|
||||||
ROOM_COUNT=3
|
ROOM_COUNT=3
|
||||||
DFAULT_LIGHT_STATE=0
|
DFAULT_LIGHT_STATE=0
|
||||||
STATE_0="a\x00\x03\x00\x00\x00|000000000000000000;\
|
STATE_0="a\x00\x03\x00\x00\x00|000000000000000000;\
|
||||||
000000000000000000;\
|
a\x00\x03\x00\x00\x00|;\
|
||||||
000000000000000000"
|
000000000000000000"
|
||||||
STATE_1="a\x00\x03\xff\xff\xff|255255255255255255;\
|
STATE_1="a\x00\x03\xff\xff\xff|255255255255255255;\
|
||||||
000000000000000000;\
|
a\x00\x03\xff\xff\xff|;\
|
||||||
000000000000000000"
|
000000000000000000"
|
||||||
STATE_2="n\x00\x02\x01\x00|!;\
|
STATE_2="n\x00\x02\x01\x00|!;\
|
||||||
000000000000000000;\
|
n\x00\x02\x01\x00|;\
|
||||||
000000000000000000"
|
000000000000000000"
|
||||||
STATE_3="!/usr/bin/python3 /home/automation/fensterbogenbeleuchtung_animations/animations.py|!;\
|
STATE_3="!/usr/bin/python3 /home/automation/fensterbogenbeleuchtung_animations/animations.py|!;\
|
||||||
000000000000000000;\
|
a\x00\x03\xff\xff\xff|;\
|
||||||
000000000000000000"
|
000000000000000000"
|
||||||
|
|
||||||
get_room_color_string() {
|
get_room_color_string() {
|
||||||
case "$ROOM_NUMBER" in
|
case "$ROOM_NUMBER" in
|
||||||
|
@ -32,7 +32,8 @@ case "$ROOM_NUMBER" in
|
||||||
echo "a\x00\x03$COLOR_A|$COLOR_B$COLOR_B"
|
echo "a\x00\x03$COLOR_A|$COLOR_B$COLOR_B"
|
||||||
;;
|
;;
|
||||||
2)
|
2)
|
||||||
echo ""
|
COLOR_A="$(echo "$COLOR" | sed "s/\(..\)\(..\)\(..\)/\\\x\2\\\x\1\\\x\3/g")"
|
||||||
|
echo "a\x00\x03$COLOR_A"
|
||||||
;;
|
;;
|
||||||
3)
|
3)
|
||||||
echo ""
|
echo ""
|
||||||
|
@ -80,12 +81,10 @@ case "$ROOM_NUMBER" in
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
2)
|
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)"
|
# 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 -en "$COLOR_B" > /dev/null
|
||||||
echo "not implemented" >&1
|
|
||||||
exit 1
|
|
||||||
;;
|
;;
|
||||||
3)
|
3)
|
||||||
# COLOR_A="$(echo "$STATE" | cut -d";" -f3 | cut -d"|" -f1)"
|
# COLOR_A="$(echo "$STATE" | cut -d";" -f3 | cut -d"|" -f1)"
|
||||||
|
|
Loading…
Reference in New Issue