Page 1 of 2

MyQ API Problem?

PostPosted: Wed Jan 06, 2021 6:00 am
by DaveL17
Not sure if this is a MyQ API issue or a bug to be honest. Happy to raise an issue on GH if it's the latter. Had roughly 20 of these errors yesterday.

Code: Select all
Jan 6, 2021 at 5:42:21 AM
   MyQ Error                       Error in plugin execution runConcurrentThread:

Traceback (most recent call last):
  File "plugin.py", line 86, in runConcurrentThread
  File "plugin.py", line 421, in getDevices
KeyError: 'items'

   MyQ Error                       plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)

Re: MyQ API Problem?

PostPosted: Wed Jan 06, 2021 7:34 am
by FlyingDiver
I see some of those in my log as well, but the API is still working. I think that occasionally the update request fails or the server sends bad data. The plugin should handle this better. Please put this in GitHub so I don't forget.

Re: MyQ API Problem?

PostPosted: Wed Jan 06, 2021 8:06 am
by DaveL17
FlyingDiver wrote:
Please put this in GitHub so I don't forget.

Thank you sir.

Done.

Re: MyQ API Problem?

PostPosted: Fri Jan 08, 2021 10:27 am
by roquej
Getting the following error:

MyQ Warning getDevices failure, status_code = 40

Ignore or serious?

JP

Error after installing new plug-in

PostPosted: Fri Jan 08, 2021 10:54 am
by HEGarrard
MyQ Error MYQ GARAGE DOOR OPENER: changeDevice failure, code: 400, response: {"code":"400.301","message":"Bad Request","description":"The serial number was invalid. Please try again."}

When I go into device settings ... the window "Configure MyQ Door Opener" I do not have any option to select "MyQ Opener Device"

If I do a "Status Request" on the device - it shows successful login. However, I also get the following in the event log:
MyQ Warning getDevices failure, status_code = 400

Any thoughts?

Thank you!

Harold

Re: Error after installing new plug-in

PostPosted: Fri Jan 08, 2021 11:14 am
by HEGarrard
I should have added -
I am unable to operate the garage door from Indigo (7.5.0)
I can open and close the door using the MyQ app on my phone.

Re: MyQ API Problem?

PostPosted: Fri Jan 08, 2021 11:18 am
by FlyingDiver
Are you sure that's a '40'? Should be a '400'.

I think that's an intermittent server error. The logins are working, but the replies from the server are bad. Not sure yet if that's a problem on their end or they deliberately broke something.

Re: Error after installing new plug-in

PostPosted: Fri Jan 08, 2021 11:22 am
by FlyingDiver
HEGarrard wrote:
MyQ Error MYQ GARAGE DOOR OPENER: changeDevice failure, code: 400, response: {"code":"400.301","message":"Bad Request","description":"The serial number was invalid. Please try again."}

When I go into device settings ... the window "Configure MyQ Door Opener" I do not have any option to select "MyQ Opener Device"


If you already have MyQ devices defined, that list will be empty. So that's normal.

Re: MyQ API Problem?

PostPosted: Fri Jan 08, 2021 11:23 am
by FlyingDiver
Everyone - I'm getting status 400 on my system too. No need to report that. And I don't yet know if this is a server failure on this end or another example of broken API.

Re: MyQ API Problem?

PostPosted: Fri Jan 08, 2021 11:47 am
by roquej
FlyingDiver wrote:
Are you sure that's a '40'? Should be a '400'.

I think that's an intermittent server error. The logins are working, but the replies from the server are bad. Not sure yet if that's a problem on their end or they deliberately broke something.


Yes, is 400 sorry. Was multitasking on a conference call when I copy and pasted.

JP

Re: MyQ API Problem?

PostPosted: Fri Jan 08, 2021 12:41 pm
by FlyingDiver
FlyingDiver wrote:
Everyone - I'm getting status 400 on my system too. No need to report that. And I don't yet know if this is a server failure on this end or another example of broken API.


The Home Assistant implementation is also having the same issue. So it's not just the Indigo plugin.

Re: MyQ API Problem?

PostPosted: Fri Jan 08, 2021 1:02 pm
by FlyingDiver
Possible fix, for anyone that wants to edit the plugin files. Change line 15 of plugin.py from:

Code: Select all
DEFAULT_USER_AGENT = "myq-indigo"

to
Code: Select all
DEFAULT_USER_AGENT = "pymyq"


That change was made back in Dec when it looked like MyQ was blocking the pymyq user-agent. Now it appears they're allowing it and blocking anything else. :evil:

Re: MyQ API Problem?

PostPosted: Fri Jan 08, 2021 1:13 pm
by DaveL17
Thanks as alway Joe. Trying now. I changed the line (line 14 in my case) and restarted. I received a warning:
Code: Select all
 MyQ Warning                     getDevices failure, status_code = 500
Restarted again and no warning. Will see how it goes.

Much appreciated.

EDIT: wound up getting the 500 error 10 minutes later.

Re: MyQ API Problem?

PostPosted: Fri Jan 08, 2021 10:57 pm
by MKuchnic
I went ahead and changed it and it worked for me.
Thanks for the workaround

Follow up
I'm nowise getting the 500 error as well. Mine waiting bit a half hour before starting.

Re: MyQ API Problem?

PostPosted: Sat Jan 09, 2021 6:01 am
by DaveL17
Seems to have settled down for me as well.

Thanks Joe.