Page 2 of 2

Re: MyQ API Problem?

PostPosted: Sat Jan 09, 2021 8:59 pm
by HEGarrard
I edited the plugin files. Change line 15 of plugin.py from:

DEFAULT_USER_AGENT = "myq-indigo"
to
DEFAULT_USER_AGENT = "pymyq"

If I do a "Status Request" on the device - it shows successful login and I no longer get the error:

Code: Select all
MyQ Warning getDevices failure, status_code = 400


However, if I try and open the door from Indigo, I get the following error ...
Code: Select all
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."}


I am not sure how the plug-in works ... but I did notice that there are two serial numbers listed.

Code: Select all
MyQ Debug                       getDevices: 2 Devices
MyQ Debug                       getDevices: device_family = garagedoor, name = Garage Door, serial_number = CG0860A2****
MyQ Debug                       Checking Opener Device: MYQ GARAGE DOOR OPENER () against CG0860A2****
MyQ Debug                       getDevices: device_family = gateway, name = Garage Door, serial_number = GW0E0018**** 

I replaced the last four digits in each serial numbers - not sure if I am showing secure numbers?!?!?
So Lines 2 and 4 use the same serial number. However, Line 4 is a different serial number.

Line 4, starting at 0E0018**** is my serial number of the opener.

Hope my explanation makes sense! Is this normal??

Harold

Re: MyQ API Problem?

PostPosted: Sat Jan 09, 2021 9:05 pm
by FlyingDiver
It's broken. Not your setup, but the API. What I posted was a "possible" fix. It works sometimes.

MyQ is in the process of switching from their V5 API to V6. It's hit or miss which server you get, and since this is an unofficial API, we have no way to redirect to a V5 server. If you get one, great. If not, it doesn't work. Smarter people than me are working on reverse-engineering the V6 API, and when they post their results I'll update the plugin.

Re: MyQ API Problem?

PostPosted: Sat Jan 09, 2021 9:37 pm
by HEGarrard
Thank you for the quick reply ... and your hard work on this!

Harold

Re: MyQ API Problem?

PostPosted: Sun Jan 10, 2021 11:59 am
by colovin
Changing line 15 has worked for me. Thanks for the work around!

Re: MyQ API Problem?

PostPosted: Wed Jan 27, 2021 4:12 pm
by Jann
This worked for me! Thanks so much!
PS: For some reason it was on line 14... but okay.

FlyingDiver wrote:
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: