MyQ API Problem?

HEGarrard
Posts: 40
Joined: Tue Sep 09, 2014 1:30 pm

Re: MyQ API Problem?

Post 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
User avatar
FlyingDiver
Posts: 7823
Joined: Sat Jun 07, 2014 10:36 am
Location: Southwest Florida, USA

Re: MyQ API Problem?

Post 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.
joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
HEGarrard
Posts: 40
Joined: Tue Sep 09, 2014 1:30 pm

Re: MyQ API Problem?

Post by HEGarrard »

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

Harold
colovin
Posts: 175
Joined: Tue Oct 27, 2009 11:55 pm

Re: MyQ API Problem?

Post by colovin »

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
Jann
Posts: 120
Joined: Sun Mar 12, 2006 10:20 am
Location: Auburndale, FL
Contact:

Re: MyQ API Problem?

Post 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:
Locked

Return to “MyQ”