MyQ Plugin - BETA

User avatar
FlyingDiver
Posts: 7823
Joined: Sat Jun 07, 2014 10:36 am
Location: Southwest Florida, USA

Re: MyQ Plugin - BETA

Post by FlyingDiver »

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
estopka
Posts: 19
Joined: Wed Sep 02, 2015 8:54 am

Re: MyQ Plugin - BETA

Post by estopka »

Updated to 0.0.11, and still no joy. Any way I could get the code and tinker with it?
User avatar
FlyingDiver
Posts: 7823
Joined: Sat Jun 07, 2014 10:36 am
Location: Southwest Florida, USA

Re: MyQ Plugin - BETA

Post by FlyingDiver »

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
bkmar1192
Posts: 274
Joined: Sat Sep 12, 2015 11:23 am

Re: MyQ Plugin - BETA

Post by bkmar1192 »

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
estopka
Posts: 19
Joined: Wed Sep 02, 2015 8:54 am

Re: MyQ Plugin - BETA

Post by estopka »

Pls do greatly appreciated!
akindigo
Posts: 10
Joined: Sun Nov 06, 2016 11:09 am

Re: MyQ Plugin - BETA

Post by akindigo »

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

Re: MyQ Plugin - BETA

Post by FlyingDiver »

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
estopka
Posts: 19
Joined: Wed Sep 02, 2015 8:54 am

Re: MyQ Plugin - BETA

Post by estopka »

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.
akindigo
Posts: 10
Joined: Sun Nov 06, 2016 11:09 am

Re: MyQ Plugin - BETA

Post by akindigo »

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.
akindigo
Posts: 10
Joined: Sun Nov 06, 2016 11:09 am

Re: MyQ Plugin - BETA

Post by akindigo »

Pull request sent.
User avatar
FlyingDiver
Posts: 7823
Joined: Sat Jun 07, 2014 10:36 am
Location: Southwest Florida, USA

Re: MyQ Plugin - BETA

Post by FlyingDiver »

v0.0.13 with the User Agent fix is available.
joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
estopka
Posts: 19
Joined: Wed Sep 02, 2015 8:54 am

Re: MyQ Plugin - BETA

Post by estopka »

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

Re: MyQ Plugin - BETA

Post by FlyingDiver »

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
estopka
Posts: 19
Joined: Wed Sep 02, 2015 8:54 am

Re: MyQ Plugin - BETA

Post by estopka »

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

Return to “MyQ”