Water leaks control

I connected inductive sensor that bought from aliexpress for couple of euros to the GPIO of my raspberry Pi running the OpenHAB and I use MQTTany - GPIO and more over MQTT to get the data. Also works fine.

Because of the operating voltage of the inductive sensor is higher than what the GPIO can accept, optocoupler in between should be used and also >5V power supply to feed the sensor.