We have moved at community.getvera.com

Author Topic: Create separate sensor for each rain sensor value  (Read 628 times)

Offline rigpapa

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1121
  • Karma: +187/-3
Re: Create separate sensor for each rain sensor value
« Reply #15 on: January 20, 2019, 02:40:32 pm »
Watching this thread, it all seems too painful for a relatively trivial need. Steep learning curve.

So, in the "Virtual Sensor" plugin, I've added the ability to create a virtual temperature, humidity, light, security, or generic sensor that simply copies its value from any variable in any other Vera device (and keeps it updated in real time). I'm submitting the update to the Vera plugin marketplace today and it should be available to install from there tomorrow. It's available in the project's Github repository now, and the AltAppStore (v1.4).
Author of Reactor, DelayLight, SiteSensor, Rachio, Deus Ex Machina II, Intesis WMP Gateway, Auto Virtual Thermostat and VirtualSensor plugins. Vera Plus w/100+ Z-wave devices. Vera3, Lite. Hassio, Slapdash.

Online TMC

  • Jr. Member
  • **
  • Posts: 95
  • Karma: +0/-0
Re: Create separate sensor for each rain sensor value
« Reply #16 on: January 20, 2019, 04:34:16 pm »
@rigpapa
I've also recently discovered the Reactor plugin.
Now with Virtual Sensor I have solved my problem.
You are a genius.
I'll make a donation.
These plugins should be paid.
Thank you.

Offline rigpapa

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1121
  • Karma: +187/-3
Re: Create separate sensor for each rain sensor value
« Reply #17 on: January 20, 2019, 04:36:47 pm »
@rigpapa
I've also recently discovered the Reactor plugin.
Now with Virtual Sensor I have solved my problem.
You are a genius.
I'll make a donation.
These plugins should be paid.
Thank you.

I've already made the commitment to the community that I will never charge for Reactor (and not for Virtual Sensor, either). But donations in any amount are always appreciated!
Author of Reactor, DelayLight, SiteSensor, Rachio, Deus Ex Machina II, Intesis WMP Gateway, Auto Virtual Thermostat and VirtualSensor plugins. Vera Plus w/100+ Z-wave devices. Vera3, Lite. Hassio, Slapdash.

Online TMC

  • Jr. Member
  • **
  • Posts: 95
  • Karma: +0/-0
Re: Create separate sensor for each rain sensor value
« Reply #18 on: January 20, 2019, 04:50:54 pm »
Quote

I've already made the commitment to the community that I will never charge for Reactor (and not for Virtual Sensor, either). But donations in any amount are always appreciated!

With great pleasure I will make a donation.

Offline therealdb

  • Sr. Member
  • ****
  • Posts: 258
  • Karma: +6/-0
  • Automate all the things!
Re: Create separate sensor for each rain sensor value
« Reply #19 on: January 21, 2019, 12:54:56 am »
Watching this thread, it all seems too painful for a relatively trivial need. Steep learning curve.

Yeah, code is inevitable. Great addition to your plugin.
Vera Edge EU, Fibaro FGRM 222 (14), Fibaro FGS 223 (26), Fibaro FGS 222 (6), Fibaro UBS (2), Fibaro+N Plug (3), NeoCoolCam Door Sensor (3), PIR (2) & Plugs (2), Nest (3), Home Server running my own integrations, Harmony Hub, OpenSprinkler, Personal Weather Station, Sonoff TH & more

Offline rigpapa

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1121
  • Karma: +187/-3
Re: Create separate sensor for each rain sensor value
« Reply #20 on: January 21, 2019, 08:02:16 am »
OK, so Vera has approved v1.4 of Virtual Sensor. The procedure would then be something like this:

* Install Virtual Sensor 1.4 from the plugin marketplace;
* Find your new "Virtual Sensor" device, go in to the control panel, and hit the "Add a XXX Sensor" for the type of sensor you want (generic, temp, humidity, etc.). That function creates a child device, so it causes a Luup reload.
* While Luup is reloading, hard-refresh your browser (refresh with cache flush: CTRL-F5 for Chrome/Win, SHIFT-F5 for Firefox/Win, CMD+SHIFT+R for many Mac browsers).
* Go back into the "Virtual Sensor" master device control panel.
* Disable the device if it's enabled--when enabled, the free-running function generates values for the master device, but you don't need this feature, so spare your CPU a few cycles and just turn it off. The "Enable/Disable" affects only the function generator, not the data-copying of the child virtual sensors.
* Go to the "Virtual Sensors" tab and choose the device and state variable that should be used as the data source for your virtual sensor.
* Hit the Reload Luup button on that tab to make your changes take effect.

You can make as many child devices from the master device as you want, just repeat the above. You can use any device variable on any device as a data source. The child devices use purely the Vera-defined structures, UI and behaviors, together with all of their features and non-features; there are no additional or changed behaviors for these devices.
Author of Reactor, DelayLight, SiteSensor, Rachio, Deus Ex Machina II, Intesis WMP Gateway, Auto Virtual Thermostat and VirtualSensor plugins. Vera Plus w/100+ Z-wave devices. Vera3, Lite. Hassio, Slapdash.

Offline tinman

  • Full Member
  • ***
  • Posts: 215
  • Karma: +16/-0
Re: Create separate sensor for each rain sensor value
« Reply #21 on: January 21, 2019, 09:09:15 am »
The rain sensor you are trying to access to display values as individual sensors actually saves rain values for each of the last 60 minutes, 24 hours, 52 weeks, 12 months, and 7 days. The plugin collecting this data updates it if necessary each time the sensor transmits its current rain count. If the new rain count has changed it recalculates all of the displayed values. Since it doesn't store the calculated values (except for rain in the last 24Hrs) it will be difficult to do what you'd like.

Offline cranb

  • Sr. Newbie
  • *
  • Posts: 31
  • Karma: +0/-0
Re: Create separate sensor for each rain sensor value
« Reply #22 on: January 21, 2019, 09:16:26 am »
OK, so Vera has approved v1.4 of Virtual Sensor. The procedure would then be something like this:

* Install Virtual Sensor 1.4 from the plugin marketplace;
* Find your new "Virtual Sensor" device, go in to the control panel, and hit the "Add a XXX Sensor" for the type of sensor you want (generic, temp, humidity, etc.). That function creates a child device, so it causes a Luup reload.
* While Luup is reloading, hard-refresh your browser (refresh with cache flush: CTRL-F5 for Chrome/Win, SHIFT-F5 for Firefox/Win, CMD+SHIFT+R for many Mac browsers).
* Go back into the "Virtual Sensor" master device control panel.
* Disable the device if it's enabled--when enabled, the free-running function generates values for the master device, but you don't need this feature, so spare your CPU a few cycles and just turn it off. The "Enable/Disable" affects only the function generator, not the data-copying of the child virtual sensors.
* Go to the "Virtual Sensors" tab and choose the device and state variable that should be used as the data source for your virtual sensor.
* Hit the Reload Luup button on that tab to make your changes take effect.

You can make as many child devices from the master device as you want, just repeat the above. You can use any device variable on any device as a data source. The child devices use purely the Vera-defined structures, UI and behaviors, together with all of their features and non-features; there are no additional or changed behaviors for these devices.

Works great! Thank you so much for the update.  :D