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

Ambient PWS doesn't load in 0.103.0 #29849

Closed
bachya opened this issue Dec 11, 2019 · 6 comments · Fixed by #29850
Closed

Ambient PWS doesn't load in 0.103.0 #29849

bachya opened this issue Dec 11, 2019 · 6 comments · Fixed by #29850

Comments

@bachya
Copy link
Contributor

bachya commented Dec 11, 2019

Home Assistant release with the issue:

0.103.0

Last working Home Assistant release (if known):
0.102.3

Operating environment (Hass.io/Docker/Windows/etc.):

Docker

Integration:

ambient_station

Description of problem:

Loading this integration in 0.103.0 shows the below stacktrace.

Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):

ambient_station:
  api_key: !secret pws_api_key
  app_key: !secret pws_app_key

Traceback (if applicable):

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/ambient_station/__init__.py", line 439, in ws_connect
    await self._attempt_connect()
  File "/usr/src/homeassistant/homeassistant/components/ambient_station/__init__.py", line 350, in _attempt_connect
    await self.client.websocket.connect()
  File "/usr/local/lib/python3.7/site-packages/aioambient/websocket.py", line 76, in connect
    transports=["websocket"],
  File "/usr/local/lib/python3.7/site-packages/socketio/asyncio_client.py", line 108, in connect
    engineio_path=socketio_path)
  File "/usr/local/lib/python3.7/site-packages/engineio/asyncio_client.py", line 76, in connect
    url, headers, engineio_path)
  File "/usr/local/lib/python3.7/site-packages/engineio/asyncio_client.py", line 251, in _connect_websocket
    ws = await self.http.ws_connect(
AttributeError: 'NoneType' object has no attribute 'ws_connect'

Additional information:

This is (a) an issue in python-engineio and (b) my failure to pin a specific version (i.e., it upgraded without me intending to). The quickest route would be to pin the previous version; will work on a PR for that.

Relevant aioambient bug: bachya/aioambient#21

@garyak
Copy link

garyak commented Dec 11, 2019

@bachya I see you're on it already. Is pinning the previous version something a novice could do?

@bachya
Copy link
Contributor Author

bachya commented Dec 11, 2019

@garyak I forget if you're on hass.io or not, but if you can access a command line and run pip list successfully (i.e., it shows the Python packages installed by HASS), then you can do the following:

$ pip uninstall python-engineio
$ pip uninstall python-socketio
$ pip install --upgrade aioambient

I did this in my instance (which is the HASS Docker image), rebooted HASS, and the integration started working again.

@garyak
Copy link

garyak commented Dec 11, 2019

Yes, hass.io in Docker-CE on Ubuntu. Execute these commands in the HA container?

@bachya
Copy link
Contributor Author

bachya commented Dec 11, 2019

Roger that. Run pip list first and verify that you see an entry for aioambient; if you do, you're good to execute those commands.

@garyak
Copy link

garyak commented Dec 11, 2019

All good now. Thanks! Fixed in next release of HA?

@bachya
Copy link
Contributor Author

bachya commented Dec 11, 2019

Great!

🤞 I've tagged it for 0.103.1: #29850

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants