Popp Z-rain not returning to zero

Hi all
I’ve been playing around with the Z-rain sensor and Hassio 3.12. Adding the sensor is a bit tricky since it almost immediately goes into sleeping mode and HA doesn’t have time to finish with the setup. I have to push the inclusion button on the Z-rain a few more times until it’s listed as Query Stage Complete.
Now, the thing is: After it’s been raining the HA still reports the last mm count for the Z-rain rain amount. Like we got 1mm yesterday and that’s still showing on the dashboard. I used to run Domoticz and don’t remember having this issue with the Z-rain before.
Any ideas?

Regards
/Fredrik

Bump.
I realize the Popp Z-rain isn’t the most common device but what about general terms. Has anyone had this issue with another sensor? Reported value stuck?

/Fredrik

Hi all
I’ll reply to this myself with my workaround if anyone else run into the same problem. After contacting the Popp support, which landed me at aeotec, I got the suggestion to send the Rain Counter 0 command to the Z-rain. This worked and the Z-rain is reporting 0 rain even after rebooting HA.
Thankfully there is a suitable action to call in automation which led me to set up the following which has worked fine.

automation
  alias: ZeroRain
  description: ''
  trigger:
  - platform: template
    value_template: '{{ as_timestamp(strptime(states(''sensor.date_time''),''%Y-%m-%d,
      %H:%M'')) - (as_timestamp(states.sensor.popp_co_popp_z_rain_rain_sensor_general.last_changed))>1000}}'
  condition:
  - above: '0'
    below: '90'
    condition: numeric_state
    entity_id: sensor.popp_co_popp_z_rain_rain_sensor_general
  action:
  - data:
      node_id: 23
      parameter: 1
      size: 2
      value: 0
    service: zwave.set_config_parameter

Hi @TheHoff.
I am thinking of getting a Popp Z-Rain gauge and connect it to my raspberrypi 3b and get the statistc into home assistant. Can you recommend it? How are you running it? Please guide me!

Hi Zkaning
No probs, I’ll try to offer as much insight as I can. I got mine in December 2019 when my Oregon 433mhz rain gauge broke after years on the roof top. Like I’ve been “droning on” in my posts I used Domoticz until I switched to Home Assistant a month ago and there seems to be something differing between these two in how the data from the Z-rain is being processed.
Anyway. The Z-rain as a unit is a good build and I recommend it for the price it has, it’s plastic but compared to Oregon the parts looks like they will last longer.
Inclusion with Home Assistant is pretty easy if you follow whats written under https://www.home-assistant.io/integrations/zwave/. I use the Aeon Z-stick Gen5. What took me a while to understand was how a battery powered Z-wave device, like the Z-rain, communicates compared to a powered device like a wall switch. The Z-rain only communicates by itself at a set interval which by default is once every 24h and it’s only at these times you can send commands, like rain amount reset, to the device. This communication interval can be changed in the HA Z-wave section but an interval of 10 minutes drained my lithium batteries in two months.
I basically use the default Lovelace card on my dashboard as seen below. Something one needs to handle somehow is the Rain amount value sent by the Z-rain, it’s not shown properly on my screenshot but at the moment it was 16.5mm which was one days worth of rain, but it was three days ago and is still being sent by the Z-rain. But Popp I’m told this is by design. The Rain Rate value goes back to 0 as soon as the rain stops but amount continues to accumulate until you factory reset the sensor or have HA send a reset command, which can only be done during the communication intervals. Something of a caveat I would say.
zrain

Thank you sooo much!! I will dig deeper into this when I have the time but if I understand it correct it is possible to reset the rain amount every 24h and then get that 24h accumulated per day and have a graph showing the last week amount divided per day? That is what I want to know to be able to watering my lawn when the last 7 days is below lets say 25mm rain :slight_smile:

Think nothing of it.
I ended up with this automation which resets the counter in HA just after midnight. The caveat here is the “zwave.set_config_parameter” command, if your HA restarts before the reset command is received by the Z-rain, which depends on the communication interval, the Z-rain will report back the last known rain amount to HA which might mess up any depending automation. Like your lawn watering logic. In my case I got lousy graphs in Graphana with the rain amount graphs jumping back an forth and made it next to impossible to read if there had been any actual rain or not.

/Fredrik

alias: ZeroRain
  description: ''
  trigger:
  - at: 00:01:00
    platform: time
  condition:
  - above: '0'
    below: '90'
    condition: numeric_state
    entity_id: sensor.popp_co_popp_z_rain_rain_sensor_general
  action:
  - data:
      node_id: 24
      parameter: 1
      size: 2
      value: 0
    service: zwave.set_config_parameter
  - data:
      entity_id: sensor.popp_co_popp_z_rain_rain_sensor_general
      state: 0
    service: python_script.set_state

So for quick rain detection this device is not good, correct?

Hi PuckStar
Actually, quick detection of rain is where it’s best at. It has a feature which gives an instant notification of “rain activity”. My problem is still the accumulation feature where the sensor remembers the total rainfall instead of leaving it to HA.

/Fredrik

thanks
anyway i making a package for manage rain rate and rain volume.

your template is ok but need utcnow() and not sensor.date_time, like this:

{{ (as_timestamp(utcnow()) - as_timestamp(states.sensor.popp_co_popp_z_rain_rain_sensor_rain_rate.last_changed)) | int > (states(“input_number.atmospheric_events_rain_rate_reset_value_wait_rain_management”) | int * 60) | int }}

and you can use an input number for select the right time difference between sensor last_changed and now. * 60 if you set “minutes” as u.m. in the input_number options.

i created an automation that write the sensor in an input_text box only if it changes, so i can do double check…

The difference between domoticz and hassio causing the behaviour you see is that domoticz keeps track of the value at 0:00 and reports both the value returned by the z-rain as the total rainfall, plus the difference between the current value and the value at 0:00 as today’s rainfall. Hassio apparently only shows the value reported by the device.

1 Like

Hi Frederic,
please how to get the quick detection of rain from Z-rain?
Pavel

Hi
I don’t know how you define “quick” but if there is heavy rain which causes the tipping cup inside the Z-rain to move it’s pretty quick at sending a Z-wave message. After that it’s up to the receiving logic, in my case Home Assistant, to calculate the daily difference. Light rain or if it’s dirt inside the funnel might cause the Z-rain to be slow in triggering on rain, I’ve also had to lubricate the tipping cup a few times.

On a side note I’ve tossed around the idea of using a moisture sensor and a towel as a sort of “is it raining yes/no?”-sensor.

/Fredrik

I’m reviving this thread since I can’t find any answer to this.

I have similar issues with my Popp Z-Rain, but it’s the value that show how much it rains right now that doesn’t return to zero. So for the past week couple of weeks it’s been saying that it rains 7mm/h constantly. Rather useless if you ask me :slight_smile:

Does your Popp Z-Rain reset the flow value to 0 when it stops raining?

I’ve tried moving my sensor closer to the Telldus bridge, but even if it’s indoors it still doesn’t reset the value. I’ve also flipped the cradle inside to simulate light rain and then just left it so it’d understand that it has stopped raining but no luck.

Suggestions are highly appreciated.

Hi ,

I have created 3 new utility meters sensors using helpers : hourly , monthly , yearly

pluviometer

1 Like