Adapters Plugin

Posted on
Mon Dec 26, 2016 3:57 pm
Mattias offline
Posts: 65
Joined: May 30, 2014

Re: Adapters Plugin

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

Posted on
Mon Jan 02, 2017 12:43 pm
Mattias offline
Posts: 65
Joined: May 30, 2014

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: 3883
Joined: Aug 20, 2013

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: 95
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: 95
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: 3883
Joined: Aug 20, 2013

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: 319
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: 319
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: 70
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 ;-)

Who is online

Users browsing this forum: neilk and 2 guests