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

myq now requires a user agent #39

Merged
merged 1 commit into from
Jun 5, 2020

Conversation

bdraco
Copy link
Contributor

@bdraco bdraco commented Jun 5, 2020

Fixes #38

@dseven
Copy link
Contributor

dseven commented Jun 5, 2020

Confirm this fixes today's issue for me - thanks!

@ehendrix23 ehendrix23 merged commit db78820 into arraylabs:master Jun 5, 2020
@NickNothom
Copy link

I updated via pip and I'm still having the same issue as before. Any ideas?
Rebooted everything, and I confirmed that the update worked.

Unexpected exception
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/myq/config_flow.py", line 50, in async_step_user
    info = await validate_input(self.hass, user_input)
  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
    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

@bdraco
Copy link
Contributor Author

bdraco commented Jun 5, 2020

There hasn’t been a new release yet so the change has to be patched in manually at this time

@funkyche
Copy link

funkyche commented Jun 5, 2020

There hasn’t been a new release yet so the change has to be patched in manually at this time

I apologize for the stupidity of this, but I am new to Hassio. What's the best way to manually patch this? Thanks in advance.

@funkyche
Copy link

funkyche commented Jun 5, 2020

There hasn’t been a new release yet so the change has to be patched in manually at this time

I apologize for the stupidity of this, but I am new to Hassio. What's the best way to manually patch this? Thanks in advance.

I should also mention I am running this from a pi.

@ehendrix23
Copy link
Collaborator

Just pushed new version (2.0.3) to pypi. Will someone be able to update Home Assistant for new version?

@bdraco
Copy link
Contributor Author

bdraco commented Jun 5, 2020

Thanks @ehendrix23 PR is here home-assistant/core#36469

@GaryOkie
Copy link

GaryOkie commented Jun 5, 2020

Just confirming that this fix is working perfectly. Thanks so much @bdraco !

@NickNothom - I also found that after installing the update via pip install pymyq==2.0.3 and restarting HA, that it didn't work. This is because HA's myq current requirements forces it to use the 2.0.2 version, so the update gets replaced during the restart.

If you can't wait for the next HA release, then probably the easiest means to obtain the fix is to navigate to /usr/src/homeassistant/homeassistant/components/myq and edit the manifest.json file to change the version requirements from 2.0.2 to 2.0.3, then restart. That will pull the updated pymyq code automatically.

(Home Assistant users will need to ssh, then run docker exec -t -i homeassistant /bin/bash in order to access the normally inaccessible HA python code).

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

Successfully merging this pull request may close these issues.

API Changed Again?
6 participants