Adapters Plugin [archive]

Posted on
Fri Aug 09, 2019 8:49 am
Korey offline
User avatar
Posts: 811
Joined: Jun 04, 2008
Location: Henderson, NV

Re: Adapters Plugin

howartp wrote:
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



Any news on this?

I use the Adaptor plugin for a bunch of conversion, but I find it will stop updating every so often and will require a reload of the plugin to make it function again.

Thanks!

--
Korey

Posted on
Sun Aug 11, 2019 2:35 pm
matt (support) offline
Site Admin
User avatar
Posts: 21411
Joined: Jan 27, 2003
Location: Texas

Re: Adapters Plugin

I found another/different email address we had for dustysparkle and just sent him another message. I'll let you know when/if I hear back from him.

Image

Posted on
Thu Apr 30, 2020 12:33 pm
bsp9493 offline
Posts: 153
Joined: Nov 30, 2017
Location: Kelowna, BC

Re: Adapters Plugin

Hi...

I have been seeing the following in my logs recently...

Is this being caused by the Adapters Plug in, or is my device that's feeding it causing the problem? This is the only error message that I am receiving and when I check my source device, everything appears to be ok.

Thanx in advance.

dave

Code: Select all
   Adapters Error                  Error in plugin execution ServerReplacedElem:

Traceback (most recent call last):
  File "plugin.py", line 130, in deviceUpdated
  File "/Library/Application Support/Perceptive Automation/Indigo 7.4/Plugins/Adapters.indigoPlugin/Contents/Server Plugin/sensor_adapter.py", line 39, in go
  File "/Library/Application Support/Perceptive Automation/Indigo 7.4/Plugins/Adapters.indigoPlugin/Contents/Server Plugin/pyrescaler/pyrescaler.py", line 103, in format
  File "/Library/Application Support/Perceptive Automation/Indigo 7.4/Plugins/Adapters.indigoPlugin/Contents/Server Plugin/pyrescaler/pyrescaler.py", line 106, in convert
ValueError: could not convert string to float: ----.-

   Adapters Error                  Error in plugin execution ServerReplacedElem:

Traceback (most recent call last):
  File "plugin.py", line 130, in deviceUpdated
  File "/Library/Application Support/Perceptive Automation/Indigo 7.4/Plugins/Adapters.indigoPlugin/Contents/Server Plugin/sensor_adapter.py", line 39, in go
  File "/Library/Application Support/Perceptive Automation/Indigo 7.4/Plugins/Adapters.indigoPlugin/Contents/Server Plugin/pyrescaler/pyrescaler.py", line 103, in format
  File "/Library/Application Support/Perceptive Automation/Indigo 7.4/Plugins/Adapters.indigoPlugin/Contents/Server Plugin/pyrescaler/pyrescaler.py", line 106, in convert
ValueError: could not convert string to float: ----.-

Posted on
Thu Apr 30, 2020 1:28 pm
DaveL17 offline
User avatar
Posts: 6744
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Adapters Plugin

For some reason, the plugin is expecting a float value (decimal number) but is getting a string (text) instead. If this was working without error at one point, then either the plugin code has changed or the source data has changed types. If you're using a custom formula adapter, you may be able to solve the problem by changing 'x' in the formula to 'float(x)', but that solution is untested.

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

[My Plugins] - [My Forums]

Posted on
Thu Apr 30, 2020 1:41 pm
bsp9493 offline
Posts: 153
Joined: Nov 30, 2017
Location: Kelowna, BC

Re: Adapters Plugin

Thanx Dave...

I have 2 custom and 1 standard Predefined scale (temperature, F to C).

I have changed the custom ones to "float(x)" as you suggested, will see what happens.

Strange, it's intermittent and nothing has changed with the devices that I am using with them that I am aware of.

Will keep an eye out.

d

Posted on
Thu Apr 30, 2020 1:47 pm
bsp9493 offline
Posts: 153
Joined: Nov 30, 2017
Location: Kelowna, BC

Re: Adapters Plugin

If it helps... I turned on debug after I made those changes... this is what popped up in the a few mins after the change.

Code: Select all
Adapters Debug                  ws1401ip variables['solarRadiation'] {0:.1f} units: 41.2 units
   Adapters Debug                  ws1401ip variables['UV'] {0:.1f} units: 41.9 units
   Adapters Debug                  resulting format with precision applied: {0:.1f} {1}
   Adapters Debug                  formatted result: 17.8 °C
   Adapters Debug                  ws1401ip variables['outdoorTemp'] °F -> °C: 17.8 °C
   Adapters Debug                  ws1401ip variables['solarRadiation'] {0:.1f} units: 41.2 units
   Adapters Debug                  ws1401ip variables['UV'] {0:.1f} units: 41.9 units
   Adapters Debug                  ws1401ip variables['solarRadiation'] {0:.1f} units: 41.2 units
   Adapters Debug                  ws1401ip variables['UV'] {0:.1f} units: 41.9 units
   Adapters Debug                  resulting format with precision applied: {0:.1f} {1}
   Adapters Debug                  formatted result: 18.1 °C
   Adapters Debug                  ws1401ip variables['outdoorTemp'] °F -> °C: 18.1 °C
   Adapters Debug                  ws1401ip variables['solarRadiation'] {0:.1f} units: 41.2 units
   Adapters Debug                  ws1401ip variables['UV'] {0:.1f} units: 41.9 units
   Adapters Debug                  ws1401ip variables['solarRadiation'] {0:.1f} units: 47.5 units
   Adapters Debug                  ws1401ip variables['UV'] {0:.1f} units: 47.5 units
   Adapters Debug                  resulting format with precision applied: {0:.1f} {1}
   Adapters Debug                  formatted result: 18.1 °C
   Adapters Debug                  ws1401ip variables['outdoorTemp'] °F -> °C: 18.1 °C
   Adapters Debug                  ws1401ip variables['solarRadiation'] {0:.1f} units: 47.5 units
   Adapters Debug                  ws1401ip variables['UV'] {0:.1f} units: 47.5 units
   Adapters Debug                  ws1401ip variables['solarRadiation'] {0:.1f} units: 47.5 units
   Adapters Debug                  ws1401ip variables['UV'] {0:.1f} units: 47.5 units
   Adapters Debug                  resulting format with precision applied: {0:.1f} {1}
   Adapters Debug                  formatted result: 18.1 °C
   Adapters Debug                  ws1401ip variables['outdoorTemp'] °F -> °C: 18.1 °C
   Adapters Debug                  ws1401ip variables['solarRadiation'] {0:.1f} units: 47.5 units
   Adapters Debug                  ws1401ip variables['UV'] {0:.1f} units: 47.5 units
   Adapters Debug                  ws1401ip variables['solarRadiation'] {0:.1f} units: 47.5 units
   Adapters Debug                  ws1401ip variables['UV'] {0:.1f} units: 47.5 units
   Adapters Debug                  resulting format with precision applied: {0:.1f} {1}
   Adapters Debug                  formatted result: 18.1 °C
   Adapters Debug                  ws1401ip variables['outdoorTemp'] °F -> °C: 18.1 °C
   Adapters Debug                  ws1401ip variables['solarRadiation'] {0:.1f} units: 47.5 units
   Adapters Debug                  ws1401ip variables['UV'] {0:.1f} units: 47.5 units
   Adapters Debug                  ws1401ip variables['solarRadiation'] {0:.1f} units: 47.5 units
   Adapters Debug                  ws1401ip variables['UV'] {0:.1f} units: 47.5 units
   Adapters Debug                  resulting format with precision applied: {0:.1f} {1}
   Adapters Debug                  formatted result: 18.1 °C
   Adapters Debug                  ws1401ip variables['outdoorTemp'] °F -> °C: 18.1 °C
   Adapters Debug                  ws1401ip variables['solarRadiation'] {0:.1f} units: 47.5 units
   Adapters Debug                  ws1401ip variables['UV'] {0:.1f} units: 47.5 units
   Adapters Debug                  ws1401ip variables['solarRadiation'] {0:.1f} units: 47.5 units
   Adapters Debug                  ws1401ip variables['UV'] {0:.1f} units: 47.5 units
   Adapters Debug                  resulting format with precision applied: {0:.1f} {1}
   Adapters Debug                  formatted result: 18.1 °C
   Adapters Debug                  ws1401ip variables['outdoorTemp'] °F -> °C: 18.1 °C
   Adapters Debug                  ws1401ip variables['solarRadiation'] {0:.1f} units: 47.5 units
   Adapters Debug                  ws1401ip variables['UV'] {0:.1f} units: 47.5 units
   Adapters Debug                  ws1401ip variables['solarRadiation'] {0:.1f} units: 47.5 units
   Adapters Debug                  ws1401ip variables['UV'] {0:.1f} units: 47.5 units
   Adapters Debug                  resulting format with precision applied: {0:.1f} {1}
   Adapters Debug                  formatted result: 18.1 °C
   Adapters Debug                  ws1401ip variables['outdoorTemp'] °F -> °C: 18.1 °C
   Adapters Debug                  ws1401ip variables['solarRadiation'] {0:.1f} units: 47.5 units
   Adapters Debug                  ws1401ip variables['UV'] {0:.1f} units: 47.5 units
   Adapters Debug                  ws1401ip variables['solarRadiation'] {0:.1f} units: 47.5 units
   Adapters Debug                  ws1401ip variables['UV'] {0:.1f} units: 47.5 units
   Adapters Debug                  resulting format with precision applied: {0:.1f} {1}
   Adapters Debug                  formatted result: 18.1 °C
   Adapters Debug                  ws1401ip variables['outdoorTemp'] °F -> °C: 18.1 °C
   Adapters Debug                  ws1401ip variables['solarRadiation'] {0:.1f} units: 47.5 units
   Adapters Debug                  ws1401ip variables['UV'] {0:.1f} units: 47.5 units
   Adapters Debug                  ws1401ip variables['solarRadiation'] {0:.1f} units: 47.5 units
   Adapters Debug                  ws1401ip variables['UV'] {0:.1f} units: 47.5 units
   Adapters Debug                  resulting format with precision applied: {0:.1f} {1}
   Adapters Debug                  formatted result: 18.1 °C
   Adapters Debug                  ws1401ip variables['outdoorTemp'] °F -> °C: 18.1 °C
   Adapters Debug                  ws1401ip variables['solarRadiation'] {0:.1f} units: 47.5 units
   Adapters Debug                  ws1401ip variables['UV'] {0:.1f} units: 47.5 units
   Adapters Debug                  ws1401ip variables['solarRadiation'] {0:.1f} units: 47.5 units
   Adapters Debug                  ws1401ip variables['UV'] {0:.1f} units: 47.5 units
   Adapters Debug                  resulting format with precision applied: {0:.1f} {1}
   Adapters Debug                  formatted result: 18.1 °C
   Adapters Debug                  ws1401ip variables['outdoorTemp'] °F -> °C: 18.1 °C
   Adapters Debug                  ws1401ip variables['solarRadiation'] {0:.1f} units: 47.5 units
   Adapters Debug                  ws1401ip variables['UV'] {0:.1f} units: 47.5 units
   Adapters Debug                  ws1401ip variables['solarRadiation'] {0:.1f} units: 47.5 units
   Adapters Debug                  ws1401ip variables['UV'] {0:.1f} units: 47.5 units
   Adapters Debug                  resulting format with precision applied: {0:.1f} {1}
   Adapters Debug                  formatted result: 18.1 °C
   Adapters Debug                  ws1401ip variables['outdoorTemp'] °F -> °C: 18.1 °C
   Adapters Debug                  ws1401ip variables['solarRadiation'] {0:.1f} units: 47.5 units
   Adapters Debug                  ws1401ip variables['UV'] {0:.1f} units: 47.5 units
   Adapters Debug                  ws1401ip variables['solarRadiation'] {0:.1f} units: 47.5 units
   Adapters Debug                  ws1401ip variables['UV'] {0:.1f} units: 47.5 units
   Adapters Debug                  resulting format with precision applied: {0:.1f} {1}
   Adapters Debug                  formatted result: 18.1 °C
   Adapters Debug                  ws1401ip variables['outdoorTemp'] °F -> °C: 18.1 °C
   Adapters Debug                  ws1401ip variables['solarRadiation'] {0:.1f} units: 47.5 units
   Adapters Debug                  ws1401ip variables['UV'] {0:.1f} units: 47.5 units
   Adapters Debug                  ws1401ip variables['solarRadiation'] {0:.1f} units: 47.5 units
   Adapters Debug                  ws1401ip variables['UV'] {0:.1f} units: 47.5 units
   Adapters Debug                  resulting format with precision applied: {0:.1f} {1}
   Adapters Debug                  formatted result: 18.1 °C
   Adapters Debug                  ws1401ip variables['outdoorTemp'] °F -> °C: 18.1 °C
   Adapters Debug                  ws1401ip variables['solarRadiation'] {0:.1f} units: 47.5 units
   Adapters Debug                  ws1401ip variables['UV'] {0:.1f} units: 47.5 units

Posted on
Thu Apr 30, 2020 4:53 pm
DaveL17 offline
User avatar
Posts: 6744
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Adapters Plugin

Looks like it may be working then, yes?

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

[My Plugins] - [My Forums]

Posted on
Sun Apr 25, 2021 12:38 pm
ckeyes888 offline
Posts: 2417
Joined: Nov 26, 2009
Location: Kalispell, MT

Re: Adapters Plugin

Just need to remove the decimal from my Davis temp device. 72.1 - 72
Maybe the plugin can do that?

Thanks,

Carl

Posted on
Sun Apr 25, 2021 12:56 pm
DaveL17 offline
User avatar
Posts: 6744
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Adapters Plugin

Yes. That's precisely what it was meant to do. :)

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

[My Plugins] - [My Forums]

Posted on
Sun Apr 25, 2021 2:24 pm
ckeyes888 offline
Posts: 2417
Joined: Nov 26, 2009
Location: Kalispell, MT

Re: Adapters Plugin

Thanks Dave. Maybe a tip on how to do that?
Seeing a lot of formulas I don’t understand.

Carl

Posted on
Sun Apr 25, 2021 5:04 pm
DaveL17 offline
User avatar
Posts: 6744
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Adapters Plugin

Sure! No need to use a custom formula.

  1. Create a new Adapters device.
  2. Select Predefined Scale Adapter.
  3. Select the source sensor device.
  4. Select Scale Type: Temperature
  5. Native Scale: Fahrenheit (or choice)
  6. Desired Scale: Fahrenheit (or choice)
  7. Precision: 1 (zero decimal places)

That's it. Then use the Adapters device instead of the source device for displaying on control pages and so forth. If you want to do something more creative later (that requires a formula) I'm happy to help with that, too.

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

[My Plugins] - [My Forums]

Posted on
Sun Apr 25, 2021 5:05 pm
ckeyes888 offline
Posts: 2417
Joined: Nov 26, 2009
Location: Kalispell, MT

Re: Adapters Plugin

Perfect...thanks a bunch!

Carl

Posted on
Sun Apr 25, 2021 5:12 pm
DaveL17 offline
User avatar
Posts: 6744
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Adapters Plugin

No problem!

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

[My Plugins] - [My Forums]

Posted on
Mon Apr 26, 2021 10:04 pm
ckeyes888 offline
Posts: 2417
Joined: Nov 26, 2009
Location: Kalispell, MT

Re: Adapters Plugin - Issue Removing Decimal

Tried the settings you mentioned but am still getting the decimal.
Missed something? Still returns 43.1

Thanks,

Carl
Attachments
8BA2E7DC-03A7-4391-89AD-15E7360D419E.png
8BA2E7DC-03A7-4391-89AD-15E7360D419E.png (73.29 KiB) Viewed 6850 times

Posted on
Tue Apr 27, 2021 4:16 am
FlyingDiver offline
User avatar
Posts: 7190
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Adapters Plugin - Issue Removing Decimal

ckeyes888 wrote:
Tried the settings you mentioned but am still getting the decimal.
Missed something? Still returns 43.1l


Set "Precision" to 0.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Who is online

Users browsing this forum: No registered users and 0 guests