MyQ garage opener hub integration not working

@kanga_who, thank you so much for those directions – that did the trick for me and it’s working now!

I am migrating from Smartthhings – got tired of the service disruptions & laggy response times due to all the cloud dependencies. My sense of things so far is that HA is a much more flexible system.

Once again, thank you!

Marc

1 Like

Did work for 2 days…
Logger: homeassistant.config_entries
Source: components/myq/init.py:36
First occurred: 12:25:33 PM (1 occurrences)
Last logged: 12:25:33 PM

Error setting up entry [email protected] for myq
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/config_entries.py”, line 236, in async_setup
result = await component.async_setup_entry(hass, self) # type: ignore
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.8/site-packages/pymyq/api.py”, line 259, in login
await api.authenticate(username, password, False)
File “/usr/local/lib/python3.8/site-packages/pymyq/api.py”, line 170, in authenticate
auth_resp = await self.request(
File “/usr/local/lib/python3.8/site-packages/pymyq/api.py”, line 151, in request
return await self._send_request(
File “/usr/local/lib/python3.8/site-packages/pymyq/api.py”, line 114, in _send_request
message = f"Error requesting data from {url}: {data.get(‘description’, str(err))}"
UnboundLocalError: local variable ‘err’ referenced before assignment

Did you change it to something static or are you using the latest GitHub release where the user agent is random every time?

Seems like something got reversed. I did the api(?) change command line and charge the user agent (?) to pymyq and it came online. I’m not a programmer so it’s hard to explain it all. But it works again now.

Logger: pymyq.api
I see that the fix is in the works but chew on this while you wait…

I have the correct credentials but the login appears to time out.
Interesting side note - you can only use the Android/iOS App to access your account now. No logging in via web interface. Thinking that the HA access issue is related.

Source: /usr/local/lib/python3.8/site-packages/pymyq/api.py:77
First occurred: 5:06:35 PM (6 occurrences)
Last logged: 5:57:17 PM

  • Device update failed; trying again in 2 seconds
  • Device update failed; trying again in 4 seconds
  • Device update failed; trying again in 5 seconds

@kanga_who
How did you get the Sonoff to work? I had a Shelly one working at my old house. New house has a MyQ but when I tried to connect the Shelly the same way, it didnt open the garage. I looked at the wall mounted switch that comes with the opener. It has some chip in it that I assumed is sending a unique code everytime, so its not just as simple as shorting the two wires together.

So just wondering how you got yours to work.

I wired the Sonoff into the switch pins of the motor itself, so the Sonoff is just acting like a wall button press, if that makes sense.

@kanga_who

Yes it does, thats what I did with the Shelly1. On non MyQ opener, it worked. On myQ opener, it didnt work. I may have to revisit.

Thanks for posting this - worked perfectly!

For others:
To edit, press the INS key
After you make the change, press :x and hit enter. This will exit and save the file in vi.

Can anyone tell me how to access that pymyq/api.py file? I see the location in my logs: /usr/local/lib/python3.8/site-packages/pymyq/api.py

When I ssh on port 22, I do not see that directory structor. I have tried ssh on port 22222 and tried the docker exec -it homeassistant /bin/bash, but seems like docker only allows info and registries for me:

Usage:
  ha docker [command]

Aliases:
  docker, do

Examples:

  ha docker info
  ha docker registries

Available Commands:
  info        Shows information about the host docker backend
  registries  Manage private OCI docker registry

Any ideas? Am I missing something? Some system info for my setup:

docker: 19.03.13
features:
- reboot
- shutdown
- services
- network
- hostname
- hassos
hassos: "5.8"
homeassistant: 2020.12.1
machine: raspberrypi4
operating_system: Home Assistant OS 5.8
supervisor: 2020.12.7

Thanks!

I am running HA on Proxmox on a Nuc. Any ideas on how to get it to work?

how do you install the fix?

I made this work. I installed SSH & Web Terminal Add-on and disabled protection mode and followed the steps here -

https://github.com/home-assistant/core/issues/44303

2 Likes

every 6 months or so the integration breaks. This is MyQ’s fault, because they don’t have an API. Instead, it has to emulate the MyQ app so they think you are using the app when really you are using Home Assistant. Because of this, every time MyQ makes changes to their app, the Home Assistant integration for MyQ stops working.

1 Like

Given that myQ breaks on a regular basis, I would agree that there needs to be a static thread to track this as an ongoing issue. That said, I think we can streamline this a bit more.

First and foremost, the static thread should have a header with a tracker identifying versions in which myQ functionality stops and when it is restored. This makes it much easier to see at a glance if myQ is broken in the version you are running or not.

The second piece would be to implement logic into the myQ component to detect if the connectivity is down or not. If the connection is in fact hard down, there could then be a notification generated within HA stating so and providing a direct link to the myQ status tracker. This would allow users to confirm immediately if the component is down and if there is anything they can do about it.

All in all, I think this would save on redundant support tickets being raised for an issue we all know is super common.

Ok, I dont have a pymyq directory under site-packages… Any ideas?

Hi,

This works for me, thanks!

Just goes to show the validity of searching for an answer before just posting!

Cheers,

Ambidexter

Thanks, might help if i read the entire things

This also worked for me as well. Thanks!

specifically this.

For the MyQ case I solved this by purchasing a Security+ 2.0 MyQ push button. Then I soldered wires to the button leads – not the wires leading to the MyQ opener. That way the relay closing is simulating pushing the Security+ 2.0 button which then triggers the MyQ opener.
You wire up the push button the same and associate with MyQ opener (yellow button on the opener if I remember). You can even just put the button right near the opener if you don’t need another button in your garage. Then use whatever (e.g. Sonoff) to trigger the relay.
If you search for “liftmaster myq door push button” you’ll find one for about $11 USD.