home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
73.9k stars 30.97k forks source link

Home Assistant Core Update Breaks iAqualink Integration #81439

Closed livetoautomate closed 2 years ago

livetoautomate commented 2 years ago

The problem

After updating to HA Core 2022.11 Jandy iAqualink fails to start. There seems to be an issue with missing python dependency 'httpx'.

What version of Home Assistant Core has the issue?

core-2022.11

What was the last working version of Home Assistant Core?

core-2022.10.5

What type of installation are you running?

Home Assistant Supervised

Integration causing the issue

iAqualink

Link to integration documentation on our website

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

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

2022-11-02 20:47:56.153 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry <email> for iaqualink
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 365, in async_setup
result = await component.async_setup_entry(hass, self)
File "/usr/src/homeassistant/homeassistant/components/iaqualink/__init__.py", line 76, in async_setup_entry
await aqualink.login()
File "/usr/local/lib/python3.10/site-packages/iaqualink/client.py", line 126, in login
r = await self._send_login_request()
File "/usr/local/lib/python3.10/site-packages/iaqualink/client.py", line 121, in _send_login_request
return await self.send_request(
File "/usr/local/lib/python3.10/site-packages/iaqualink/client.py", line 92, in send_request
self._client = httpx.AsyncClient(
File "/usr/local/lib/python3.10/site-packages/httpx/_client.py", line 1386, in __init__
raise ImportError(
ImportError: Using http2=True, but the 'h2' package is not installed. Make sure to install httpx using `pip install httpx[http2]`.

Additional information

No response

home-assistant[bot] commented 2 years ago

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

Code owner commands Code owners of `iaqualink` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Change the title of the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign iaqualink` Removes the current integration label and assignees on the issue, add the integration domain after the command.

(message by CodeOwnersMention)


iaqualink documentation iaqualink source (message by IssueLinks)

pmalojer commented 2 years ago

Hi, im having the same issue and have the below in the log file since updating to the latest core. 2022-11-03 14:42:53.183 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry email address here for iaqualink File "/usr/src/homeassistant/homeassistant/components/iaqualink/init.py", line 76, in async_setup_entry File "/usr/local/lib/python3.10/site-packages/iaqualink/client.py", line 126, in login File "/usr/local/lib/python3.10/site-packages/iaqualink/client.py", line 121, in _send_login_request File "/usr/local/lib/python3.10/site-packages/iaqualink/client.py", line 92, in send_request

jaim-fads commented 2 years ago

Same issue

Clipboard02

j6s33m commented 2 years ago

Yup. Same issue.

livetoautomate commented 2 years ago

This seems to be a duplicate of #81154.

@flz - Any thoughts on this?

glynweston commented 2 years ago

Same Issue/ error messages. Fallback to core-2022.10.5 - errors cease.

bboi69 commented 2 years ago

This needs to be sorted out asap. I can’t control aqualink from HomeKit 😭

Just restored my backup to 10.5 in the meantime.

RichardUUU commented 2 years ago

Same issue for me.

matthewhadley commented 2 years ago

To temporarily fix this, the missing package can be installed manually in the homeassistant container. If you have the ssh add-on running with protection mode disabled (needed to run docker commands):

docker exec -it homeassistant bash
pip install httpx[http2]

Then reload the integration

glynweston commented 2 years ago

That worked thanks Matt.

j6s33m commented 2 years ago

To temporarily fix this, the missing package can be installed manually in the homeassistant container. If you have the ssh add-on running with protection mode disabled (needed to run docker commands):


docker exec -it homeassistant bash

pip install httpx[http2]

Then reload the integration

Yes this fixed it. Thanks!

RicSuzu commented 2 years ago

Thanks for the fix! Everything except for my pool lights is working now.

Logger: homeassistant.components.light Source: components/iaqualink/light.py:88 Integration: Light (documentation, issues) First occurred: 10:17:43 AM (4 occurrences) Last logged: 10:21:43 AM

Error adding entities for domain light with platform iaqualink Error while setting up iaqualink platform for light Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 428, in async_add_entities await asyncio.gather(*tasks) File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 605, in _async_add_entity capabilities=entity.capability_attributes, File "/usr/src/homeassistant/homeassistant/components/light/init.py", line 929, in capability_attributes data[ATTR_EFFECT_LIST] = self.effect_list File "/usr/src/homeassistant/homeassistant/components/iaqualink/light.py", line 88, in effect_list return list(self.dev.supported_light_effects) AttributeError: 'IaquaColorLightJL' object has no attribute 'supported_light_effects'

Ashkaan commented 2 years ago

What do we do if we're running HAOS?

I SSH'd in and installed the missing http2 package, but it's still not working after a reload.

image
jaim-fads commented 2 years ago

I updated to Home Assistant 2022.11.1 today hoping that might contain a fix. No such luck. I deleted the iAqualink integration with hopes a re-installation would bring it back. After entering my user name/password I am getting the "Unknown error occurred". I haven't been able to SSH the http package so I am spinning...

Ashkaan commented 2 years ago

I updated to Home Assistant 2022.11.1 today hoping that might contain a fix. No such luck. I deleted the iAqualink integration with hopes a re-installation would bring it back. After entering my user name/password I am getting the "Unknown error occurred". I haven't been able to SSH the http package so I am spinning...

Yep, same here. I had to restore from backup to get the integration back (albeit still broken).

bdraco commented 2 years ago

The manifest file needs to include the [h2] dep

jaim-fads commented 2 years ago

Having a strange issue when I updated to 22.11.01 and then restored to the backup prior to the update. For some reason, after the update, it cleared my root permissions. All of my config files are inaccessible and when I try to add them back via a backup I saved locally, it tells me I don’t have permissions. My SSH add on should have installed as root but user seems to be [core-ssh]$. (Shouldn’t it be [home assistant ssh]$ when you're in root?)

I tried to re-add the aqualink integration and gives me Unknown Error occurred and prevents me from installing the integration. I believe this is because I don’t have anything in my config file but if i had permissions I could re-add my backup copy!

Please Advise.