core: deconz fails to init after reboot because the addon isn't started yet

The problem

I noticed several times now that when I reboot Home Assistant (full installation on RPi 3b+), deconz integration fails to initialize.

It seems this happens because it tries to access data provided by the deconz addon, but that addon hasn’t fully started yet. So the only way to make deconz work is to restart Home Assistant Core once after the whole OS starts up.

It’s possible that if my hardware was faster this wouldn’t happen because the addon would be started by the time deconz tries to access it. My deconz addon is on the latest version - 6.12.0.

What version of Home Assistant Core has the issue?

core-2022.3.5

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

deconz

Link to integration documentation on our website

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

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

2022-03-28 09:15:33 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry 00212E06133A for deconz
File "/usr/src/homeassistant/homeassistant/components/deconz/__init__.py", line 40, in async_setup_entry
api = await get_deconz_session(hass, config_entry.data)
File "/usr/src/homeassistant/homeassistant/components/deconz/gateway.py", line 276, in get_deconz_session
await deconz_session.refresh_state()
File "/usr/local/lib/python3.9/site-packages/pydeconz/gateway.py", line 124, in refresh_state
File "/usr/local/lib/python3.9/site-packages/pydeconz/gateway.py", line 144, in request
File "/usr/local/lib/python3.9/site-packages/pydeconz/gateway.py", line 163, in _request
pydeconz.errors.ResponseError: Invalid content type: text/html

Additional information

No response

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 1
  • Comments: 21 (10 by maintainers)

Commits related to this issue

Most upvoted comments

No that’s the web request to retrieve the full data from deconz, easy mistake to make! 😃

I will need to improve the error logging as it doesn’t help debugging this…

Looking at your logs the add-on gets discovered shortly after but doesn’t seem to trigger the integration to setup, hmm…