....
authorrealraum <realraum@realraum.at>
Thu, 4 Nov 2010 17:37:05 +0000 (17:37 +0000)
committerrealraum <realraum@realraum.at>
Thu, 4 Nov 2010 17:37:05 +0000 (17:37 +0000)
play-sound-status.py
switch-power.py

index 976bed4..2eceb2f 100755 (executable)
@@ -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")
index 9f7ac69..15027d6 100755 (executable)
@@ -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