MYQ not working again

Issue has been fixed: #37100

It will require a HA update to push the new version, or you can manually change the api.py file to match the new user agent.

2 Likes

Seems as if this has started up yet again. Starting to get really old. Anyone else seeing the same?
Dump from my log:

2020-06-25 17:37:56 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry <EMAIL REMOVED> for myq
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 176, in login
    await api.authenticate(username, password)
  File "/usr/local/lib/python3.7/site-packages/pymyq/api.py", line 123, in authenticate
    login_request=True,
  File "/usr/local/lib/python3.7/site-packages/pymyq/api.py", line 92, in request
    data = await resp.json(content_type=None)
  File "/usr/local/lib/python3.7/site-packages/aiohttp/client_reqrep.py", line 1040, in json
    return loads(stripped.decode(encoding))
  File "/usr/local/lib/python3.7/json/__init__.py", line 348, in loads
    return _default_decoder.decode(s)
  File "/usr/local/lib/python3.7/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/local/lib/python3.7/json/decoder.py", line 353, in raw_decode
    obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Expecting ',' delimiter: line 4 column 65 (char 114)

Mine stopped working again today. I’m in process of switching my garage door control to Konnected relays

2 Likes

So I have some code that I have been using for 2-3 years for allowing Alexa to control MyQ and so far it has not given me issues except for once years ago. It is using a myq v4 api and the api for HA is using v5. Not sure if this is to allow newer/more devices but I am about to try implementing my code from Alexa into my HA. If I can, maybe I’ll can try to look into either making a v4 specific myq component or add it into the existing one and allow users to select which api version to use.

If anyone knows if v5 offers anything additional that HA uses vs v4 then please let me know. Also, my code does not require a user agent which is what seems to be the constant issue with v5.

Can you explain what I need to manually change please.

2 Likes

I posted the same over here: Anyone else having issues with MYQ? - #80 by Dorque

You need to modify a line in the api.py file:

from
DEFAULT_USER_AGENT = "myQ/14041 CFNetwork/1107.1 Darwin/19.0.0"
to
DEFAULT_USER_AGENT = "myQ/19569 CFNetwork/1107.1 Darwin/19.0.0"

2 Likes

I’m not seeing the file in the path provided, strange.

If you are using Docker, these instructions will help you:

If you’re not using Docker, I’m not sure where the file should be. Hoping someone chimes in to help.

1 Like

Thanks for the update. I saw on github that there was another change to make as well to the file “pymyq/version.py.”
Change
version = ‘2.0.4’
to
version = ‘2.0.5’

Made both changes and restarted Home Assistant and all is working now

Rich, could you shed some light as to the full directory structure where the this particular ‘version.py’ file resides?
Thank you

I wouldn’t touch the version file. As this is just a pull request, the final state of version 2.0.5 may contain additional changes. Once the official 2.0.5 version is released, there is a chance your pymyq won’t update because it detects itself as already 2.0.5.

If this is the only change for version 2.0.5, then you will be fine, but I wouldn’t take the chance.

:+1: got it thanks!

Thanks for the explanation. Could be helpful. :heavy_check_mark:

since few days I get the following error when trying to load Myq:

Error setting up entry me@mydomain for myq

Eveything was working well since many years. The Api stop from time to time but soon a fx is posted but this time it’s a different error.

Anybody have this. I’m on Hass.io Home Assistant 0.111.4

it’s an ongoing issue and if you search, you’ll find posts of others having the same issue and how to resolve it. requires updating a specific file or two for MyQ.

Yes the fix was done in HA 0.111.1, I’m on HA 0.111.4. It was working about a week ago.

there have been 2 or 3 additional fixes since then.

OK I’m on Hass.io so not easy to edit files. I’ll wait for and update. Thank you

Back on track with HA 0.112. Thank you

1 Like