Is there still a need for this or any advantages instead of using the history stats way?
When i restart HA the value of the rainsensor won’t reset.
Is there still a need for this or any advantages instead of using the history stats way?
When i restart HA the value of the rainsensor won’t reset.
I could never get the original method to work properly, it would always reset after restarting HA and I’d lose the total for the day.
The counter method has worked flawlessly for me.
I wanted to show a chart of weekly rainfall over a year. I uses Apex charts as below but the chart only ever shows the current week or so, any suggestions on what I am doing wrong?
Thanks.
type: custom:apexcharts-card
graph_span: 365d
header:
show: true
title: RAINFALL WEEKLY
show_states: true
span:
start: week
offset: ‘-364d’
series:
It’s probably because your apexchart only looks at the history, which is kept for 2 weeks by default I think. The chart should use the long term statistics, which contains data kept ‘forever’.
You could use the default HA card, and do it like this.
chart_type: bar
period: week
type: statistics-graph
entities:
- sensor.rain_week
stat_types:
- state
title: Weekly
days_to_show: 365
Thanks, I tried that and it just stuck on displaying “Loading statistics…”
How is the respons time and sensitivity of this rain gauge? Does it respond immediately when it’s starting to drizzle? Like picture below?
This gauge is mainly to measure the amount of rain, rather than detecting rain. For detecting rain, there is a better way. Search for rain drop sensor. You can hook that sensor up to an aqara sensor as well
Hi,
I want to setup the apex card to graph the forecast and intensity, I am looking over it probably in this chain, but do you have a code for the card? I tried to make it myself using the attributes of the buienalarm but have not been successful.
Thanks for this DYI project!
Accuracy is 0.3 mm. It reacts after detecting such precipitation. Overall, it works very nicely. I calibrated it with a manual meter and it is perfect.
I’ve added it to the original post, under the screenshots of the graphs!
After 3.5 years mounted, I decided to give it a clean.
All electrical components were dry and no corrosion is present. Still on the original battery.
Hi Guys,
I found an easier way to grab the flip event: without tools, open the rain box, remove the built-in magnetic sensor with all its cable and close the internal cover. Now, with a small grip, remove the flip metalic axis that hold the flip and turn the rain receiver to have the flip magnet facing the outside. Next, put the metalic axis back on its original location. The flip should be working normally.
Now, using a classic door sensor like this AAA-cells powered one, https://fr.aliexpress.com/item/1005005875872668.html,
pair it with HA and note EntityId. It will be needed to create sensor device as stated in top of this project. After having created the flip sensor according top post guidelines, do not forget to restart HA. I forgot that stupid step
Finally, remove the door sensor’s plastic top and bottom covers,
locate the magnet sensor on the motherboard. Using 2-sided tape, place the sensor (on its side for sample), taking care of the flip magnet and door sensor detector. When tested a couple of time the flip is working fine, replace the cover of the rain collector.
Depending of the door-sensor location and size, you may have to adapt flip count value by 2 if the flip remains in “close/open” state or “open/close/open” when flip occurs…
Good luck and thanks for nice DIY project !!!
Th
Good solution! Do you think the sensor will survive the rain when placed on the outside of the box?
The sensor IS inside the box Once taped, cover has to be reinstalled … Forgot to note it … I updated my prevous reply. Thanks for the point
Hi, welcome to the forum!
I have been following this topic for some time because I like this idea to create such a device so simply.
From you description, I don’t understand the process…
You don’t happen to have any pictures that make it clear?
Are using those door sensors yourself on other places as well? The AAA batteries are a big benefit.
If yes:
TIA
Here you are :
Open the rain collector, Remove cable and circuit
Locate Flip axis, extract, rotate collector, reseat
Install Zigbee Door sensor after having paired it. I use Zigbee2MqTT but you may
use other Zigbee integration.
Then close the box and install it.
After Installation :
From Home Assistant Side now, edit configuration.yaml, add
sensor:
- platform: history_stats
name: Rainsensor flips
### REPLACE ENTITY_ID WITH YOUR SENSOR ID
entity_id: binary_sensor.ga_rain_meter_contact
state: 'off'
type: count
start: '{{ now().replace(hour=0, minute=0, second=0) }}'
end: '{{ now() }}'
template:
- sensor:
- name: Rainfall today
unit_of_measurement: mm
state_class: total_increasing
unique_id: rainfall_today
state: >-
{% set count = states('sensor.rainsensor_flips') | int(0) %}
{% set mm = count * 2 * 0.30303 %}
{% if count >= 0 %}
{{ mm|round(1, 'floor') }}
{% endif %}
# If you have issues with the history sensor doubling after restarting HA, add te line below (@BigG)
availability: "{{ (states('sensor.rainsensor_flips') not in ('unknown', 'unavailable')) }}"
When flipping over, if the sensor goes to OPEN/CLOSE/OPEN thanks to its position facing the magnet sensor or not, then modify line
{% set mm = count * 2 * 0.30303 %}
as
{% set mm = count * 0.30303 %}
to count each flip.
Now restart HA. You can now create graph like
chart_type: bar
period: hour
type: statistics-graph
entities:
- sensor.rainfall_today
stat_types:
- change
title: Hourly Rainfall
days_to_show: 1
Have fun !
Th
Hello. I am just thinking.
It would be nice to know if it is raining now at home even at the lowest intensity. If it is mildly sprinkling, the gauge will not not collect enough drop to tip the scale (at less my setup will not). I was thinking of placing one of this either on top of the gauge or to the side. Though the material will not withstand the sun for a long period of time before it starts to crack.
This is what you can use best for that (I have no experience with it yet)
https://smarthomescene.com/reviews/tuya-zigbee-solar-rain-sensor-rb-srain01-review/
According to that review, this seems the perfect device not only for detecting rain as it seems to even be able to measure somehow the quantity…