home-assistant-bosch-custom-component: Integration wont load anymore on latest HA update 2023.6.3b

Describe the bug Integration wont load anymore. in the notification i get this message on boot: The following integrations and platforms could not be set up:

bosch (Show logs) Please check your config and logs.

To Reproduce Update to the latest version of HA 2023.6.b3

This is what the log says: Logger: homeassistant.loader Source: custom_components/bosch/init.py:12 Integration: bosch (documentation, issues) First occurred: 23:25:34 (1 occurrences) Last logged: 23:25:34

Unexpected exception importing component custom_components.bosch Traceback (most recent call last): File “/usr/local/lib/python3.11/enum.py”, line 260, in set_name enum_member.value = enum_class.member_type(*args) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File “/usr/local/lib/python3.11/site-packages/aioxmpp/xso/model.py”, line 2923, in init self.xso_class = self._create_class() ^^^^^^^^^^^^^^^^^^^^ File “/usr/local/lib/python3.11/site-packages/aioxmpp/xso/model.py”, line 2933, in _create_class self._create_name(), ^^^^^^^^^^^^^^^^^^^ File “/usr/local/lib/python3.11/site-packages/aioxmpp/xso/model.py”, line 2926, in create_name return “”.join(map(str.title, self.name.split(""))) ^^^^^^^^^ AttributeError: ‘XSOEnumMixin’ object has no attribute ‘name’

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File “/usr/src/homeassistant/homeassistant/loader.py”, line 813, in get_component ComponentProtocol, importlib.import_module(self.pkg_path) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File “/usr/local/lib/python3.11/importlib/init.py”, line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File “<frozen importlib._bootstrap>”, line 1206, in _gcd_import File “<frozen importlib._bootstrap>”, line 1178, in _find_and_load File “<frozen importlib._bootstrap>”, line 1149, in _find_and_load_unlocked File “<frozen importlib._bootstrap>”, line 690, in _load_unlocked File “<frozen importlib._bootstrap_external>”, line 940, in exec_module File “<frozen importlib._bootstrap>”, line 241, in _call_with_frames_removed File “/config/custom_components/bosch/init.py”, line 12, in <module> from bosch_thermostat_client.const import ( File “/usr/local/lib/python3.11/site-packages/bosch_thermostat_client/init.py”, line 10, in <module> from .gateway import gateway_chooser File “/usr/local/lib/python3.11/site-packages/bosch_thermostat_client/gateway/init.py”, line 1, in <module> from .ivt import IVTGateway, IVTMBLanGateway File “/usr/local/lib/python3.11/site-packages/bosch_thermostat_client/gateway/ivt.py”, line 6, in <module> from bosch_thermostat_client.connectors import connector_ivt_chooser File “/usr/local/lib/python3.11/site-packages/bosch_thermostat_client/connectors/init.py”, line 2, in <module> from .ivt import IVTXMPPConnector File “/usr/local/lib/python3.11/site-packages/bosch_thermostat_client/connectors/ivt.py”, line 2, in <module> import aioxmpp File “/usr/local/lib/python3.11/site-packages/aioxmpp/init.py”, line 101, in <module> from .errors import ( # NOQA File “/usr/local/lib/python3.11/site-packages/aioxmpp/errors.py”, line 109, in <module> class ErrorCondition(structs.CompatibilityMixin, xso.XSOEnumMixin, enum.Enum): File “/usr/local/lib/python3.11/enum.py”, line 557, in new raise exc File “/usr/local/lib/python3.11/enum.py”, line 266, in set_name raise new_exc ** Debug SCAN ** ** IMPORTANT ** Go to Developer tools in Home Assistant, choose Service tab and choose bosch.debug_scan Download file to your computer and upload it somewhere eg. https://jsonblob.com/

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Reactions: 4
  • Comments: 56 (6 by maintainers)

Most upvoted comments

Yup! @slovdahl! You are welcome.

I try to get a release out tomorrow (or at least before the weekend).

…/Frenck

Let’s hope we get a 2023.6.1 fairly soon with Python 3.11.4. 🤞

Confirming core update 2023.6.2 fixed this issue!

It is not; I would strongly discourage doing that manually. Unless you are an very advanced sysadmin, knowing what you are doing, I would really really strongly recommended staying out of doing things like that. And even if one is… that link you send, makes no sense and is way overcomplicated for the goal.

Please note, by recommending things like that, you will get users into a state of breaking their system, as they are not familiar or knowledgable enough to handle such things.

The right answer here is: If you need this to work right now, restore a backup of Home Assistant 2023.5 or older (the one you had before upgrading to 2023.6), and wait until a fix is available.

…/Frenck

So the update will be merged soon with 2023.6.2 it should be fixed

It depends on when it lands, I’m not sure if it will make into 2023.6.2 (or a patch release at all).

The linked PR to this issue is for bumping our base images, but we have more changes in the pipeline affecting those (cosign support).

Additionally, the linked PR is just the base image, which still needs to be built and shipped (which takes quite some hours). After that, I can start adjusting the Home Assistant base image, once that is tested, approved, build, and shipped I can start upgrading the Home Assistant Core itself, which also needs to be tested, approved, build, and shipped.

TL;DR: Don’t hold your breath on it being shipped in .2

…/Frenck

Good news if you didn’t already notice: the upcoming 2023.6.2 will have Python 3.11.4. Thank you very much @frenck! 🙇

Yes its working again now! Thanks to all!

regarding newer databaser format: My schema_changes table said v41 changed 2023-04-07, v41 seems to be the latest and already 3 month old

@rhehl Rollbacks are not supported, and HA is not designed to work that way. It is not just the database format but also other data formats (e.g., config entries, entity registries, device registries, area registries, and even storage versions for individual integrations, and a bunch more).

For that reason, please use backup to restore.

In my case a restore back to 2023.5.6 was not a big issue. After the restore completed i had to restart (not reset) my KM200 device and i was back in business again.

So backup/ restore is working as expected.

I got another HA Setup running at a different location without the Bosch integration so i could update to take a look for the new stuff. For my needs i can go on for a while with 2023.05

Correct, a Python update between HA 2023.5 and 2023.6 broke this integration. A newer Python version fixes it again, and we’re hoping that that Python version will be available in HA 2023.6.2 or a later patch version, but there are no guarantees. The safest course of action in your case right now might be to go back to HA 2023.5 while we wait for the fixed Python version.

@Tuningmormota

As temporary workaround the python can be updated to 3.11.4 manually ( i have done it on my HA docker image). After this integration works again. But only do it if you know what you are doing, and how to go back if something goes south.

Any suggestion as to how? With the current hot weather here my temperature inside is not what it’s supposed to be.

I have done the following:

  1. Opened a console to HA docker instance. (I run it on a Pi4, and I use portainer for docker managment)
  2. I used the apk command the download what is needed to download, compile and bulid python (stackoverflow and google is recommended at this point, especially for troubelshooting if needed)
  3. donwload the official python lib
  4. extract it
  5. Start worring if it works at the end or not. (I have a backup every 30 minutes form my config folder, and weekly image of Pi SD card, so I was brave enough)
  6. run configure and make scripts and let it run for long time. (and hoping no errors will happen during the process. It run around 40 minutes on my setup)
  7. restart docker image, after that I could see the temerature values for the rooms, and automations based on away mode are working again.
  8. check all other pages of HA are looks good or not? In my case yes.

Only do if you have a good quality backup, or you dont mind to start everthying from scratch. (as HA is running, while under it you may exchange python libs which are currently in use. It very easily corrupts your HA database and config, and other thing which may different between our setups.) I did it bacause from 2023.6.1 I went back 2023.5.4 and I could reach energy and settings pages any more. Now I running 2023.6.1 with python 3.11.4 so far working. But I can update only to HA version which will have python 3.11.4 already.

12.16.2023: Typo corrections, I should not type long thing late 😃

So the update will be merged soon with 2023.6.2 it should be fixed

It depends on when it lands, I’m not sure if it will make into 2023.6.2 (or a patch release at all).

@Frenck

Thank you so much for caring about the issue.

May I ask, to include the recording sensors as well. Those have stopped working with a former update

Thank you soooo much in advance!

image .

2023.6.1 did not fix this issue as of yet.

Looks like it’s actually a Python 3.11.3 regression: https://github.com/horazont/aioxmpp/issues/391#issuecomment-1575137853. Should be fixed in Python 3.11.4 that should be released tomorrow. Hopefully HA will update to it too.

@frenck Thank you very much. It works and my CT200 seems to report better then before.

@Tuningmormota

As temporary workaround the python can be updated to 3.11.4 manually ( i have done it on my HA docker image). After this integration works again. But only do it if you know what you are doing, and how to go back if something goes south.

Any suggestion as to how? With the current hot weather here my temperature inside is not what it’s supposed to be.

@schlaufon I will work on it when I get working docker image 😉

Thanks for keeping us updated and managing expectations! @frenck

It just won’t load! image

It’s not loading because of this bug

Would there not be another way to temporarily fix this? until the new python is released?

It’s aioxmpp bug. We’re waiting for upstream to fix https://github.com/horazont/aioxmpp/issues/391