This article is about making a pump controller with a Sonoff S26 and ESPHome. Most pumps are costing money as the continue using about 40-80 Watt. With the pump plugged in to the Sonoff we can controll when the pump is on and off based on the temperature measured from the water tube.
So for example, turn on the pump when the water temp is 30C and turn off the pump when the water temp is 25C.
More info and config files can be found at: https://github.com/Martinvdm/underfloor_heating_pump_controller
(Kudos to the original maker Jeroen, at Github.)
First of all, this can be done with a Sonoff S20, but as there are sold out everywhere and replaced by the Sonoff S26, this guide is about the newer Sonoff S26.
Now, the Sonoff S26 is a lot more difficult then the Sonoff S20. As the Sonoff S20 is having a heading on the board already, the S26 does nog have this, so you need to solder really tiny pinouts. Not inpossible, but a little bit harder.
First of all open up the Sonoff S26 and solder the 3,3V and Ground. This can be done at some bigger solder points, J1 for 3,3V and J2 for Ground.
(You can find a good pictures from this site: https://notenoughtech.com/home-automation/hacking-sonoff-wifi-smart-plug)
When you have soldered this, you can use the RX and TX from the other side. I didn’t solder but just hold it when flashing. Connect the wires to your USB adapter and press the button of the Sonoff S26 before plugging in to get it in flashing mode. Flash the ESPHome file.
Now when the firmere is in, you can connect the Dallas temp sensor.
I used GPIO2 as the Dallas Sensor Data connection. This a tiny solder point. For 3,3V and Ground a used the bigger solder points on the main board.
Make shure you flash with DEBUG logging on to get the right Dallas address in the Log output, and configure this in your ESPhome config.
Now when done, you can add a Integration in Home assistant and set some Lovelace to get a nice controllable plug:
Hi TechJunky:
Thanks for the awesome project. Just one question? How to do you add to HA both
underfloor_heating_pump.yaml and lovelace.yaml?
Regards.