How to install a smart hot water cylinder thermostat

I’d like to be able to detect the temperature of the water in my hot water cylinder and then control that temperature via Home Assistant.

Right now, the boiler that heats the hot water is controlled by Tado, but the temperature at which the hot water is shut off is either via time expiring in the tado schedule, or the water reaching a set temperature.
That set temperature is controlled via a device like this:

image

Which is sticking out the side of the hot water tank. (with the rods inside the tank)

I’m sure someone has tried this before and wondered what you used.
Ideally, I’d like to get the actual temperature of the water. Failing that I was wondering about using something like an aqara door or leak detector to at least tell me when the water was hot or not.

(I’m pretty sure this can be done, after seeing videos using these devices to make smart pressure pads.)

1 Like

Have you got an immersion heater ?

i created a device in esphome to do this using a sonoff r2

#thermostat control of hot water tank
  - platform: bang_bang
    name: Hot Water Tank
    id: hw_tank
    sensor: hw_tank_temp
    default_target_temperature_low: 50 °C
    default_target_temperature_high: 59.5 °C
    heat_action:
      - homeassistant.service:
          service: water_heater.set_operation_mode
          data:
            entity_id: water_heater.hot_water
            operation_mode: heat
    idle_action:
      - homeassistant.service:
          service: water_heater.set_operation_mode
          data:
            entity_id: water_heater.hot_water
            operation_mode: auto
    visual:
      min_temperature: 45 °C
      max_temperature: 65 °C
      temperature_step: 0.5 °C
    away_config:
      default_target_temperature_low: 20
      default_target_temperature_high: 20

the esphome device is connected to a small dallas temperature sensor which is inserted into one of the thermostat tubes in the hot water cylinder.

this code creates a virtual thermostat, which toggles the tado hot water function on and off.

The tank doesn’t have an immersion heater, it’s just heated via a boiler in another room (controller by tado).

@samnewman86 any chance of a parts list ? And the esp code ?

that is the espcode i have pasted above.

parts was a sonoff r2 and a dallas temperature sensor. think you also need a resistor. all the details for that are in the esphome wiki

Sonoff TH16 + a DS18B20 temp probe + Tasmota.

If you are just after temperature, something like a Zigbee temp sensor might work but getting the sensor coupled to the tank, and still getting radio comms next to a copper tank of water meant it was easier just to use a Sonoff TH16 with a 2.5mm sensor socket. The slim Dallas 18B20 probe fits down the standard capillary thermostat probe hole (no changes needed), and is powered from the wiring centre.

Very simple - hardware is COTS, plugs together.

If you decide to use the TH16 relay (e.g. for an additional immersion heater to augment the boiler), I would ensure the standard boiler cut-out thermostat is retained for safety alongside any HASS relay switching (might be a over-temp, or might also have a room stat which is still useful for freezing in case HASS goes horribly wrong).

The typical S-plan or Y-plan wiring centre used in the UK is daunting, but once you work out which is the incoming mains spur, and how the thermostats are wired, it’s not too bad to augment.

High-temperature silicone cable is recommended for the TH16.

1 Like

I don’t use my immersion heater so I removed the thermostat for that and dropped in a Dallas temp sensor connected to esp32 + esphome. This has given great insights e.g. on how the limit was currently set BUT the real issue with a HW tank is this won’t tell you how much hot water is left. When the boiler is not running there is no convection in the tank and cold water sits in layers. Just a few mins of water being used and your temp sensor will say below 20 degrees when in fact the tank is nearly full of hot water.

My plan is now to connect more temp sensors (using the 1-wire approach) and e.g. add 2 more measuring points on the tank, I have a contact point half way up and I may need a pilot hole in the insulation further towards the top eg around the 20% mark.