Hello community - I’m a myQ user. I specifically bought the device because it was supported by Home Assistant. I even bought two to get a second door sensor.
It appears that the company is deliberately trying to lock pymyq users out of controlling the equipment they purchased.
Here is the bad news: the long term “fix” appears to be… migrate away from this hardware.
The short term super hacky fix is to evade the hard coded user agent block by changing the user-agent header in the pymyq library. To manually do this on the latest HA (I’m running hass):
docker exec -it homeassistant vi /usr/local/lib/python3.7/site-packages/pymyq/api.py
Find the line that starts with DEFAULT_USER_AGENT, and edit the value, to… anything. For the time being.
To exit vim, type :wq. Restart home assistant and your cover will work again. Until they block us another way.
I am in the middle of setting up an Sonoff SV to open/close using the inbuilt wired button terminals and will add an RF of Xiaomi door sensor to detect open/close.
I only got the motor installed 3 weeks ago, and paid the extra for the MyQ which I am now regretting as it’s now broken for the 3rd time. I should have saved my money and DIYed it to start.
Thanks for this - what’s the proper path for Hassio running on Docker with Ubuntu? I don’t have a pymyq directory at the path you listed.
Also, tried using the Ubuntu ‘locate’ command and couldn’t find a pymyq directory. I did have the MyQ integration set up under a prior version of Hassio but not sure why this directory doesn’t exist. Maybe I’m using ‘locate’ incorrectly; I’m not a highly proficient Linux user.
Hey! This is the command I ran on the host (ubuntu) shell, which will open the docker container running home assistant and edit the library file.
The bottom line is the pymyq/api.py file needs an edit to DEFAULT_USER_AGENT. If you are in the container directly, you can run the command starting with vi (omit the docker prefix). I was not able to get to this file in the SSH add-on though, and had to connect to the Ubuntu host directly.
Hmm. Yeah I tried that command but it didn’t work for me for some reason. Thanks - maybe this will get ‘officially’ fixed in the next version of Home Assistant.
Thanks for this. Changing fixed it. I guess I could map that file out of my docker container if that is the fix each time, but I think it is time to move away from MyQ.