Bug? base64 required for authentication

User avatar
boisy
Posts: 281
Joined: Tue Jun 25, 2013 12:43 pm

Bug? base64 required for authentication

Post by boisy »

I ran across an error using a URL Extension device in this plugin with authentication. I need to add the following line at the top of the plug.py file:

Code: Select all

import base64
After that, the authentication worked.
User avatar
boisy
Posts: 281
Joined: Tue Jun 25, 2013 12:43 pm

Re: Bug? base64 required for authentication

Post by boisy »

I found two more issues in plugin.py for this plugin:

1. For my application, I need to read the result of the urllib2.open() in _updateURL():

Code: Select all

			else:
				ret = urllib2.urlopen(url)
				
			res = ret.read()
			indigo.server.log(unicode(ret))
So I added the "res = ret.read()" line. Without this, my Arduino code would lock up. I don't expect this will hurt anything in any case, and should be added.

2. There's a bug on line 567 of the onDevicecommandTurnOff() function:

Code: Select all

				if self.urlDeviceAction (dev, dev.pluginProps["onCommand"]) == False: 
That array subscript should be "offCommand".

With these two fixes and the base64 in the first message, this plugin works fine for me now.
User avatar
boisy
Posts: 281
Joined: Tue Jun 25, 2013 12:43 pm

Re: Bug? base64 required for authentication

Post by boisy »

No one seems to be responding to this feedback. Is the developer active?

I found what I think is another issue with this plugin.

Line 770 in plugin.py is:

Code: Select all

				ret = urllib2.urlopen(ret, url)
The second parameter should not be there. Instead, the line should read:

Code: Select all

				ret = urllib2.urlopen(ret)
User avatar
DaveL17
Posts: 7323
Joined: Tue Aug 20, 2013 11:02 am
Location: Chicago, IL, USA
Contact:

Re: Bug? base64 required for authentication

Post by DaveL17 »

Colorado4Wheeler has left the Indigo world and is not supporting any Indigo plugins going forward. He said (on GitHub) that he would be open to developers taking over the Indigo plugins and is willing to transfer the repos.
I came here to drink milk and kick ass....and I've just finished my milk.

My Plugins and Scripts
User avatar
boisy
Posts: 281
Joined: Tue Jun 25, 2013 12:43 pm

Re: Bug? base64 required for authentication

Post by boisy »

I just caught up on his departure from another post. Thanks for alerting me to this.

FlyingDiver expressed some interest in fixing bugs in this very plug-in. That would be a great start.
Post Reply

Return to “Device Extensions Plugin”