Skip to content

Conversation

@chr-fritz
Copy link

This PR adds two additional counter metrics for the amount of rain in the last hour and today.

@xperimental
Copy link
Owner

Hi @chr-fritz , thanks for your contribution.

I had left out these metrics on purpose when I added the rain metric, because it seemed like they would just be duplicated aggregations that should be possible to re-create using the rain metric and PromQL. Have you tried that before creating the PR? If yes, can you show a bit of the details?

@chr-fritz
Copy link
Author

chr-fritz commented Nov 2, 2025

Hi @xperimental,

sorry for the delayed answer. I don't tested the recreation from the current measurement, as it seams that the rain_amount_mm metric, is just the last measurement, which would be ok, if the resolution is high enough. But Netatmo refreshes the information only in an interval of 10 minutes. Which means that a short but strong rain shower may not be visible within the data of rain_amount_mm. So this metric is always underestimated.

I run the version from the PR the whole week and and looked into the data right now. What i found was one day (last monday) which is interesting:
Comparsion

When I look to these diagramms (the legend is the executed query), I would say that the most usable metric is the sum of today. It will be resetted to zero at midnight and allows to recalculate the current amount. The hour metric is a rolling sum about the last hour.

Additionally, the diagramms show also the low resolution of the rain_amount_mm metric. Compared with the sum of the whole day, it shows no rain between 8 and 9 am. The sum shows some rain.

I updated the PR, to just add the sum of rain today, but not the sum of the last hour.

@chr-fritz chr-fritz force-pushed the feature/rain-gauges branch from 8b35a6b to fa7549c Compare November 2, 2025 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants