Debugging issues after upgrade to 2022.9

HI all. After a little advice with debugging my setup. Been running HA for years and this is the first time i’ve had a fail after an upgrade (That wasn’t due to me missing breaking changes at least!).

Everything seems to work fine for around an hour, then things start failing. It is as if the docker networking falls apart and addons/integrations slowly stop working. The logs look as below:

Updating xiaomi_cloud_map_extractor camera took longer than the scheduled update interval 0:00:10
15:51:54 – () Camera -
Updating visonic alarm_control_panel took longer than the scheduled update interval 0:00:30
15:51:49 – () Alarm Control Panel -
Template variable warning: 'homeassistant.util.read_only_dict.ReadOnlyDict object' has no attribute 'results' when rendering '{{ states.sensor.octopus_export.attributes.results|map(attribute='value_inc_vat')|list|last|round(2) }}'
15:51:47 – () helpers/template.py -
Empty reply found when expecting JSON data
15:51:47 – () RESTful -
Error fetching data: https://api.octopus.energy/v1/products/AGILE-18-02-21/electricity-tariffs/E-1R-AGILE-18-02-21-N/standard-unit-rates/?period_from= 2022-09-21T15:30:00Z&period_to= 2022-09-22T15:30:00Z failed with
15:51:47 – () RESTful -
Update of sensor.octopus is taking over 10 seconds
15:51:47 – () helpers/entity.py -
Error doing job: Task exception was never retrieved
15:51:37 – () Smart EQ Connect () -
Updating rpi_power binary_sensor took longer than the scheduled update interval 0:00:30
15:51:37 – () Binary Sensor -
Updating smarteqconnect sensor took longer than the scheduled update interval 0:00:30
15:51:37 – () Sensor -
Reset of hci0 timed out after 10!
15:51:34 – () components/bluetooth/util.py -
Unable to find referenced entities light.garage_tool_wall_light or it is/they are currently not available
15:51:19 – () helpers/service.py -
Timeout sending report to Alexa for vacuum.digby
15:51:09 – () Amazon Alexa -
Garage Light Switch Off: Already running
15:51:09 – () Automation -
Error fetching information from http://192.168.1.114:5000/api/stats: Cannot connect to host 192.168.1.114:5000 ssl:default [Connect call failed ('192.168.1.114', 5000)]
15:50:52 – () Frigate () -
Error fetching alexa_media data: Error communicating with API:
15:49:34 – () Alexa Media Player ()
alexaapi.get_devices((<alexapy.alexalogin.AlexaLogin object at 0x7f8ccc7550>,), {}): Timeout error occured accessing AlexaAPI: An exception of type CancelledError occurred. Arguments: ()
15:49:34 – () runner.py -
Timeout fetching octoprint-a023d01b7ae6740d1488dc4b1ee2fe08 data
15:44:38 – () OctoPrint
Timeout fetching Digby data
15:39:51 – () Xiaomi Miio
TemplateError('UndefinedError: No aggregated item, sequence was empty.') while processing template 'Template("{{ states.sensor.octopus.attributes.results|map(attribute='value_inc_vat')|list|min|round(2) }}")' for attribute '_attr_native_value' in entity 'sensor.octopus_min_price'
15:39:47 – () helpers/template_entity.py -
Power state of bluetooth adapter hci0 is OFF after power cycle
15:39:34 – () /usr/local/lib/python3.10/site-packages/bluetooth_auto_recovery/recover.py -
Exception in async_discover when dispatching 'mqtt_discovery_new_light_mqtt': ({'schema': 'template', 'name': 'Shelly RGBW2 AF08D0 Light 0', 'command_topic': 'shellies/shellyrgbw2-AF08D0/color/0/set', 'state_topic': 'shellies/shellyrgbw2-AF08D0/color/0/status', 'availability_topic': 'shellies/shellyrgbw2-AF08D0/online', 'payload_available': 'true', 'payload_not_available': 'false', 'effect_list': ['Off', 'Meteor Shower', 'Gradual Change', 'Flash'], 'command_on_template': '{"turn":"on"{%if brightness is defined%},"gain":{{brightness|float|multiply(0.3922)|round}}{%endif%}{%if red is defined and green is defined and blue is defined%},"red":{{red}},"green":{{green}},"blue":{{blue}}{%endif%}{%if white_value is defined%},"white":{{white_value}}{%endif%}{%if effect is defined%}{%if effect=="Meteor Shower"%}"effect":1{%elif effect=="Gradual Change"%}"effect":2{%elif effect=="Flash"%}"effect":3{%else%}"effect":0{%endif%}{%else%}"effect":0{%endif%}}', 'command_off_template': '{"turn":"off"}', 'state_template': '{%if value_json.ison%}on{%else%}off{%endif%}', 'brightness_template': '{{value_json.gain|float|multiply(2.55)|round}}', 'red_template': '{{value_json.red}}', 'green_template': '{{value_json.green}}', 'blue_template': '{{value_json.blue}}', 'white_value_template': '{{value_json.white}}', 'effect_template': '{%if value_json.effect==1%}Meteor Shower{%elif value_json.effect==2%}Gradual Change{%elif value_json.effect==3%}Flash{%else%}Off{%endif%}', 'unique_id': 'shellyrgbw2-af08d0-light-0', 'qos': '0', 'device': {'identifiers': ['84cca8af08d0'], 'name': 'Shelly RGBW2 AF08D0', 'model': 'Shelly RGBW2', 'sw_version': '20211109-130054/v1.11.7-g682a0db', 'manufacturer': 'Allterco Robotics'}, 'platform': 'mqtt'},) Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/voluptuous/schema_builder.py", line 272, in __call__ return self._compiled([], data) File "/usr/local/lib/python3.10/site-packages/voluptuous/schema_builder.py", line 818, in validate_callable return schema(data) File "/usr/src/homeassistant/homeassistant/helpers/config_validation.py", line 829, in validator raise vol.Invalid(warning % arguments) voluptuous.error.Invalid: The 'white_value_template' option has been removed, please remove it from your configuration During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/mqtt/mixins.py", line 350, in async_discover config = schema(discovery_payload) File "/usr/local/lib/python3.10/site-packages/voluptuous/validators.py", line 232, in __call__ return self._exec((Schema(val) for val in self.validators), v) File "/usr/local/lib/python3.10/site-packages/voluptuous/validators.py", line 355, in _exec raise e if self.msg is None else AllInvalid(self.msg, path=path) File "/usr/local/lib/python3.10/site-packages/voluptuous/validators.py", line 351, in _exec v = func(v) File "/usr/local/lib/python3.10/site-packages/voluptuous/schema_builder.py", line 272, in __call__ return self._compiled([], data) File "/usr/local/lib/python3.10/site-packages/voluptuous/schema_builder.py", line 818, in validate_callable return schema(data) File "/usr/src/homeassistant/homeassistant/components/mqtt/light/__init__.py", line 50, in validate_mqtt_light_discovery return schemas[value[CONF_SCHEMA]](value) File "/usr/local/lib/python3.10/site-packages/voluptuous/validators.py", line 232, in __call__ return self._exec((Schema(val) for val in self.validators), v) File "/usr/local/lib/python3.10/site-packages/voluptuous/validators.py", line 355, in _exec raise e if self.msg is None else AllInvalid(self.msg, path=path) File "/usr/local/lib/python3.10/site-packages/voluptuous/validators.py", line 351, in _exec v = func(v) File "/usr/local/lib/python3.10/site-packages/voluptuous/schema_builder.py", line 276, in __call__ raise er.MultipleInvalid([e]) voluptuous.error.MultipleInvalid: The 'white_value_template' option has been removed, please remove it from your configuration
15:22:06 – () util/logging.py -
Forced update failed. Entity sensor.electricity_cost not found.
15:15:00 – () helpers/entity_component.py
sensor.total_gas_usage_day has unit m3 which is unsupported for device_class gas
14:20:10 – () Sensor
Config entry 'DC:A6:32:8B:9D:3B' for bluetooth integration not ready yet: hci0 (DC:A6:32:8B:9D:3B): Failed to start Bluetooth: [org.bluez.Error.NotReady] Resource Not Ready; Retrying in background
14:19:11 – () config_entries.py
Updating alexa_media media_player took longer than the scheduled update interval 0:00:10
14:19:07 – () Media Player
Setup of sensor platform command_line is taking over 10 seconds.
14:19:07 – () Sensor -
Error initializing 'Turn on IBoost' trigger: In 'numeric_state' condition: unknown entity sensor.givenergy_battery_percentage
14:18:57 – () Home Assistant Core Integration -
TemplateError('UndefinedError: 'None' has no attribute 'attributes'') while processing template 'Template("{{ states.sensor.octopus_export.attributes.results|map(attribute='value_inc_vat')|list|max|round(2) / 100 }}")' for attribute '_attr_native_value' in entity 'sensor.octopus_max_export_price'
14:18:57 – () helpers/template_entity.py -
Error while processing template: Template("{{ states.sensor.octopus_export.attributes.results|map(attribute='value_inc_vat')|list|max|round(2) / 100 }}")
14:18:57 – () helpers/template.py -
Config entry 'Living Room' for apple_tv integration not ready yet: Not found at 192.168.1.193, waiting for discovery; Retrying in background
14:18:41 – () config_entries.py -
Can't connect to ESPHome API for nspanel @ 192.168.3.207: Error connecting to ('192.168.3.207', 6053): [Errno 111] Connect call failed ('192.168.3.207', 6053)
14:18:39 – () /usr/local/lib/python3.10/site-packages/aioesphomeapi/reconnect_logic.py -

This issue has persisted in all releases of 2022.9 including the latest 2022.9.5. Rolling back to my previous backup works OK and everything is fine in 2022.8

I had the same symptoms as you with 2022.9. The RAM memory was slowly increasing until HASS grinded to a halt. I hade to remove all integrations with bluetooth and then it was OK again.
And it looks like you have some problem with your hci0 in your log.

That would be great if that is what my issue is. You are correct, I do have a broken half installed Bluetooth integration.

I’ll remove the integration and try the upgrade again and report back in here.

Wait for 2022.9.6 it has some changes to bluetooth and dbus, that might fix it.
There is a open issue possibly related to this

Heh, I missed your latest reply but deleted the bluetooth integration and upgraded again and so far so good.

Now to debug why my Shelly RGBW2 has stopped working in 2022.9 too