klali / ha-plejd

Plejd component for Home Assistant
Apache License 2.0
69 stars 16 forks source link

HA-Plejd Stops responding #17

Closed errno111 closed 4 years ago

errno111 commented 5 years ago

Hi,

I have a dedicated Raspberry Pi 3b with ha-plejd on it, Running a Hass.io installation. it works for a couple of hours but all of a sudden it stops working and i cant Control the lights Before i reboot the pi.

I have reinstalled Everything on a Pi 3B+ different SD card brand, but i get the same problem.

Here is my log after a reboot and until it stops working.

2019-09-01 06:01:40 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for plejd which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you do experience issues with Home Assistant. 2019-09-01 06:07:29 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.1864913968] 'data' Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 130, in handle_call_service connection.context(msg), File "/usr/src/homeassistant/homeassistant/core.py", line 1235, in async_call await asyncio.shield(self._execute_service(handler, service_call)) File "/usr/src/homeassistant/homeassistant/core.py", line 1260, in _execute_service await handler.func(service_call) File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 210, in handle_service self._platforms.values(), func, call, service_name, required_features File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 349, in entity_service_call future.result() # pop exception if have File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 371, in _handle_service_platform_call await getattr(entity, func)(data) File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run result = self.fn(self.args, self.kwargs) File "/config/custom_components/plejd/light.py", line 119, in turn_off plejd_write(pi, pi["handles"]["data"], plejd_enc_dec(pi["key"], pi["address"], payload)) KeyError: 'data' 2019-09-01 06:37:10 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.1864913968] 'data' Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 130, in handle_call_service connection.context(msg), File "/usr/src/homeassistant/homeassistant/core.py", line 1235, in async_call await asyncio.shield(self._execute_service(handler, service_call)) File "/usr/src/homeassistant/homeassistant/core.py", line 1260, in _execute_service await handler.func(service_call) File "/usr/src/homeassistant/homeassistant/components/light/init.py", line 307, in async_handle_light_on_service await light.async_turn_on(pars) File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run result = self.fn(self.args, self.kwargs) File "/config/custom_components/plejd/light.py", line 109, in turn_on plejd_write(pi, pi["handles"]["data"], plejd_enc_dec(pi["key"], pi["address"], payload)) KeyError: 'data' 2019-09-01 06:38:47 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.1864913968] 'data' Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 130, in handle_call_service connection.context(msg), File "/usr/src/homeassistant/homeassistant/core.py", line 1235, in async_call await asyncio.shield(self._execute_service(handler, service_call)) File "/usr/src/homeassistant/homeassistant/core.py", line 1260, in _execute_service await handler.func(service_call) File "/usr/src/homeassistant/homeassistant/components/light/init.py", line 307, in async_handle_light_on_service await light.async_turn_on(pars) File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run result = self.fn(self.args, self.kwargs) File "/config/custom_components/plejd/light.py", line 109, in turn_on plejd_write(pi, pi["handles"]["data"], plejd_enc_dec(pi["key"], pi["address"], payload)) KeyError: 'data' 2019-09-01 06:43:50 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.1864913968] 'data' Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 130, in handle_call_service connection.context(msg), File "/usr/src/homeassistant/homeassistant/core.py", line 1235, in async_call await asyncio.shield(self._execute_service(handler, service_call)) File "/usr/src/homeassistant/homeassistant/core.py", line 1260, in _execute_service await handler.func(service_call) File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 210, in handle_service self._platforms.values(), func, call, service_name, required_features File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 349, in entity_service_call future.result() # pop exception if have File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 371, in _handle_service_platform_call await getattr(entity, func)(data) File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run result = self.fn(self.args, self.kwargs) File "/config/custom_components/plejd/light.py", line 119, in turn_off plejd_write(pi, pi["handles"]["data"], plejd_enc_dec(pi["key"], pi["address"], payload)) KeyError: 'data' 2019-09-01 06:47:10 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.1864913968] 'data' Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 130, in handle_call_service connection.context(msg), File "/usr/src/homeassistant/homeassistant/core.py", line 1235, in async_call await asyncio.shield(self._execute_service(handler, service_call)) File "/usr/src/homeassistant/homeassistant/core.py", line 1260, in _execute_service await handler.func(service_call) File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 210, in handle_service self._platforms.values(), func, call, service_name, required_features File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 349, in entity_service_call future.result() # pop exception if have File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 371, in _handle_service_platform_call await getattr(entity, func)(data) File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run result = self.fn(self.args, self.kwargs) File "/config/custom_components/plejd/light.py", line 119, in turn_off plejd_write(pi, pi["handles"]["data"], plejd_enc_dec(pi["key"], pi["address"], payload)) KeyError: 'data' 2019-09-01 06:47:10 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.1864913968] 'data' Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 130, in handle_call_service connection.context(msg), File "/usr/src/homeassistant/homeassistant/core.py", line 1235, in async_call await asyncio.shield(self._execute_service(handler, service_call)) File "/usr/src/homeassistant/homeassistant/core.py", line 1260, in _execute_service await handler.func(service_call) File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 210, in handle_service self._platforms.values(), func, call, service_name, required_features File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 349, in entity_service_call future.result() # pop exception if have File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 371, in _handle_service_platform_call await getattr(entity, func)(data) File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run result = self.fn(self.args, self.kwargs) File "/config/custom_components/plejd/light.py", line 119, in turn_off plejd_write(pi, pi["handles"]["data"], plejd_enc_dec(pi["key"], pi["address"], payload)) KeyError: 'data' 2019-09-01 07:48:29 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.1864913968] 'data' Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 130, in handle_call_service connection.context(msg), File "/usr/src/homeassistant/homeassistant/core.py", line 1235, in async_call await asyncio.shield(self._execute_service(handler, service_call)) File "/usr/src/homeassistant/homeassistant/core.py", line 1260, in _execute_service await handler.func(service_call) File "/usr/src/homeassistant/homeassistant/components/light/init.py", line 307, in async_handle_light_on_service await light.async_turn_on(pars) File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run result = self.fn(self.args, self.kwargs) File "/config/custom_components/plejd/light.py", line 109, in turn_on plejd_write(pi, pi["handles"]["data"], plejd_enc_dec(pi["key"], pi["address"], payload)) KeyError: 'data' 2019-09-01 07:48:34 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.1864913968] 'data' Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 130, in handle_call_service connection.context(msg), File "/usr/src/homeassistant/homeassistant/core.py", line 1235, in async_call await asyncio.shield(self._execute_service(handler, service_call)) File "/usr/src/homeassistant/homeassistant/core.py", line 1260, in _execute_service await handler.func(service_call) File "/usr/src/homeassistant/homeassistant/components/light/init.py", line 307, in async_handle_light_on_service await light.async_turn_on(pars) File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run result = self.fn(self.args, self.kwargs) File "/config/custom_components/plejd/light.py", line 109, in turn_on plejd_write(pi, pi["handles"]["data"], plejd_enc_dec(pi["key"], pi["address"], payload)) KeyError: 'data' 2019-09-01 07:50:36 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.1864913968] 'data' Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 130, in handle_call_service connection.context(msg), File "/usr/src/homeassistant/homeassistant/core.py", line 1235, in async_call await asyncio.shield(self._execute_service(handler, service_call)) File "/usr/src/homeassistant/homeassistant/core.py", line 1260, in _execute_service await handler.func(service_call) File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 210, in handle_service self._platforms.values(), func, call, service_name, required_features File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 349, in entity_service_call future.result() # pop exception if have File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 371, in _handle_service_platform_call await getattr(entity, func)(data) File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run result = self.fn(self.args, self.kwargs) File "/config/custom_components/plejd/light.py", line 119, in turn_off plejd_write(pi, pi["handles"]["data"], plejd_enc_dec(pi["key"], pi["address"], payload)) KeyError: 'data' 2019-09-01 07:50:42 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.1864913968] 'data' Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 130, in handle_call_service connection.context(msg), File "/usr/src/homeassistant/homeassistant/core.py", line 1235, in async_call await asyncio.shield(self._execute_service(handler, service_call)) File "/usr/src/homeassistant/homeassistant/core.py", line 1260, in _execute_service await handler.func(service_call) File "/usr/src/homeassistant/homeassistant/components/light/init.py", line 307, in async_handle_light_on_service await light.async_turn_on(pars) File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run result = self.fn(self.args, self.kwargs) File "/config/custom_components/plejd/light.py", line 109, in turn_on plejd_write(pi, pi["handles"]["data"], plejd_enc_dec(pi["key"], pi["address"], payload)) KeyError: 'data' 2019-09-01 07:50:43 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.1864913968] 'data' Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 130, in handle_call_service connection.context(msg), File "/usr/src/homeassistant/homeassistant/core.py", line 1235, in async_call await asyncio.shield(self._execute_service(handler, service_call)) File "/usr/src/homeassistant/homeassistant/core.py", line 1260, in _execute_service await handler.func(service_call) File "/usr/src/homeassistant/homeassistant/components/light/init.py", line 307, in async_handle_light_on_service await light.async_turn_on(pars) File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run result = self.fn(self.args, self.kwargs) File "/config/custom_components/plejd/light.py", line 109, in turn_on plejd_write(pi, pi["handles"]["data"], plejd_enc_dec(pi["key"], pi["address"], payload)) KeyError: 'data' 2019-09-01 07:51:43 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.1862919312] 'data' Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 130, in handle_call_service connection.context(msg), File "/usr/src/homeassistant/homeassistant/core.py", line 1235, in async_call await asyncio.shield(self._execute_service(handler, service_call)) File "/usr/src/homeassistant/homeassistant/core.py", line 1260, in _execute_service await handler.func(service_call) File "/usr/src/homeassistant/homeassistant/components/light/init.py", line 307, in async_handle_light_on_service await light.async_turn_on(pars) File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run result = self.fn(self.args, self.kwargs) File "/config/custom_components/plejd/light.py", line 109, in turn_on plejd_write(pi, pi["handles"]["data"], plejd_enc_dec(pi["key"], pi["address"], payload)) KeyError: 'data' 2019-09-01 07:51:46 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.1862919312] 'data' Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 130, in handle_call_service connection.context(msg), File "/usr/src/homeassistant/homeassistant/core.py", line 1235, in async_call await asyncio.shield(self._execute_service(handler, service_call)) File "/usr/src/homeassistant/homeassistant/core.py", line 1260, in _execute_service await handler.func(service_call) File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 210, in handle_service self._platforms.values(), func, call, service_name, required_features File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 349, in entity_service_call future.result() # pop exception if have File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 371, in _handle_service_platform_call await getattr(entity, func)(data) File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run result = self.fn(self.args, self.kwargs) File "/config/custom_components/plejd/light.py", line 119, in turn_off plejd_write(pi, pi["handles"]["data"], plejd_enc_dec(pi["key"], pi["address"], payload)) KeyError: 'data' 2019-09-01 07:51:47 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.1862919312] 'data' Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 130, in handle_call_service connection.context(msg), File "/usr/src/homeassistant/homeassistant/core.py", line 1235, in async_call await asyncio.shield(self._execute_service(handler, service_call)) File "/usr/src/homeassistant/homeassistant/core.py", line 1260, in _execute_service await handler.func(service_call) File "/usr/src/homeassistant/homeassistant/components/light/init.py", line 307, in async_handle_light_on_service await light.async_turn_on(pars) File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run result = self.fn(self.args, self.kwargs) File "/config/custom_components/plejd/light.py", line 109, in turn_on plejd_write(pi, pi["handles"]["data"], plejd_enc_dec(pi["key"], pi["address"], payload)) KeyError: 'data' 2019-09-01 07:52:43 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.1864913968] 'data' Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 130, in handle_call_service connection.context(msg), File "/usr/src/homeassistant/homeassistant/core.py", line 1235, in async_call await asyncio.shield(self._execute_service(handler, service_call)) File "/usr/src/homeassistant/homeassistant/core.py", line 1260, in _execute_service await handler.func(service_call) File "/usr/src/homeassistant/homeassistant/components/light/init.py", line 307, in async_handle_light_on_service await light.async_turn_on(pars) File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run result = self.fn(self.args, self.kwargs) File "/config/custom_components/plejd/light.py", line 109, in turn_on plejd_write(pi, pi["handles"]["data"], plejd_enc_dec(pi["key"], pi["address"], payload)) KeyError: 'data' 2019-09-01 07:55:38 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.1863859376] 'data' Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 130, in handle_call_service connection.context(msg), File "/usr/src/homeassistant/homeassistant/core.py", line 1235, in async_call await asyncio.shield(self._execute_service(handler, service_call)) File "/usr/src/homeassistant/homeassistant/core.py", line 1260, in _execute_service await handler.func(service_call) File "/usr/src/homeassistant/homeassistant/components/light/init.py", line 307, in async_handle_light_on_service await light.async_turn_on(pars) File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run result = self.fn(self.args, self.kwargs) File "/config/custom_components/plejd/light.py", line 109, in turn_on plejd_write(pi, pi["handles"]["data"], plejd_enc_dec(pi["key"], pi["address"], payload)) KeyError: 'data' 2019-09-01 07:55:39 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.1863859376] 'data' Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 130, in handle_call_service connection.context(msg), File "/usr/src/homeassistant/homeassistant/core.py", line 1235, in async_call await asyncio.shield(self._execute_service(handler, service_call)) File "/usr/src/homeassistant/homeassistant/core.py", line 1260, in _execute_service await handler.func(service_call) File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 210, in handle_service self._platforms.values(), func, call, service_name, required_features File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 349, in entity_service_call future.result() # pop exception if have File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 371, in _handle_service_platform_call await getattr(entity, func)(data) File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run result = self.fn(self.args, self.kwargs) File "/config/custom_components/plejd/light.py", line 119, in turn_off plejd_write(pi, pi["handles"]["data"], plejd_enc_dec(pi["key"], pi["address"], payload)) KeyError: 'data' 2019-09-01 07:57:44 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.1864913968] 'data' Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 130, in handle_call_service connection.context(msg), File "/usr/src/homeassistant/homeassistant/core.py", line 1235, in async_call await asyncio.shield(self._execute_service(handler, service_call)) File "/usr/src/homeassistant/homeassistant/core.py", line 1260, in _execute_service await handler.func(service_call) File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 210, in handle_service self._platforms.values(), func, call, service_name, required_features File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 349, in entity_service_call future.result() # pop exception if have File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 371, in _handle_service_platform_call await getattr(entity, func)(data) File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run result = self.fn(self.args, self.kwargs) File "/config/custom_components/plejd/light.py", line 119, in turn_off plejd_write(pi, pi["handles"]["data"], plejd_enc_dec(pi["key"], pi["address"], payload)) KeyError: 'data'

klali commented 5 years ago

Can you retry this with the plejd component logging at debug?

klali commented 5 years ago

I gave a pointer to https://github.com/IanHarvey/bluepy/pull/355 over email and that seems to have helped this case.

klali commented 4 years ago

I've just merged a partial re-write that uses dbus instead of bluepy, this is probably fixed with that.