Anyone else having issues with MYQ?

Great to see it fixed so quickly, hopefully it will make a release soon. Kudos to all involved.

any way to apply this fix to home assistant OS no the docker version?

You can see the changes here: https://github.com/arraylabs/pymyq/pull/43/commits/6661107c34f823c6092b747cf8a891c06ba3e39a

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"

@Dorque thanks for the reply!

that is what i’m trying to find… where is that file located! im running HAss.os on RPi 4.

If you go into Home Assistant logs, there will be errors related to that file. I’m not sure where it is for you since I use the Docker version of Home Assistant. For Docker, it is in /usr/local/lib/python3.7/site-packages/pymyq/ in the Docker container.

Ditto me. Unfortunately I am a Home Assistant nube and figured I screwed something up. Deleted by config for MyQ. Next time I know.

@dorque my file as per the log is on the same spot as yours… but when i ssh to it can’t see anything on inside /lib/

MyQ changed their API again, fix is in PR already; likely in next HA release…

Does their app not use this api? I am not getting app updates, so are they pushing this information to the app to use? Or do they have it on some sort of schedule. Just seems odd to me.

They can make that kind of change to their app without pushing a full app update. They could also have had it set up in the app before, but that’s less likely.

Understood. I guess my point is, is there anyway we can replicate that and get the same updates that the app is getting.

That’s basically what we’re doing here. If you follow these instructions, make sure to paste in the right agent user string from Dorque here.

Understood, I have already applied the update and it is working fine for me again. I was referring to the possibility of doing this in an automated fashion. For the MyQ app to continue working, they must be sending it and updated user-agent or, like you said, it is on a schedule. More likely I am guessing they are sending it an updated user-agent somehow. If we could learn that mechanism, maybe we can mimic it in the Python library and capture the newest user-agent and use that.

Another option is to include the user agent in the configuration like I mentioned here. This would allow for easily changing the user-agent from the configuration file and it’s pushed down and overrides the default in the Python Api class. This would make it easier for everyone to update the user-agent without the need to modify python code or waiting for a HA update.

1 Like

I haven’t followed the history of MyQ breaking changes except for the last month, but if that pattern exists outside of the last two breaks, it would be an excellent idea.

Is there any reason this user agent value can’t be set in an ENV value? No recompiling needed.

I fixed my Docker install as follows:

  1. On the host, download the patched file:
    wget https://raw.githubusercontent.com/arraylabs/pymyq/6661107c34f823c6092b747cf8a891c06ba3e39a/pymyq/api.py
  2. Map this file into the Docker container (in my case I use a docker run command):
    -v <host-path-to-file>/api.py:/usr/local/lib/python3.7/site-packages/pymyq/api.py

Does anyone know how to apply this change to HA that is installed in VirtualBox? My HA log shows the path to the file as “/usr/local/lib/python3.7/site-packages/pymyq/api.py” but I can’t figure out how to access it.

If you have terminal access to the VM you can download the patched file and replace the existing one.

I’ve never figured out how to do that. Not exactly a Linux expert. Putty gives me a “Connection Refused”. I don’t know if SSH needs to be enabled on the VM? A firewall issue? No clue.

I have tried to get the SSH add-on working but I can’t figure out how to enable the port. The log terminates with “SSH Port is disabled” .

And then of course, the documentation has a note that says:

“This add-on will not enable you to install packages or do anything as root. This is not working with Home Assistant.” … So that’s not very encouraging.

I’m shamelessly canvassing for a feature to allow the user to set the user-agent in a simpler fashion. Please vote, and vote often.

2 Likes