I hope you like and enjoy my Underfloor heating pump controller. It saves energy and allows for zone-based heating. Please follow the link below the openings page of the project.
This DIY controller is based on cheap hardware. It runs on ESP Home together with some additional configuration in Home Assistant. I wrote some documentation and all sources are included. If you like the project, please hit the ‘star’ in GitHub. Feedback is very welcome as well.
It is indeed important to know if you really have a system that doesn’t switch off. I took a Shelly socket with power reporting to HA. Run it for a few days.
I forgot to add a picture of the installed system.
Thanks for you’re question. I don’t have S26 experience, but I think it can work. The S26 is supported by ESPHome, and it is possible to connect an extra sensor. See e.g. this link: How to add AM2302 to new Sonoff S26 – Sauron's TrashPage
Did you ever had this? When it is exact 01:00 at night the switch is continue on and then off again for every second. So on off on off on off etc. Seems to be something with the script anti corrosion.
@Martinvdm Thanks for the feedback. I have checked my own system and that seems to be fine.
I think you are right, that it has something to do with the anti-corrosion cycle. This rapid on/off is not very good for the pump as well. So take care it doesn’t destroy your pump. I think that it is better to not use the switch until the problem is fixed.
I had a look at the scripts, but I am not able to see where it goes wrong.
Can you help me with additional information? Can you check the logs on the pump state, the logs on the manual/automatic mode switch, and the logs on the override switch? And maybe check the ESPHome logs around 1 o’clock in the night?
Last night same issue.
I captured a piece of esphome logging
[01:05:55][D][switch:017]: 's20_relay' Turning OFF.
[01:05:55][D][switch:037]: 's20_relay': Sending state OFF
[01:05:55][D][binary_sensor:036]: 'Pump': Sending state OFF
[01:05:56][D][dallas.sensor:136]: 'Water temperature': Got Temperature=19.4°C
[01:05:56][D][switch:013]: 's20_relay' Turning ON.
[01:05:56][D][switch:037]: 's20_relay': Sending state ON
[01:05:56][D][binary_sensor:036]: 'Pump': Sending state ON
[01:05:57][D][dallas.sensor:136]: 'Water temperature': Got Temperature=19.4°C
[01:05:57][D][switch:017]: 's20_relay' Turning OFF.
[01:05:57][D][switch:037]: 's20_relay': Sending state OFF
[01:05:57][D][binary_sensor:036]: 'Pump': Sending state OFF
[01:05:57][D][switch:013]: 's20_relay' Turning ON.
[01:05:57][D][switch:037]: 's20_relay': Sending state ON
[01:05:57][D][binary_sensor:036]: 'Pump': Sending state ON
[01:05:58][D][dallas.sensor:136]: 'Water temperature': Got Temperature=19.4°C
[01:05:58][D][switch:017]: 's20_relay' Turning OFF.
[01:05:58][D][switch:037]: 's20_relay': Sending state OFF
[01:05:58][D][binary_sensor:036]: 'Pump': Sending state OFF
[01:05:59][D][dallas.sensor:136]: 'Water temperature': Got Temperature=19.4°C
If you set manual override in ha, it seems not to work, so it continue on off rapidly. I flashed the firmware from esphome, and after boot it continues on off again. So I removed the time section and flashed, after to doing that it is controllable again.
So I think I keep skipping the time section in esphome for now and will make an automation in ha to run the pump it is hasn’t started in the past 48h.
Edit: Automation in ha:
- alias: FloorHeatingPump Anti Corrosion
trigger:
platform: time
at: '01:30:00'
condition:
- condition: state
entity_id: binary_sensor.floorheatingpump_pump_state
state: 'off'
for:
hours: 24
action:
#turn off automatic mode
- service: switch.turn_off
entity_id: switch.floorheatingpump_manual_automatic
# turn on the pump
- service: switch.turn_on
entity_id: switch.floorheatingpump_on_off
# wait for 1 min
- delay:
minutes: 1
# turn off the pump
- service: switch.turn_off
entity_id: switch.floorheatingpump_on_off
# turn on automatic mode
- service: switch.turn_on
entity_id: switch.floorheatingpump_manual_automatic
Hi Martin, thanks for the input. I hoped that one of the switches was flipping too, but that is not the case. I checked the S26 hardware w.r.t. the S20. No big differences. The controller chip is identical. So I don’t think the problem is in the hardware.
It keeps a mystery. To know what happens, I need to add more logging to the script. If you like we can do this together, but if you are happy with the current setup, we can leave it for now.
Sorry for being a dimwit, but I’m a little stuck with your solution. I managed to do the hardware part. But i don’t know what to do with the underfloor_heating_pump.yaml and how to integrate the lovellace.yaml.
for the underfloor_heating_pump.yaml i made a separate [packages] directory within the config directory and put the file in.
I also integrated within the configuration file, like:
It seems that the underfloor_heating_pump.yaml file is installed correctly. This file adds among others, four automations, which is shown in this picture:
The lovelace.yaml file describes the user interface of the project. To use the example user interface, create a new Home Assistant dashboard. Use the dashboard editor, and copy-paste the lovelace.yaml contents into the editor. If everything is ok, the dashboard will show the user interface.
@riddertommie, this is the configuration, that includes the view as well. If this is not going to work, maybe start with some Love Lace experimenting. Just add some buttons and other stuff and inspect the raw editor, to see what happens under the hood.
title: My Home
views:
- icon: hass:thermometer
title: Example
badges: []
cards:
- cards:
- cards:
- entities:
- entity: switch.manual_automatic_2
name: Automatic
- entity: switch.on_off
name: Manual override
- entity: binary_sensor.pump
show_header_toggle: false
type: entities
- hours_to_show: 24
graph: line
entity: sensor.water_temperature
name: Water temperature
type: sensor
detail: 1
type: horizontal-stack
- entities:
- entity: input_number.threshold_temp_off
name: Temperature pump off
- entity: input_number.threshold_temp_on
name: Temperature pump on
show_header_toggle: false
title: Thresholds automatic mode
type: entities
title: Underfloor heating pump
type: vertical-stack