☔ DIY Zigbee rain gauge

remove the two comments, or fix the indentation like in the original post. I suspect they cause an error

#If you have issues with the history sensor doubling after restarting HA, add the line below (@BigG)
#availability: "{{ (states('sensor.rain_sensor_flips') not in ('unknown', 'unavailable')) }}"

1 Like

Yes, I removed the two comments and now Rainfall Today is 0.4 in.
I suspect at this point, the weekly, monthly and annual all should read the same value.
They are reading Unknown. That’s an assignment for me to figure out.

Thank you for helping.

1 Like

@ekainz Unfortunately, I have to write again. Everything works except for the rain intensity. It always only shows me 0.00mm/h. But I can’t find the error. When I put it in the developer tools, it tells me ‘trigger’ is undefined.

Is this just a formatting issue? I just can’t get to the error and hope someone can help me :frowning:

    - name: "Regen Intensitaet"
      unique_id: regen_intensitaet
      state: >
          {% set lastTip = as_timestamp(now()) - as_timestamp(states.binary_sensor.diy_zigbee_regenmesser_contact.last_changed) %}
          {% set betweenTips = states('sensor.regen_sensor_zeit_zwischen_tropfen') | as_timedelta %}
          {% set max_time = max(lastTip, betweenTips.total_seconds()) %}
            {{ (0,30303 / (max_time / 3600)) | round(1, default=0) }}
      state_class: measurement
      device_class: precipitation_intensity
      unit_of_measurement: "mm/h"
  - trigger:
      - platform: state
        entity_id: binary_sensor.diy_zigbee_regenmesser_contact
    sensor:
      - name: Regensensor Zeit zwischen Tropfen
        unique_id: regen_sensor_zeit_zwischen_tropfen
        state: >
          {{ (now() - trigger.from_state.last_changed).total_seconds() }}
        state_class: measurement
        unit_of_measurement: "s"

It’s been a while since I’ve asked so I will again…

Has anyone created a fully 3D printed case yet? Not a modified version of the commercial ones people are using?

while not exactly the same but works just as well and designed for the Aqara door sensors. This is what I’m using.

https://smartsolutions4home.com/ss4h-zrg-zigbee-rain-gauge/

2 Likes

That’s seems to be exactly what I’m looking for! Thank you! :+1:

Any reason this wouldn’t work to measure sprinklers?

Ordered the parts and have tested the code with a door sensor I have here. Looking forward to getting this setup!

As long as you can get a representative sample of water to go into the measurement catch funnel I don’t see why it shouldn’t work.

But depending on the type of sprinklers you have that might not be possible.

Hello, with the help of a friend, I was able to make the rain gauge soldering to work. Now this is working in HA.
However I noticed, an issue. When rain is very weak, let say 1 mm drop in 30 minutes, the rain gauge does not count anything. I noticed the drops remain on the device and don’t fall into the hole. Have you also noticed it ? And did you find a workaround ?

Good to hear you got it working.

I have not noticed that, but someone else had the same issue, and I think they used a bit of wax to stimulate the raindrops to slide to the hole.

If they do not pass the hole, you could try to make it wider with a drill.

1 Like

Another option: use rain-x to make the water flow easier.

I have an issue with my intensity counter: it always shows 0.3 mm/h, even when there is no rain. It never goes to zero. What could be the problem?

Do you use z2m or zha? Do you use the approach in the original post or another approach?