Float Switch with smart sensor / dry contact switch sensor

21 Mar 2023
Reaction score
I bough a Float Switch that works with a floating on top of a liquid which opens or closes the electrical circuit as the liquid level rises or falls.

My idea was to use the ports S1 and S2 from the Sonoff Mini R4 to close the circuit and so I would be warned by Alexa the water level has gone down, however I’m affraid the S1 and S2 may not completly isolated and somehow I get 110V in the water tank.

Any smart device I can use? Maybe a dry contact sensor? Any suggestion?



  • Float Switch.jpg
    Float Switch.jpg
    97.6 KB · Views: 16
Sponsored Links
Shelly probably make something you could use, relatively cheap and baked in Alexa compatibility. I know they at least used to have something with loads of contacts you could power with relatively low voltage DC.

There's also almost certainly someone out there making a commercial product that would replace your existing switch, but you'll pay an arm and a leg for that.
Thanks ericmark

Do you know how to integrate that with any smart device? My intetion is not to turn on any pump, only to receive an alert on Alexa. The float swicth itself would be connected staright to the smart switch.

I was planning to use any smart switch with only to know the state is ON (buoy is up and circuit closed) or OFF (buoy is down and circuit open), however, as I said, I'm affraid to connect a 110v device to the Float Switch without knowing if it is fuly isolated.


  • Untitled.png
    248.1 KB · Views: 20
Sponsored Links
I considered the idea with my water heating, as hard to run cables from cistern to where boiler is, and was looking at £120 which seems steep and not a smart device.

I did get a relay for my landing lamp, which was zigbee, and it had low voltage contacts for a switch, but shows change of state not if switches on or off.

So interested in any replies, as may help me.
Yeah, you both need a sensor not a switch because you are trying to detect the output of a switch.
Something like this might be a starting point for the float switch sketch with some experimental bodgery (to determine whether the thing expects variable resistance or variable voltage from the temperature/humidity sensors)

DIYnot Local

Staff member

If you need to find a tradesperson to get your job done, please try our local search below, or if you are doing it yourself you can find suppliers local to you.

Select the supplier or trade you require, enter your location to begin your search.

Are you a trade or supplier? You can create your listing free at DIYnot Local