Page 5 of 8

Re: Adapters Plugin

PostPosted: Mon Dec 26, 2016 3:57 pm
by Mattias
here's some data from one multisensor (humidity, luminance, temperature)

Re: Adapters Plugin

PostPosted: Mon Jan 02, 2017 12:43 pm
by Mattias
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

Re: Adapters Plugin

PostPosted: Tue Jan 17, 2017 5:33 am
by smackie
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...

Re: Adapters Plugin

PostPosted: Thu Jan 26, 2017 7:16 am
by DaveL17
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

Re: Adapters Plugin

PostPosted: Sun Sep 03, 2017 2:50 am
by jmdraper
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

Re: Adapters Plugin

PostPosted: Sun Sep 03, 2017 2:58 am
by jmdraper
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

Re: Adapters Plugin

PostPosted: Wed Sep 06, 2017 11:51 am
by dustysparkle
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. :-)

Re: Adapters Plugin

PostPosted: Wed Dec 13, 2017 9:17 pm
by DaveL17
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

Re: Adapters Plugin

PostPosted: Thu Dec 14, 2017 8:42 am
by dustysparkle
Ah, thanks, Dave. I'll change that in the next version to point to this topic. :)

Re: Adapters Plugin

PostPosted: Thu Apr 12, 2018 7:22 am
by noel1983
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

Re: Adapters Plugin

PostPosted: Thu Apr 12, 2018 8:42 am
by noel1983
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!

Re: Adapters Plugin

PostPosted: Sat May 05, 2018 4:07 pm
by qcvictor
Hi Dustysparkle
As enhancement, unit pressure will be great. bar=>psi
Just for get a nice small icon ;-)

Re: Adapters Plugin

PostPosted: Sun Jun 09, 2019 11:35 am
by mgolden50
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

Re: Adapters Plugin

PostPosted: Sun Jun 09, 2019 11:38 am
by howartp
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

Re: Adapters Plugin

PostPosted: Sun Jun 09, 2019 11:53 am
by mgolden50
Thanks