Error in SQL integration

I am accessing an external MariaDB instance to get and display some data from my home heating system. This went fine for the last years. Since the latest update of Home Assistent, I am getting “not available” in th UI for these values after a fresh start of home assistant OS.

When checking the SQL Intergration, I can see “configuration errors” for these values. After clicking on the three dots and “re-load”, the errors vanish and the values are displayed correctly in the GUI.

When checking the log I can see

Logger: homeassistant.config_entries
Quelle: config_entries.py:637
Erstmals aufgetreten: 00:12:09 (6 Vorkommnisse)
Zuletzt protokolliert: 00:12:09

Error setting up entry PumpenschachtVolumen for sql
Error setting up entry TemperaturAußen for sql
Error setting up entry TemperaturVorlauf for sql
Error setting up entry TemperaturKessel for sql
Error setting up entry TemperaturSolar for sql
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/config_entries.py”, line 637, in __async_setup_with_context
result = await component.async_setup_entry(hass, self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/components/sql/init.py”, line 110, in async_setup_entry
redact_credentials(get_instance(hass).db_url),
~~~~~~~~~~~~^^^^^^
File “/usr/src/homeassistant/homeassistant/helpers/recorder.py”, line 76, in get_instance
return hass.data[DATA_INSTANCE]
~~~~~~~~~^^^^^^^^^^^^^^^
KeyError: ‘recorder_instance’

I am using the Home Assistant recorder with a seperate MariaDB instance.

Can anybody help? Always reloading the entities after every restart is not funny…

Cheers,
Stefan

1 Like

Same for me for a few last days since I’ve not restart an SQL integration, using PostgreSQL DB.

Same issue here using MariaDB. Reloading integration resolved the error but after every reboot the error comes back.

Same for me - also reload will fix it until next reboot.

I have the same problem, but reloading the SQL integration does not resolve the problem. This first started happening when I upgraded to 14.0. My HA instance is querying an external MariaDB, and I have a MariaDB installed on the HA box. Both are Raspberry Pi 4s. I used to use recorder a year or so ago, but I no longer use recorder. I read somewhere that a similar clash between recorder and external databases cropped up a few years ago. I am still hoping for a solution since this error prevents my heating systems from working automatically. I have to turn them on and off manually, and I have sixteen of them.