Core: MyQ Broken yet again

Created on 5 Jun 2020  路  15Comments  路  Source: home-assistant/core

The problem


MyQ shows unavailable again, cannot setup integration

Environment

  • Home Assistant Core release with the issue: 0.110.4
  • Last working Home Assistant Core release (if known): 0.110.4
  • Operating environment (Home Assistant/Supervised/Docker/venv): HA
  • Integration causing this issue: MyQ
  • Link to integration documentation on our website:

Problem-relevant configuration.yaml

Config FLow

Traceback/Error logs

2020-06-04 20:56:39 WARNING (MainThread) [pymyq.api] Device update failed; trying again in 1 seconds
2020-06-04 20:56:40 WARNING (MainThread) [pymyq.api] Device update failed; trying again in 5 seconds
2020-06-04 20:56:45 ERROR (MainThread) [homeassistant.components.myq.config_flow] Unexpected exception
  File "/usr/src/homeassistant/homeassistant/components/myq/config_flow.py", line 50, in async_step_user
  File "/usr/src/homeassistant/homeassistant/components/myq/config_flow.py", line 30, in validate_input
    await pymyq.login(data[CONF_USERNAME], data[CONF_PASSWORD], websession)
  File "/usr/local/lib/python3.7/site-packages/pymyq/api.py", line 170, in login
  File "/usr/local/lib/python3.7/site-packages/pymyq/api.py", line 119, in authenticate
config $

Additional information

myq

Most helpful comment

Already fixed here

https://github.com/arraylabs/pymyq/pull/39

As soon as it merged and is released I鈥檒l update the home assistant integration and send a PR

All 15 comments

One of these days I'll learn my lesson and quit updating. That day apparently was not today :(

Its not HA its a MyQ problem.

I thought I was crazy.. Glad to see (well, not glad) I am not the only one.

Same,
Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 217, in async_setup hass, self File "/usr/src/homeassistant/homeassistant/components/myq/__init__.py", line 36, in async_setup_entry myq = await pymyq.login(conf[CONF_USERNAME], conf[CONF_PASSWORD], websession) File "/usr/local/lib/python3.7/site-packages/pymyq/api.py", line 170, in login await api.authenticate(username, password) File "/usr/local/lib/python3.7/site-packages/pymyq/api.py", line 119, in authenticate self._security_token = auth_resp["SecurityToken"] TypeError: 'NoneType' object is not subscriptable

myq documentation
myq source
(message by IssueLinks)

Same error:

File "/usr/src/homeassistant/homeassistant/config_entries.py", line 217, in async_setup
hass, self
File "/usr/src/homeassistant/homeassistant/components/myq/__init__.py", line 36, in async_setup_entry
myq = await pymyq.login(conf[CONF_USERNAME], conf[CONF_PASSWORD], websession)
File "/usr/local/lib/python3.7/site-packages/pymyq/api.py", line 170, in login
await api.authenticate(username, password)
File "/usr/local/lib/python3.7/site-packages/pymyq/api.py", line 119, in authenticate
self._security_token = auth_resp["SecurityToken"]
TypeError: 'NoneType' object is not subscriptable

Hey there @bdraco, mind taking a look at this issue as its been labeled with a integration (myq) you are listed as a codeowner for? Thanks!
(message by CodeOwnersMention)

Already fixed here

https://github.com/arraylabs/pymyq/pull/39

As soon as it merged and is released I鈥檒l update the home assistant integration and send a PR

Wonderful thank you for the swift response

manually patched the files, and my doors work again. Thank you!

manually patched the files, and my doors work again. Thank you!

I am new to hassio, and I am running from a pi. I am not sure how to manually patch. Is that possible on a pi?

manually patched the files, and my doors work again. Thank you!

I am new to hassio, and I am running from a pi. I am not sure how to manually patch. Is that possible on a pi?

On my python venv install, I opened /srv/homeassistant/lib/python3.8/site-packages/pymyq/api.py in nano and made the changes described here https://github.com/arraylabs/pymyq/pull/39/files (just the two lines to api.py) and then restarted my hass service.

pymyq has been updated so you can modify myq/manifest.json and change the version to 2.0.3 + restart

thank you for the very fast response @bdraco.

Another way to apply the patch manually when on HassOS/Hass.io/supervised with SSH access:

docker exec -w /usr/local/lib/python3.7/site-packages/pymyq homeassistant bash -c "curl -S -s https://patch-diff.githubusercontent.com/raw/arraylabs/pymyq/pull/39.diff | patch -p2"

This patch will persist inside the Home Assistant core container until Home Assistant is updated to a new/different version.

Was this page helpful?
0 / 5 - 0 ratings