☔ DIY Zigbee rain gauge

Yes that’s also something to keep in mind

I mounted it on a “afdak” in my garden

I can also help you with the calculation. I made an excel for this, also to calibrate the rain gauge. That is also possible in Dutch :wink:

1 Like

Can you share your code for this? I am also Dutch, so I assume you used one of the Dutch weather forecast services (buienradar, buienalarm etc).

I will share the code later today, I’m not behind my laptop right now, but you can start by installing this

1 Like

Thanks (the mentioned integration was already installed, so that was an easy action :slight_smile: )

1 Like


This is the code for the top graph (You also need the Apexcharts integration)
It’s for the buienalarm entity, not buienradar.

    - type: custom:apexcharts-card
      graph_span: 24h
      now:
        show: true
      span:
        start: day
      all_series_config:
        stroke_width: 2
      series:
        - entity: sensor.rainfall_today
          name: Regenval
          color: '#039ae5'
          extend_to: now
        - entity: sensor.neerslag_buienalarm_regen_data
          name: Voorspelling
          extend_to: false
          color: grey
          unit: mm
          data_generator: >
            if (typeof entity.attributes.data.start == 'undefined') {return []}

            let start_date = entity.attributes.data.start * 1000;
            let start_state = Number(hass.states['sensor.rainfall_today'].state);

            return entity.attributes.data.precip.map((precip, index) => {
              if (index != 0) { start_date = start_date + (5 * 60 * 1000) }
              start_state += entity.attributes.data.precip[index] / 12;
              return [start_date, start_state];
            });
2 Likes

Thank you very much! Works perfectly!

1 Like

Why just not use internal HA Telegram integration? No need for NodeRed - makes notification service out of it and that’s it…

A good rain gauge has a measuring surface of at least 200 cm2, a “sharp” edge and a deep and steep funnel.
This minimizes the effect of drops on the edge and splashing on the measurement.
In theory, 1 “bucket” of water can evaporate between two rain showers. The water in the bucket does not evaporate very quickly, there is no wind and direct sunlight in the meter.
Raindrops that “stick” in the funnel do evaporate quickly. If the funnel is dirty, more water will stick and evaporate.

During my studies, a long time ago, I had to calibrate a rain gauge as a research assignment :wink:

I don’t know the tipping point (horizontal position) but if the right bucket is down. In my opinion a little bit more reliable, the “on” status takes longer which reduces the chance that “on” status is missed.

Does anyone have a piece of code to calculate the rain rate in mm per hour?

It’s in the original post!

My gosh, I’m feeling slightly stupid right now :relaxed:. Thanks @parrel

1 Like

I’ve added the trend binary sensor (which for some reason stays on when it starts to rain, but never goes to off, only at midnight). I’ve added the rain rate sensor, but that stays at the last calculated rate even though it stopped raining. What am I doing wrong? :frowning:

1 Like

I decided to keep it that way, because you can’t really figure out when it stops raining, and when to reset it. And to reset it you’d have to do some hacky things in yaml, so I prefer it this way.

When there is a heavy rain storm I use it to see the intensity but nothing more to be honest, I don’t mind it keeping the same value if the rain stops.

If you have a suggestion to solve this let me know :wink:

2 Likes

image

We finally had a bit of rain to test this properly. The values seem reasonable for the amount of rain we had but I don’t know of a site in the UK to check rainfall historically, so I can’t be sure.

1 Like

You could put it next to an old-fashioned rain gauge and compare the results :slight_smile:

3 Likes

I have made the Rain Gauge with an Aqara Door sensor, but I experience that I miss a lot of tip count.
The link quality is LQI 47 which I think should be fine.
Is there a setting in Aqara that could cause the sensor to not report all detections? (like; stop report if too frequent etc)

No settings as far as I know. Do you have a existing zigbee network and does it work? In my experience if a zigbee sensor or switch is not working or sometimes not reporting state even though it is connected OK, it is down to interference with wifi networks.

1 Like

It could be interference like the previous post, but did you also make sure that the reed sensor is working as it should, and not too far away from the magnet?