I was looking for reliable and cheap solution for a rain sensor to trigger an alarm in OpenHab when windows are open. Ready made sensors are available e.g. from Homematic but expensive.
After some search I found the Rain Sensor RS 12. You can easily combine the output (which goes to “low” when rain is detected) with any device providing a switch input. I choose the Shelly (plus) 1.
You can directly connect the “OUT” teminal of the RS12 with the Shelly “SW” pin. Additionally a 12V power supply is needed. After setting up the Shelly for MQTT operation, adding it as thing to OH and creating a channel for the contact status, you have a rain sensor for 30…40 € added to your home control system.
In my case when rain is detected, I created a rule to
- mute all running audio (Spotify, radio, TV) etc.
- announce the rain
- announce all open windows, awnings, doors etc.
Edit 2.8.24: Schematic updated.