config values
[svn42.git] / track-presence.py
index c8f1b50..9ba0ac9 100755 (executable)
@@ -49,8 +49,8 @@ class UWSConfig:
     self.config_parser.set('tracker','sec_necessary_to_move_through_door',"10.0")
     self.config_parser.set('tracker','sec_general_movement_timeout',"3600")
     self.config_parser.set('tracker','server_socket',"/var/run/tuer/presence.socket")
-    self.config_parser.set('tracker','photo_flashlight',"950")
-    self.config_parser.set('tracker','photo_artif_light',"150")
+    self.config_parser.set('tracker','photo_flashlight',"1020")
+    self.config_parser.set('tracker','photo_artif_light',"960")
     self.config_parser.add_section('debug')
     self.config_parser.set('debug','enabled',"False")
     self.config_mtime=0
@@ -369,7 +369,6 @@ class StatusTracker: #(threading.Thread):
     self.timer=threading.Timer(sec, self.checkPresenceStateChangeAndNotify)
     self.timer.start()
   
-  #TODO: check brightness level from cam or an arduino sensor
   def somebodyPresent(self):
     with self.lock:
       if self.door_open:
@@ -396,8 +395,8 @@ class StatusTracker: #(threading.Thread):
       elif self.door_open and not somebody_present:
         self.checkAgainIn(2*float(self.uwscfg.tracker_sec_necessary_to_move_through_door))
         return None
-      elif not somebody_present and self.last_light_unixts > self.last_door_operation_unixts and self.last_light_value > int(self.uwscfg.tracker_photo_artif_light):
-        return "Nobody here but light is still on"
+#      elif not somebody_present and self.last_light_unixts > self.last_door_operation_unixts and self.last_light_value > int(self.uwscfg.tracker_photo_artif_light):
+#return "Nobody here but light is still on"
       else:
         return None