☔ DIY Zigbee rain gauge

Perfect! Works flawless.Just what is was looking for. Thanx! :wave:

Should this solution also works with a wind meter? Count the rotations or is the doorsensor not sensitive enough… experience anybody? :face_with_monocle:

2 Likes

Thanks! I also thought about this! But I think that the door sensor battery would be empty really quick if it sends so much data. But you could always try it.

Got the rain gauge from China, installation was really easy.

Great extension. I might migrate to use ESP board and ESP home, so I can make it more like a weather station. Including wind, humidity and temp.

But for now this is great! Thanks again.

1 Like

Do you know a wind meter that works simulair with a contact that closes every rotation? More than happy to order it and see what I can do with an powered ESP module.

Something like this maybe. https://esphome.io/components/sensor/tx20.html

I already found that one, but couldn’t find the device in any shop. I wonder if there is any cheap Chinese wind meter that works simulair as the rain gauge.

I received my rain gauge last week. I will try to find time to integrate it. :slight_smile:

1 Like

Hmmm in theory one could also print a “tipping bucket”-style rain gauge (https://www.thingiverse.com/search?q=Rain+gauge&type=things&sort=relevant), attach a magnet to it, rig it up to the aqara sensor and hook it up to HA…

Yeah I tried that first, and destroyed the reed sensor lol. But there are some pretty good tipping bucket rain gauges on thingiverse.

I made this using the same gauge with the Sonoff SNZB-04 door sensor. It’s not even necessary to solder anything, just remove the board that comes in the rain gauge (with the reed switch) and replace it with the door sensor (taken out of the case). Place it so the black bar on the sensor is about where the reed switch used to be, in the middle where the magnet from the bucket passes. I just cut out some cardboard to fit and taped the door sensor to it. The builtin magnet in the gauge is enough to trip the door sensor.

12 Likes

Quick question when does the day reset to 0.0mm is it midnight or can we set the time?
Thanks again for this it’s awesome.

1 Like

Right now it resets every day at 00:00, but you can set the time, and range yourself. You can also reset every week for example. More info on that here:

1 Like

Mine arrived today on the slow boat from China, One month 8 days :roll_eyes:
Installed right next to my other gauge so should be a good test on accuracy.

Awesome diy thanks verry much

3 Likes

Really nice! What’s the name of your weather station?

It’s a Holman, Does the trick but now I get the results even when not at home thanks mate.

1 Like

I did the same with the Aqara door sensor. Works great.

2 Likes

It is also possible to display rainfall pr hour if we measure the time between two tips.

    - platform: trend
      sensors:
        rain:
          entity_id: sensor.rainfall_today
          min_gradient: 0.000138889
    rain_pr_hour:
        friendly_name: "Rain pr hour"
        unit_of_measurement: 'mm/h'
        value_template: >-
          {% if state_attr('binary_sensor.rain','gradient') > 0 and state_attr('binary_sensor.rain','gradient') < 0.0278 %}
          {{ (state_attr('binary_sensor.rain','gradient')*3600) | round(1) }}
          {% else %}
          {{ states('sensor.rain_pr_hour') }}
          {% endif %}

sensor.rain_pr_hour is between 0 and 100mm/h

4 Likes

Hello,

Thanks for your sharing.
I have an issue, if home assistant or zigbee2mqtt restart, the counter increase and rainmeter also…
Have you seen that ?
Do you have any ideas to resolve it ?

Thank you in advance .
Tuiting.

I suspect that this is caused by the history sensor. When you restart z2m, it might report ‘off’ for a second, causing the history sensor to increase. I don’t have this issue with ZHA. Maybe you need to add something to the mqtt settings to have it remember the last state?

Thank you for your reply. Indeed, I saw the option “retain” and everything works perfectly.

devices:
  '0x00158d0005225c0d':
    friendly_name: DO_RAIN
    retain: true

Thank you so much.

3 Likes