Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Home Connect won't initialise on 2023.4.0, worked on 2023.3.x #90915

Closed
jamespreedy opened this issue Apr 6, 2023 · 23 comments
Closed

Home Connect won't initialise on 2023.4.0, worked on 2023.3.x #90915

jamespreedy opened this issue Apr 6, 2023 · 23 comments

Comments

@jamespreedy
Copy link

The problem

Hi folks, thanks in advance for your help.

I'm getting an error with the Home Connect integration on startup.
I've tried deleted and re-adding it, tried reloading it, and tried doing all this with my appliances turned on and active.

I've included logs, and a copy paste of the errors below.

If I can do anything else to help, please let me know.

What version of Home Assistant Core has the issue?

core-2023.4.0

What was the last working version of Home Assistant Core?

core-2023.3.x

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Home Connect

Link to integration documentation on our website

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

Diagnostics information

home-assistant_home_connect_2023-04-06T09-14-34.918Z.log

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Logger: homeassistant.config_entries
Source: components/home_connect/api.py:163 
First occurred: 6:53:07 am (2 occurrences) 
Last logged: 10:09:35 am

Error setting up entry Home Connect for home_connect
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 383, in async_setup
    result = await component.async_setup_entry(hass, self)
  File "/usr/src/homeassistant/homeassistant/components/home_connect/__init__.py", line 269, in async_setup_entry
    await update_all_devices(hass, entry)
  File "/usr/src/homeassistant/homeassistant/components/home_connect/__init__.py", line 293, in update_all_devices
    await hass.async_add_executor_job(hc_api.get_devices)
  File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/components/home_connect/api.py", line 99, in get_devices
    {CONF_DEVICE: device, CONF_ENTITIES: device.get_entity_info()}
  File "/usr/src/homeassistant/homeassistant/components/home_connect/api.py", line 303, in get_entity_info
    program_switches = self.get_program_switches()
  File "/usr/src/homeassistant/homeassistant/components/home_connect/api.py", line 163, in get_program_switches
    return [{ATTR_DEVICE: self, "program_name": p} for p in programs]
TypeError: 'NoneType' object is not iterable

Additional information

No response

@home-assistant
Copy link

home-assistant bot commented Apr 6, 2023

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

Code owner commands

Code owners of home_connect can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign home_connect Removes the current integration label and assignees on the issue, add the integration domain after the command.

(message by CodeOwnersMention)


home_connect documentation
home_connect source
(message by IssueLinks)

@stickpin
Copy link
Contributor

stickpin commented Apr 6, 2023

@jamespreedy
Please see: https://community.home-assistant.io/t/home-connect-integration-broken/556601/7
And: #90631

Which appliances do you have?

@ToroNander
Copy link

Hi Guys,

I had the same error. I Turned ON the appliances like in the link above, restarted the integration and all is running again.
Appliances: Washing machine, Hood, Cooktop.

Thx,
BR

@jamespreedy
Copy link
Author

@stickpin - thanks for that.
I saw it, but had deleted the integration and set it up with the appliances on, with no joy, so raised a bug.

I have 2x Siemens Dishwashers, 2x Siemens ovens and a Siemens Dryer.

@stickpin
Copy link
Contributor

stickpin commented Apr 6, 2023

@jamespreedy Unfortunately, it's a breaking change to support dynamic programs. Due to the limitation of the Home Connect itself, there is no other way to do it except to turn on the appliances to retrieve the initial programs list. :(

In theory, you don't have to delete the integration. You can turn on the appliances and then Reload the integration:
Screenshot 2023-04-06 at 12 06 53

It should do the trick, but it may keep the unsupported programs. So my suggestion is actually to reconfigure it once from scratch.

This action is required only once, so it shouldn't cause any issues later on.
And if new programs get available from the vendor, you don't have to wait for the implementation but only turn on the appliance and do Reload once again.

@jamespreedy
Copy link
Author

@stickpin - thanks again.

I'd tried a reload with the devices on first, it was only when that didn't work that I tried deleting and re-setting-up the integration.

Is there anything else I should be doing? e.g. restarting home assistant after deleting and before re-adding the integration?

I opted to keep the credentials stores in Home Assistant rather than wiping them - should I have done that?

@stickpin
Copy link
Contributor

stickpin commented Apr 6, 2023

@jamespreedy I am removing and adding the integration back without Home Assistance restart. So I don't think it's mandatory. But I don't exclude the fact that some setups may have a different experience.

Regarding credentials, yes it's ok. All the credentials are slowly migrating from XML config to the UI. They are visible here:
Screenshot 2023-04-06 at 12 27 22

The Home Connect documentation is updated as well and waiting for merge: home-assistant/home-assistant.io#26893

@Olninyo
Copy link

Olninyo commented Apr 6, 2023

Im still getting the nonetype error even when adding the integration with the dishwasher turned on. its a bosch sms6zc100g/17

@stickpin
Copy link
Contributor

stickpin commented Apr 7, 2023

@Olninyo first of all please update your HA to 2023.4.1 it should fix an error in case integration cannot retrieve the available programs. It will return an empty list of programs.
After the update, please try to reconfigure the integration again.
If you still get some errors, please share the log here.

@Olninyo
Copy link

Olninyo commented Apr 7, 2023

@stickpin updating worked perfectly, a device appeared before I even reloaded the integration. thanks for the speedy fix! am very new to all this so encouraging to see stuff getting supported so well.

@x3style
Copy link

x3style commented Apr 7, 2023

I can confirm it self populated after a while in 2023.4.1 but the buttons don't really work:

Logger: homeassistant.components.home_connect.switch
Source: components/home_connect/switch.py:128
Integration: Home Connect (documentation, issues)
First occurred: 10:00:19 AM (4 occurrences)
Last logged: 10:01:31 AM

Error while trying to turn off device: {'description': 'Key BSH.Common.Setting.PowerState has unknown enum type or enum member BSH.Common.EnumType.PowerState.Off.', 'key': 'SDK.Error.InvalidSettingValue'}

@stickpin
Copy link
Contributor

stickpin commented Apr 7, 2023

@x3style The change that is being done in version 2023.4.0 is related to the available programs fetching only. Meaning previously it was a generic static list of preset programs, now it's a dynamic list based on your appliance model fetched through Home Connect.

Based on the error, it seems like integration is not able to get a valid PowerState of your device. It's not related to the change of the programs fetching.

In any case, try to do the following (one of them is supposed to help):

  1. Try to restart Home Assistant with the appliance power turned on and try again.
  2. Try to remove and add the integration again with the appliance's power turned on.

If it's not going to help, please share your appliance type and model.

@jimverte
Copy link

jimverte commented May 8, 2023

@stickpin I had the same issue as you - could not control the dishwasher of Bosch anymore - no more programs visible in the integration tool.

Currently removed the complete integration and hope that soon a solution cloud be found by the developer.

@stickpin
Copy link
Contributor

stickpin commented May 8, 2023

@jimverte your appliances must be turned on during the initial integration configuration to fetch the programs. If an appliance is off or in a running state the list will be incomplete or empty.
If you still have a problem after following the instructions, please share the logs.

@jimverte
Copy link

jimverte commented May 8, 2023

@stickpin

@jimverte
Copy link

jimverte commented May 8, 2023

Tried with active dishwasher (power on)

2023-05-08 11:35:40.705 DEBUG (MainThread) [homeassistant.components.home_connect.sensor] Updated, new state: None
2023-05-08 11:35:40.705 DEBUG (MainThread) [homeassistant.components.home_connect.switch] Updated, new state: None
2023-05-08 11:36:33.985 INFO (MainThread) [homeassistant.components.home_connect.config_flow] Successfully authenticated
2023-05-08 11:37:46.482 DEBUG (SyncWorker_6) [homeassistant.components.home_connect.api] Unable to fetch available programs. Probably offline
2023-05-08 11:37:46.549 DEBUG (SyncWorker_2) [homeassistant.components.home_connect.api] Unable to fetch appliance status. Probably offline
2023-05-08 11:37:46.608 DEBUG (SyncWorker_2) [homeassistant.components.home_connect.api] Unable to fetch settings. Probably offline
2023-05-08 11:37:46.656 DEBUG (SyncWorker_2) [homeassistant.components.home_connect.api] Unable to fetch active programs. Probably offline
2023-05-08 11:37:46.656 INFO (SyncWorker_2) [homeconnect.sseclient] Connecting ...
2023-05-08 11:37:46.713 INFO (Thread-8230 (_listen)) [homeconnect] Listening to event stream for all devices
2023-05-08 11:37:46.722 DEBUG (MainThread) [homeassistant.components.home_connect.binary_sensor] Updated, new state: None
2023-05-08 11:37:46.723 DEBUG (MainThread) [homeassistant.components.home_connect.binary_sensor] Updated, new state: None
2023-05-08 11:37:46.723 DEBUG (MainThread) [homeassistant.components.home_connect.sensor] Updated, new state: None
2023-05-08 11:37:46.724 DEBUG (MainThread) [homeassistant.components.home_connect.sensor] Updated, new state: None
2023-05-08 11:37:46.724 DEBUG (MainThread) [homeassistant.components.home_connect.switch] Updated, new state: None

@jimverte
Copy link

jimverte commented May 8, 2023

still no succes :(

@jimverte
Copy link

jimverte commented May 8, 2023

Used devices : SMI6ZCS00E by Bosch

@jimverte
Copy link

jimverte commented May 8, 2023

thanks to analyse / advice
running version ha : 2023.4.6

@stickpin
Copy link
Contributor

stickpin commented May 8, 2023

@jimverte are you sure you have remote control enabled on the Dishwasher itself?
Are you able to control it using the regular Home Connect app?

The integration is not even able to get your appliance state.

@jimverte
Copy link

jimverte commented May 8, 2023 via email

@jimverte
Copy link

jimverte commented May 8, 2023 via email

@issue-triage-workflows
Copy link

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍
This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

@issue-triage-workflows issue-triage-workflows bot closed this as not planned Won't fix, can't repro, duplicate, stale Aug 13, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Sep 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants