Hi everyone, I wanted to share a fun and affordable DIY project I recently completed—a rain gauge using an IKEA parasoll door contact and a WH-SP-RG rain gauge. I’ve always been interested in home automation and meteorology, so combining the two was a natural fit!
Why DIY?
I noticed that most commercial rain gauges were either too expensive or relied on proprietary gateways, which I wanted to avoid. The WH-SP-RG rain gauge caught my eye because it’s cheap (~€20) and does the essential job of translating rain into pulses. However, it lacks wireless connectivity, so I needed a way to integrate it into my smart home setup.
How It Works
- Rain Gauge Mechanism: The WH-SP-RG uses a seesaw mechanism with a magnet. When enough rainwater collects, the seesaw flips, causing the magnet to pass a reed switch and generate a pulse.
- Wireless Integration: I replaced the original reed switch with an IKEA parasoll door contact. The parasoll’s hall sensor detects the magnet’s movement, sending wireless pulses to my openHAB system.
- Zigbee Network Expansion: To ensure reliable communication, I used an IKEA Tretakt plug as a Zigbee repeater, extending the network to cover my yard.
Advantages of This Setup
- Reliability: The parasoll door contacts are designed for security, so phantom or missed pulses are rare.
- Weatherproofing: The rubber-sealed battery compartments keep everything dry, even after six months of outdoor use.
- Easy Battery Management: Monitoring battery levels and replacements is straightforward in openHAB.
Challenges and Solutions
- Magnet Placement: The magnet’s position was critical. After some trial and error, I found the optimal spot to ensure consistent detection.
- Signal Stability: Initially, I struggled with signal dropouts. Adding the Tretakt repeater solved this issue, providing a stable connection.
Implementation in openHAB
I created items in openHAB to track rain accumulation in liters per square meter. A rule translates each pulse into a fixed amount of rain (0.303 l/m²) and updates the totals hourly and daily. This setup allows me to monitor rainfall patterns and integrate the data into my smart home automation.
Unexpected Fun
One funny incident involved a group of snails climbing onto the sensor and flipping it over! I now mount it on a plate to prevent such mishaps. It’s a good reminder to secure outdoor devices properly.
Why Not Use an ESP?
I considered using an ESP32 for pulse capture but decided against it due to challenges with deep sleep mode, battery management, and debounce issues. The parasoll solution proved simpler and more reliable.
Conclusion
This project was a great way to combine affordability, reliability, and smart home integration. I’m thrilled with how it turned out and love checking the rainfall data during storms. If you’re looking for a DIY weather project, I highly recommend this approach!
Happy tinkering! ![]()
![]()