MyQ Plugin - BETA

Posted on
Fri Nov 04, 2016 9:41 am
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: MyQ Plugin - BETA

v0.0.11 is up now. Might be better. Hard for me to tell since I can't ever get that error myself.

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

Posted on
Fri Nov 04, 2016 11:03 am
estopka offline
Posts: 19
Joined: Sep 02, 2015

Re: MyQ Plugin - BETA

Updated to 0.0.11, and still no joy. Any way I could get the code and tinker with it?

Posted on
Fri Nov 04, 2016 11:12 am
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: MyQ Plugin - BETA

estopka wrote:
Updated to 0.0.11, and still no joy. Any way I could get the code and tinker with it?


It's in the plugin. All Indigo plugins are written in Python. Just show contents on the plugin wrapper.

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

Posted on
Fri Nov 04, 2016 4:20 pm
bkmar1192 offline
Posts: 274
Joined: Sep 12, 2015

Re: MyQ Plugin - BETA

I've created a MyQ plugin as well - it is was my first plugin so wanted to do some clean up before uploading. If you want I'll send you what I have just an FYI... I am about ready to step in a plan right now but will follow up early next week.


Sent from my iPhone using Tapatalk

Posted on
Fri Nov 04, 2016 4:54 pm
estopka offline
Posts: 19
Joined: Sep 02, 2015

Re: MyQ Plugin - BETA

Pls do greatly appreciated!

Posted on
Sun Nov 06, 2016 11:23 am
akindigo offline
Posts: 10
Joined: Nov 06, 2016

Re: MyQ Plugin - BETA

I think the problem has to do with the URL encoding of the appID. Notice the "%2f" very near the end of the Liftmaster and Chamberlain appIDs; passing that through the requests.get() module, that part of the appID gets transformed to "%252fi" (where "%25" is the URL encoding of the character "%").

Posted on
Sun Nov 06, 2016 11:35 am
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: MyQ Plugin - BETA

akindigo wrote:
I think the problem has to do with the URL encoding of the appID. Notice the "%2f" very near the end of the Liftmaster and Chamberlain appIDs; passing that through the requests.get() module, that part of the appID gets transformed to "%252fi" (where "%25" is the URL encoding of the character "%").


Yup. I think that's it. v0.0.12 has the fix.

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

Posted on
Sun Nov 06, 2016 12:23 pm
estopka offline
Posts: 19
Joined: Sep 02, 2015

Re: MyQ Plugin - BETA

Thank you for posting 0.0.12, but, Ughhh, still not getting any response on the initial login, which I believe is supposed to be retrieving my device information.

When I run the "URL..." command line in a browser, I get a return with the security token.

I then post this security token in another "URL..get" command line and get all relevant information on my system, so I am able to replicate what I think the plugin is trying to do, at least from an API call perspective.

When I blow the plugin out of Indigo, and reload, the first time I launch it, I get the following error messages
Code: Select all
Traceback (most recent call last):
  File "plugin.py", line 109, in runConcurrentThread
  File "plugin.py", line 308, in getDevices
  File "plugin.py", line 276, in myqLogin
AttributeError: 'Plugin' object has no attribute 'appID'


Notice the last line about no attribute 'appID', have been trying to troubleshoot, but everything I know about Python has been learned so far this weekend, but will keep trying.

Posted on
Sun Nov 06, 2016 12:40 pm
akindigo offline
Posts: 10
Joined: Nov 06, 2016

Re: MyQ Plugin - BETA

Not quite :shock:

It looks like the web service does not like the python2.6 user agent string. My hack for it was to pass it a proper (if fake) user agent. With these changes, it seems to work just fine. I'll push a request on github.

Posted on
Sun Nov 06, 2016 12:47 pm
akindigo offline
Posts: 10
Joined: Nov 06, 2016

Re: MyQ Plugin - BETA

Pull request sent.

Posted on
Sun Nov 06, 2016 1:09 pm
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: MyQ Plugin - BETA

v0.0.13 with the User Agent fix is available.

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

Posted on
Sun Nov 06, 2016 1:16 pm
estopka offline
Posts: 19
Joined: Sep 02, 2015

Re: MyQ Plugin - BETA

Sorry, and of course appreciate the effort, but now getting the following:

Code: Select all
 MyQ Error                       Error in plugin execution runConcurrentThread:

Traceback (most recent call last):
  File "plugin.py", line 109, in runConcurrentThread
  File "plugin.py", line 304, in getDevices
  File "plugin.py", line 275, in myqLogin
NameError: global name 'userAgent' is not defined

Posted on
Sun Nov 06, 2016 1:30 pm
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: MyQ Plugin - BETA

That was my fault. akindigo's code was good and I messed it up. Try v0.0.14.

That's what I get for trying to do updates while I'm also playing World of Warcraft.

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

Posted on
Sun Nov 06, 2016 8:49 pm
estopka offline
Posts: 19
Joined: Sep 02, 2015

Re: MyQ Plugin - BETA

Alright, awesome way to end the weekend, plugin working as expected now. Thanks for sticking with it! Have a good week.

Who is online

Users browsing this forum: No registered users and 1 guest

cron