MyQ garage opener hub integration not working

work lunch break.

I don’t have this hardware

The issue with MyQ is it’s a closed API and subject to change at any time. Until Chamberlin/Merlin release a public API, this will continue to happen whenever they feel like updating things on their end.

It’s the reason I ditched my brand new MyQ after 2 weeks for a $10 Sonoff SV and a $5 magnetic reed sensor, the latter setup hasn’t failed once.

2 Likes

But more importantly the solution has always (AFAIK) has been to replace the user agent. Off the top of my head I can think of a few ways this could be done. Both would rely on a HA community maintained repo of verified list of working user-agents, such as a text file located at https://github.com/HA/M/blob/main/agents

  1. A user could grab the latest verified working agent in that file and then open the MyQ integration UI and set the agent there
  2. Specify the agent in `configuration.yaml’
  3. If the authorization fails, the integration could try try again using this list or trying to generate its own algorithm based user agent. If a new agent works, it would use that in the future. Of course this won’t work if the credentials are wrong, but this is probably not the case.

My point is we should be able to specify the user agent instead of waiting for a dev to hard code it and publishing it. Waiting is part of life, yeah. But some people need access to their garage door sooner rather than next week.

ETA: Another component would be to have some public service that reports on the API status. If it goes down, subscribers would get a notification. They could then publish a working user agent to the repo. And if #3 above were implemented, then the issue would automatically be fixed for most MyQ users without them doing a thing, much less knowing the API stopped working for them, however briefly.

1 Like

I remember doing that 2 or 3 times in the fortnight I used mine, hence ditching it.

I agree that would make fixing the breaking changes easier. There may be a reason this isn’t done already though. Perhaps you could create a PR for the component to start this process.

Spend $15 on a Sonoff SV + magnetic reed sensor, you’ll never need to wait again. :wink:

1 Like

Please do a search for MyQ in the forums. Numerous results from long ago with one recent post about 20-30 spots down. Had the results been in chronological order from the latest, I would not of posted my question. It wasn’t malicious in its intent, but it has clearly offended you. I have learned that you learn from your mistakes and you also find out who you should avoid because they are above helping new users.

Have a happy holiday.

Spend $15 on a Sonoff SV + magnetic reed sensor, you’ll never need to wait again. :wink:

Since I do (begrudgingly and infrequently) use the MyQ app (connected on a separate VLAN on my home network) I really don’t need the HA integration for opening and closing my garage door. My automation is around sensing the door is open or closed. That’s why I also highly recommend a separate sensor for your garage door.

I have Z-Wave, so in my case I came across a DSB29 Door/Window Sensor (2nd Edition)
by AEON Labs. It’s a simple magnetic sensor. Attaching it to the door and integrating with OZW (beta) was simple and it has worked continuously since spending the 15 minutes or so installing.

Here’s an image showing how I mounted it:

1 Like

Thanks, that worked perfectly.

Hey mate, look, I do help out a lot of people on this forum and do so happily. It’s not that I don’t want to help.

For future reference therre is a drop down box that lets you select ’ latest post’, giving you the search results in chron order.

As you will see, 4 recent threads about this issue.

Enjoy the holiday break :slight_smile:

2 Likes

I also don’t use the actual open/close door functionality normally, far more important for me is to quickly know that a door is open as that triggers my parking laser, and turns the lights on. For some reason I used a reed switch to another RPi, but just doing the ZWave or Zigbee door/window sensor would have been easier.

I’ve found the latency of that Z-Wave sensor through OZW HA integration to be more than adequate, BTW. Any other sensor and radio (ZigBee etc) should be equal.

I use the sensor to turn the main garage lights on to help when family members unload the car, etc. We use the LiftMaster garage door opener from the car, or a keypad outside, mainly. That MyQ app – which you should disable location services from after setup – is only used in a pinch.

A simple sensor integrated with HA helps my family. This pretty much gets to the core of why I invest in HA and why this HA community project is awesome! :slight_smile:

EDIT: I meant to reply to wellsi’s input.

Looks like MyQ integration is down again. Below is the error. Tried to remove and re-add the integration and still the same error. Anyone else have similar issues?

Logger: homeassistant.components.myq.config_flow
Source: components/myq/config_flow.py:30
Integration: MyQ ([documentation](https://www.home-assistant.io/integrations/myq), [issues](https://github.com/home-assistant/home-assistant/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+myq%22))
First occurred: 7:08:47 PM (1 occurrences)
Last logged: 7:08:47 PM

Unexpected exception

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/myq/config_flow.py", line 50, in async_step_user info = await validate_input(self.hass, user_input) File "/usr/src/homeassistant/homeassistant/components/myq/config_flow.py", line 30, in validate_input await pymyq.login(data[CONF_USERNAME], data[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

How about using the search function and checking the other 3-4 threads discussing this issues.

Search first, start a thread second.

Take a read of this also.

1 Like

Just. wow. :man_facepalming:

Merged the various duplicate threads I could find - please remember to use the search function folks :wink:

2 Likes

@jaaem, Thank you for the clear instructions. Worked perfectly.

I am new to Home Assistant & I am trying to get the MYQ integration running. Unfortunately, I have not been able to figure out how to update the myq integration with the fix outlined several posts above. I actually can’t event install it, since the login fails when I try to install it. I’ve tried various searchs – no success. Any help would be deeply appreciated, thank you.

Marc

:warning: I no longer use the MyQ integration, so this is my best recollection of how to do it, hopefully it helps.

You’ll need to download all of the files from Github for the MyQ component.

Edit the files needed to match as described here. Using a program like Notepad++ is good for this sort of thing.

Place all of these files in a folder named myq on your desktop.

Place that folder in the custom_components folder of your HA config directory, create that folder if you don’t already have it. You can connect to your HA machine via SSH using a program like WinSCP to drag and drop folders. You’ll of course need to have SSH installed/configured first.

Reboot HA and then you should be able to add the MyQ integration.

@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?