home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
73.43k stars 30.66k forks source link

WLED Integration causing job listener issues on HA restart #54966

Closed rob1303-hub closed 2 years ago

rob1303-hub commented 3 years ago

The problem

When restarting HA there is an error within System>Core>Logs for each WLED controller/ strip I have integrated.

This does not appear to have any negative issues with the operation of the lights from within HA or directly.

Whilst the errors do not mention WLED I am able to remove/ replicate the errors by removing/ adding the WLED integration and associated devices.

Not sure if relevant, but including just in case: I have lovelace cards/ input-selects/automations set up for each light - but removing/ adding whether these are present do not appear to effect the errors appearing in the log. These are structured using: https://community.home-assistant.io/t/wled-control-palette-speed-reverse-preset-second-color/194189/5

What is version of Home Assistant Core has the issue?

2021.8.8

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

WLED

Link to integration documentation on our website

https://www.home-assistant.io/integrations/wled/

Example YAML snippet

No response

Anything in the logs that might be useful for us?

[s6-finish] waiting for services.
2021-08-21 11:13:36 ERROR (MainThread) [homeassistant.core] Unable to remove unknown job listener (<Job HassJobType.Callback <function EventBus.async_listen_once.<locals>._onetime_listener at 0x7fa2cc604550>>, None)
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/core.py", line 848, in _async_remove_listener
    self._listeners[event_type].remove(filterable_job)
KeyError: 'homeassistant_stop'
2021-08-21 11:13:36 ERROR (MainThread) [homeassistant.core] Unable to remove unknown job listener (<Job HassJobType.Callback <function EventBus.async_listen_once.<locals>._onetime_listener at 0x7fa2cc5ff310>>, None)
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/core.py", line 848, in _async_remove_listener
    self._listeners[event_type].remove(filterable_job)
KeyError: 'homeassistant_stop'
2021-08-21 11:13:36 ERROR (MainThread) [homeassistant.core] Unable to remove unknown job listener (<Job HassJobType.Callback <function EventBus.async_listen_once.<locals>._onetime_listener at 0x7fa2cc3051f0>>, None)
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/core.py", line 848, in _async_remove_listener
    self._listeners[event_type].remove(filterable_job)
KeyError: 'homeassistant_stop'
2021-08-21 11:13:36 ERROR (MainThread) [homeassistant.core] Unable to remove unknown job listener (<Job HassJobType.Callback <function EventBus.async_listen_once.<locals>._onetime_listener at 0x7fa2cc305430>>, None)
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/core.py", line 848, in _async_remove_listener
    self._listeners[event_type].remove(filterable_job)
KeyError: 'homeassistant_stop'
2021-08-21 11:13:39 ERROR (MainThread) [homeassistant.components.hassio.handler] Client error on /homeassistant/restart request Server disconnected
s6-svscanctl: fatal: unable to control /var/run/s6/services: supervisor not listening
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] udev.sh: executing... 
[cont-init.d] udev.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.

Additional information

WLED version v0.12.1-b1 "Hikari"

Errors appear whether light is switched on or off when HA restarts.

cfg.json output from one of the lights: {"rev":[1,0],"vid":2104220,"id":{"mdns":"study_wled","name":"study_wled","inv":"Light"},"nw":{"ins":[{"ssid":"PNOT","pskl":9,"ip":[10,0,30,84],"gw":[10,0,30,1],"sn":[255,255,255,0]}]},"ap":{"ssid":"WLED-AP","pskl":8,"chan":1,"hide":0,"behav":0,"ip":[4,3,2,1]},"wifi":{"sleep":false,"phy":1},"hw":{"led":{"total":90,"maxpwr":850,"ledma":35,"rgbwm":3,"ins":[{"start":0,"len":90,"pin":[17],"order":0,"rev":false,"skip":0,"type":22}]},"btn":{"ins":[{"type":2,"pin":[0],"macros":[0,0,0]}]},"ir":{"pin":18,"type":2},"relay":{"pin":12,"rev":false}},"light":{"scale-bri":100,"pal-mode":0,"gc":{"bri":1,"col":2.8},"tr":{"mode":true,"dur":7,"pal":0},"nl":{"mode":1,"dur":60,"tbri":0,"macro":0}},"def":{"ps":0,"on":false,"bri":196},"if":{"sync":{"port0":21324,"port1":65506,"recv":{"bri":false,"col":false,"fx":false},"send":{"dir":false,"btn":false,"va":false,"hue":false,"macro":false,"twice":false}},"nodes":{"list":true,"bcast":true},"live":{"en":true,"port":5568,"mc":false,"dmx":{"uni":1,"seqskip":false,"addr":1,"mode":4},"timeout":25,"maxbri":false,"no-gc":true,"offset":0},"va":{"alexa":false,"macros":[0,0]},"blynk":{"token":"","host":"blynk-cloud.com","port":80},"mqtt":{"en":false,"broker":"","port":1883,"user":"","pskl":0,"cid":"WLED-38eaa4","topics":{"device":"wled/38eaa4","group":"wled/all"}},"hue":{"en":false,"id":1,"iv":25,"recv":{"on":false,"bri":false,"col":false},"ip":[10,0,30,0]},"ntp":{"en":true,"host":"10.0.0.1","tz":11,"offset":0,"ampm":false,"ln":0,"lt":0}},"ol":{"clock":0,"cntdwn":false,"min":0,"max":29,"o12pix":0,"o5m":false,"osec":false},"timers":{"cntdwn":{"goal":[20,1,1,0,0,0],"macro":0},"ins":[{"en":1,"hour":255,"min":0,"macro":0,"dow":127},{"en":1,"hour":255,"min":0,"macro":0,"dow":127}]},"ota":{"lock":false,"lock-wifi":false,"pskl":7,"aota":true},"um":{}}

probot-home-assistant[bot] commented 3 years ago

Hey there @frenck, mind taking a look at this issue as it has been labeled with an integration (wled) you are listed as a code owner for? Thanks! (message by CodeOwnersMention)


wled documentation wled source (message by IssueLinks)

rob1303-hub commented 3 years ago

Errors remain on boot after changing system from HA OS to Supervised install on Debian 11.

rob1303-hub commented 3 years ago

Issue remains after updating to core-2021.9.0 & core-2021.9.1

Whilst I thought it was an issue with startup looking at timings I can see that the errors actually occur when shutting down the system for a restart, rather than on startup.

frenck commented 2 years ago

This issue has been fixed in #57752

rob1303-hub commented 2 years ago

Thank you. Rob