We have moved at community.getvera.com

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

Offline TMC

  • Jr. Member
  • **
  • Posts: 95
  • Karma: +0/-0
Create separate sensor for each rain sensor value
« on: January 16, 2019, 05:03:34 pm »
I have a rain sensor that displays the following values:

Current rain rate:           0.00 mm/hr
In the last 60 minutes:   0.00 mm
In the last 24 hours:           26.40 mm
In the last 7 days:           51.40 mm
In the last 12 months:   51.40 mm

Is it possible to create 5 separate sensors for each value?
« Last Edit: January 16, 2019, 05:05:54 pm by TMC »

Offline rafale77

  • Community Beta
  • Hero Member
  • ******
  • Posts: 1749
  • Karma: +101/-27
  • HA ≠ IoT as a blue sky is cloudless.
Re: Create separate sensor for each rain sensor value
« Reply #1 on: January 16, 2019, 05:10:22 pm »
What type of sensor is it? I am not aware of a device type of the rain sensor. If you already have one then it is easy to have multiple. Depending on the type they can be child devices or if it is an API, you can use Rigpapa's site sensor plugin.
openLuup (79 devices, 141 scenes, 19 apps) master to VeraPlus (142 zwave nodes, 8 Zigbee nodes, 221 devices,  20 scenes , 2 apps) +  Hubitat (15 Zigbee nodes) + Home-Assistant (API Integrations). Bridged to Siri and Alexa. Homewave. VeraPlus ExtRooted and mios server independent.

Offline TMC

  • Jr. Member
  • **
  • Posts: 95
  • Karma: +0/-0
Re: Create separate sensor for each rain sensor value
« Reply #2 on: January 17, 2019, 02:20:31 am »

Offline rafale77

  • Community Beta
  • Hero Member
  • ******
  • Posts: 1749
  • Karma: +101/-27
  • HA ≠ IoT as a blue sky is cloudless.
Re: Create separate sensor for each rain sensor value
« Reply #3 on: January 17, 2019, 02:40:50 am »
What I meant was how does it show up on the vera? By device type, I meant to ask which device json file?
openLuup (79 devices, 141 scenes, 19 apps) master to VeraPlus (142 zwave nodes, 8 Zigbee nodes, 221 devices,  20 scenes , 2 apps) +  Hubitat (15 Zigbee nodes) + Home-Assistant (API Integrations). Bridged to Siri and Alexa. Homewave. VeraPlus ExtRooted and mios server independent.

Offline TMC

  • Jr. Member
  • **
  • Posts: 95
  • Karma: +0/-0
Re: Create separate sensor for each rain sensor value
« Reply #4 on: January 17, 2019, 02:47:44 am »
I do not know. Can you help me, tell me where I find the file?

Offline rafale77

  • Community Beta
  • Hero Member
  • ******
  • Posts: 1749
  • Karma: +101/-27
  • HA ≠ IoT as a blue sky is cloudless.
Re: Create separate sensor for each rain sensor value
« Reply #5 on: January 17, 2019, 02:57:03 am »
Well it is because it does not exists, I looked. What you are essentially asking is for someone to write a plugin by creating a new device file and device type. With the nearing release of a new platform, you might want to ask the ownership to add integration for it. I just don't know how you got it connected to the vera to begin with.
openLuup (79 devices, 141 scenes, 19 apps) master to VeraPlus (142 zwave nodes, 8 Zigbee nodes, 221 devices,  20 scenes , 2 apps) +  Hubitat (15 Zigbee nodes) + Home-Assistant (API Integrations). Bridged to Siri and Alexa. Homewave. VeraPlus ExtRooted and mios server independent.

Offline TMC

  • Jr. Member
  • **
  • Posts: 95
  • Karma: +0/-0
Re: Create separate sensor for each rain sensor value
« Reply #6 on: January 17, 2019, 02:58:40 am »
Thanks.

Offline rafale77

  • Community Beta
  • Hero Member
  • ******
  • Posts: 1749
  • Karma: +101/-27
  • HA ≠ IoT as a blue sky is cloudless.
Re: Create separate sensor for each rain sensor value
« Reply #7 on: January 17, 2019, 03:02:46 am »
http://forum.micasaverde.com/index.php/topic,50878.0.html

A thread discussing another rain sensor which indeed does not have a device type.
openLuup (79 devices, 141 scenes, 19 apps) master to VeraPlus (142 zwave nodes, 8 Zigbee nodes, 221 devices,  20 scenes , 2 apps) +  Hubitat (15 Zigbee nodes) + Home-Assistant (API Integrations). Bridged to Siri and Alexa. Homewave. VeraPlus ExtRooted and mios server independent.

Offline therealdb

  • Sr. Member
  • ****
  • Posts: 258
  • Karma: +6/-0
  • Automate all the things!
Re: Create separate sensor for each rain sensor value
« Reply #8 on: January 17, 2019, 03:17:25 am »
you can easily use this device file:
https://github.com/mysensors/Vera/tree/development/raingauge

I modified them to show data coming from my weather station. In your case, create a device manually and use some lua code to copy data over the new one.

I don't know why you would have separate device, I think one is more than enough.
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 TMC

  • Jr. Member
  • **
  • Posts: 95
  • Karma: +0/-0
Re: Create separate sensor for each rain sensor value
« Reply #9 on: January 17, 2019, 05:53:54 am »
Yes in Vera web I see all of them correctly. But in a mobile application no. I'm also interested in seeing these values in the Home Assistant. The same situation is with the wind sensor.

Offline TMC

  • Jr. Member
  • **
  • Posts: 95
  • Karma: +0/-0
Re: Create separate sensor for each rain sensor value
« Reply #10 on: January 17, 2019, 06:12:14 am »
you can easily use this device file:
https://github.com/mysensors/Vera/tree/development/raingauge

I modified them to show data coming from my weather station. In your case, create a device manually and use some lua code to copy data over the new one.


Can you help me with creating a new sensor?

Offline therealdb

  • Sr. Member
  • ****
  • Posts: 258
  • Karma: +6/-0
  • Automate all the things!
Re: Create separate sensor for each rain sensor value
« Reply #11 on: January 17, 2019, 03:19:22 pm »
Search the forum via google, you?ll find a lot of examples. Sorry but I?m on mobile right now.
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 TMC

  • Jr. Member
  • **
  • Posts: 95
  • Karma: +0/-0
Re: Create separate sensor for each rain sensor value
« Reply #12 on: January 19, 2019, 04:46:48 pm »
I've managed to create a virtual wind sensor. Can I send the value from the wind sensor to display only "wind gust"?

Offline therealdb

  • Sr. Member
  • ****
  • Posts: 258
  • Karma: +6/-0
  • Automate all the things!
Re: Create separate sensor for each rain sensor value
« Reply #13 on: January 20, 2019, 04:06:04 am »
Yes. But first we need service and variable name. Go to the source device, then advanced, then variables. Take note of the variable name, move your mouse over and take note of the service name.

Repeat for the destination.

Now, you can write a scene with a trigger on the source variable, if this is part of a trigger. Or schedule a scene every x minute to copy. Search the forum to get how to read and write variables, or write back your variables here and I?ll help you.
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 TMC

  • Jr. Member
  • **
  • Posts: 95
  • Karma: +0/-0
Re: Create separate sensor for each rain sensor value
« Reply #14 on: January 20, 2019, 06:22:09 am »
Can you help me? I do not succeed by myself. I searched the forum and did not understand how to create a variable.

I found how to get the source sensor values through http:
http://192.168.1.22:3480/data_request?id=variableget&DeviceNum=191&serviceId=urn:upnp-org:serviceId:WindSensor1&Variable=GustSpeed  (AvgSpeed/Direction)
« Last Edit: January 20, 2019, 06:42:58 am by TMC »