Hello community,
until yesterday my home assistant installation worked well. Unfortunately the system crashed. Now everything is working again except schedy heating.
I have the default rule for window open recognition.
schedule_prepend:
- x: "Mark(5, Mark.OVERLAY) if not is_empty(filter_entities('binary_sensor', window_room=room_name, state='on')) else Next()"
Everytime a window is opened, appdeamon throws an error, because in home assitant an error is thrown and the API answers with a 500.
Also if I add the window contact explicit to one room and deactivate the global rule, the same error is thrown.
- x: "5 if is_on('binary_sensor.aqara_window_2_schlafzimmer') else Next()"
My setup is a docker environment where each component is an own docker container.
Thats the error:
homeassistant | 2019-12-27 17:51:12 ERROR (MainThread) [aiohttp.server] Error handling request
homeassistant | Traceback (most recent call last):
homeassistant | File "/usr/local/lib/python3.7/site-packages/aiohttp/web_protocol.py", line 418, in start
homeassistant | resp = await task
homeassistant | File "/usr/local/lib/python3.7/site-packages/aiohttp/web_app.py", line 458, in _handle
homeassistant | resp = await handler(request)
homeassistant | File "/usr/local/lib/python3.7/site-packages/aiohttp/web_middlewares.py", line 119, in impl
homeassistant | return await handler(request)
homeassistant | File "/usr/src/homeassistant/homeassistant/components/http/real_ip.py", line 40, in real_ip_middleware
homeassistant | return await handler(request)
homeassistant | File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 73, in ban_middleware
homeassistant | return await handler(request)
homeassistant | File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 136, in auth_middleware
homeassistant | return await handler(request)
homeassistant | File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 122, in handle
homeassistant | result = await result
homeassistant | File "/usr/src/homeassistant/homeassistant/components/api/__init__.py", line 355, in post
homeassistant | domain, service, data, True, self.context(request)
homeassistant | File "/usr/src/homeassistant/homeassistant/core.py", line 1236, in async_call
homeassistant | await asyncio.shield(self._execute_service(handler, service_call))
homeassistant | File "/usr/src/homeassistant/homeassistant/core.py", line 1261, in _execute_service
homeassistant | await handler.func(service_call)
homeassistant | File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 213, in handle_service
homeassistant | self._platforms.values(), func, call, service_name, required_features
homeassistant | File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 348, in entity_service_call
homeassistant | future.result() # pop exception if have
homeassistant | File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 372, in _handle_service_platform_call
homeassistant | await func(entity, data)
homeassistant | File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 529, in async_service_temperature_set
homeassistant | await entity.async_set_temperature(**kwargs)
homeassistant | File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 390, in async_set_temperature
homeassistant | ft.partial(self.set_temperature, **kwargs)
homeassistant | File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
homeassistant | result = self.fn(*self.args, **self.kwargs)
homeassistant | File "/usr/src/homeassistant/homeassistant/components/maxcube/climate.py", line 124, in set_temperature
homeassistant | cube.set_target_temperature(device, target_temperature)
homeassistant | File "/usr/local/lib/python3.7/site-packages/maxcube/cube.py", line 246, in set_target_temperature
homeassistant | self.set_temperature_mode(thermostat, temperature, thermostat.mode)
homeassistant | File "/usr/local/lib/python3.7/site-packages/maxcube/cube.py", line 270, in set_temperature_mode
homeassistant | command = 's:' + base64.b64encode(bytearray.fromhex(byte_cmd)).decode('utf-8') + '\r\n'
homeassistant | ValueError: non-hexadecimal number found in fromhex() arg at position 21
appdaemon_1 | 2019-12-27 18:51:12.019854 WARNING AppDaemon: ------------------------------------------------------------
appdaemon_1 | 2019-12-27 18:51:12.019970 WARNING AppDaemon: Unexpected error in worker for App schedy_heating:
appdaemon_1 | 2019-12-27 18:51:12.020069 WARNING AppDaemon: Worker Ags: {'name': 'schedy_heating', 'id': UUID('503fb818-0c88-485a-a05f-xxxxxxxxxx'), 'type': 'timer', 'function': <function Room.trigger_reevaluation.<locals>._reevaluation_cb at 0x7fdbac1668c8>, 'kwargs': {}}
appdaemon_1 | 2019-12-27 18:51:12.020141 WARNING AppDaemon: ------------------------------------------------------------
appdaemon_1 | 2019-12-27 18:51:12.020431 WARNING AppDaemon: Traceback (most recent call last):
appdaemon_1 | File "/usr/local/lib/python3.6/site-packages/appdaemon/appdaemon.py", line 586, in worker
appdaemon_1 | funcref(self.sanitize_timer_kwargs(app, args["kwargs"]))
appdaemon_1 | File "/usr/local/lib/python3.6/site-packages/hass_apps/schedy/room.py", line 723, in _reevaluation_cb
appdaemon_1 | self.apply_schedule(reset=reset)
appdaemon_1 | File "/usr/local/lib/python3.6/site-packages/hass_apps/schedy/room.py", line 50, in wrapper
appdaemon_1 | result = handler(self, *args, **kwargs)
appdaemon_1 | File "/usr/local/lib/python3.6/site-packages/hass_apps/schedy/room.py", line 409, in apply_schedule
appdaemon_1 | self.set_value(new_scheduled_value, force_resend=force_resend)
appdaemon_1 | File "/usr/local/lib/python3.6/site-packages/hass_apps/schedy/room.py", line 587, in set_value
appdaemon_1 | changed |= actor.set_value(value, force_resend=force_resend)[0]
appdaemon_1 | File "/usr/local/lib/python3.6/site-packages/hass_apps/schedy/actor/base.py", line 285, in set_value
appdaemon_1 | self._resending_cb({"left_tries": self.cfg["send_retries"] + 1})
appdaemon_1 | File "/usr/local/lib/python3.6/site-packages/hass_apps/schedy/room.py", line 50, in wrapper
appdaemon_1 | result = handler(self, *args, **kwargs)
appdaemon_1 | File "/usr/local/lib/python3.6/site-packages/hass_apps/schedy/actor/base.py", line 93, in _resending_cb
appdaemon_1 | self.do_send()
appdaemon_1 | File "/usr/local/lib/python3.6/site-packages/hass_apps/schedy/actor/thermostat.py", line 326, in do_send
appdaemon_1 | temperature=temp.value,
appdaemon_1 | File "/usr/local/lib/python3.6/site-packages/appdaemon/plugins/hass/hassapi.py", line 22, in func_wrapper
appdaemon_1 | return func(*args, **kwargs)
appdaemon_1 | File "/usr/local/lib/python3.6/site-packages/appdaemon/plugins/hass/hassapi.py", line 522, in call_service
appdaemon_1 | r.raise_for_status()
appdaemon_1 | File "/usr/local/lib/python3.6/site-packages/requests/models.py", line 940, in raise_for_status
appdaemon_1 | raise HTTPError(http_error_msg, response=self)
appdaemon_1 | requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: http://192.168.0.7:8123/api/services/climate/set_temperature
The room and the contact/thermostat doesn’t matter. Error occurs in all rooms.