Kane610/deconz

Error doing job: Task exception was never retrieved - KeyError: 'e'

Closed this issue · 4 comments

Hi !

Thanks for your work on that integration ! I get the following error in HA Error doing job: Task exception was never retrieved.

Logger: homeassistant
Source: /usr/src/homeassistant/homeassistant/runner.py:98
First occurred: 2:45:51 PM (10580 occurrences)
Last logged: 4:05:48 PM

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/pydeconz/gateway.py", line 183, in session_handler
    self.event_handler(self.websocket.data)  # type: ignore
  File "/usr/local/lib/python3.9/site-packages/pydeconz/gateway.py", line 193, in event_handler
    if (event_type := event[EVENT_TYPE]) not in SUPPORTED_EVENT_TYPES:
KeyError: 'e'

Not sure where the issue is, but I tried to find the correlation with the Deconz log, I guess this could be related to the following lines:

[...]
16:07:42:822 Websocket 172.16.1.133:63146 send message: {"e":"changed","id":"149","r":"sensors","state":{"consumption":5695,"lastupdated":"2022-01-02T15:07:42.819","power":240},"t":"event","uniqueid":"00:1f:ee:00:00:00:56:f5-05-0702"} (ret = 178)
16:07:42:821 Websocket 172.16.1.20:47856 send message: {"e":"changed","id":"149","r":"sensors","state":{"consumption":5695,"lastupdated":"2022-01-02T15:07:42.819","power":240},"t":"event","uniqueid":"00:1f:ee:00:00:00:56:f5-05-0702"} (ret = 178)
16:07:20:813 Websocket 172.16.1.20:42276 send message: {"e":"changed","id":"149","r":"sensors","state":{"consumption":5695,"lastupdated":"2022-01-02T15:07:20.812","power":240},"t":"event","uniqueid":"00:1f:ee:00:00:00:56:f5-05-0702"} (ret = 178)
16:07:41:810 Websocket 172.16.1.133:63146 send message: {"e":"changed","id":"149","r":"sensors","state":{"consumption":5695,"lastupdated":"2022-01-02T15:07:41.807","power":241},"t":"event","uniqueid":"00:1f:ee:00:00:00:56:f5-05-0702"} (ret = 178)
16:07:42:821 Websocket 172.16.1.20:43948 send message: {"e":"changed","id":"149","r":"sensors","state":{"consumption":5695,"lastupdated":"2022-01-02T15:07:42.819","power":240},"t":"event","uniqueid":"00:1f:ee:00:00:00:56:f5-05-0702"} (ret = 178)
16:07:42:820 Websocket 172.16.1.20:42276 send message: {"e":"changed","id":"149","r":"sensors","state":{"consumption":5695,"lastupdated":"2022-01-02T15:07:42.819","power":240},"t":"event","uniqueid":"00:1f:ee:00:00:00:56:f5-05-0702"} (ret = 178)
16:07:20:813 Websocket 172.16.1.20:43948 send message: {"e":"changed","id":"149","r":"sensors","state":{"consumption":5695,"lastupdated":"2022-01-02T15:07:20.812","power":240},"t":"event","uniqueid":"00:1f:ee:00:00:00:56:f5-05-0702"} (ret = 178)
16:07:20:814 Websocket 172.16.1.20:47856 send message: {"e":"changed","id":"149","r":"sensors","state":{"consumption":5695,"lastupdated":"2022-01-02T15:07:20.812","power":240},"t":"event","uniqueid":"00:1f:ee:00:00:00:56:f5-05-0702"} (ret = 178)
16:07:20:814 Websocket 172.16.1.100:61475 send message: {"e":"changed","id":"149","r":"sensors","state":{"consumption":5695,"lastupdated":"2022-01-02T15:07:20.812","power":240},"t":"event","uniqueid":"00:1f:ee:00:00:00:56:f5-05-0702"} (ret = 178)
16:07:20:814 Websocket 172.16.1.133:63146 send message: {"e":"changed","id":"149","r":"sensors","state":{"consumption":5695,"lastupdated":"2022-01-02T15:07:20.812","power":240},"t":"event","uniqueid":"00:1f:ee:00:00:00:56:f5-05-0702"} (ret = 178)
[...]

Thanks !
Kind regards,

WM

Can you enable debug logging for the integration per instructions in integration documentation? According to the error message there is no key with "e" in the web socket message, which doesn't seem to be the case according to your Deconz logs.

Sure ! I'll do that.

Strange thing is that I still see the same message in Deconz log but I don't have the error in HA anymore after I updated HA to latest version. I'll post as soon as I get the error again.

Ok. Let's close this in the mean time then?

Sure ! Thanks !