Adapters Plugin [archive]

Open source plugin that allows you to create devices which translate/transform values from other devices (Fahrenheit to Celsius for instance).
User avatar
DaveL17
Posts: 7321
Joined: Tue Aug 20, 2013 11:02 am
Location: Chicago, IL, USA
Contact:

Re: Adapters Plugin

Post by DaveL17 »

Not sure what's causing the error, but it's working fine for me. Do your settings resemble these?
Screen Shot 2019-06-09 at 2.05.09 PM.png
Screen Shot 2019-06-09 at 2.05.09 PM.png (85.98 KiB) Viewed 9309 times
I came here to drink milk and kick ass....and I've just finished my milk.

My Plugins and Scripts
User avatar
mgolden50
Posts: 278
Joined: Mon Jan 29, 2007 7:55 pm
Location: Chandler, AZ
Contact:

Re: Adapters Plugin

Post by mgolden50 »

Dave, Thanks for the support. I put the parameters you recommended into the adapter. I assume the symbol for degree is option shift 8 on a Mac keyboard.

Adapters Error Error in plugin execution ServerReplacedElem:

Traceback (most recent call last):
File "plugin.py", line 127, in deviceUpdated
File "/Library/Application Support/Perceptive Automation/Indigo 7.3/IndigoPluginHost.app/Contents/Resources/PlugIns/plugin_base.py", line 1179, in deviceUpdated
File "plugin.py", line 110, in deviceStartComm
File "/Library/Application Support/Perceptive Automation/Indigo 7.3/Plugins/Adapters.indigoPlugin/Contents/Server Plugin/sensor_adapter.py", line 25, in __init__
File "/Library/Application Support/Perceptive Automation/Indigo 7.3/Plugins/Adapters.indigoPlugin/Contents/Server Plugin/sensor_adapter.py", line 76, in __init__
KeyError: key formula not found in dict

Mike
Attachments
Screen Shot 2019-06-09 at 1.29.53 PM.jpg
Screen Shot 2019-06-09 at 1.29.53 PM.jpg (79.91 KiB) Viewed 9296 times
User avatar
mgolden50
Posts: 278
Joined: Mon Jan 29, 2007 7:55 pm
Location: Chandler, AZ
Contact:

Re: Adapters Plugin

Post by mgolden50 »

Dave,
So if these parameters work correctly on your system there must be something wrong with my Indigo setup.

Mike
User avatar
mgolden50
Posts: 278
Joined: Mon Jan 29, 2007 7:55 pm
Location: Chandler, AZ
Contact:

Re: Adapters Plugin

Post by mgolden50 »

Hi Again Dave,

So restarting IndigoServer eliminated the errors buy the Adapter plugin now shows 0 degrees even those I'm asking it to subtract 6.8 degrees from the physical device's reported 78.2 degrees.

Could the ° symbol I used is not recognized as a valid unit?

Thx

Mike
howartp
Posts: 4559
Joined: Thu Jan 09, 2014 4:43 pm
Location: West Yorkshire, UK

Re: Adapters Plugin

Post by howartp »

I'm digging in the code.

The error isn't anything you're doing - there appears to be a bug in the code, because "formula" (key formula not found in dict) is not supposed to be in the dict, so it shouldn't be trying to reference it.

I also get 0, and if you stop/start the device you get the error back again...

Dave, is it working for you?
User avatar
mgolden50
Posts: 278
Joined: Mon Jan 29, 2007 7:55 pm
Location: Chandler, AZ
Contact:

Re: Adapters Plugin

Post by mgolden50 »

Thanks guys!!!
howartp
Posts: 4559
Joined: Thu Jan 09, 2014 4:43 pm
Location: West Yorkshire, UK

Re: Adapters Plugin

Post by howartp »

Ok, he's got an easily fixable bug.

Download the attached Devices.xml and save it into

\Library\Application Support\Perceptive Automation\Indigo 7.3\Plugins\Adapters.indigoPlugin\Contents\Server Plugin\

(If you're not familiar with plugins, you'll need to right-click Adapters.indigoPlugin and "Show package contents")

Then restart the plugin, delete your adapter device, and recreate it.

Peter
Attachments
Devices.xml
(6.72 KiB) Downloaded 330 times
howartp
Posts: 4559
Joined: Thu Jan 09, 2014 4:43 pm
Location: West Yorkshire, UK

Re: Adapters Plugin

Post by howartp »

Matt/Jay, i'm intending publishing a new Nissan Leaf plugin (also Dusty's).

Dusty has touched his github account twice in the last 18 months, so obviously isn't active anywhere at present.

Can I takeover his plugin(s) - Nissan Leaf and Adapters certainly, to post up this fixed version? Not sure if he has others?

Peter
howartp
Posts: 4559
Joined: Thu Jan 09, 2014 4:43 pm
Location: West Yorkshire, UK

Re: Adapters Plugin

Post by howartp »

(Just looked; the only other plugin is Ecobee - anyone else want to take on that one?)

Peter
howartp
Posts: 4559
Joined: Thu Jan 09, 2014 4:43 pm
Location: West Yorkshire, UK

Re: Adapters Plugin

Post by howartp »

That’s great; I only searched his posts on here, I didn’t actually read them so it might have said that in a reply sonewhere.


Sent from my iPhone using Tapatalk Pro
User avatar
DaveL17
Posts: 7321
Joined: Tue Aug 20, 2013 11:02 am
Location: Chicago, IL, USA
Contact:

Re: Adapters Plugin

Post by DaveL17 »

howartp wrote:I'm digging in the code.

The error isn't anything you're doing - there appears to be a bug in the code, because "formula" (key formula not found in dict) is not supposed to be in the dict, so it shouldn't be trying to reference it.

I also get 0, and if you stop/start the device you get the error back again...

Dave, is it working for you?
It's working for me without errors, but I can't guarantee that I'm on the latest version of the plugin. It look like the degree symbol is being used in a standard python string format conversion, so it really shouldn't be related to the error. Regardless, it sounds like Peter may be willing to fork the plugin and fix the error for good.
I came here to drink milk and kick ass....and I've just finished my milk.

My Plugins and Scripts
User avatar
jay (support)
Site Admin
Posts: 19232
Joined: Wed Mar 19, 2008 11:52 am
Location: Austin, Texas
Contact:

Re: Adapters Plugin

Post by jay (support) »

howartp wrote:Can I takeover his plugin(s) - Nissan Leaf and Adapters certainly, to post up this fixed version? Not sure if he has others?
@howartp - I've sent @DustySparkle an email to enquire. I'll let you know when I get a reply. If he's no longer maintaining them, then we'll figure out the best course for getting those moved to the right spots so you can take over maintenance. Thanks for the offer!
Jay (Indigo Support)
Twitter | Facebook | LinkedIn
howartp
Posts: 4559
Joined: Thu Jan 09, 2014 4:43 pm
Location: West Yorkshire, UK

Re: Adapters Plugin

Post by howartp »

Any news Jay?


Sent from my iPhone using Tapatalk Pro
User avatar
jay (support)
Site Admin
Posts: 19232
Joined: Wed Mar 19, 2008 11:52 am
Location: Austin, Texas
Contact:

Re: Adapters Plugin

Post by jay (support) »

No. If I don't hear by Monday, we'll consider what to do next. The issue is that he used the Apache 2.0 license (rather than a less restrictive license like MIT or Unlicense). That license carries some requirements that are somewhat burdensome, namely section 4b:
You must cause any modified files to carry prominent notices stating that You changed the files
That's a pain to enforce when multiple people are working on the same source. Since we would be distributing the plugin via the store, we would (theoretically) be liable for a variety of things: 1) the License file wouldn't be included in the plugin bundle so it would have the effect of being distributed without the license and 2) if you (or anyone contributing to it) forgot to attribute their changes clearly in the source, then we would be liable for that as well (again because we're distributing it).

This is why the MIT license is SO MUCH BETTER for our purposes and we highly recommend that people use that instead.
Jay (Indigo Support)
Twitter | Facebook | LinkedIn
howartp
Posts: 4559
Joined: Thu Jan 09, 2014 4:43 pm
Location: West Yorkshire, UK

Re: Adapters Plugin

Post by howartp »

Leaf won’t be a problem as I’m rewriting that with a different base library; I never liked his implementation anyway!


Sent from my iPad using Tapatalk Pro
Locked

Return to “Adapters”