Adapters Plugin [archive]

Posted on
Mon Dec 26, 2016 3:57 pm
Mattias offline

Re: Adapters Plugin

here's some data from one multisensor (humidity, luminance, temperature)
Attachments
multisensor_123.txt
(10.89 KiB) Downloaded 301 times

Posted on
Mon Jan 02, 2017 12:43 pm
Mattias offline

Re: Adapters Plugin

Yesterday I moved the z-stick to a different usb-port, and now it seems that the Adapters plug in works correct. So, no remaining issues with the plug in. The problem was because of malfunctioning z-stick/usb-port and not the plug in.
//Mattias

Posted on
Tue Jan 17, 2017 5:33 am
smackie offline
Posts: 9
Joined: May 08, 2014

Re: Adapters Plugin

Really glad I discovered this plugin - it's a total gem! Especially if you use DaveL17s WUnderstation and have to convert your usual C sensors to F. I was using custom python scripts on a schedule but this cleans everything up.

Thanks!

I noticed that someone asked for dew point a while back. I do this calculation for my WUnderstation feed and looked at integrating it into Adapters. It's not a brilliant fit as it requires two values, the temperature and humidity. However, it might be possible to make this work if we expanded the custom formula model a little. Right now, it takes a formula using "x" as the variable, derived from the linked sensor. This is fine.

However, we could also add optional "y" and "z" variables that are fed from Indigo variable values. This would allow calculations that are rooted on a sensor value but depend on other variables (which could also be sensor values saved to variables). Two more variables should cover pretty much all circumstances. I'm not sure there's much point in integrating a standard dew point calculation into adapters but it'd be trivial to write instructions for the calculation using a multiple variable function.

Any thoughts? I'd have a crack at this if I get a chance in the near future...

Cheers

Scott...

Posted on
Thu Jan 26, 2017 7:16 am
DaveL17 offline
User avatar
Posts: 6744
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Adapters Plugin

Feasibility of Feature Request Request:

Hi dustysparkle: you may not have seen this thread, but we've been talking about you. :D I wanted to request the feasibility of a feature request (hence my redundant note above). Would it be possible without too much heartache to make the adapters plugin location aware? We're trying to apply a locale-based format specifier, but it doesn't appear to work. Alternatively, would it be possible to have a "locale adapter" perhaps?

http://forums.indigodomo.com/viewtopic.php?f=149&t=17796

Cheers,
Dave

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Sun Sep 03, 2017 2:50 am
jmdraper offline
Posts: 103
Joined: Sep 11, 2014
Location: Surrey, UK

Re: Adapters Plugin

Hi

This plugin looks like exactly what I need but I just can't get it working properly for my use case. I am trying to take the 'time left in minutes' state of an Indigo Timer device and add 1 to it for use on a control page (so that if the timer has, say 30s left on it then the control page will show '1 minute' instead of '0 minutes').

I installed the plugin, created a new Adapters device and chose Custom Linear Scale adapter, then selected my timer device timeLeftMinutes state from the sensor state drop-down list. In the list, it correctly shows the number of minutes left at the end of this entry, which gave me hope this would work . Then I changed offset to 1.0 and left the multiplier as 1.0 and left the formatting field as default. But the value of the adapters device just stays at 0 regardless of the timeLeftMinutes state of the timer it's based on.

Am I doing something wrong or is there a bug?

Thanks,
Jon

Posted on
Sun Sep 03, 2017 2:58 am
jmdraper offline
Posts: 103
Joined: Sep 11, 2014
Location: Surrey, UK

Re: Adapters Plugin

OK I got my use case working now, though I still don't understand why my first attempt didn't work. I got it working by using a Custom formula adapter (numeric result) with the formula of x+1.

Thanks for the incredibly useful plugin. And if anyone can explain what I was doing wrong with the linear adapter I would be most grateful!

Cheers,
Jon

Posted on
Wed Sep 06, 2017 11:51 am
dustysparkle offline
Posts: 54
Joined: Dec 14, 2015

Re: Adapters Plugin

Hi Jon,

I'm not sure what must caused the problem with the linear conversion. If I had to take a guess, it would be something involving conversion between numeric values and string values somewhere.

In any case, I'm glad you got it working with the forumula--that's definitely the most flexible way to use the plugin. If I had it to do all over again, I'd just write that one and leave the linear transformation out. :-)

Posted on
Wed Dec 13, 2017 9:17 pm
DaveL17 offline
User avatar
Posts: 6744
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Adapters Plugin

Hi dustysparkle - just a note that the plugin menu item "About Adapters v1.0.2" points to http://temp-converter.indigo.drjason.com which appears to be a dead URL.

Cheers,
Dave

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Thu Dec 14, 2017 8:42 am
dustysparkle offline
Posts: 54
Joined: Dec 14, 2015

Re: Adapters Plugin

Ah, thanks, Dave. I'll change that in the next version to point to this topic. :)

Posted on
Thu Apr 12, 2018 7:22 am
noel1983 offline
Posts: 446
Joined: Oct 17, 2014

Re: Adapters Plugin

Hi,
This looks to be an awesome plugin. Probably me being dense but I can't get it to work.

Looking to have it show 'Unlocked' if x == on else 'Locked' if x == off

This is for a relay controlling a door latch.

Logs show:

Traceback (most recent call last):
File "plugin.py", line 127, in deviceUpdated
File "/Library/Application Support/Perceptive Automation/Indigo 7/IndigoPluginHost.app/Contents/PlugIns/plugin_base.py", line 1179, in deviceUpdated
File "plugin.py", line 110, in deviceStartComm
File "/Library/Application Support/Perceptive Automation/Indigo 7/Plugins/Adapters.indigoPlugin/Contents/Server Plugin/sensor_adapter.py", line 30, in __init__
File "/Library/Application Support/Perceptive Automation/Indigo 7/Plugins/Adapters.indigoPlugin/Contents/Server Plugin/sensor_adapter.py", line 39, in go
File "/Library/Application Support/Perceptive Automation/Indigo 7/Plugins/Adapters.indigoPlugin/Contents/Server Plugin/pyrescaler/pyrescaler.py", line 103, in format
File "/Library/Application Support/Perceptive Automation/Indigo 7/Plugins/Adapters.indigoPlugin/Contents/Server Plugin/pyrescaler/pyrescaler.py", line 106, in convert
File "/Library/Application Support/Perceptive Automation/Indigo 7/Plugins/Adapters.indigoPlugin/Contents/Server Plugin/simpleeval.py", line 334, in simple_eval
File "/Library/Application Support/Perceptive Automation/Indigo 7/Plugins/Adapters.indigoPlugin/Contents/Server Plugin/simpleeval.py", line 226, in eval
File "/Library/Application Support/Perceptive Automation/Indigo 7/Plugins/Adapters.indigoPlugin/Contents/Server Plugin/simpleeval.py", line 265, in _eval
File "/Library/Application Support/Perceptive Automation/Indigo 7/Plugins/Adapters.indigoPlugin/Contents/Server Plugin/simpleeval.py", line 263, in _eval
File "/Library/Application Support/Perceptive Automation/Indigo 7/Plugins/Adapters.indigoPlugin/Contents/Server Plugin/simpleeval.py", line 294, in _eval
NameNotDefined: 'on' is not defined for expression ''Unlocked' if x == on else 'Locked''

Guidance much appreciated
Thanks
Noel

Posted on
Thu Apr 12, 2018 8:42 am
noel1983 offline
Posts: 446
Joined: Oct 17, 2014

Re: Adapters Plugin

Solved! Just copied the syntax from the example and now works

'Unlocked' if x == 1 else 'Locked' if x == 0 else 'stuck'

What's particularly impressive is the little graphic in indigo shows the green padlock or yellow open padlock. Very cool!

Posted on
Sat May 05, 2018 4:07 pm
qcvictor offline
Posts: 80
Joined: Apr 23, 2015
Location: Quebec, Canada

Re: Adapters Plugin

Hi Dustysparkle
As enhancement, unit pressure will be great. bar=>psi
Just for get a nice small icon ;-)

Posted on
Sun Jun 09, 2019 11:35 am
mgolden50 offline
User avatar
Posts: 247
Joined: Jan 29, 2007
Location: Chandler, AZ

Re: Adapters Plugin

Hi DustySparkle,

I guess I'm a dummy. I'm attempting to use your plugin but having trouble that I can't figure out. When I set the plugin forPredefined scales it works fine.
Put when I select Custom Linear Scale Adapter so I can offset the reported temperature from an Aeon MultiSensor 6 by -6.8 degrees I get the following errors:

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

Could you provide me with an example for how to set the parameters for a negative temperature offset using this Adapter. that would eliminate these errors. I would much appreciate it.

Thx

Mike

Posted on
Sun Jun 09, 2019 11:38 am
howartp offline
Posts: 4559
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Re: Adapters Plugin

I’m not sure Dusty is around any more; if he doesn’t reply, one of us will have a look.


Sent from my iPhone using Tapatalk Pro

Posted on
Sun Jun 09, 2019 11:53 am
mgolden50 offline
User avatar
Posts: 247
Joined: Jan 29, 2007
Location: Chandler, AZ

Re: Adapters Plugin

Thanks

Who is online

Users browsing this forum: No registered users and 0 guests

cron