diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..65a39ae --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,16 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": "Run Unit Tests", + "type": "debugpy", + "request": "launch", + "program": "${workspaceFolder}/apps/ad_toolbox/unittests.py", + "console": "integratedTerminal", + "cwd": "${workspaceFolder}" + } + ] +} \ No newline at end of file diff --git a/appdaemon.yaml b/appdaemon.yaml index 32f8f38..c0725ba 100644 --- a/appdaemon.yaml +++ b/appdaemon.yaml @@ -3,6 +3,8 @@ appdaemon: longitude: 0 elevation: 30 time_zone: Europe/Berlin + exclude_dirs: + - unit_tests plugins: HASS: type: hass @@ -14,3 +16,15 @@ http: admin: api: hadashboard: +logs: + main_log: + filename: /conf/logs/appdaemon.log + date_format: "%d-%m-%y %H:%M:%S" + access_log: + filename: /conf/logs/access.log + error_log: + filename: /conf/logs/error.log + virtualsensors_log: + name: VirtualSensorsLog + filename: /conf/logs/virtualsensors.log + date_format: "%d-%m-%y %H:%M:%S" diff --git a/apps/ad_toolbox b/apps/ad_toolbox index 8386a64..923cfd4 160000 --- a/apps/ad_toolbox +++ b/apps/ad_toolbox @@ -1 +1 @@ -Subproject commit 8386a6477e690f30adf1e973cd26a54ac9fb1079 +Subproject commit 923cfd415266502ea0af267314be9c9e41ea4af2 diff --git a/apps/apps.yaml b/apps/apps.yaml index 4c84034..cd40adf 100644 --- a/apps/apps.yaml +++ b/apps/apps.yaml @@ -1,3 +1,41 @@ -hello_world: - module: hello - class: HelloWorld +motion_tracker: + module: motiontracker + class: MotionTracker + + mqtt_device_name: AD Motion Tracker + + areas: + corridor: + motion_sensors: binary_sensor.corridor_motion + hallway: + motion_sensors: binary_sensor.hallway_motion + restroom: + motion_sensors: binary_sensor.restroom_motion + +light_corridor: + module: smartlight + class: SmartLight + entity: light.corridor + + smart_conditions: + trigger_conditions: sensor.corridor_last_motion < 5 + blocking_conditions: sensor.corridor_motion_light_level > 10 and not self + +light_hallway: + module: smartlight + class: SmartLight + entity: light.hallway + + smart_conditions: + trigger_conditions: sensor.hallway_last_motion < 5 + blocking_conditions: sensor.hallway_motion_light_level > 10 and not self + +light_restroom: + module: smartlight + class: SmartLight + entity: light.restroom + + smart_conditions: + trigger_conditions: sensor.restroom_last_motion < 5 + blocking_conditions: sensor.restroom_motion_light_level > 10 and not self + diff --git a/apps/apps.yaml.example b/apps/apps.yaml.example deleted file mode 100644 index 4c84034..0000000 --- a/apps/apps.yaml.example +++ /dev/null @@ -1,3 +0,0 @@ -hello_world: - module: hello - class: HelloWorld diff --git a/apps/data/motion_tracker.dataset b/apps/data/motion_tracker.dataset new file mode 100644 index 0000000..22de063 Binary files /dev/null and b/apps/data/motion_tracker.dataset differ diff --git a/apps/hello.py b/apps/hello.py deleted file mode 100644 index 7e44729..0000000 --- a/apps/hello.py +++ /dev/null @@ -1,13 +0,0 @@ -import hassapi as hass - -# -# Hello World App -# -# Args: -# - - -class HelloWorld(hass.Hass): - def initialize(self): - self.log("Hello from AppDaemon") - self.log("You are now ready to run Apps!") diff --git a/apps/motiontracker.py b/apps/motiontracker.py new file mode 100644 index 0000000..b399d22 --- /dev/null +++ b/apps/motiontracker.py @@ -0,0 +1,137 @@ +import appdaemon.plugins.hass.hassapi as hass +from ad_toolbox.smartobject import SmartObject +from ad_toolbox.eventhandler import EventHandler +from ad_toolbox.expressionparser import ParsingException +import time + +class MotionTracker(SmartObject): + + MAX_TIME = 120 + + def initialize(self): + super().initialize() + + if self.dataset == None: + self.dataset = { 'areas_movement_time' : dict(), 'last_area_with_movement' : 'Unknown', 'areas_door_close_time' : dict() } + else: + # clean obsolete keys + self.dataset['areas_movement_time'] = {area : self.dataset['areas_movement_time'][area] for area in self.args['areas'] if area in self.dataset['areas_movement_time']} + self.dataset['areas_door_close_time'] = {area : self.dataset['areas_door_close_time'][area] for area in self.args['areas'] if area in self.dataset['areas_door_close_time']} + + self.input_sensors = dict() + self.output_last_motion_sensors = dict() + self.output_last_motion_time_sensors = dict() + self.output_door_close_time_sensors = dict() + self.update_cb_handle = None + + if "areas" in self.args: + current_time = time.time() + for area in self.args['areas']: + update_on_both_front = False + self.output_last_motion_sensors[area] = self.create_entity(f"sensor.{area}_last_motion") + self.output_last_motion_time_sensors[area] = self.create_entity(f"sensor.{area}_last_motion_time") + if isinstance(self.args['areas'][area], dict): + sensor_entities = self.args['areas'][area]['motion_sensors'] + try: update_on_both_front = self.args['areas'][area]['update_on_both_front'] + except KeyError: pass + + if 'door_sensor' in self.args['areas'][area]: + self.output_door_close_time_sensors[area] = self.create_entity(f"{area}_sensor.door_close_time") + + if not area in self.dataset['areas_door_close_time']: + self.dataset['areas_door_close_time'][area] = 0 + + if not self.output_door_close_time_sensors[area].exists(): + self.output_door_close_time_sensors[area].set_state(state = self.dataset['areas_door_close_time'][area],attributes = {'unit_of_measurement' : "s"}) + + self.listen_state(self.on_door_close,self.args['areas'][area]['door_sensor'],new = 'off', old = 'on',area = area) + else: + sensor_entities = self.args['areas'][area] + + if isinstance(sensor_entities, list): + for entity in sensor_entities: + self.register_motion_sensor(area,entity,update_on_both_front) + else: + self.register_motion_sensor(area,sensor_entities,update_on_both_front) + + if not area in self.dataset['areas_movement_time']: + self.dataset['areas_movement_time'][area] = 0 + + if not self.output_last_motion_time_sensors[area].exists(): + self.output_last_motion_time_sensors[area].set_state(state = self.dataset['areas_movement_time'][area],attributes = {'unit_of_measurement' : "s"}) + + self.update_area_sensor(area,current_time) + + if "clear_areas_events" in self.args: + self.event_handlers = list() + for entry in self.args["clear_areas_events"]: + yaml_block = self.args["clear_areas_events"][entry] + + try: self.event_handlers.append(EventHandler(self,yaml_block['events_to_listen'],self.on_clear_areas_event,entry)) + except ParsingException as e: + self.log_error(str(e)) + continue + + self.update_areas_data() + + def on_clear_areas_event(self, event_name, event_data,entry): + for area in self.args["clear_areas_events"][entry]['areas_to_clear']: + self.log(f"{area} movement data reseted by {event_name} event") + self.dataset['areas_movement_time'][area] = 0 + self.output_last_motion_time_sensors[area].set_state(state = 0) + + self.update_areas_data() + + def register_motion_sensor(self,area,sensor_entity,update_on_both_front): + self.log(f"Registering sensor {sensor_entity} for area {area}") + if sensor_entity not in self.input_sensors: + self.input_sensors[sensor_entity] = area + self.listen_state(self.on_motion_detected,sensor_entity,old = "off", new = "on", area = area) + if update_on_both_front: + self.listen_state(self.on_motion_detected,sensor_entity,old = "on", new = "off", area = area) + else: + self.log_error(f"{sensor_entity} is already registered for area {self.input_sensors[sensor_entity]}") + + def update_area_sensor(self,area,current_time): + time_elapsed = min((current_time - self.dataset['areas_movement_time'][area]) / 60,self.MAX_TIME) + assert time_elapsed != None + self.output_last_motion_sensors[area].set_state(state = int(time_elapsed),attributes = {'unit_of_measurement' : "min"}) + + def is_excluded_from_last_area_with_movement(self,area): + if "areas_excluded_from_last_area_with_movement" in self.args: + return area in self.args["areas_excluded_from_last_area_with_movement"] + + return False + + def is_area_initialized(self,area): + return area in self.output_last_motion_sensors #might need a dedicated boolean at some point + + def update_areas_data(self,*args): + current_time = time.time() + #we don't want update_areas_data_to_fork if it's called directly from on_state_change + if self.update_cb_handle and self.timer_running(self.update_cb_handle): + self.cancel_timer(self.update_cb_handle) + self.update_cb_handle = None + + #I want to start updating the oldest + #if not, the order might not be respected for a fraction of seconds. + #For example if A = 5 and B = 6 and add 2 to the both of them starting by A + #A will be bigger than B (A = 7 and B = 6) for a very short time, and might trigger some automation + for area in sorted(self.dataset['areas_movement_time'], key = lambda area: self.dataset['areas_movement_time'][area]): + if (self.is_area_initialized(area)): self.update_area_sensor(area,current_time) + + self.set_state("sensor.last_motion",state = self.dataset['last_area_with_movement']) + self.update_cb_handle = self.run_in(self.update_areas_data,30) + + def on_motion_detected(self, entity, attribute, old, new, kwargs): + current_time = time.time() + self.dataset['areas_movement_time'][kwargs['area']] = current_time + self.output_last_motion_time_sensors[kwargs['area']].set_state(state = current_time) + + if not self.is_excluded_from_last_area_with_movement(kwargs['area']): + self.dataset['last_area_with_movement'] = kwargs['area'] + + self.update_areas_data() + + def on_door_close(self, entity, attribute, old, new, kwargs): + self.output_door_close_time_sensors[kwargs['area']].set_state(state = time.time()) diff --git a/apps/smartlight.py b/apps/smartlight.py new file mode 100644 index 0000000..e49a49b --- /dev/null +++ b/apps/smartlight.py @@ -0,0 +1,92 @@ +import appdaemon.plugins.hass.hassapi as hass +from smartswitch import SmartSwitch +import ad_toolbox.smartcondition as SmartCondition + +class SmartLight(SmartSwitch): + + #@SmartCondition.catch_smartcondition_exception(lambda self, message: self.log_error(message,stop_app = True)) + def on_initialize_smart_object(self): + self.light_brightness_pct_list = list() + self.light_brightness_pct = None + + super().on_initialize_smart_object() + + if "increase_brightness_events" in self.args: + self.register_event_from_yaml(self.args["increase_brightness_events"],self.on_increase_brightness_event) + if "decrease_brightness_events" in self.args: + self.register_event_from_yaml(self.args["decrease_brightness_events"],self.on_decrease_brightness_event) + + if "brightness_pct_step" in self.args: + self.brightness_pct_step = self.args["brightness_pct_step"] + else: self.brightness_pct_step = 5 + + if "on_events_with_transition" in self.args: + for key in self.args["on_events_with_transition"]: + #self.log(f"{key}") + self.register_event_from_yaml(self.args["on_events_with_transition"][key]["events"],self.on_turn_on_with_transition,key) + + if "light_brightness_pct" in self.args: + self.always_change_brightness = False + + for key in self.args["light_brightness_pct"]: + if key == 'always_change_brightness': + self.always_change_brightness = bool(self.args["light_brightness_pct"][key]) + else: + self.light_brightness_pct_list.append((SmartCondition.Evaluator(self,self.args["light_brightness_pct"][key],condition_name = key, on_update_cb = self.on_update_light_brightness_pct,constants = self.constants, templates_library = self.templates_library, log_callback_trigger_reason = False),key)) + self. on_update_light_brightness_pct() + + self.listen_state(self.on_state_change,self.entity_id) + + def on_state_change(self, entity, attribute, old, new, *kwargs): + if "icon_override" in self.args: + override_data = self.args['icon_override'] + + def update_icon(entity_id,new_state): self.set_state(entity_id,attributes = { 'icon' : override_data['on_icon'] if new_state == 'on' else override_data['off_icon'] }) + + if isinstance(override_data['dest_entities'],list): + for target_entity in override_data['dest_entities']: + update_icon(target_entity,new) + else: + update_icon(override_data['dest_entities'],new) + + + def on_increase_brightness_event(self, event_name, data, kwargs): + if self.get_state(self.entity_id) != 'off': + self.call_service("light/turn_on", entity_id = self.entity_id, brightness_step_pct = self.brightness_pct_step) + + def on_decrease_brightness_event(self, event_name, data, kwargs): + if self.get_state(self.entity_id) != 'off': + self.call_service("light/turn_on", entity_id = self.entity_id, brightness_step_pct = -self.brightness_pct_step) + + def on_turn_on_with_transition(self, event_name, data, kwargs,event_category): + transition_time = self.args["on_events_with_transition"][event_category]["transition_time"] + brightness_pct = self.args["on_events_with_transition"][event_category]["brightness_pct"] + self.log(f"Turn on at {brightness_pct}% with a transition of {transition_time}s") + self.call_service("light/turn_on", entity_id = self.entity_id,brightness_pct = 1) + self.call_service("light/turn_on", entity_id = self.entity_id, transition = transition_time,brightness_pct = brightness_pct) + + def switch_on(self): + if self.light_brightness_pct != None: + self.log(f"Turn on {self.entity_id} at {self.light_brightness_pct}%") + self.call_service("light/turn_on", entity_id = self.entity_id,brightness_pct = self.light_brightness_pct) + else: + super().switch_on() + + def on_update_light_brightness_pct(self): + for brightness_pct_evaluator in self.light_brightness_pct_list: + if brightness_pct_evaluator[0].evaluate(False) == SmartCondition.Result.Succeeded: + if self.light_brightness_pct != brightness_pct_evaluator[1]: + brightness_pct_evaluator[0].log_callback_trigger_reason() + brightness_pct_evaluator[0].log_evaluation_result() + self.light_brightness_pct = brightness_pct_evaluator[1] + self.log_info(f"New brightness : {self.light_brightness_pct}%") + break + + if (self.always_change_brightness or self.get_state(self.entity_id) == "on") and self.light_brightness_pct != None: + self.call_service("light/turn_on", entity_id = self.entity_id,brightness_pct = self.light_brightness_pct) + + if int(self.light_brightness_pct) == 0: #some integration seems to not turn off the light when you set up a brightness of 0 + self.log_info("Turning off") + self.call_service("light/turn_off", entity_id = self.entity_id) + + diff --git a/apps/smartswitch.py b/apps/smartswitch.py new file mode 100644 index 0000000..9b8f3eb --- /dev/null +++ b/apps/smartswitch.py @@ -0,0 +1,144 @@ +import appdaemon.plugins.hass.hassapi as hass +import ad_toolbox.smartcondition as SmartCondition +from ad_toolbox.smartobject import SmartObject + +class SmartSwitch(SmartObject): + + #@SmartCondition.catch_smartcondition_exception(lambda self, message: self.log_error(message,stop_app = True)) + def on_initialize_smart_object(self): + #super().initialize() + + self.off_conditions_evaluator = None + self.smart_conditions_evaluator = None + + #self.depends_on_module("smartswitch") + + if "smart_conditions" in self.args: + self.smart_conditions_evaluator = SmartCondition.Evaluator(self,self.args['smart_conditions'],condition_name = "smart_conditions",on_change_cb = self.on_smart_conditions_change,constants = self.constants, templates_library = self.templates_library) + if "off_conditions" in self.args: + if self.smart_conditions_evaluator == None: + self.off_conditions_evaluator = SmartCondition.Evaluator(self,self.args['off_conditions'],condition_name = "off_conditions",on_succeed_cb = self.on_off_conditions,constants = self.constants, templates_library = self.templates_library) + else: + self.log(f"Warning you can't have both an off_conditons and a smart_conditions, the off_conditions will be ignored") + + if "debug" in self.args: + self.log(f'Registering on_debug_display_event for {self.args["debug"]}') + self.listen_event(self.on_debug_display_event,self.args["debug"]) + + if "off_events" in self.args: + self.register_event_from_yaml(self.args["off_events"],self.on_turn_off_event) + if "on_events" in self.args: + self.register_event_from_yaml(self.args["on_events"],self.on_turn_on_event) + if "toggle_events" in self.args: + self.register_event_from_yaml(self.args["toggle_events"],self.on_toggle_event) + + #todo: replace with register_event_from_yaml + if "toggle_action" in self.args: + self.toggle_action = self.args["toggle_action"] + self.listen_event(self.on_toggle_event_action,"ios.action_fired") + + self.auto_switch_cb_handle = None + if 'auto_switch_on_after' in self.args: + if self.is_off(): + self.log(f"Smartswitch has been restarted while it was on. Since we have auto_switch_on_after activated we turn it on as we can't know how long is left for the timer",level = 'WARNING') + self.switch_on() + self.listen_state(self.on_state_change,self.entity_id, old = 'on',new = 'off') + if 'auto_switch_off_after' in self.args: + if self.is_on(): + self.log(f"Smartswitch has been restarted while it was on. Since we have auto_switch_off_after activated we turn it off as we can't know how long is left for the timer",level = 'WARNING') + self.switch_off() + self.listen_state(self.on_state_change,self.entity_id, old = 'off',new = 'on') + + def terminate(self): + self.smart_conditions_evaluator = None + self.off_conditions_evaluator = None + super().terminate() + + def on_state_change(self, entity, attribute, old, new, kwargs): + self.log("state changed from " + str(old) + " to " + str(new)) + if old != new: + if self.auto_switch_cb_handle != None: + self.cancel_timer(self.auto_switch_cb_handle) + self.auto_switch_cb_handle = None + + if new == 'on' and 'auto_switch_off_after' in self.args: + delay = self.args['auto_switch_off_after'] + self.log(f"{self.entity_id} will auto switch on in {delay}s") + self.auto_switch_cb_handle = self.run_in(self.on_auto_switch_after, delay, new_state = 'off',autoswitch_delay = delay) + if new == 'off' and 'auto_switch_on_after' in self.args: + delay = self.args['auto_switch_on_after'] + self.log(f"{self.entity_id} will auto switch off in {delay}s") + self.auto_switch_cb_handle = self.run_in(self.on_auto_switch_after, delay, new_state = 'on',autoswitch_delay = delay) + + def on_auto_switch_after(self, kwargs): + self.auto_switch_cb_handle = None + self.log(f"Switching {self.entity_id} {kwargs['new_state']} after {kwargs['autoswitch_delay']}s") + self.set_state(self.entity_id,state = kwargs['new_state']) + + #debug display to display all events + def on_debug_display_event(self,event_name,data,kwargs): + self.log(f"events {event_name} has been catched. data = {data}") + + def switch_on(self): + self.log(f"Turn on {self.entity_id}") + self.turn_on(self.entity_id) + # not needed yet + # if self.smart_conditions_evaluator: + # self.smart_conditions_evaluator.force_last_evaluation_result(SmartCondition.Result.Succeeded) + # if self.off_conditions_evaluator: + # self.off_conditions_evaluator.force_last_evaluation_result(SmartCondition.Result.Succeeded) + + def switch_off(self): + self.log(f"Turn off {self.entity_id}") + self.turn_off(self.entity_id) + # not needed yet + # if self.smart_conditions_evaluator: + # self.smart_conditions_evaluator.force_last_evaluation_result(SmartCondition.Result.Failed) + # if self.off_conditions_evaluator: + # self.off_conditions_evaluator.force_last_evaluation_result(SmartCondition.Result.Failed) + + def on_toggle_event(self, event_name, data, kwargs): + if self.is_on(): + self.log(f"Toggled off by event {event_name}") + self.switch_off() + else: + self.log(f"Toggled on by event {event_name}") + self.switch_on() + + def is_on(self): return self.get_state(self.entity_id) != 'off' + + def is_off(self): return not self.is_on() + + def on_turn_off_event(self, event_name, data, kwargs): + self.log(f"Turned off by event {event_name}") + self.switch_off() + + def on_turn_on_event(self, event_name, data, kwargs): + self.log(f"Turned on by event {event_name}") + self.switch_on() + + def on_toggle_event_action(self, event_name, data, kwargs): + if data['actionName'] == self.toggle_action: + if self.is_on(): + self.switch_off() + else: + self.switch_on() + + def on_smart_conditions_change(self,prev_result,result): + #trying to track some weird behavior + # if self.smart_conditions_evaluator: + # debug_result = self.smart_conditions_evaluator.evaluate() + # if debug_result != result: + # self.log(f"on_smart_conditions_change was called with prev_result = {prev_result}, result = {result} and evaluate returned {debug_result}") + # else: + # self.log("on_smart_conditions_change was called without a smart_conditions_evaluator") + if result == SmartCondition.Result.Succeeded: + if self.is_off(): + self.switch_on() + else : + if self.is_on(): + self.switch_off() + + def on_off_conditions(self): + if self.is_on(): + self.switch_off() \ No newline at end of file diff --git a/logs/access.log b/logs/access.log new file mode 100644 index 0000000..858c52f --- /dev/null +++ b/logs/access.log @@ -0,0 +1,3 @@ +2026-04-15 21:27:16.172334 INFO Access: New client Admin Client connected +2026-04-15 23:00:13.639981 INFO Access: New client Admin Client connected +2026-04-15 23:15:26.363736 INFO Access: New client Admin Client connected diff --git a/logs/appdaemon.log b/logs/appdaemon.log new file mode 100644 index 0000000..d4b61b0 --- /dev/null +++ b/logs/appdaemon.log @@ -0,0 +1,926 @@ +15-04-26 21:27:14 INFO AppDaemon: ------------------------------------------------------------ +15-04-26 21:27:14 INFO AppDaemon: AppDaemon Version 4.5.5 starting +15-04-26 21:27:14 INFO AppDaemon: Additional version info: dev +15-04-26 21:27:14 INFO AppDaemon: ------------------------------------------------------------ +15-04-26 21:27:14 INFO AppDaemon: Python version is 3.12.10 +15-04-26 21:27:14 INFO AppDaemon: Configuration read from: /conf/appdaemon.yaml +15-04-26 21:27:14 INFO AppDaemon: Added log: AppDaemon +15-04-26 21:27:14 INFO AppDaemon: Added log: Error +15-04-26 21:27:14 INFO AppDaemon: Added log: Access +15-04-26 21:27:14 INFO AppDaemon: Added log: Diag +15-04-26 21:27:14 INFO AppDaemon: Added log: VirtualSensorsLog +15-04-26 21:27:14 INFO AppDaemon: Using /conf/apps as app_dir +15-04-26 21:27:14 INFO AppDaemon: Loading Plugin HASS using class HassPlugin from module appdaemon.plugins.hass.hassplugin +15-04-26 21:27:14 INFO HASS: HASS Plugin initialization complete +15-04-26 21:27:14 INFO AppDaemon: Initializing HTTP +15-04-26 21:27:14 INFO AppDaemon: Using 'ws' for event stream +15-04-26 21:27:14 INFO AppDaemon: HTTP Listening on port 5050 +15-04-26 21:27:14 INFO AppDaemon: Starting API +15-04-26 21:27:14 INFO AppDaemon: Starting Admin Interface +15-04-26 21:27:14 INFO AppDaemon: Starting Dashboards +15-04-26 21:27:14 INFO HASS: Connected to Home Assistant 2026.4.2 with aiohttp websocket +15-04-26 21:27:14 INFO HASS: Authenticated to Home Assistant 2026.4.2 +15-04-26 21:27:14 INFO HASS: Waiting for Home Assistant to start +15-04-26 21:27:14 INFO AppDaemon: Starting Apps with 1 workers and 1 pins +15-04-26 21:27:14 INFO AppDaemon: Running on port 5050 +15-04-26 21:27:14 INFO AppDaemon: Waiting for plugins to be ready +15-04-26 21:27:14 INFO HASS: Completed initialization in 67.800ms +15-04-26 21:27:14 INFO AppDaemon: All plugins ready +15-04-26 21:27:14 INFO AppDaemon: Scheduler running in realtime +15-04-26 21:27:15 INFO AppDaemon: New app config: motion_tracker +15-04-26 21:27:15 INFO AppDaemon: Starting apps: {'motion_tracker'} +15-04-26 21:27:15 INFO AppDaemon: Calling initialize() for motion_tracker +15-04-26 21:27:15 INFO motion_tracker: Name = motion_tracker +15-04-26 21:27:15 INFO motion_tracker: Registering sensor binary_sensor.corridor_motion for area corridor +15-04-26 21:27:15 INFO motion_tracker: Registering sensor binary_sensor.hallway_motion for area hallway +15-04-26 21:27:15 INFO motion_tracker: Registering sensor binary_sensor.restroom_motion for area restroom +15-04-26 21:27:15 INFO AppDaemon: App initialization complete +15-04-26 21:38:21 INFO AppDaemon: Modified Python files: 1 +15-04-26 21:38:21 INFO AppDaemon: Modification affects apps set() +15-04-26 21:38:45 INFO AppDaemon: Modified Python files: 1 +15-04-26 21:38:45 INFO AppDaemon: Modification affects apps {'motion_tracker'} +15-04-26 21:38:45 INFO AppDaemon: Stopping apps: {'motion_tracker'} +15-04-26 21:38:45 INFO AppDaemon: Calling terminate() for 'motion_tracker' +15-04-26 21:38:45 INFO motion_tracker: Writing dataset to /conf/apps/data/motion_tracker.dataset +15-04-26 21:38:45 INFO AppDaemon: Starting apps: {'motion_tracker'} +15-04-26 21:38:45 INFO AppDaemon: Calling initialize() for motion_tracker +15-04-26 21:38:45 INFO motion_tracker: Name = motion_tracker +15-04-26 21:38:45 INFO motion_tracker: /conf/apps/data/motion_tracker.dataset loaded +15-04-26 21:38:45 WARNING AppDaemon: App 'motion_tracker' failed to start +15-04-26 21:39:06 INFO AppDaemon: Modified Python files: 1 +15-04-26 21:39:06 INFO AppDaemon: Modification affects apps {'motion_tracker'} +15-04-26 21:39:06 INFO AppDaemon: Stopping apps: {'motion_tracker'} +15-04-26 21:39:06 INFO AppDaemon: Calling terminate() for 'motion_tracker' +15-04-26 21:39:06 INFO motion_tracker: Writing dataset to /conf/apps/data/motion_tracker.dataset +15-04-26 21:39:06 INFO AppDaemon: Starting apps: {'motion_tracker'} +15-04-26 21:39:06 INFO AppDaemon: Calling initialize() for motion_tracker +15-04-26 21:39:06 INFO motion_tracker: Name = motion_tracker +15-04-26 21:39:06 INFO motion_tracker: /conf/apps/data/motion_tracker.dataset loaded +15-04-26 21:39:06 WARNING AppDaemon: App 'motion_tracker' failed to start +15-04-26 21:45:27 INFO AppDaemon: Modified Python files: 1 +15-04-26 21:45:27 INFO AppDaemon: Modification affects apps set() +15-04-26 21:55:56 INFO AppDaemon: Modified Python files: 1 +15-04-26 21:55:56 INFO AppDaemon: Modification affects apps {'motion_tracker'} +15-04-26 21:55:56 INFO AppDaemon: Stopping apps: {'motion_tracker'} +15-04-26 21:55:56 INFO AppDaemon: Calling terminate() for 'motion_tracker' +15-04-26 21:55:56 INFO motion_tracker: Writing dataset to /conf/apps/data/motion_tracker.dataset +15-04-26 21:55:56 INFO AppDaemon: Starting apps: {'motion_tracker'} +15-04-26 21:55:56 INFO AppDaemon: Calling initialize() for motion_tracker +15-04-26 21:55:56 INFO motion_tracker: Name = motion_tracker +15-04-26 21:55:56 INFO motion_tracker: /conf/apps/data/motion_tracker.dataset loaded +15-04-26 21:55:56 WARNING AppDaemon: App 'motion_tracker' failed to start +15-04-26 21:59:46 INFO AppDaemon: Modified Python files: 1 +15-04-26 21:59:46 INFO AppDaemon: Modification affects apps {'motion_tracker'} +15-04-26 21:59:46 INFO AppDaemon: Stopping apps: {'motion_tracker'} +15-04-26 21:59:46 INFO AppDaemon: Calling terminate() for 'motion_tracker' +15-04-26 21:59:46 INFO motion_tracker: Writing dataset to /conf/apps/data/motion_tracker.dataset +15-04-26 21:59:46 INFO AppDaemon: Starting apps: {'motion_tracker'} +15-04-26 21:59:46 INFO AppDaemon: Calling initialize() for motion_tracker +15-04-26 21:59:46 INFO motion_tracker: Name = motion_tracker +15-04-26 21:59:46 INFO motion_tracker: /conf/apps/data/motion_tracker.dataset loaded +15-04-26 21:59:46 WARNING AppDaemon: App 'motion_tracker' failed to start +15-04-26 22:03:15 INFO AppDaemon: Modified Python files: 1 +15-04-26 22:03:15 INFO AppDaemon: Modification affects apps {'motion_tracker'} +15-04-26 22:03:15 INFO AppDaemon: Stopping apps: {'motion_tracker'} +15-04-26 22:03:15 INFO AppDaemon: Calling terminate() for 'motion_tracker' +15-04-26 22:03:15 INFO motion_tracker: Writing dataset to /conf/apps/data/motion_tracker.dataset +15-04-26 22:03:15 INFO AppDaemon: Starting apps: {'motion_tracker'} +15-04-26 22:03:15 INFO AppDaemon: Calling initialize() for motion_tracker +15-04-26 22:03:15 INFO motion_tracker: Name = motion_tracker +15-04-26 22:03:15 INFO motion_tracker: /conf/apps/data/motion_tracker.dataset loaded +15-04-26 22:03:15 WARNING motion_tracker: Entity sensor.last_motion_corridor not found in the default namespace +15-04-26 22:03:15 WARNING motion_tracker: Entity sensor.last_motion_time_corridor not found in the default namespace +15-04-26 22:03:15 INFO motion_tracker: Registering sensor binary_sensor.corridor_motion for area corridor +15-04-26 22:03:15 WARNING motion_tracker: Entity sensor.last_motion_time_corridor not found in the default namespace +15-04-26 22:03:15 INFO AppDaemon: motion_tracker: Entity sensor.last_motion_time_corridor created in namespace: default +15-04-26 22:03:15 WARNING motion_tracker: Entity sensor.last_motion_corridor not found in the default namespace +15-04-26 22:03:15 INFO AppDaemon: motion_tracker: Entity sensor.last_motion_corridor created in namespace: default +15-04-26 22:03:15 WARNING motion_tracker: Entity sensor.last_motion_hallway not found in the default namespace +15-04-26 22:03:15 WARNING motion_tracker: Entity sensor.last_motion_time_hallway not found in the default namespace +15-04-26 22:03:15 INFO motion_tracker: Registering sensor binary_sensor.hallway_motion for area hallway +15-04-26 22:03:15 WARNING motion_tracker: Entity sensor.last_motion_time_hallway not found in the default namespace +15-04-26 22:03:15 INFO AppDaemon: motion_tracker: Entity sensor.last_motion_time_hallway created in namespace: default +15-04-26 22:03:15 WARNING motion_tracker: Entity sensor.last_motion_hallway not found in the default namespace +15-04-26 22:03:15 INFO AppDaemon: motion_tracker: Entity sensor.last_motion_hallway created in namespace: default +15-04-26 22:03:15 WARNING motion_tracker: Entity sensor.last_motion_restroom not found in the default namespace +15-04-26 22:03:15 WARNING motion_tracker: Entity sensor.last_motion_time_restroom not found in the default namespace +15-04-26 22:03:15 INFO motion_tracker: Registering sensor binary_sensor.restroom_motion for area restroom +15-04-26 22:03:15 WARNING motion_tracker: Entity sensor.last_motion_time_restroom not found in the default namespace +15-04-26 22:03:15 INFO AppDaemon: motion_tracker: Entity sensor.last_motion_time_restroom created in namespace: default +15-04-26 22:03:15 WARNING motion_tracker: Entity sensor.last_motion_restroom not found in the default namespace +15-04-26 22:03:15 INFO AppDaemon: motion_tracker: Entity sensor.last_motion_restroom created in namespace: default +15-04-26 22:05:07 INFO AppDaemon: Modified Python files: 1 +15-04-26 22:05:07 INFO AppDaemon: Modification affects apps set() +15-04-26 22:09:16 INFO AppDaemon: Modified Python files: 1 +15-04-26 22:09:16 INFO AppDaemon: Modification affects apps set() +15-04-26 22:10:25 INFO AppDaemon: Modified Python files: 1 +15-04-26 22:10:25 INFO AppDaemon: Modification affects apps set() +15-04-26 22:12:30 INFO AppDaemon: Modified Python files: 1 +15-04-26 22:12:30 INFO AppDaemon: Modification affects apps set() +15-04-26 22:17:05 INFO AppDaemon: Modified Python files: 1 +15-04-26 22:17:05 INFO AppDaemon: Modification affects apps set() +15-04-26 22:24:53 INFO AppDaemon: Modified Python files: 1 +15-04-26 22:24:53 INFO AppDaemon: Modification affects apps {'motion_tracker'} +15-04-26 22:24:53 INFO AppDaemon: Stopping apps: {'motion_tracker'} +15-04-26 22:24:53 INFO AppDaemon: Calling terminate() for 'motion_tracker' +15-04-26 22:24:53 INFO motion_tracker: Writing dataset to /conf/apps/data/motion_tracker.dataset +15-04-26 22:24:53 INFO AppDaemon: Starting apps: {'motion_tracker'} +15-04-26 22:24:53 INFO AppDaemon: Calling initialize() for motion_tracker +15-04-26 22:24:53 INFO motion_tracker: Name = motion_tracker +15-04-26 22:24:53 INFO motion_tracker: /conf/apps/data/motion_tracker.dataset loaded +15-04-26 22:24:53 WARNING AppDaemon: App 'motion_tracker' failed to start +15-04-26 22:27:06 INFO AppDaemon: SIGTERM Received +15-04-26 22:27:06 INFO AppDaemon: AppDaemon is shutting down +15-04-26 22:27:06 INFO HASS: Disconnecting from Home Assistant +15-04-26 22:27:07 INFO AppDaemon: Stopping apps: {'motion_tracker'} +15-04-26 22:27:07 INFO AppDaemon: Calling terminate() for 'motion_tracker' +15-04-26 22:27:07 INFO motion_tracker: Writing dataset to /conf/apps/data/motion_tracker.dataset +15-04-26 22:27:07 INFO AppDaemon: Shutting down webserver +15-04-26 22:27:07 INFO AppDaemon: Saving all namespaces +15-04-26 22:27:07 INFO AppDaemon: AppDaemon is stopped. +15-04-26 22:27:16 INFO AppDaemon: ------------------------------------------------------------ +15-04-26 22:27:16 INFO AppDaemon: AppDaemon Version 4.5.5 starting +15-04-26 22:27:16 INFO AppDaemon: Additional version info: dev +15-04-26 22:27:16 INFO AppDaemon: ------------------------------------------------------------ +15-04-26 22:27:16 INFO AppDaemon: Python version is 3.12.10 +15-04-26 22:27:16 INFO AppDaemon: Configuration read from: /conf/appdaemon.yaml +15-04-26 22:27:16 INFO AppDaemon: Added log: AppDaemon +15-04-26 22:27:16 INFO AppDaemon: Added log: Error +15-04-26 22:27:16 INFO AppDaemon: Added log: Access +15-04-26 22:27:16 INFO AppDaemon: Added log: Diag +15-04-26 22:27:16 INFO AppDaemon: Added log: VirtualSensorsLog +15-04-26 22:27:16 INFO AppDaemon: Using /conf/apps as app_dir +15-04-26 22:27:16 INFO AppDaemon: Loading Plugin HASS using class HassPlugin from module appdaemon.plugins.hass.hassplugin +15-04-26 22:27:16 INFO HASS: HASS Plugin initialization complete +15-04-26 22:27:16 INFO AppDaemon: Initializing HTTP +15-04-26 22:27:16 INFO AppDaemon: Using 'ws' for event stream +15-04-26 22:27:16 INFO AppDaemon: HTTP Listening on port 5050 +15-04-26 22:27:17 INFO AppDaemon: Starting API +15-04-26 22:27:17 INFO AppDaemon: Starting Admin Interface +15-04-26 22:27:17 INFO AppDaemon: Starting Dashboards +15-04-26 22:27:17 INFO HASS: Connected to Home Assistant 2026.4.2 with aiohttp websocket +15-04-26 22:27:17 INFO HASS: Authenticated to Home Assistant 2026.4.2 +15-04-26 22:27:17 INFO AppDaemon: Starting Apps with 1 workers and 1 pins +15-04-26 22:27:17 INFO HASS: Waiting for Home Assistant to start +15-04-26 22:27:17 INFO AppDaemon: Running on port 5050 +15-04-26 22:27:17 INFO AppDaemon: Waiting for plugins to be ready +15-04-26 22:27:17 INFO AppDaemon: All plugins ready +15-04-26 22:27:17 INFO AppDaemon: Scheduler running in realtime +15-04-26 22:27:17 INFO HASS: Completed initialization in 82.400ms +15-04-26 22:27:17 INFO AppDaemon: New app config: motion_tracker +15-04-26 22:27:17 INFO AppDaemon: Starting apps: {'motion_tracker'} +15-04-26 22:27:17 INFO AppDaemon: Calling initialize() for motion_tracker +15-04-26 22:27:17 INFO motion_tracker: Name = motion_tracker +15-04-26 22:27:17 INFO motion_tracker: /conf/apps/data/motion_tracker.dataset loaded +15-04-26 22:27:17 INFO motion_tracker: Registering sensor binary_sensor.corridor_motion for area corridor +15-04-26 22:27:17 INFO motion_tracker: Registering sensor binary_sensor.hallway_motion for area hallway +15-04-26 22:27:17 INFO motion_tracker: Registering sensor binary_sensor.restroom_motion for area restroom +15-04-26 22:27:17 INFO AppDaemon: App initialization complete +15-04-26 22:38:55 INFO AppDaemon: Modified Python files: 1 +15-04-26 22:38:55 INFO AppDaemon: Modification affects apps set() +15-04-26 22:41:15 INFO AppDaemon: Modified Python files: 1 +15-04-26 22:41:15 INFO AppDaemon: Modification affects apps set() +15-04-26 22:41:44 INFO AppDaemon: App config modified: motion_tracker +15-04-26 22:41:44 INFO AppDaemon: Stopping apps: {'motion_tracker'} +15-04-26 22:41:44 INFO AppDaemon: Calling terminate() for 'motion_tracker' +15-04-26 22:41:44 INFO motion_tracker: Writing dataset to /conf/apps/data/motion_tracker.dataset +15-04-26 22:41:44 INFO AppDaemon: Starting apps: {'motion_tracker'} +15-04-26 22:41:44 INFO AppDaemon: Calling initialize() for motion_tracker +15-04-26 22:41:44 INFO motion_tracker: Name = motion_tracker +15-04-26 22:41:44 INFO motion_tracker: /conf/apps/data/motion_tracker.dataset loaded +15-04-26 22:41:44 INFO motion_tracker: Registering sensor binary_sensor.corridor_motion for area corridor +15-04-26 22:41:44 INFO motion_tracker: Registering sensor binary_sensor.hallway_motion for area hallway +15-04-26 22:41:44 INFO motion_tracker: Registering sensor binary_sensor.restroom_motion for area restroom +15-04-26 22:42:40 INFO AppDaemon: Modified Python files: 1 +15-04-26 22:42:40 INFO AppDaemon: Modification affects apps {'motion_tracker'} +15-04-26 22:42:40 INFO AppDaemon: Stopping apps: {'motion_tracker'} +15-04-26 22:42:40 INFO AppDaemon: Calling terminate() for 'motion_tracker' +15-04-26 22:42:40 INFO motion_tracker: Writing dataset to /conf/apps/data/motion_tracker.dataset +15-04-26 22:42:40 INFO AppDaemon: Starting apps: {'motion_tracker'} +15-04-26 22:42:40 INFO AppDaemon: Calling initialize() for motion_tracker +15-04-26 22:42:40 INFO motion_tracker: Name = motion_tracker +15-04-26 22:42:40 INFO motion_tracker: /conf/apps/data/motion_tracker.dataset loaded +15-04-26 22:42:40 WARNING motion_tracker: Entity sensor.corridor_last_motion not found in the default namespace +15-04-26 22:42:40 INFO AppDaemon: motion_tracker: Entity sensor.corridor_last_motion created in namespace: default +15-04-26 22:42:40 INFO motion_tracker: Previous message repeated 1 times +15-04-26 22:42:40 WARNING motion_tracker: Entity sensor.corridor_last_motion_time not found in the default namespace +15-04-26 22:42:40 INFO AppDaemon: motion_tracker: Entity sensor.corridor_last_motion_time created in namespace: default +15-04-26 22:42:40 INFO motion_tracker: Previous message repeated 1 times +15-04-26 22:42:40 INFO motion_tracker: Registering sensor binary_sensor.corridor_motion for area corridor +15-04-26 22:42:40 WARNING motion_tracker: Entity sensor.hallway_last_motion not found in the default namespace +15-04-26 22:42:40 INFO AppDaemon: motion_tracker: Entity sensor.hallway_last_motion created in namespace: default +15-04-26 22:42:40 INFO motion_tracker: Previous message repeated 1 times +15-04-26 22:42:40 WARNING motion_tracker: Entity sensor.hallway_last_motion_time not found in the default namespace +15-04-26 22:42:40 INFO AppDaemon: motion_tracker: Entity sensor.hallway_last_motion_time created in namespace: default +15-04-26 22:42:40 INFO motion_tracker: Previous message repeated 1 times +15-04-26 22:42:40 INFO motion_tracker: Registering sensor binary_sensor.hallway_motion for area hallway +15-04-26 22:42:40 WARNING motion_tracker: Entity sensor.restroom_last_motion not found in the default namespace +15-04-26 22:42:40 INFO AppDaemon: motion_tracker: Entity sensor.restroom_last_motion created in namespace: default +15-04-26 22:42:40 INFO motion_tracker: Previous message repeated 1 times +15-04-26 22:42:40 WARNING motion_tracker: Entity sensor.restroom_last_motion_time not found in the default namespace +15-04-26 22:42:40 INFO AppDaemon: motion_tracker: Entity sensor.restroom_last_motion_time created in namespace: default +15-04-26 22:42:40 INFO motion_tracker: Previous message repeated 1 times +15-04-26 22:42:40 INFO motion_tracker: Registering sensor binary_sensor.restroom_motion for area restroom +15-04-26 22:43:12 WARNING HASS: Disconnected from Home Assistant, retrying in 5 seconds +15-04-26 22:43:12 INFO AppDaemon: Stopping apps from namespace 'default' because the plugin failed +15-04-26 22:43:12 INFO AppDaemon: Stopping apps: {'motion_tracker'} +15-04-26 22:43:12 INFO AppDaemon: Calling terminate() for 'motion_tracker' +15-04-26 22:43:12 WARNING HASS: Attempt to call Home Assistant while disconnected: call_plugin_service +15-04-26 22:43:12 INFO motion_tracker: Writing dataset to /conf/apps/data/motion_tracker.dataset +15-04-26 22:43:17 INFO HASS: Previous message repeated 5 times +15-04-26 22:43:17 WARNING HASS: ------------------------------------------------------------ +15-04-26 22:43:17 WARNING HASS: Unexpected error while getting hass config +15-04-26 22:43:17 WARNING HASS: ------------------------------------------------------------ +Traceback (most recent call last): + File "/usr/local/lib/python3.12/site-packages/appdaemon/utils.py", line 478, in wrapper + result = await func(self, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "/usr/local/lib/python3.12/site-packages/appdaemon/plugins/hass/hassplugin.py", line 577, in get_hass_config + if meta := (await self.websocket_send_json(type="get_config")).get("result"): + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +AttributeError: 'NoneType' object has no attribute 'get' + +15-04-26 22:43:17 WARNING HASS: ------------------------------------------------------------ +15-04-26 22:43:17 WARNING HASS: Logged an error to /conf/logs/error.log +15-04-26 22:43:17 WARNING HASS: Disconnected from Home Assistant, retrying in 5 seconds +15-04-26 22:43:17 WARNING HASS: Error getting services - retrying +15-04-26 22:43:17 WARNING HASS: ------------------------------------------------------------ +15-04-26 22:43:17 WARNING HASS: Unexpected error while getting hass services +15-04-26 22:43:17 WARNING HASS: ------------------------------------------------------------ +Traceback (most recent call last): + File "/usr/local/lib/python3.12/site-packages/appdaemon/utils.py", line 478, in wrapper + result = await func(self, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "/usr/local/lib/python3.12/site-packages/appdaemon/plugins/hass/hassplugin.py", line 589, in get_hass_services + services: dict[str, dict[str, dict]] = (await self.websocket_send_json(type="get_services"))["result"] + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^ +TypeError: 'NoneType' object is not subscriptable + +15-04-26 22:43:17 WARNING HASS: ------------------------------------------------------------ +15-04-26 22:43:17 WARNING HASS: Logged an error to /conf/logs/error.log +15-04-26 22:43:20 INFO AppDaemon: SIGTERM Received +15-04-26 22:43:20 INFO AppDaemon: AppDaemon is shutting down +15-04-26 22:43:22 WARNING HASS: Timed out [0:00:10] waiting for request: {'type': 'get_states', 'id': 444} +15-04-26 22:43:22 WARNING HASS: ------------------------------------------------------------ +15-04-26 22:43:22 WARNING HASS: Unexpected error while getting hass state +15-04-26 22:43:22 WARNING HASS: ------------------------------------------------------------ +Traceback (most recent call last): + File "/usr/local/lib/python3.12/site-packages/appdaemon/utils.py", line 478, in wrapper + result = await func(self, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "/usr/local/lib/python3.12/site-packages/appdaemon/plugins/hass/hassplugin.py", line 761, in get_complete_state + hass_state = (await self.websocket_send_json(type="get_states"))["result"] + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^ +KeyError: 'result' + +15-04-26 22:43:22 WARNING HASS: ------------------------------------------------------------ +15-04-26 22:43:22 WARNING HASS: Logged an error to /conf/logs/error.log +15-04-26 22:43:22 WARNING AppDaemon: Excessive time spent in utility loop: 10.1s, 131ms in check_app_updates(), 10.0s in other +15-04-26 22:43:22 INFO HASS: Disconnecting from Home Assistant +15-04-26 22:43:22 INFO AppDaemon: Stopping apps: {'motion_tracker'} +15-04-26 22:43:22 INFO AppDaemon: Calling terminate() for 'motion_tracker' +15-04-26 22:43:22 WARNING HASS: Attempt to call Home Assistant while disconnected: call_plugin_service +15-04-26 22:43:22 INFO motion_tracker: Writing dataset to /conf/apps/data/motion_tracker.dataset +15-04-26 22:43:22 INFO AppDaemon: Shutting down webserver +15-04-26 22:43:22 INFO AppDaemon: Saving all namespaces +15-04-26 22:43:22 INFO AppDaemon: AppDaemon is stopped. +15-04-26 22:43:33 INFO AppDaemon: ------------------------------------------------------------ +15-04-26 22:43:33 INFO AppDaemon: AppDaemon Version 4.5.5 starting +15-04-26 22:43:33 INFO AppDaemon: Additional version info: dev +15-04-26 22:43:33 INFO AppDaemon: ------------------------------------------------------------ +15-04-26 22:43:33 INFO AppDaemon: Python version is 3.12.10 +15-04-26 22:43:33 INFO AppDaemon: Configuration read from: /conf/appdaemon.yaml +15-04-26 22:43:33 INFO AppDaemon: Added log: AppDaemon +15-04-26 22:43:33 INFO AppDaemon: Added log: Error +15-04-26 22:43:33 INFO AppDaemon: Added log: Access +15-04-26 22:43:33 INFO AppDaemon: Added log: Diag +15-04-26 22:43:33 INFO AppDaemon: Added log: VirtualSensorsLog +15-04-26 22:43:33 INFO AppDaemon: Using /conf/apps as app_dir +15-04-26 22:43:33 INFO AppDaemon: Loading Plugin HASS using class HassPlugin from module appdaemon.plugins.hass.hassplugin +15-04-26 22:43:33 INFO HASS: HASS Plugin initialization complete +15-04-26 22:43:33 INFO AppDaemon: Initializing HTTP +15-04-26 22:43:33 INFO AppDaemon: Using 'ws' for event stream +15-04-26 22:43:33 INFO AppDaemon: HTTP Listening on port 5050 +15-04-26 22:43:33 INFO AppDaemon: Starting API +15-04-26 22:43:33 INFO AppDaemon: Starting Admin Interface +15-04-26 22:43:33 INFO AppDaemon: Starting Dashboards +15-04-26 22:43:33 INFO AppDaemon: Starting Apps with 1 workers and 1 pins +15-04-26 22:43:33 INFO AppDaemon: Running on port 5050 +15-04-26 22:43:33 INFO AppDaemon: Waiting for plugins to be ready +15-04-26 22:43:33 INFO HASS: Connected to Home Assistant 2026.4.2 with aiohttp websocket +15-04-26 22:43:33 INFO HASS: Authenticated to Home Assistant 2026.4.2 +15-04-26 22:43:33 INFO HASS: Waiting for Home Assistant to start +15-04-26 22:43:51 INFO HASS: Home Assistant fully started after 17.5s +15-04-26 22:43:51 INFO AppDaemon: All plugins ready +15-04-26 22:43:51 INFO AppDaemon: Scheduler running in realtime +15-04-26 22:43:51 INFO HASS: Completed initialization in 17.7s +15-04-26 22:43:51 INFO AppDaemon: New app config: motion_tracker +15-04-26 22:43:51 INFO AppDaemon: Starting apps: {'motion_tracker'} +15-04-26 22:43:51 INFO AppDaemon: Calling initialize() for motion_tracker +15-04-26 22:43:51 INFO motion_tracker: Name = motion_tracker +15-04-26 22:43:51 INFO motion_tracker: /conf/apps/data/motion_tracker.dataset loaded +15-04-26 22:43:51 WARNING motion_tracker: Entity sensor.corridor_last_motion not found in the default namespace +15-04-26 22:43:51 INFO AppDaemon: motion_tracker: Entity sensor.corridor_last_motion created in namespace: default +15-04-26 22:43:52 INFO motion_tracker: Previous message repeated 1 times +15-04-26 22:43:52 WARNING motion_tracker: Entity sensor.corridor_last_motion_time not found in the default namespace +15-04-26 22:43:52 INFO AppDaemon: motion_tracker: Entity sensor.corridor_last_motion_time created in namespace: default +15-04-26 22:43:52 INFO motion_tracker: Previous message repeated 1 times +15-04-26 22:43:52 INFO motion_tracker: Registering sensor binary_sensor.corridor_motion for area corridor +15-04-26 22:43:52 WARNING motion_tracker: Entity sensor.hallway_last_motion not found in the default namespace +15-04-26 22:43:52 INFO AppDaemon: motion_tracker: Entity sensor.hallway_last_motion created in namespace: default +15-04-26 22:43:52 INFO motion_tracker: Previous message repeated 1 times +15-04-26 22:43:52 WARNING motion_tracker: Entity sensor.hallway_last_motion_time not found in the default namespace +15-04-26 22:43:52 INFO AppDaemon: motion_tracker: Entity sensor.hallway_last_motion_time created in namespace: default +15-04-26 22:43:52 INFO motion_tracker: Previous message repeated 1 times +15-04-26 22:43:52 INFO motion_tracker: Registering sensor binary_sensor.hallway_motion for area hallway +15-04-26 22:43:52 WARNING motion_tracker: Entity sensor.restroom_last_motion not found in the default namespace +15-04-26 22:43:52 INFO AppDaemon: motion_tracker: Entity sensor.restroom_last_motion created in namespace: default +15-04-26 22:43:52 INFO motion_tracker: Previous message repeated 1 times +15-04-26 22:43:52 WARNING motion_tracker: Entity sensor.restroom_last_motion_time not found in the default namespace +15-04-26 22:43:52 INFO AppDaemon: motion_tracker: Entity sensor.restroom_last_motion_time created in namespace: default +15-04-26 22:43:52 INFO motion_tracker: Previous message repeated 1 times +15-04-26 22:43:52 INFO motion_tracker: Registering sensor binary_sensor.restroom_motion for area restroom +15-04-26 22:43:52 WARNING motion_tracker: Entity sensor.last_motion not found in the default namespace +15-04-26 22:43:52 INFO AppDaemon: motion_tracker: Entity sensor.last_motion created in namespace: default +15-04-26 22:43:52 INFO AppDaemon: App initialization complete +15-04-26 22:53:27 INFO AppDaemon: Modified Python files: 1 +15-04-26 22:53:27 INFO AppDaemon: Modification affects apps set() +15-04-26 22:54:57 INFO AppDaemon: Modified Python files: 1 +15-04-26 22:54:57 INFO AppDaemon: Modification affects apps set() +15-04-26 22:55:18 INFO AppDaemon: Modified Python files: 1 +15-04-26 22:55:18 INFO AppDaemon: Modification affects apps set() +15-04-26 22:56:36 INFO AppDaemon: Modified Python files: 1 +15-04-26 22:56:36 INFO AppDaemon: Modification affects apps set() +15-04-26 22:56:38 INFO AppDaemon: Deleted Python files: 1 +15-04-26 22:56:38 INFO AppDaemon: Deletion affects apps set() +15-04-26 22:57:13 INFO AppDaemon: Modified Python files: 1 +15-04-26 22:57:13 INFO AppDaemon: Modification affects apps set() +15-04-26 22:58:22 INFO AppDaemon: Modified Python files: 1 +15-04-26 22:58:22 INFO AppDaemon: Modification affects apps set() +15-04-26 22:58:38 INFO AppDaemon: Modified Python files: 1 +15-04-26 22:58:38 INFO AppDaemon: Modification affects apps set() +15-04-26 22:59:48 INFO AppDaemon: Modified Python files: 1 +15-04-26 22:59:48 INFO AppDaemon: Modification affects apps set() +15-04-26 23:02:48 INFO AppDaemon: SIGTERM Received +15-04-26 23:02:48 INFO AppDaemon: AppDaemon is shutting down +15-04-26 23:02:48 INFO HASS: Disconnecting from Home Assistant +15-04-26 23:02:48 INFO AppDaemon: Stopping apps: {'motion_tracker'} +15-04-26 23:02:48 INFO AppDaemon: Calling terminate() for 'motion_tracker' +15-04-26 23:02:48 WARNING HASS: Attempt to call Home Assistant while disconnected: call_plugin_service +15-04-26 23:02:48 INFO motion_tracker: Writing dataset to /conf/apps/data/motion_tracker.dataset +15-04-26 23:02:48 INFO AppDaemon: Shutting down webserver +15-04-26 23:02:48 INFO AppDaemon: Saving all namespaces +15-04-26 23:02:48 INFO AppDaemon: AppDaemon is stopped. +15-04-26 23:02:59 INFO AppDaemon: ------------------------------------------------------------ +15-04-26 23:02:59 INFO AppDaemon: AppDaemon Version 4.5.5 starting +15-04-26 23:02:59 INFO AppDaemon: Additional version info: dev +15-04-26 23:02:59 INFO AppDaemon: ------------------------------------------------------------ +15-04-26 23:02:59 INFO AppDaemon: Python version is 3.12.10 +15-04-26 23:02:59 INFO AppDaemon: Configuration read from: /conf/appdaemon.yaml +15-04-26 23:02:59 INFO AppDaemon: Added log: AppDaemon +15-04-26 23:02:59 INFO AppDaemon: Added log: Error +15-04-26 23:02:59 INFO AppDaemon: Added log: Access +15-04-26 23:02:59 INFO AppDaemon: Added log: Diag +15-04-26 23:02:59 INFO AppDaemon: Added log: VirtualSensorsLog +15-04-26 23:02:59 INFO AppDaemon: Using /conf/apps as app_dir +15-04-26 23:02:59 INFO AppDaemon: Loading Plugin HASS using class HassPlugin from module appdaemon.plugins.hass.hassplugin +15-04-26 23:02:59 INFO HASS: HASS Plugin initialization complete +15-04-26 23:02:59 INFO AppDaemon: Initializing HTTP +15-04-26 23:02:59 INFO AppDaemon: Using 'ws' for event stream +15-04-26 23:02:59 INFO AppDaemon: HTTP Listening on port 5050 +15-04-26 23:02:59 INFO AppDaemon: Starting API +15-04-26 23:02:59 INFO AppDaemon: Starting Admin Interface +15-04-26 23:02:59 INFO AppDaemon: Starting Dashboards +15-04-26 23:02:59 INFO HASS: Connected to Home Assistant 2026.4.2 with aiohttp websocket +15-04-26 23:02:59 INFO HASS: Authenticated to Home Assistant 2026.4.2 +15-04-26 23:02:59 INFO HASS: Waiting for Home Assistant to start +15-04-26 23:02:59 INFO AppDaemon: Starting Apps with 1 workers and 1 pins +15-04-26 23:02:59 INFO AppDaemon: Running on port 5050 +15-04-26 23:02:59 INFO AppDaemon: Waiting for plugins to be ready +15-04-26 23:02:59 INFO AppDaemon: All plugins ready +15-04-26 23:02:59 INFO AppDaemon: Scheduler running in realtime +15-04-26 23:02:59 INFO HASS: Completed initialization in 85.920ms +15-04-26 23:02:59 INFO AppDaemon: New app config: motion_tracker +15-04-26 23:02:59 INFO AppDaemon: Starting apps: {'motion_tracker'} +15-04-26 23:02:59 INFO AppDaemon: Calling initialize() for motion_tracker +15-04-26 23:02:59 INFO motion_tracker: Name = motion_tracker +15-04-26 23:02:59 INFO motion_tracker: /conf/apps/data/motion_tracker.dataset loaded +15-04-26 23:02:59 INFO motion_tracker: Registering sensor binary_sensor.corridor_motion for area corridor +15-04-26 23:03:00 INFO motion_tracker: Registering sensor binary_sensor.hallway_motion for area hallway +15-04-26 23:03:00 INFO motion_tracker: Registering sensor binary_sensor.restroom_motion for area restroom +15-04-26 23:03:00 INFO AppDaemon: App initialization complete +15-04-26 23:04:04 WARNING HASS: Disconnected from Home Assistant, retrying in 5 seconds +15-04-26 23:04:05 INFO AppDaemon: Stopping apps from namespace 'default' because the plugin failed +15-04-26 23:04:05 INFO AppDaemon: Stopping apps: {'motion_tracker'} +15-04-26 23:04:05 INFO AppDaemon: Calling terminate() for 'motion_tracker' +15-04-26 23:04:05 WARNING HASS: Attempt to call Home Assistant while disconnected: call_plugin_service +15-04-26 23:04:05 INFO motion_tracker: Writing dataset to /conf/apps/data/motion_tracker.dataset +15-04-26 23:04:09 INFO HASS: Previous message repeated 5 times +15-04-26 23:04:09 WARNING HASS: Disconnected from Home Assistant, retrying in 5 seconds +15-04-26 23:04:14 WARNING HASS: Disconnected from Home Assistant, retrying in 5 seconds +15-04-26 23:04:19 WARNING HASS: Disconnected from Home Assistant, retrying in 5 seconds +15-04-26 23:04:24 INFO HASS: Connected to Home Assistant 2026.4.2 with aiohttp websocket +15-04-26 23:04:24 INFO HASS: Authenticated to Home Assistant 2026.4.2 +15-04-26 23:04:24 INFO HASS: Waiting for Home Assistant to start +15-04-26 23:04:49 INFO HASS: Home Assistant fully started after 24.5s +15-04-26 23:04:49 INFO HASS: Completed initialization in 24.6s +15-04-26 23:04:49 INFO AppDaemon: Processing restart for plugin namespace 'default' +15-04-26 23:04:49 INFO AppDaemon: Starting apps: {'motion_tracker'} +15-04-26 23:04:49 INFO AppDaemon: Calling initialize() for motion_tracker +15-04-26 23:04:49 INFO motion_tracker: Name = motion_tracker +15-04-26 23:04:49 INFO motion_tracker: /conf/apps/data/motion_tracker.dataset loaded +15-04-26 23:04:49 WARNING motion_tracker: Entity sensor.corridor_last_motion not found in the default namespace +15-04-26 23:04:49 INFO AppDaemon: motion_tracker: Entity sensor.corridor_last_motion created in namespace: default +15-04-26 23:04:49 INFO motion_tracker: Previous message repeated 1 times +15-04-26 23:04:49 WARNING motion_tracker: Entity sensor.corridor_last_motion_time not found in the default namespace +15-04-26 23:04:49 INFO AppDaemon: motion_tracker: Entity sensor.corridor_last_motion_time created in namespace: default +15-04-26 23:04:49 INFO motion_tracker: Previous message repeated 1 times +15-04-26 23:04:49 INFO motion_tracker: Registering sensor binary_sensor.corridor_motion for area corridor +15-04-26 23:04:49 WARNING motion_tracker: Entity sensor.hallway_last_motion not found in the default namespace +15-04-26 23:04:49 INFO AppDaemon: motion_tracker: Entity sensor.hallway_last_motion created in namespace: default +15-04-26 23:04:50 INFO motion_tracker: Previous message repeated 1 times +15-04-26 23:04:50 WARNING motion_tracker: Entity sensor.hallway_last_motion_time not found in the default namespace +15-04-26 23:04:50 INFO AppDaemon: motion_tracker: Entity sensor.hallway_last_motion_time created in namespace: default +15-04-26 23:04:50 INFO motion_tracker: Previous message repeated 1 times +15-04-26 23:04:50 INFO motion_tracker: Registering sensor binary_sensor.hallway_motion for area hallway +15-04-26 23:04:50 WARNING motion_tracker: Entity sensor.restroom_last_motion not found in the default namespace +15-04-26 23:04:50 INFO AppDaemon: motion_tracker: Entity sensor.restroom_last_motion created in namespace: default +15-04-26 23:04:50 INFO motion_tracker: Previous message repeated 1 times +15-04-26 23:04:50 WARNING motion_tracker: Entity sensor.restroom_last_motion_time not found in the default namespace +15-04-26 23:04:50 INFO AppDaemon: motion_tracker: Entity sensor.restroom_last_motion_time created in namespace: default +15-04-26 23:04:50 INFO motion_tracker: Previous message repeated 1 times +15-04-26 23:04:50 INFO motion_tracker: Registering sensor binary_sensor.restroom_motion for area restroom +15-04-26 23:04:50 WARNING motion_tracker: Entity sensor.last_motion not found in the default namespace +15-04-26 23:04:50 INFO AppDaemon: motion_tracker: Entity sensor.last_motion created in namespace: default +15-04-26 23:06:55 INFO AppDaemon: SIGTERM Received +15-04-26 23:06:55 INFO AppDaemon: AppDaemon is shutting down +15-04-26 23:06:55 INFO HASS: Disconnecting from Home Assistant +15-04-26 23:06:56 INFO AppDaemon: Stopping apps: {'motion_tracker'} +15-04-26 23:06:56 INFO AppDaemon: Calling terminate() for 'motion_tracker' +15-04-26 23:06:56 WARNING HASS: Attempt to call Home Assistant while disconnected: call_plugin_service +15-04-26 23:06:56 INFO motion_tracker: Writing dataset to /conf/apps/data/motion_tracker.dataset +15-04-26 23:06:56 INFO AppDaemon: Shutting down webserver +15-04-26 23:06:56 INFO AppDaemon: Saving all namespaces +15-04-26 23:06:56 INFO AppDaemon: AppDaemon is stopped. +15-04-26 23:07:06 INFO AppDaemon: ------------------------------------------------------------ +15-04-26 23:07:06 INFO AppDaemon: AppDaemon Version 4.5.5 starting +15-04-26 23:07:06 INFO AppDaemon: Additional version info: dev +15-04-26 23:07:06 INFO AppDaemon: ------------------------------------------------------------ +15-04-26 23:07:06 INFO AppDaemon: Python version is 3.12.10 +15-04-26 23:07:06 INFO AppDaemon: Configuration read from: /conf/appdaemon.yaml +15-04-26 23:07:06 INFO AppDaemon: Added log: AppDaemon +15-04-26 23:07:06 INFO AppDaemon: Added log: Error +15-04-26 23:07:06 INFO AppDaemon: Added log: Access +15-04-26 23:07:06 INFO AppDaemon: Added log: Diag +15-04-26 23:07:06 INFO AppDaemon: Added log: VirtualSensorsLog +15-04-26 23:07:06 INFO AppDaemon: Using /conf/apps as app_dir +15-04-26 23:07:06 INFO AppDaemon: Loading Plugin HASS using class HassPlugin from module appdaemon.plugins.hass.hassplugin +15-04-26 23:07:06 INFO HASS: HASS Plugin initialization complete +15-04-26 23:07:06 INFO AppDaemon: Initializing HTTP +15-04-26 23:07:06 INFO AppDaemon: Using 'ws' for event stream +15-04-26 23:07:06 INFO AppDaemon: HTTP Listening on port 5050 +15-04-26 23:07:06 INFO AppDaemon: Starting API +15-04-26 23:07:06 INFO AppDaemon: Starting Admin Interface +15-04-26 23:07:06 INFO AppDaemon: Starting Dashboards +15-04-26 23:07:06 WARNING HASS: Disconnected from Home Assistant, retrying in 5 seconds +15-04-26 23:07:06 INFO AppDaemon: Starting Apps with 1 workers and 1 pins +15-04-26 23:07:06 INFO AppDaemon: Running on port 5050 +15-04-26 23:07:06 INFO AppDaemon: Waiting for plugins to be ready +15-04-26 23:07:11 WARNING HASS: Disconnected from Home Assistant, retrying in 5 seconds +15-04-26 23:07:16 WARNING HASS: Disconnected from Home Assistant, retrying in 5 seconds +15-04-26 23:07:21 INFO HASS: Connected to Home Assistant 2026.4.2 with aiohttp websocket +15-04-26 23:07:21 INFO HASS: Authenticated to Home Assistant 2026.4.2 +15-04-26 23:07:21 INFO HASS: Waiting for Home Assistant to start +15-04-26 23:07:39 INFO HASS: Home Assistant fully started after 18.1s +15-04-26 23:07:39 INFO AppDaemon: All plugins ready +15-04-26 23:07:39 INFO AppDaemon: Scheduler running in realtime +15-04-26 23:07:39 INFO HASS: Completed initialization in 18.2s +15-04-26 23:07:39 INFO AppDaemon: New app config: motion_tracker +15-04-26 23:07:40 INFO AppDaemon: Starting apps: {'motion_tracker'} +15-04-26 23:07:40 INFO AppDaemon: Calling initialize() for motion_tracker +15-04-26 23:07:40 INFO motion_tracker: Name = motion_tracker +15-04-26 23:07:40 INFO motion_tracker: /conf/apps/data/motion_tracker.dataset loaded +15-04-26 23:07:40 WARNING motion_tracker: Entity sensor.corridor_last_motion not found in the default namespace +15-04-26 23:07:40 INFO AppDaemon: motion_tracker: Entity sensor.corridor_last_motion created in namespace: default +15-04-26 23:07:40 INFO motion_tracker: Previous message repeated 1 times +15-04-26 23:07:40 WARNING motion_tracker: Entity sensor.corridor_last_motion_time not found in the default namespace +15-04-26 23:07:40 INFO AppDaemon: motion_tracker: Entity sensor.corridor_last_motion_time created in namespace: default +15-04-26 23:07:40 INFO motion_tracker: Previous message repeated 1 times +15-04-26 23:07:40 INFO motion_tracker: Registering sensor binary_sensor.corridor_motion for area corridor +15-04-26 23:07:40 WARNING motion_tracker: Entity sensor.hallway_last_motion not found in the default namespace +15-04-26 23:07:40 INFO AppDaemon: motion_tracker: Entity sensor.hallway_last_motion created in namespace: default +15-04-26 23:07:40 INFO motion_tracker: Previous message repeated 1 times +15-04-26 23:07:40 WARNING motion_tracker: Entity sensor.hallway_last_motion_time not found in the default namespace +15-04-26 23:07:40 INFO AppDaemon: motion_tracker: Entity sensor.hallway_last_motion_time created in namespace: default +15-04-26 23:07:40 INFO motion_tracker: Previous message repeated 1 times +15-04-26 23:07:40 INFO motion_tracker: Registering sensor binary_sensor.hallway_motion for area hallway +15-04-26 23:07:40 WARNING motion_tracker: Entity sensor.restroom_last_motion not found in the default namespace +15-04-26 23:07:40 INFO AppDaemon: motion_tracker: Entity sensor.restroom_last_motion created in namespace: default +15-04-26 23:07:40 INFO motion_tracker: Previous message repeated 1 times +15-04-26 23:07:40 WARNING motion_tracker: Entity sensor.restroom_last_motion_time not found in the default namespace +15-04-26 23:07:40 INFO AppDaemon: motion_tracker: Entity sensor.restroom_last_motion_time created in namespace: default +15-04-26 23:07:40 INFO motion_tracker: Previous message repeated 1 times +15-04-26 23:07:40 INFO motion_tracker: Registering sensor binary_sensor.restroom_motion for area restroom +15-04-26 23:07:40 WARNING motion_tracker: Entity sensor.last_motion not found in the default namespace +15-04-26 23:07:40 INFO AppDaemon: motion_tracker: Entity sensor.last_motion created in namespace: default +15-04-26 23:07:40 INFO AppDaemon: App initialization complete +15-04-26 23:15:19 INFO AppDaemon: New app config: light_corridor +15-04-26 23:15:19 INFO AppDaemon: New app config: light_hallway +15-04-26 23:15:19 INFO AppDaemon: New app config: light_restroom +15-04-26 23:15:19 INFO AppDaemon: Adding thread 1 +15-04-26 23:15:19 INFO AppDaemon: Adding thread 2 +15-04-26 23:15:19 INFO AppDaemon: Adding thread 3 +15-04-26 23:15:20 WARNING AppDaemon: Failed to start apps: {'light_restroom', 'light_hallway', 'light_corridor'} +15-04-26 23:20:34 INFO AppDaemon: Modified Python files: 1 +15-04-26 23:20:34 INFO AppDaemon: Modification affects apps {'light_restroom', 'light_hallway', 'light_corridor'} +15-04-26 23:20:34 INFO AppDaemon: Stopping apps: {'light_restroom', 'light_hallway', 'light_corridor'} +15-04-26 23:20:34 WARNING AppDaemon: Failed to start apps: {'light_restroom', 'light_hallway', 'light_corridor'} +15-04-26 23:20:48 INFO AppDaemon: Modified Python files: 1 +15-04-26 23:20:48 INFO AppDaemon: Modification affects apps {'light_restroom', 'light_hallway', 'light_corridor'} +15-04-26 23:20:48 INFO AppDaemon: Stopping apps: {'light_restroom', 'light_hallway', 'light_corridor'} +15-04-26 23:20:48 WARNING AppDaemon: Failed to start apps: {'light_restroom', 'light_hallway', 'light_corridor'} +15-04-26 23:21:44 INFO AppDaemon: Modified Python files: 1 +15-04-26 23:21:44 INFO AppDaemon: Modification affects apps {'light_restroom', 'light_hallway', 'light_corridor'} +15-04-26 23:21:44 INFO AppDaemon: Stopping apps: {'light_restroom', 'light_hallway', 'light_corridor'} +15-04-26 23:21:44 WARNING AppDaemon: Failed to start apps: {'light_restroom', 'light_hallway', 'light_corridor'} +15-04-26 23:23:35 INFO AppDaemon: Modified Python files: 1 +15-04-26 23:23:35 INFO AppDaemon: Modification affects apps {'light_restroom', 'light_hallway', 'light_corridor'} +15-04-26 23:23:35 INFO AppDaemon: Stopping apps: {'light_restroom', 'light_hallway', 'light_corridor'} +15-04-26 23:23:35 WARNING AppDaemon: Failed to start apps: {'light_restroom', 'light_hallway', 'light_corridor'} +15-04-26 23:23:53 INFO AppDaemon: Modified Python files: 1 +15-04-26 23:23:53 INFO AppDaemon: Modification affects apps {'light_restroom', 'light_hallway', 'light_corridor'} +15-04-26 23:23:53 INFO AppDaemon: Stopping apps: {'light_restroom', 'light_hallway', 'light_corridor'} +15-04-26 23:23:53 WARNING AppDaemon: Failed to start apps: {'light_restroom', 'light_hallway', 'light_corridor'} +15-04-26 23:24:21 INFO AppDaemon: Modified Python files: 1 +15-04-26 23:24:21 INFO AppDaemon: Modification affects apps {'light_restroom', 'light_hallway', 'light_corridor'} +15-04-26 23:24:21 INFO AppDaemon: Stopping apps: {'light_restroom', 'light_hallway', 'light_corridor'} +15-04-26 23:24:21 WARNING AppDaemon: Failed to start apps: {'light_restroom', 'light_hallway', 'light_corridor'} +15-04-26 23:24:28 INFO AppDaemon: Modified Python files: 1 +15-04-26 23:24:28 INFO AppDaemon: Modification affects apps {'light_restroom', 'light_hallway', 'light_corridor'} +15-04-26 23:24:28 INFO AppDaemon: Stopping apps: {'light_restroom', 'light_hallway', 'light_corridor'} +15-04-26 23:24:28 INFO AppDaemon: Starting apps: {'light_restroom', 'light_hallway', 'light_corridor'} +15-04-26 23:24:28 INFO AppDaemon: Calling initialize() for light_restroom +15-04-26 23:24:28 INFO light_restroom: Name = light_restroom +15-04-26 23:24:28 INFO light_restroom: Linked to light.restroom +15-04-26 23:24:28 INFO AppDaemon: Calling initialize() for light_hallway +15-04-26 23:24:28 INFO light_hallway: Name = light_hallway +15-04-26 23:24:28 INFO light_hallway: Linked to light.hallway +15-04-26 23:24:28 INFO light_hallway: Turn off light.hallway +15-04-26 23:24:28 INFO AppDaemon: Calling initialize() for light_corridor +15-04-26 23:24:28 INFO light_corridor: Name = light_corridor +15-04-26 23:24:28 INFO light_corridor: Linked to light.corridor +15-04-26 23:24:29 INFO light_corridor: Turn off light.corridor +15-04-26 23:28:09 INFO light_hallway: [smart_conditions] Callback trigger by sensor.hallway_last_motion(52 => 0) +15-04-26 23:28:09 INFO light_hallway: [smart_conditions][Evaluating] Triggered by (sensor.hallway_last_motion[0] < 5)[True] +15-04-26 23:28:09 INFO light_hallway: Turn on light.hallway +15-04-26 23:28:14 INFO light_corridor: [smart_conditions] Callback trigger by sensor.corridor_last_motion(53 => 0) +15-04-26 23:28:14 INFO light_corridor: [smart_conditions][Evaluating] Triggered by (sensor.corridor_last_motion[0] < 5)[True] +15-04-26 23:28:14 INFO light_corridor: Turn on light.corridor +15-04-26 23:28:15 INFO light_restroom: [smart_conditions] Callback trigger by sensor.restroom_last_motion(53 => 0) +15-04-26 23:28:15 INFO light_restroom: [smart_conditions][Evaluating] Triggered by (sensor.restroom_last_motion[0] < 5)[True] +15-04-26 23:28:16 INFO light_restroom: Turn on light.restroom +15-04-26 23:33:42 INFO light_restroom: [smart_conditions] Callback trigger by sensor.restroom_last_motion(4 => 5) +15-04-26 23:33:42 INFO light_restroom: [smart_conditions][Evaluating] No valid conditions +15-04-26 23:33:42 INFO light_restroom: Turn off light.restroom +15-04-26 23:33:42 INFO light_hallway: [smart_conditions] Callback trigger by sensor.hallway_last_motion(4 => 5) +15-04-26 23:33:42 INFO light_hallway: [smart_conditions][Evaluating] No valid conditions +15-04-26 23:33:42 INFO light_corridor: [smart_conditions] Callback trigger by sensor.corridor_last_motion(4 => 5) +15-04-26 23:33:42 INFO light_corridor: [smart_conditions][Evaluating] No valid conditions +15-04-26 23:33:42 INFO light_hallway: Turn off light.hallway +15-04-26 23:33:42 INFO light_corridor: Turn off light.corridor +15-04-26 23:33:52 WARNING HASS: Timed out [0:00:10] waiting for request: {'type': 'call_service', 'domain': 'homeassistant', 'service': 'turn_off', 'target': {'entity_id': 'light.restroom'}, 'id': 987} +15-04-26 23:33:52 WARNING AppDaemon: Excessive time spent in callback Evaluator.__on_condition_state_change for light_restroom. Thread entity: 'thread.thread-1' - now complete after 10.2s (limit=10.0s) +15-04-26 23:33:52 WARNING HASS: Timed out [0:00:10] waiting for request: {'type': 'call_service', 'domain': 'homeassistant', 'service': 'turn_off', 'target': {'entity_id': 'light.corridor'}, 'id': 990} +15-04-26 23:33:52 WARNING AppDaemon: Excessive time spent in callback Evaluator.__on_condition_state_change for light_corridor. Thread entity: 'thread.thread-3' - now complete after 10.3s (limit=10.0s) +15-04-26 23:34:01 WARNING HASS: Request already timed out for 987 +15-04-26 23:34:01 WARNING HASS: Error with websocket result: home_assistant_error: Failed to send request: device did not respond +15-04-26 23:34:01 WARNING HASS: Request already timed out for 990 +15-04-26 23:34:01 WARNING HASS: Error with websocket result: home_assistant_error: Failed to send request: device did not respond +15-04-26 23:41:08 WARNING HASS: Disconnected from Home Assistant, retrying in 5 seconds +15-04-26 23:41:08 INFO AppDaemon: Stopping apps from namespace 'default' because the plugin failed +15-04-26 23:41:08 INFO AppDaemon: Stopping apps: {'motion_tracker', 'light_restroom', 'light_hallway', 'light_corridor'} +15-04-26 23:41:08 INFO AppDaemon: Calling terminate() for 'motion_tracker' +15-04-26 23:41:08 WARNING HASS: Attempt to call Home Assistant while disconnected: call_plugin_service +15-04-26 23:41:08 INFO motion_tracker: Writing dataset to /conf/apps/data/motion_tracker.dataset +15-04-26 23:41:08 INFO AppDaemon: Calling terminate() for 'light_corridor' +15-04-26 23:41:08 INFO AppDaemon: Calling terminate() for 'light_restroom' +15-04-26 23:41:08 INFO AppDaemon: Calling terminate() for 'light_hallway' +15-04-26 23:41:13 INFO HASS: Previous message repeated 5 times +15-04-26 23:41:13 WARNING HASS: Disconnected from Home Assistant, retrying in 5 seconds +15-04-26 23:41:18 WARNING HASS: Disconnected from Home Assistant, retrying in 5 seconds +15-04-26 23:41:22 WARNING HASS: ------------------------------------------------------------ +15-04-26 23:41:22 WARNING HASS: Unexpected error while getting hass config +15-04-26 23:41:22 WARNING HASS: ------------------------------------------------------------ +Traceback (most recent call last): + File "/usr/local/lib/python3.12/site-packages/appdaemon/utils.py", line 478, in wrapper + result = await func(self, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "/usr/local/lib/python3.12/site-packages/appdaemon/plugins/hass/hassplugin.py", line 577, in get_hass_config + if meta := (await self.websocket_send_json(type="get_config")).get("result"): + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +AttributeError: 'NoneType' object has no attribute 'get' + +15-04-26 23:41:22 WARNING HASS: ------------------------------------------------------------ +15-04-26 23:41:22 WARNING HASS: Logged an error to /conf/logs/error.log +15-04-26 23:41:23 WARNING HASS: Disconnected from Home Assistant, retrying in 5 seconds +15-04-26 23:41:25 WARNING HASS: Error getting services - retrying +15-04-26 23:41:25 WARNING HASS: ------------------------------------------------------------ +15-04-26 23:41:25 WARNING HASS: Unexpected error while getting hass services +15-04-26 23:41:25 WARNING HASS: ------------------------------------------------------------ +Traceback (most recent call last): + File "/usr/local/lib/python3.12/site-packages/appdaemon/utils.py", line 478, in wrapper + result = await func(self, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "/usr/local/lib/python3.12/site-packages/appdaemon/plugins/hass/hassplugin.py", line 589, in get_hass_services + services: dict[str, dict[str, dict]] = (await self.websocket_send_json(type="get_services"))["result"] + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^ +TypeError: 'NoneType' object is not subscriptable + +15-04-26 23:41:25 WARNING HASS: ------------------------------------------------------------ +15-04-26 23:41:25 WARNING HASS: Logged an error to /conf/logs/error.log +15-04-26 23:41:28 WARNING HASS: Disconnected from Home Assistant, retrying in 5 seconds +15-04-26 23:41:33 WARNING HASS: Disconnected from Home Assistant, retrying in 5 seconds +15-04-26 23:41:38 WARNING HASS: Disconnected from Home Assistant, retrying in 5 seconds +15-04-26 23:41:43 WARNING HASS: Disconnected from Home Assistant, retrying in 5 seconds +15-04-26 23:41:48 WARNING HASS: Disconnected from Home Assistant, retrying in 5 seconds +15-04-26 23:42:22 WARNING HASS: ------------------------------------------------------------ +15-04-26 23:42:22 WARNING HASS: Unexpected error while getting hass config +15-04-26 23:42:22 WARNING HASS: ------------------------------------------------------------ +Traceback (most recent call last): + File "/usr/local/lib/python3.12/site-packages/appdaemon/utils.py", line 478, in wrapper + result = await func(self, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "/usr/local/lib/python3.12/site-packages/appdaemon/plugins/hass/hassplugin.py", line 577, in get_hass_config + if meta := (await self.websocket_send_json(type="get_config")).get("result"): + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +AttributeError: 'NoneType' object has no attribute 'get' + +15-04-26 23:42:22 WARNING HASS: ------------------------------------------------------------ +15-04-26 23:42:22 WARNING HASS: Logged an error to /conf/logs/error.log +15-04-26 23:42:24 WARNING HASS: Disconnected from Home Assistant, retrying in 5 seconds +15-04-26 23:42:25 WARNING HASS: Error getting services - retrying +15-04-26 23:42:25 WARNING HASS: ------------------------------------------------------------ +15-04-26 23:42:25 WARNING HASS: Unexpected error while getting hass services +15-04-26 23:42:25 WARNING HASS: ------------------------------------------------------------ +Traceback (most recent call last): + File "/usr/local/lib/python3.12/site-packages/appdaemon/utils.py", line 478, in wrapper + result = await func(self, *args, **kwargs) + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "/usr/local/lib/python3.12/site-packages/appdaemon/plugins/hass/hassplugin.py", line 589, in get_hass_services + services: dict[str, dict[str, dict]] = (await self.websocket_send_json(type="get_services"))["result"] + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^ +TypeError: 'NoneType' object is not subscriptable + +15-04-26 23:42:25 WARNING HASS: ------------------------------------------------------------ +15-04-26 23:42:25 WARNING HASS: Logged an error to /conf/logs/error.log +15-04-26 23:42:29 WARNING HASS: Disconnected from Home Assistant, retrying in 5 seconds +15-04-26 23:42:34 WARNING HASS: Disconnected from Home Assistant, retrying in 5 seconds +15-04-26 23:42:39 WARNING HASS: Disconnected from Home Assistant, retrying in 5 seconds +15-04-26 23:42:44 WARNING HASS: Disconnected from Home Assistant, retrying in 5 seconds +15-04-26 23:42:49 WARNING HASS: Disconnected from Home Assistant, retrying in 5 seconds +15-04-26 23:42:54 WARNING HASS: Disconnected from Home Assistant, retrying in 5 seconds +15-04-26 23:42:59 WARNING HASS: Disconnected from Home Assistant, retrying in 5 seconds +15-04-26 23:43:04 WARNING HASS: Disconnected from Home Assistant, retrying in 5 seconds +15-04-26 23:43:09 INFO HASS: Connected to Home Assistant 2026.4.2 with aiohttp websocket +15-04-26 23:43:09 INFO HASS: Authenticated to Home Assistant 2026.4.2 +15-04-26 23:43:09 INFO HASS: Waiting for Home Assistant to start +15-04-26 23:43:31 INFO HASS: Home Assistant fully started after 22.5s +15-04-26 23:43:32 INFO HASS: Completed initialization in 22.6s +15-04-26 23:43:32 INFO AppDaemon: Processing restart for plugin namespace 'default' +15-04-26 23:43:32 INFO AppDaemon: Starting apps: {'motion_tracker', 'light_restroom', 'light_hallway', 'light_corridor'} +15-04-26 23:43:32 INFO AppDaemon: Calling initialize() for motion_tracker +15-04-26 23:43:32 INFO motion_tracker: Name = motion_tracker +15-04-26 23:43:32 INFO motion_tracker: /conf/apps/data/motion_tracker.dataset loaded +15-04-26 23:43:32 WARNING motion_tracker: Entity sensor.corridor_last_motion not found in the default namespace +15-04-26 23:43:32 INFO AppDaemon: motion_tracker: Entity sensor.corridor_last_motion created in namespace: default +15-04-26 23:43:32 INFO motion_tracker: Previous message repeated 1 times +15-04-26 23:43:32 WARNING motion_tracker: Entity sensor.corridor_last_motion_time not found in the default namespace +15-04-26 23:43:32 INFO AppDaemon: motion_tracker: Entity sensor.corridor_last_motion_time created in namespace: default +15-04-26 23:43:32 INFO motion_tracker: Previous message repeated 1 times +15-04-26 23:43:32 INFO motion_tracker: Registering sensor binary_sensor.corridor_motion for area corridor +15-04-26 23:43:32 WARNING motion_tracker: Entity sensor.hallway_last_motion not found in the default namespace +15-04-26 23:43:32 INFO AppDaemon: motion_tracker: Entity sensor.hallway_last_motion created in namespace: default +15-04-26 23:43:32 INFO motion_tracker: Previous message repeated 1 times +15-04-26 23:43:32 WARNING motion_tracker: Entity sensor.hallway_last_motion_time not found in the default namespace +15-04-26 23:43:32 INFO AppDaemon: motion_tracker: Entity sensor.hallway_last_motion_time created in namespace: default +15-04-26 23:43:32 INFO motion_tracker: Previous message repeated 1 times +15-04-26 23:43:32 INFO motion_tracker: Registering sensor binary_sensor.hallway_motion for area hallway +15-04-26 23:43:32 WARNING motion_tracker: Entity sensor.restroom_last_motion not found in the default namespace +15-04-26 23:43:32 INFO AppDaemon: motion_tracker: Entity sensor.restroom_last_motion created in namespace: default +15-04-26 23:43:33 INFO motion_tracker: Previous message repeated 1 times +15-04-26 23:43:33 WARNING motion_tracker: Entity sensor.restroom_last_motion_time not found in the default namespace +15-04-26 23:43:33 INFO AppDaemon: motion_tracker: Entity sensor.restroom_last_motion_time created in namespace: default +15-04-26 23:43:33 INFO motion_tracker: Previous message repeated 1 times +15-04-26 23:43:33 INFO motion_tracker: Registering sensor binary_sensor.restroom_motion for area restroom +15-04-26 23:43:33 WARNING motion_tracker: Entity sensor.last_motion not found in the default namespace +15-04-26 23:43:33 INFO AppDaemon: motion_tracker: Entity sensor.last_motion created in namespace: default +15-04-26 23:43:33 INFO AppDaemon: Calling initialize() for light_restroom +15-04-26 23:43:33 INFO light_restroom: Name = light_restroom +15-04-26 23:43:33 INFO light_restroom: Linked to light.restroom +15-04-26 23:43:33 INFO light_restroom: Turn off light.restroom +15-04-26 23:43:43 WARNING HASS: Timed out [0:00:10] waiting for request: {'type': 'call_service', 'domain': 'homeassistant', 'service': 'turn_off', 'target': {'entity_id': 'light.restroom'}, 'id': 20} +15-04-26 23:43:43 INFO AppDaemon: Calling initialize() for light_hallway +15-04-26 23:43:43 INFO light_hallway: Name = light_hallway +15-04-26 23:43:43 INFO light_hallway: Linked to light.hallway +15-04-26 23:43:43 INFO AppDaemon: Calling initialize() for light_corridor +15-04-26 23:43:43 INFO light_corridor: Name = light_corridor +15-04-26 23:43:43 INFO light_corridor: Linked to light.corridor +15-04-26 23:43:43 INFO light_corridor: Turn off light.corridor +15-04-26 23:43:43 WARNING AppDaemon: Excessive time spent in utility loop: 10.5s, 10.5s in check_app_updates(), 0.492ms in other +15-04-26 23:44:18 WARNING HASS: Request already timed out for 20 +15-04-26 23:44:18 WARNING HASS: Error with websocket result: home_assistant_error: Failed to send request: device did not respond +16-04-26 01:25:49 INFO light_corridor: [smart_conditions] Callback trigger by sensor.corridor_last_motion(117 => 0) +16-04-26 01:25:49 INFO light_corridor: [smart_conditions][Evaluating] Triggered by (sensor.corridor_last_motion[0] < 5)[True] +16-04-26 01:25:49 INFO light_corridor: Turn on light.corridor +16-04-26 01:25:59 INFO light_restroom: [smart_conditions] Callback trigger by sensor.restroom_last_motion(117 => 0) +16-04-26 01:25:59 INFO light_restroom: [smart_conditions][Evaluating] Triggered by (sensor.restroom_last_motion[0] < 5)[True] +16-04-26 01:27:06 INFO light_hallway: [smart_conditions] Callback trigger by sensor.hallway_last_motion(118 => 0) +16-04-26 01:27:06 INFO light_hallway: [smart_conditions][Evaluating] Triggered by (sensor.hallway_last_motion[0] < 5)[True] +16-04-26 01:27:06 INFO light_hallway: Turn on light.hallway +16-04-26 01:33:19 INFO light_hallway: [smart_conditions] Callback trigger by sensor.hallway_last_motion(4 => 5) +16-04-26 01:33:19 INFO light_hallway: [smart_conditions][Evaluating] No valid conditions +16-04-26 01:33:19 INFO light_hallway: Turn off light.hallway +16-04-26 01:33:20 INFO light_restroom: [smart_conditions] Callback trigger by sensor.restroom_last_motion(4 => 5) +16-04-26 01:33:20 INFO light_restroom: [smart_conditions][Evaluating] No valid conditions +16-04-26 01:33:20 INFO light_corridor: [smart_conditions] Callback trigger by sensor.corridor_last_motion(4 => 5) +16-04-26 01:33:20 INFO light_restroom: Turn off light.restroom +16-04-26 01:33:20 INFO light_corridor: [smart_conditions][Evaluating] No valid conditions +16-04-26 01:33:20 INFO light_corridor: Turn off light.corridor +16-04-26 06:44:04 INFO light_corridor: [smart_conditions] Callback trigger by sensor.corridor_last_motion(120 => 0) +16-04-26 06:44:04 INFO light_corridor: [smart_conditions][Evaluating] Triggered by (sensor.corridor_last_motion[0] < 5)[True] +16-04-26 06:44:04 INFO light_corridor: Turn on light.corridor +16-04-26 06:44:10 INFO light_restroom: [smart_conditions] Callback trigger by sensor.restroom_last_motion(120 => 0) +16-04-26 06:44:10 INFO light_restroom: [smart_conditions][Evaluating] Triggered by (sensor.restroom_last_motion[0] < 5)[True] +16-04-26 06:44:10 INFO light_restroom: Turn on light.restroom +16-04-26 06:49:36 INFO light_restroom: [smart_conditions] Callback trigger by sensor.restroom_last_motion(4 => 5) +16-04-26 06:49:36 INFO light_restroom: [smart_conditions][Evaluating] No valid conditions +16-04-26 06:49:36 INFO light_restroom: Turn off light.restroom +16-04-26 06:49:36 INFO light_corridor: [smart_conditions] Callback trigger by sensor.corridor_last_motion(4 => 5) +16-04-26 06:49:36 INFO light_corridor: [smart_conditions][Evaluating] No valid conditions +16-04-26 06:49:36 INFO light_corridor: Turn off light.corridor +16-04-26 07:19:09 INFO light_corridor: [smart_conditions] Callback trigger by sensor.corridor_last_motion(34 => 0) +16-04-26 07:19:09 INFO light_corridor: [smart_conditions][Evaluating] Triggered by (sensor.corridor_last_motion[0] < 5)[True] +16-04-26 07:19:09 INFO light_corridor: Turn on light.corridor +16-04-26 07:20:19 INFO light_hallway: [smart_conditions] Callback trigger by sensor.hallway_last_motion(120 => 0) +16-04-26 07:20:19 INFO light_hallway: [smart_conditions][Evaluating] Triggered by (sensor.hallway_last_motion[0] < 5)[True] +16-04-26 07:20:19 INFO light_hallway: Turn on light.hallway +16-04-26 07:25:20 INFO light_corridor: [smart_conditions] Callback trigger by sensor.corridor_last_motion(4 => 5) +16-04-26 07:25:20 INFO light_corridor: [smart_conditions][Evaluating] No valid conditions +16-04-26 07:25:20 INFO light_corridor: Turn off light.corridor +16-04-26 07:25:20 INFO light_hallway: [smart_conditions] Callback trigger by sensor.hallway_last_motion(4 => 5) +16-04-26 07:25:20 INFO light_hallway: [smart_conditions][Evaluating] No valid conditions +16-04-26 07:25:20 INFO light_hallway: Turn off light.hallway +16-04-26 08:04:32 INFO light_corridor: [smart_conditions] Callback trigger by sensor.corridor_last_motion(44 => 0) +16-04-26 08:04:32 INFO light_corridor: [smart_conditions][Evaluating] Triggered by (sensor.corridor_last_motion[0] < 5)[True] +16-04-26 08:04:32 INFO light_corridor: Turn on light.corridor +16-04-26 08:04:38 INFO light_restroom: [smart_conditions] Callback trigger by sensor.restroom_last_motion(79 => 0) +16-04-26 08:04:38 INFO light_restroom: [smart_conditions][Evaluating] Triggered by (sensor.restroom_last_motion[0] < 5)[True] +16-04-26 08:04:38 INFO light_restroom: Turn on light.restroom +16-04-26 08:05:04 INFO light_hallway: [smart_conditions] Callback trigger by sensor.hallway_last_motion(44 => 0) +16-04-26 08:05:04 INFO light_hallway: [smart_conditions][Evaluating] Triggered by (sensor.hallway_last_motion[0] < 5)[True] +16-04-26 08:05:04 INFO light_hallway: Turn on light.hallway +16-04-26 08:12:54 INFO light_restroom: [smart_conditions] Callback trigger by sensor.restroom_last_motion(4 => 5) +16-04-26 08:12:54 INFO light_restroom: [smart_conditions][Evaluating] No valid conditions +16-04-26 08:12:54 INFO light_restroom: Turn off light.restroom +16-04-26 08:13:04 WARNING HASS: Timed out [0:00:10] waiting for request: {'type': 'call_service', 'domain': 'homeassistant', 'service': 'turn_off', 'target': {'entity_id': 'light.restroom'}, 'id': 28927} +16-04-26 08:13:04 WARNING AppDaemon: Excessive time spent in callback Evaluator.__on_condition_state_change for light_restroom. Thread entity: 'thread.thread-1' - now complete after 10.6s (limit=10.0s) +16-04-26 08:13:13 WARNING HASS: Request already timed out for 28927 +16-04-26 08:13:13 WARNING HASS: Error with websocket result: home_assistant_error: Failed to send request: device did not respond +16-04-26 08:22:42 INFO light_hallway: [smart_conditions] Callback trigger by sensor.hallway_last_motion(4 => 5) +16-04-26 08:22:42 INFO light_hallway: [smart_conditions][Evaluating] No valid conditions +16-04-26 08:22:42 INFO light_hallway: Turn off light.hallway +16-04-26 08:23:02 INFO light_hallway: [smart_conditions] Callback trigger by sensor.hallway_last_motion(5 => 0) +16-04-26 08:23:02 INFO light_hallway: [smart_conditions][Evaluating] Triggered by (sensor.hallway_last_motion[0] < 5)[True] +16-04-26 08:23:02 INFO light_hallway: Turn on light.hallway +16-04-26 08:35:49 INFO light_corridor: [smart_conditions] Callback trigger by sensor.corridor_last_motion(4 => 5) +16-04-26 08:35:49 INFO light_corridor: [smart_conditions][Evaluating] No valid conditions +16-04-26 08:35:49 INFO light_corridor: Turn off light.corridor +16-04-26 08:39:20 INFO light_hallway: [smart_conditions] Callback trigger by sensor.hallway_last_motion(4 => 5) +16-04-26 08:39:20 INFO light_hallway: [smart_conditions][Evaluating] No valid conditions +16-04-26 08:39:20 INFO light_hallway: Turn off light.hallway +16-04-26 08:45:11 INFO light_hallway: [smart_conditions] Callback trigger by sensor.hallway_last_motion(10 => 0) +16-04-26 08:45:11 INFO light_hallway: [smart_conditions][Evaluating] Triggered by (sensor.hallway_last_motion[0] < 5)[True] +16-04-26 08:45:11 INFO light_hallway: Turn on light.hallway +16-04-26 08:45:14 INFO light_corridor: [smart_conditions] Callback trigger by sensor.corridor_last_motion(14 => 0) +16-04-26 08:45:14 INFO light_corridor: [smart_conditions][Evaluating] Triggered by (sensor.corridor_last_motion[0] < 5)[True] +16-04-26 08:45:14 INFO light_corridor: Turn on light.corridor +16-04-26 08:45:16 INFO light_restroom: [smart_conditions] Callback trigger by sensor.restroom_last_motion(37 => 0) +16-04-26 08:45:16 INFO light_restroom: [smart_conditions][Evaluating] Triggered by (sensor.restroom_last_motion[0] < 5)[True] +16-04-26 08:50:24 INFO light_hallway: [smart_conditions] Callback trigger by sensor.hallway_last_motion(4 => 5) +16-04-26 08:50:24 INFO light_hallway: [smart_conditions][Evaluating] No valid conditions +16-04-26 08:50:24 INFO light_hallway: Turn off light.hallway +16-04-26 08:50:24 INFO light_corridor: [smart_conditions] Callback trigger by sensor.corridor_last_motion(4 => 5) +16-04-26 08:50:24 INFO light_corridor: [smart_conditions][Evaluating] No valid conditions +16-04-26 08:50:24 INFO light_corridor: Turn off light.corridor +16-04-26 08:58:01 INFO light_corridor: [smart_conditions] Callback trigger by sensor.corridor_last_motion(12 => 0) +16-04-26 08:58:01 INFO light_corridor: [smart_conditions][Evaluating] Triggered by (sensor.corridor_last_motion[0] < 5)[True] +16-04-26 08:58:01 INFO light_corridor: Turn on light.corridor +16-04-26 08:58:02 INFO light_hallway: [smart_conditions] Callback trigger by sensor.hallway_last_motion(12 => 0) +16-04-26 08:58:02 INFO light_hallway: [smart_conditions][Evaluating] Triggered by (sensor.hallway_last_motion[0] < 5)[True] +16-04-26 08:58:02 INFO light_hallway: Turn on light.hallway +16-04-26 09:02:25 INFO light_restroom: [smart_conditions] Callback trigger by sensor.restroom_last_motion(4 => 5) +16-04-26 09:02:25 INFO light_restroom: [smart_conditions][Evaluating] No valid conditions +16-04-26 09:02:25 INFO light_restroom: Turn off light.restroom +16-04-26 09:04:55 INFO light_hallway: [smart_conditions] Callback trigger by sensor.hallway_last_motion(4 => 5) +16-04-26 09:04:55 INFO light_hallway: [smart_conditions][Evaluating] No valid conditions +16-04-26 09:04:55 INFO light_hallway: Turn off light.hallway +16-04-26 09:04:55 INFO light_corridor: [smart_conditions] Callback trigger by sensor.corridor_last_motion(4 => 5) +16-04-26 09:04:55 INFO light_corridor: [smart_conditions][Evaluating] No valid conditions +16-04-26 09:04:55 INFO light_corridor: Turn off light.corridor +16-04-26 09:33:19 INFO light_hallway: [smart_conditions] Callback trigger by sensor.hallway_last_motion(33 => 0) +16-04-26 09:33:19 INFO light_hallway: [smart_conditions][Evaluating] Triggered by (sensor.hallway_last_motion[0] < 5)[True] +16-04-26 09:33:19 INFO light_hallway: Turn on light.hallway +16-04-26 09:33:23 INFO light_restroom: [smart_conditions] Callback trigger by sensor.restroom_last_motion(36 => 0) +16-04-26 09:33:23 INFO light_restroom: [smart_conditions][Evaluating] Triggered by (sensor.restroom_last_motion[0] < 5)[True] +16-04-26 09:33:23 INFO light_restroom: Turn on light.restroom +16-04-26 09:39:18 INFO light_restroom: [smart_conditions] Callback trigger by sensor.restroom_last_motion(4 => 5) +16-04-26 09:39:18 INFO light_restroom: [smart_conditions][Evaluating] No valid conditions +16-04-26 09:39:18 INFO light_restroom: Turn off light.restroom +16-04-26 09:39:28 WARNING HASS: Timed out [0:00:10] waiting for request: {'type': 'call_service', 'domain': 'homeassistant', 'service': 'turn_off', 'target': {'entity_id': 'light.restroom'}, 'id': 34086} +16-04-26 09:39:28 WARNING AppDaemon: Excessive time spent in callback Evaluator.__on_condition_state_change for light_restroom. Thread entity: 'thread.thread-1' - now complete after 10.6s (limit=10.0s) +16-04-26 09:39:37 WARNING HASS: Request already timed out for 34086 +16-04-26 09:39:37 WARNING HASS: Error with websocket result: home_assistant_error: Failed to send request: device did not respond +16-04-26 09:42:18 INFO light_hallway: [smart_conditions] Callback trigger by sensor.hallway_last_motion(4 => 5) +16-04-26 09:42:18 INFO light_hallway: [smart_conditions][Evaluating] No valid conditions +16-04-26 09:42:18 INFO light_hallway: Turn off light.hallway +16-04-26 09:51:08 INFO light_hallway: [smart_conditions] Callback trigger by sensor.hallway_motion_light_level(4 => 3) +16-04-26 09:51:08 INFO light_hallway: [smart_conditions][Evaluating] Triggered by (sensor.hallway_last_motion[0] < 5)[True] +16-04-26 09:51:08 INFO light_hallway: Turn on light.hallway +16-04-26 09:56:54 INFO light_hallway: [smart_conditions] Callback trigger by sensor.hallway_last_motion(4 => 5) +16-04-26 09:56:54 INFO light_hallway: [smart_conditions][Evaluating] No valid conditions +16-04-26 09:56:54 INFO light_hallway: Turn off light.hallway +16-04-26 14:32:54 INFO light_hallway: [smart_conditions] Callback trigger by sensor.hallway_last_motion(14 => 0) +16-04-26 14:32:54 INFO light_hallway: [smart_conditions][Evaluating] Triggered by (sensor.hallway_last_motion[0] < 5)[True] +16-04-26 14:32:54 INFO light_hallway: Turn on light.hallway +16-04-26 14:42:38 INFO light_restroom: [smart_conditions] Callback trigger by sensor.restroom_last_motion(120 => 0) +16-04-26 14:42:38 INFO light_restroom: [smart_conditions][Evaluating] Triggered by (sensor.restroom_last_motion[0] < 5)[True] +16-04-26 14:48:04 INFO light_restroom: [smart_conditions] Callback trigger by sensor.restroom_last_motion(4 => 5) +16-04-26 14:48:04 INFO light_restroom: [smart_conditions][Evaluating] No valid conditions +16-04-26 14:48:04 INFO light_restroom: Turn off light.restroom +16-04-26 14:51:34 INFO light_hallway: [smart_conditions] Callback trigger by sensor.hallway_last_motion(4 => 5) +16-04-26 14:51:34 INFO light_hallway: [smart_conditions][Evaluating] No valid conditions +16-04-26 14:51:34 INFO light_hallway: Turn off light.hallway +16-04-26 15:31:43 INFO light_hallway: [smart_conditions] Callback trigger by sensor.hallway_last_motion(25 => 0) +16-04-26 15:31:43 INFO light_hallway: [smart_conditions][Evaluating] Triggered by (sensor.hallway_last_motion[0] < 5)[True] +16-04-26 15:31:43 INFO light_hallway: Turn on light.hallway +16-04-26 15:38:27 INFO light_hallway: [smart_conditions] Callback trigger by sensor.hallway_last_motion(4 => 5) +16-04-26 15:38:27 INFO light_hallway: [smart_conditions][Evaluating] No valid conditions +16-04-26 15:38:27 INFO light_hallway: Turn off light.hallway +16-04-26 15:48:12 INFO light_hallway: [smart_conditions] Callback trigger by sensor.hallway_motion_light_level(12 => 7) +16-04-26 15:48:12 INFO light_hallway: [smart_conditions][Evaluating] Triggered by (sensor.hallway_last_motion[0] < 5)[True] +16-04-26 15:48:12 INFO light_hallway: Turn on light.hallway +16-04-26 16:06:42 INFO light_hallway: [smart_conditions] Callback trigger by sensor.hallway_last_motion(4 => 5) +16-04-26 16:06:42 INFO light_hallway: [smart_conditions][Evaluating] No valid conditions +16-04-26 16:06:42 INFO light_hallway: Turn off light.hallway +16-04-26 17:10:01 INFO light_hallway: [smart_conditions] Callback trigger by sensor.hallway_motion_light_level(154 => 5) +16-04-26 17:10:01 INFO light_hallway: [smart_conditions][Evaluating] Triggered by (sensor.hallway_last_motion[0] < 5)[True] +16-04-26 17:10:01 INFO light_hallway: Turn on light.hallway +16-04-26 17:15:38 INFO light_hallway: [smart_conditions] Callback trigger by sensor.hallway_last_motion(4 => 5) +16-04-26 17:15:38 INFO light_hallway: [smart_conditions][Evaluating] No valid conditions +16-04-26 17:15:38 INFO light_hallway: Turn off light.hallway +16-04-26 17:25:50 INFO light_hallway: [smart_conditions] Callback trigger by sensor.hallway_last_motion(15 => 0) +16-04-26 17:25:50 INFO light_hallway: [smart_conditions][Evaluating] Triggered by (sensor.hallway_last_motion[0] < 5)[True] +16-04-26 17:25:50 INFO light_hallway: Turn on light.hallway +16-04-26 17:43:31 INFO light_restroom: [smart_conditions] Callback trigger by sensor.restroom_last_motion(120 => 0) +16-04-26 17:43:31 INFO light_restroom: [smart_conditions][Evaluating] Triggered by (sensor.restroom_last_motion[0] < 5)[True] +16-04-26 17:48:46 INFO light_restroom: [smart_conditions] Callback trigger by sensor.restroom_last_motion(4 => 5) +16-04-26 17:48:46 INFO light_restroom: [smart_conditions][Evaluating] No valid conditions +16-04-26 17:48:46 INFO light_restroom: Turn off light.restroom +16-04-26 17:51:46 INFO light_hallway: [smart_conditions] Callback trigger by sensor.hallway_last_motion(4 => 5) +16-04-26 17:51:46 INFO light_hallway: [smart_conditions][Evaluating] No valid conditions +16-04-26 17:51:46 INFO light_hallway: Turn off light.hallway +16-04-26 17:51:53 INFO light_hallway: [smart_conditions] Callback trigger by sensor.hallway_motion_light_level(14 => 5) +16-04-26 17:51:53 INFO light_hallway: [smart_conditions][Evaluating] Triggered by (sensor.hallway_last_motion[0] < 5)[True] +16-04-26 17:51:53 INFO light_hallway: Turn on light.hallway +16-04-26 17:57:13 INFO light_hallway: [smart_conditions] Callback trigger by sensor.hallway_last_motion(4 => 5) +16-04-26 17:57:13 INFO light_hallway: [smart_conditions][Evaluating] No valid conditions +16-04-26 17:57:13 INFO light_hallway: Turn off light.hallway +16-04-26 18:16:44 INFO light_hallway: [smart_conditions] Callback trigger by sensor.hallway_last_motion(24 => 0) +16-04-26 18:16:44 INFO light_hallway: [smart_conditions][Evaluating] Triggered by (sensor.hallway_last_motion[0] < 5)[True] +16-04-26 18:16:44 INFO light_hallway: Turn on light.hallway +16-04-26 18:22:10 INFO light_hallway: [smart_conditions] Callback trigger by sensor.hallway_last_motion(4 => 5) +16-04-26 18:22:10 INFO light_hallway: [smart_conditions][Evaluating] No valid conditions +16-04-26 18:22:10 INFO light_hallway: Turn off light.hallway +16-04-26 18:23:47 INFO light_hallway: [smart_conditions] Callback trigger by sensor.hallway_last_motion(6 => 0) +16-04-26 18:23:47 INFO light_hallway: [smart_conditions][Evaluating] Triggered by (sensor.hallway_last_motion[0] < 5)[True] +16-04-26 18:23:47 INFO light_hallway: Turn on light.hallway +16-04-26 18:32:04 INFO light_hallway: [smart_conditions] Callback trigger by sensor.hallway_last_motion(4 => 5) +16-04-26 18:32:04 INFO light_hallway: [smart_conditions][Evaluating] No valid conditions +16-04-26 18:32:04 INFO light_hallway: Turn off light.hallway +16-04-26 18:45:01 INFO light_hallway: [smart_conditions] Callback trigger by sensor.hallway_last_motion(17 => 0) +16-04-26 18:45:01 INFO light_hallway: [smart_conditions][Evaluating] Triggered by (sensor.hallway_last_motion[0] < 5)[True] +16-04-26 18:45:01 INFO light_hallway: Turn on light.hallway +16-04-26 18:50:57 INFO light_restroom: [smart_conditions] Callback trigger by sensor.restroom_last_motion(66 => 0) +16-04-26 18:50:57 INFO light_restroom: [smart_conditions][Evaluating] Triggered by (sensor.restroom_last_motion[0] < 5)[True] +16-04-26 18:58:28 INFO light_restroom: [smart_conditions] Callback trigger by sensor.restroom_last_motion(4 => 5) +16-04-26 18:58:28 INFO light_restroom: [smart_conditions][Evaluating] No valid conditions +16-04-26 18:58:28 INFO light_restroom: Turn off light.restroom +16-04-26 19:00:58 INFO light_hallway: [smart_conditions] Callback trigger by sensor.hallway_last_motion(4 => 5) +16-04-26 19:00:58 INFO light_hallway: [smart_conditions][Evaluating] No valid conditions +16-04-26 19:00:58 INFO light_hallway: Turn off light.hallway +16-04-26 19:09:31 INFO light_hallway: [smart_conditions] Callback trigger by sensor.hallway_last_motion(13 => 0) +16-04-26 19:09:31 INFO light_hallway: [smart_conditions][Evaluating] Triggered by (sensor.hallway_last_motion[0] < 5)[True] +16-04-26 19:09:31 INFO light_hallway: Turn on light.hallway +16-04-26 19:20:14 INFO light_hallway: [smart_conditions] Callback trigger by sensor.hallway_last_motion(4 => 5) +16-04-26 19:20:14 INFO light_hallway: [smart_conditions][Evaluating] No valid conditions +16-04-26 19:20:14 INFO light_hallway: Turn off light.hallway diff --git a/logs/error.log b/logs/error.log new file mode 100644 index 0000000..e69de29 diff --git a/logs/virtualsensors.log b/logs/virtualsensors.log new file mode 100644 index 0000000..e69de29 diff --git a/requirement.txt b/requirements.txt similarity index 100% rename from requirement.txt rename to requirements.txt