MyQ API Problem?

Posted on
Sat Jan 09, 2021 8:59 pm
HEGarrard offline
Posts: 40
Joined: Sep 09, 2014

Re: MyQ API Problem?

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

Posted on
Sat Jan 09, 2021 9:05 pm
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: MyQ API Problem?

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.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Sat Jan 09, 2021 9:37 pm
HEGarrard offline
Posts: 40
Joined: Sep 09, 2014

Re: MyQ API Problem?

Thank you for the quick reply ... and your hard work on this!

Harold

Posted on
Sun Jan 10, 2021 11:59 am
colovin offline
Posts: 173
Joined: Oct 27, 2009

Re: MyQ API Problem?

Changing line 15 has worked for me. Thanks for the work around!

Indigo 7.1.1, OS 10.14.6, MacMini .3.2 GHz 6 Intel Core i7, 64 GB ram

Posted on
Wed Jan 27, 2021 4:12 pm
Jann offline
Posts: 120
Joined: Mar 12, 2006
Location: Auburndale, FL

Re: MyQ API Problem?

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:

Who is online

Users browsing this forum: No registered users and 1 guest

cron