Rain and Fog Sensor modified with Shelly WiFi

I have received a lot of questions on how to do this so hear it is.

You need one Rain and Fog Sensor and one Shelly 1. The Shelly is only used as an input so any Shelly with a switch input will do. If you don’t use a Shelly 1, you probably have to run everything on 24VDC instead of 12VDC so make sure you get the correct Rain and Fog sensor for the voltage,
The simple solution is to use the sensors relay as a switch for the sw input of the Shelly, when the relay activates, it should connect the sw input to ground. You will have some difficulty fitting it all into the sensor box so I did it a bit differently, but this requires some soldering skills (and a diode). Remove the sensor relay and the relay screw terminal (marked in red in the picture below). That will make room for the Shelly 1. In the area marked yellow, there are holes for additional pins, one is 12V another is ground and one is an active low output when rain is detected. Unfortunately I can’t say what pins exactly, I don’t remember and my sensor is up on the roof, you’ll have to figure it out or go with the safe and easy solution and use the sensor relay.

Solder wires as in the picture below and solder a diode is series with the yellow wire, the active low output. The diode must “point” away from the Shelly, its anode towards the Shelly. Any standard diode will do, I used a 1N4148

I put the diode at the Shelly end of the yellow wire, it is in the black heat shrink tube. The sensors output (where we connected the yellow wire) is active low, meaning it connects to ground when rain is detected. When the sensor is not detecting rain, the sensor output is at 12V, this will damage the sw input of the Shelly, hence the diode.