# Raingauge

**URL:** <https://community.homey.app/t/raingauge/63893>\
**Category:** Questions & Help\
**Created:** [May 21, 2022, 1:40pm UTC](https://community.homey.app/t/raingauge/63893 "2022-05-21T13:40:53Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![Frans\_Keeman](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/frans_keeman/32/79711_2.png) [@Frans\_Keeman](https://community.homey.app/u/Frans_Keeman)\
**Post date:** [May 21, 2022, 1:40pm UTC](https://community.homey.app/t/raingauge/63893/1 "2022-05-21T13:40:53Z")

</div>

Hi all,

I made this rain gage after sending back the gauge from Z-rain. Bad connecting and not worth the money at all. So now I get the signal and every time it switches I get 0.15mm of rain (still have to check this). Now I would like to get a message with the total times per day it switches. Is this possible?

 ![IMG_20220521_151630](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/d/0/d04d00628e03e12d93094ffc2e524bf21135c76d.jpeg)  
 ![IMG_20220521_151551](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/5/4/543aeccffa7625c52bfc1ee4bd02a43195381ee2.jpeg)

---

<div class="post-metadata">

**Author:** ![Adrian\_Rockall](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/adrian_rockall/32/13209_2.png) [@Adrian\_Rockall](https://community.homey.app/u/Adrian_Rockall)\
**Post date:** [May 21, 2022, 2:40pm UTC](https://community.homey.app/t/raingauge/63893/2 "2022-05-21T14:40:28Z")

</div>

So, if you get a message every time it switches then create a flow to increment a variable and another flow to reset the variable at a specified time (midnight).

---

<div class="post-metadata">

**Author:** ![Adrian\_Rockall](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/adrian_rockall/32/13209_2.png) [@Adrian\_Rockall](https://community.homey.app/u/Adrian_Rockall)\
**Post date:** [May 21, 2022, 3:02pm UTC](https://community.homey.app/t/raingauge/63893/3 "2022-05-21T15:02:43Z")

</div>

You could even add a virtual sensor for measure\_rain and use the following flows to updated it:  
 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/6/6/668afad2200b61ff9349f28217007474d9c69baf.png)

First create a variable called Rain. Then update the variable each time the sensor switches:

Replace the Trigger card above with the one from the sensor.

Now update the virtual sensor each time the variable updates:

---

<div class="post-metadata">

**Author:** ![Frans\_Keeman](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/frans_keeman/32/79711_2.png) [@Frans\_Keeman](https://community.homey.app/u/Frans_Keeman)\
**Post date:** [May 21, 2022, 3:46pm UTC](https://community.homey.app/t/raingauge/63893/4 "2022-05-21T15:46:51Z")

</div>

Wow that’s quick 👍. Oke tonight I will try if I can follow what you discribed. Thanks for the quick response​:grin:👍

---

<div class="post-metadata">

**Author:** ![Frans\_Keeman](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/frans_keeman/32/79711_2.png) [@Frans\_Keeman](https://community.homey.app/u/Frans_Keeman)\
**Post date:** [May 26, 2022, 12:11pm UTC](https://community.homey.app/t/raingauge/63893/5 "2022-05-26T12:11:58Z")

</div>

HI Adrian,

I have got it almost working. The variable update works fine. The problem is the virtual sensor that does not update. I see the bold text in your picture MEASURE\_RAIN. What is that? Is that homey scripts? How do I update the virtual sensor?

---

<div class="post-metadata">

**Author:** ![Adrian\_Rockall](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/adrian_rockall/32/13209_2.png) [@Adrian\_Rockall](https://community.homey.app/u/Adrian_Rockall)\
**Post date:** [May 26, 2022, 12:15pm UTC](https://community.homey.app/t/raingauge/63893/6 "2022-05-26T12:15:33Z")

</div>

When you add the virtual sensor, it will have a property depending on the type. I added a Rain sensor so that has a property called measure\_rain which you need to set to update the value.

---

<div class="post-metadata">

**Author:** ![Adrian\_Rockall](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/adrian_rockall/32/13209_2.png) [@Adrian\_Rockall](https://community.homey.app/u/Adrian_Rockall)\
**Post date:** [May 26, 2022, 12:20pm UTC](https://community.homey.app/t/raingauge/63893/7 "2022-05-26T12:20:21Z")

</div>

I used the Virtual Devices app from the Homey store to add the Virtual sensor.

---

<div class="post-metadata">

**Author:** ![Frans\_Keeman](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/frans_keeman/32/79711_2.png) [@Frans\_Keeman](https://community.homey.app/u/Frans_Keeman)\
**Post date:** [May 26, 2022, 3:19pm UTC](https://community.homey.app/t/raingauge/63893/8 "2022-05-26T15:19:10Z")

</div>

Adrian,how can i see what the property is from my virtual sensor?  
 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/c/a/cad543b83b2bc1c6105c0e1965ffd17417314868.png)  
these are the options i have so i took “sensor”

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/c/e/ceb4c36587afda323b45db55747b8e45bb69c314.png)  
and then “Regen” (rain)

so now i have a virtual sensor with .mm

![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/5/4/5474765cd8aa26ee63ca261a4a2656cb4bd45844.png)

and i am getting this error

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/a/1/a1c30c03ba9eae20a94387141921532302ec27ce.png)

---

<div class="post-metadata">

**Author:** ![Adrian\_Rockall](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/adrian_rockall/32/13209_2.png) [@Adrian\_Rockall](https://community.homey.app/u/Adrian_Rockall)\
**Post date:** [May 26, 2022, 3:29pm UTC](https://community.homey.app/t/raingauge/63893/9 "2022-05-26T15:29:24Z")

</div>

In the card for set sensor valve type **measure\_rain** in the sensor box.

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/c/f/cf8e74a5cc21808ed4e7da06effdf09e888283f3.png)

---

<div class="post-metadata">

**Author:** ![Adrian\_Rockall](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/adrian_rockall/32/13209_2.png) [@Adrian\_Rockall](https://community.homey.app/u/Adrian_Rockall)\
**Post date:** [May 26, 2022, 3:34pm UTC](https://community.homey.app/t/raingauge/63893/10 "2022-05-26T15:34:30Z")

</div>

This developer page gives a hint at the names of capability names to use:

> **[Tutorial: Device Capabilities - Homey Apps SDK v3](https://apps-sdk-v3.developer.homey.app/tutorial-device-capabilities.html)**

The text you need to enter is from the ID column but you have to do a bit of guessing to workout which capability applies to which virtual device.

---

<div class="post-metadata">

**Author:** ![Frans\_Keeman](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/frans_keeman/32/79711_2.png) [@Frans\_Keeman](https://community.homey.app/u/Frans_Keeman)\
**Post date:** [May 26, 2022, 4:19pm UTC](https://community.homey.app/t/raingauge/63893/11 "2022-05-26T16:19:30Z")

</div>

I had tried this yesterday and now again. Same failure but then I saw I used a capitle letter M instead of m. Now it works fine. Thanks again for your quick help. For the first time I am waiting for rain now 😂😂

---

<div class="post-metadata">

**Author:** ![FKey](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/fkey/32/14793_2.png) [@FKey](https://community.homey.app/u/FKey)\
**Post date:** [May 26, 2022, 6:11pm UTC](https://community.homey.app/t/raingauge/63893/12 "2022-05-26T18:11:18Z")

</div>

Hope the counting flow will not be blocked by homey because it is [triggered too often](https://community.homey.app/search?q=%22Triggered%20too%20often%22)

---

<div class="post-metadata">

**Author:** ![RonnyW](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/ronnyw/32/10879_2.png) [@RonnyW](https://community.homey.app/u/RonnyW)\
**Post date:** [May 26, 2022, 6:22pm UTC](https://community.homey.app/t/raingauge/63893/13 "2022-05-26T18:22:39Z")

</div>

Hi, ist this gauge selfmade/printed? If not, could you please share a link? With the Aqara sensor it’s a clever solution 👍

---

<div class="post-metadata">

**Author:** ![Frans\_Keeman](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/frans_keeman/32/79711_2.png) [@Frans\_Keeman](https://community.homey.app/u/Frans_Keeman)\
**Post date:** [May 26, 2022, 8:59pm UTC](https://community.homey.app/t/raingauge/63893/14 "2022-05-26T20:59:44Z")

</div>

Yes thats correct, it’s printed. I don’t know where you live maybe I can help you out. Otherwise I can share the print file if your not in the Netherlands

---

<div class="post-metadata">

**Author:** ![RonnyW](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/ronnyw/32/10879_2.png) [@RonnyW](https://community.homey.app/u/RonnyW)\
**Post date:** [May 26, 2022, 9:18pm UTC](https://community.homey.app/t/raingauge/63893/15 "2022-05-26T21:18:03Z")

</div>

Thanks, but I’m from Germany. I saw similar gauges online with a reed sensor inside. Seems to be something similar which could work with a Aqara sensor. Thanks for the idea 🙂

---

<div class="post-metadata">

**Author:** ![Mike1233](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/mike1233/32/20991_2.png) [@Mike1233](https://community.homey.app/u/Mike1233)\
**Post date:** [May 27, 2022, 4:35am UTC](https://community.homey.app/t/raingauge/63893/16 "2022-05-27T04:35:33Z")

</div>

What type of sensor did you used?  
I don’t recognize it.

---

<div class="post-metadata">

**Author:** ![Frans\_Keeman](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/frans_keeman/32/79711_2.png) [@Frans\_Keeman](https://community.homey.app/u/Frans_Keeman)\
**Post date:** [May 29, 2022, 6:54pm UTC](https://community.homey.app/t/raingauge/63893/17 "2022-05-29T18:54:54Z")

</div>

The sensor is an aqara door sensor, cheap and effective. Works like a charm

---

<div class="post-metadata">

**Author:** ![Mike1233](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/mike1233/32/20991_2.png) [@Mike1233](https://community.homey.app/u/Mike1233)\
**Post date:** [May 30, 2022, 5:01am UTC](https://community.homey.app/t/raingauge/63893/18 "2022-05-30T05:01:26Z")

</div>

@Frans_Keeman  
Thank you.
