I’m using a LoRain Rain Gauge (LoRaWAN) that reports via MQTT. The sensor sends the amount of rainfall that occurred in the previous 15 minutes. It only sends a message when there has been rain, so every update is essentially delayed data about the past.
Another issue is that Home Assistant carries the last reported value forward indefinitely. Since the sensor only reports about the past 15-minute window and does not indicate anything afterward, Home Assistant keeps showing that last rainfall amount even though no new rain has occurred.
My question:
What is the best way to configure this in Home Assistant so that the rainfall is shown at the correct point in time?
Is there a way to adjust or backdate the sensor history so the recorded value is applied to the actual time window it represents?
And how can I prevent Home Assistant from holding on to the last value once that 15-minute period has passed?
Any suggestions or examples of how to handle delayed sensor data in Home Assistant would be greatly appreciated!
I would expect the sensor to report a value of zero at the next reporting interval (15 minutes later) if there hadn’t been any more rain. Are you saying this is not happening?
Everything else sounds like it is functioning as expected.
What is it that you want to accomplish in HA? From what I can tell the device you have is to see the amount of rain for e.g. irrigation purposes. That is about how much water per piece of soil and is not time critical. Tip bucket designs need time to fill to tip the bucket, so they are never instant (though faster than 15 mins).
If you want to know if it rains immediately, and also when it stops, there are other solutions. The cheapest form is a panel with copper wiring on it. It is basically a contact sensor that relies on the conductivity of water. They react quickly on rain but take time to dry when rain stops, and have a tendency to corrode over time. They are cheap to replace though.
If you have money to burn you can go for the Rolls Royce of rain sensors - the optical ones:
I have the RG-9 which reachts within seconds to both start and stop, has 7 levels of rain intensity and is supported by ESPHome. It is industrial grade. The version I have does not provide quantities of water, I have a separate tipping bucket for that. Hydreon sells variants that include that too.
The goal is to know how much it rained in a certain period.
I have a system setup to measure moisture levels and humidity within my cavity walls. I want to see if there is a direct correlation between rain and the relative humidity rising within the cavity wall.
The sensor you mentioned is nice but it doesn’t directly support the Lora protocol.
Most likely the relation is with temperature, so I’d include that in the graphs.
Another suggestion that may eliminate the temperature influence: The thermal comfort integration has, among many other things, a way to calculate absolute humidity from temperature and relative humidity. You should be able to see from this if the actual amount of moisture increases: