MYQ not working

I have an automation that opens my garage door using MYQ. All of a sudden the cover_open is no longer working. Any else seen this?

No logs, how can we help?

I have same issue, new as of today, I fear they have changed permissions with newest app that was (forced) migrated to last week. Here is my log:
Wed May 01 2019 15:37:10 GMT-0400 (Eastern Daylight Time)
Error while setting up platform myq
Traceback (most recent call last):
File “/usr/local/lib/python3.7/site-packages/homeassistant/helpers/entity_platform.py”, line 126, in _async_setup_platform
SLOW_SETUP_MAX_WAIT, loop=hass.loop)
File “/usr/local/lib/python3.7/asyncio/tasks.py”, line 416, in wait_for
return fut.result()
File “/usr/local/lib/python3.7/site-packages/homeassistant/components/myq/cover.py”, line 43, in async_setup_platform
myq = await login(username, password, brand, websession)
File “/usr/local/lib/python3.7/site-packages/pymyq/api.py”, line 291, in login
await api.authenticate(username, password)
File “/usr/local/lib/python3.7/site-packages/pymyq/api.py”, line 226, in authenticate
await self._get_security_token()
File “/usr/local/lib/python3.7/site-packages/pymyq/api.py”, line 242, in _get_security_token
login_request=True,
File “/usr/local/lib/python3.7/site-packages/pymyq/api.py”, line 151, in _request
return await resp.json(content_type=None)
File “/usr/local/lib/python3.7/site-packages/aiohttp/client_reqrep.py”, line 1036, 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 355, in raw_decode
raise JSONDecodeError(“Expecting value”, s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Multiple threads the last few days on MyQ being down.
Consensus is that they changed the API.
I believe this should be fixed soon as someone has already identified the fix.

1 Like

Any update , just broke today …

Was working great, but all of a sudden it died about 3-4 days ago.

MyQ I believe deactivated the api v4. HA has released 0.100.3 that updates the pymyq to version 2.0.0 that now uses api v5. This fixes the issue.

After updating your HA installation it appears that often users are getting a new “cover” entitiy with their old name “_2”. If you get this, you’ll need to remove the first entity and rename the new one. That should take care of it.

Cheers!
DeadEnd

6 Likes

Thanks! Fixed it!

Anyone getting issues today with it? Came home and the entity was unresponsive, so I did a server reset and its not finding it again.

This was what was in the log right after restart.

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 150, in _async_setup_platform
    await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT)
  File "/usr/local/lib/python3.7/asyncio/tasks.py", line 442, in wait_for
    return fut.result()
  File "/usr/src/homeassistant/homeassistant/components/myq/cover.py", line 53, in async_setup_platform
    myq = await login(username, password, websession)
  File "/usr/local/lib/python3.7/site-packages/pymyq/api.py", line 162, in login
    await api.authenticate(username, password)
  File "/usr/local/lib/python3.7/site-packages/pymyq/api.py", line 117, in authenticate
    login_request=True,
  File "/usr/local/lib/python3.7/site-packages/pymyq/api.py", line 85, 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 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Getting the same. Made it a whole 5 days before Chamberlain broke it again:roll_eyes:

Same thing for me (again)

Error while setting up platform myq
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/helpers/entity_platform.py”, line 150, in _async_setup_platform
await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT)
File “/usr/local/lib/python3.7/asyncio/tasks.py”, line 442, in wait_for
return fut.result()
File “/usr/src/homeassistant/homeassistant/components/myq/cover.py”, line 53, in async_setup_platform
myq = await login(username, password, websession)
File “/usr/local/lib/python3.7/site-packages/pymyq/api.py”, line 162, in login
await api.authenticate(username, password)
File “/usr/local/lib/python3.7/site-packages/pymyq/api.py”, line 117, in authenticate
login_request=True,
File “/usr/local/lib/python3.7/site-packages/pymyq/api.py”, line 85, 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 355, in raw_decode
raise JSONDecodeError(“Expecting value”, s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Known issue: https://github.com/home-assistant/home-assistant/issues/28337

1 Like

Thanks! I appreciate the update!

Root cause was found; sounds like a fix is forthcoming.

I had made some other changes to my config file and thought I broke this somehow. After too much time troubleshooting, it finally occurred to me that I should check the forum. I wish I would have done that sooner… :roll_eyes:

1 Like

FYI, we just merged an official fix into Home Assistant. :+1:

2 Likes

ETA on this getting pushed out to hassio?

I assume this will go out in 0.101.0, so it should be soon. In the meantime, however, there are ways to patch the solution in place; here’s a thread: https://github.com/arraylabs/pymyq/issues/27

It doesn’t call out Hass.io specifically, but the procedure should be the same. Make sure you have the SSH add-on installed and SSH into your instance. Then:

$ docker exec -it homeassistant /bin/bash
bash-5.0# cd /usr/local/lib/python3.7/site-packages/pymyq
bash-5.0# wget -O api.py https://raw.githubusercontent.com/brbeaird/pymyq/dff9fcdd87be2ca4d1507e713d0fc363538f5ec9/pymyq/api.py
bash-5.0# exit
$ docker restart homeassistant
1 Like

The fix is a bump to pymyq 2.0.1 which is NOT in 0.101b4 as of now. So you can do the above. Or if you can get into your python installation you can edit myq/manifest.json like below and restart. HA will bump pymyq to 2.0.1 automagically

{
  "domain": "myq",
  "name": "Myq",
  "documentation": "https://www.home-assistant.io/integrations/myq",
  "requirements": [
    "pymyq==2.0.1"
  ],
  "dependencies": [],
  "codeowners": []
}