From ce17854095cdf8f13ce8c1c5b234aa3da3fa686e Mon Sep 17 00:00:00 2001 From: Markus Schmidl Date: Wed, 15 Feb 2017 21:29:28 +0100 Subject: [PATCH] fensterbogenbleuchtung -> UDP --- chch-power.py | 2 +- ligth.sh => light.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) rename ligth.sh => light.sh (76%) diff --git a/chch-power.py b/chch-power.py index 29dcd31..f04d64f 100644 --- a/chch-power.py +++ b/chch-power.py @@ -36,7 +36,7 @@ def switch_longpressed(event): elif pin_shortpress_count[event.pin_num] == 1: event.chip.output_pins[event.pin_num].toggle() elif pin_shortpress_count[event.pin_num] == 2: - call(["/root/chch-power/ligth.sh"]) + call(["/root/chch-power/light.sh"]) def switch_verylongpressed(event): shortpress_delay = pin_last_rise_date[event.pin_num] - pin_last_shortpress[event.pin_num] diff --git a/ligth.sh b/light.sh similarity index 76% rename from ligth.sh rename to light.sh index 1c9dce4..d9a1793 100755 --- a/ligth.sh +++ b/light.sh @@ -26,6 +26,6 @@ case $LIGHT_STATE in ;; esac -echo -en "$(echo "$STATE" | cut -d";" -f1)" | nc -w1 172.23.92.15 49152 & -echo -en "$(echo "$STATE" | cut -d";" -f2)" >/dev/udp/172.23.92.16/31302 & +echo -en "$(echo "$STATE" | cut -d";" -f1)" > /dev/udp/172.23.92.15/49152 & +echo -en "$(echo "$STATE" | cut -d";" -f2)" > /dev/udp/172.23.92.16/31302 & echo $LIGHT_STATE > $TMPFILE