From e73500fe1313f6c4ec02e19fe906466d6b875821 Mon Sep 17 00:00:00 2001 From: realraum Date: Thu, 4 Nov 2010 17:37:05 +0000 Subject: [PATCH] .... --- play-sound-status.py | 4 ++++ switch-power.py | 12 ++++++------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/play-sound-status.py b/play-sound-status.py index 976bed4..2eceb2f 100755 --- a/play-sound-status.py +++ b/play-sound-status.py @@ -37,6 +37,10 @@ class UWSConfig: self.config_parser.set('cmdlog','delay',"0.0") self.config_parser.set('cmdlog','type',"shellcmd") self.config_parser.add_section('slugplaymp3') + self.config_parser.set('slugplayfile','remote_host',"root@slug.realraum.at") + self.config_parser.set('slugplayfile','remote_shell',"/home/playgst.sh %ARG%") + self.config_parser.set('slugplayfile','delay',"0.0") + self.config_parser.set('slugplayfile','type',"remotecmd") self.config_parser.set('slugplaymp3','remote_host',"root@slug.realraum.at") self.config_parser.set('slugplaymp3','remote_shell',"/home/playmp3.sh %ARG%") self.config_parser.set('slugplaymp3','delay',"0.0") diff --git a/switch-power.py b/switch-power.py index 9f7ac69..15027d6 100755 --- a/switch-power.py +++ b/switch-power.py @@ -210,12 +210,6 @@ def eventPeriodical(): def eventPresent(): global status_presence,room_is_bright,unixts_last_movement,uwscfg,unixts_last_presence unixts_last_presence=time.time() - if ( time.time() - unixts_last_movement ) <= float(uwscfg.powerswitching_secs_movement_before_presence_to_launch_event): - eventPresentAndMoved() - - -def eventPresentAndMoved(): - global status_presence,room_is_bright logging.debug("eventPresent()"); status_presence=True if haveDaylight(): @@ -229,6 +223,12 @@ def eventPresentAndMoved(): for id in present_ids.split(" "): switchPower(id,True) switchLogo(status_presence) + if ( time.time() - unixts_last_movement ) <= float(uwscfg.powerswitching_secs_movement_before_presence_to_launch_event): + eventPresentAndMoved() + +def eventPresentAndMoved(): + global status_presence,room_is_bright + pass def eventNobodyHere(): global status_presence -- 1.7.10.4