Page 1 of 1

ESP8266 Domoticz Level sensor to switch

Posted: 02 Nov 2021, 13:56
by servicenet
Hi,

I am looking how i can automate my pond level.

I have a level sensor already working in ESP / Domoticz but now i want that when the level of the pond is X centimeters en switch wil activate the water valve, en when the level is high enough the switch is turned off.

Can somebody tell me how to do this?

Re: ESP8266 Domoticz Level sensor to switch

Posted: 02 Nov 2021, 15:46
by chromo23
Personally i don’t see why a microcontroller is necessary.
I solved this issue with a levelswitch like the one in the picture below. It is completely analog. The switch opens when the water is lower than the lower buoy and closes when the water level reaches the upper buoy...
Bildschirmfoto 2021-11-02 um 15.41.17.png
Bildschirmfoto 2021-11-02 um 15.41.17.png (244.98 KiB) Viewed 8993 times

Re: ESP8266 Domoticz Level sensor to switch

Posted: 02 Nov 2021, 15:57
by Ath
chromo23 wrote: 02 Nov 2021, 15:46 i don’t see why a microcontroller is necessary.
:lol: The fun is in having the status of the switch/pump visible on your computer-screen (PC, tablet, mobile, etc.), and having the on/off log in Domoticz (so you can back-track when exactly it overflowed while you where away :o )

Re: ESP8266 Domoticz Level sensor to switch

Posted: 02 Nov 2021, 16:27
by servicenet
I dont see why it is necessary to have a pound in the garden. That was not my question!

return
{
on =
{
devices = { 'schakelaar'}
},

execute = function(domoticz, nivo)
if (schakelaar.active and domoticz.devices('nivo').distance < 25) then
domoticz.devices('schakelaar').switchOn()
domoticz.notify('This rocks!',
'Turns out that it is getting filled',
domoticz.PRIORITY_LOW)
end
end
}

Re: ESP8266 Domoticz Level sensor to switch

Posted: 02 Nov 2021, 16:43
by chromo23
That was not my question!
I know.. but the answer still solves your problem.... you can of course hook the switch to your microcontroller. whatever suits you.
:lol: The fun is in having the status of the switch/pump visible on your computer-screen (PC, tablet, mobile, etc.), and having the on/off log in Domoticz (so you can back-track when exactly it overflowed while you where away :o )
:lol:

Re: ESP8266 Domoticz Level sensor to switch

Posted: 02 Nov 2021, 16:58
by servicenet
No it is not the solution as you dont know the problem.

I have a DRUM filter that has auto cleaning, sometimes the pollution is very high and in the summer the water evaporate quick in the pound.

So i try your sollution years a gone, but i have plants and pollution in the pound durring the summer.

Now i try this with a sensor that will open a switch to filled the pound.

Re: ESP8266 Domoticz Level sensor to switch

Posted: 02 Nov 2021, 17:08
by chromo23
Can you please elaborate your problem. i don´t quite get it i guess....
In my understanding a switch is also a sensor and tied to a buoy it makes a perfekt level sensor.
I should mention that my pond is actually a sewage water tank. I can assure you there is also a little bit pollution in it but it works fantastically ....

Re: ESP8266 Domoticz Level sensor to switch

Posted: 02 Nov 2021, 19:29
by servicenet
Solved, we drained the pound..

return
{
on =
{
devices = {'Nivo'}
},

execute = function(domoticz, switch)
if (domoticz.devices('Nivo').distance < 30) then
domoticz.devices('schakelaar').switchOn()
domoticz.notify('This rocks!',
'Turns out that it is getting filled',
domoticz.PRIORITY_HIGH)
elseif (domoticz.devices('Nivo').distance > 30) then
domoticz.devices('schakelaar').switchOff()
end
end
}