Rule for control solar heating of my swimming pool
Posted: 21 May 2022, 00:54
Hello,
I use a nodemcu to control the solar heating of my swimming pool.
I use a ds18b20 probe and a 2004 LCD
I would like to program an espeasy to trigger a pump when the water is over 45 but I must admit that I am as bad at English as I am at code.
For English it's fine there is google traslate, but for the code, I'm counting on you.
I did some research and I found this that I adapted with the gpios of my relay. But I'm not sure it's right and I'm missing some things for the display.
- If the temperature of the outlet sensor is > 45°C the pump starts and starts a second counter
- If the temperature of the outlet probe is < 30°C the pump stops and stops the second counter
- Display the circuit inlet and circuit outlet temperature on line 1 of the screen.
- Display the date and time on line 2 of the screen.
- We display the duration of one cycle in seconds on line 3 of the screen.
- Display the time of the last cycle on line 4 of the screen.
On Relay Off do
gpio,13.1
end
on RelayOn do
gpio,13.0
end
on ds18b20#temperature>45 do
RelayOn event
//start the second counter
end
on ds18b20#temperature<30 do
RelayOff event
// stop the second counter and put the result in a variable
// We display on line 3 the duration in seconds of the heating cycle
// We display the stop time on the screen on line 4
end
Thank's in advance for you help
I use a nodemcu to control the solar heating of my swimming pool.
I use a ds18b20 probe and a 2004 LCD
I would like to program an espeasy to trigger a pump when the water is over 45 but I must admit that I am as bad at English as I am at code.
For English it's fine there is google traslate, but for the code, I'm counting on you.
I did some research and I found this that I adapted with the gpios of my relay. But I'm not sure it's right and I'm missing some things for the display.
- If the temperature of the outlet sensor is > 45°C the pump starts and starts a second counter
- If the temperature of the outlet probe is < 30°C the pump stops and stops the second counter
- Display the circuit inlet and circuit outlet temperature on line 1 of the screen.
- Display the date and time on line 2 of the screen.
- We display the duration of one cycle in seconds on line 3 of the screen.
- Display the time of the last cycle on line 4 of the screen.
On Relay Off do
gpio,13.1
end
on RelayOn do
gpio,13.0
end
on ds18b20#temperature>45 do
RelayOn event
//start the second counter
end
on ds18b20#temperature<30 do
RelayOff event
// stop the second counter and put the result in a variable
// We display on line 3 the duration in seconds of the heating cycle
// We display the stop time on the screen on line 4
end
Thank's in advance for you help