Custom smart thermostat: Aqara + Shelly, would these work for me?

Hello,
I’m renovating my house and I wanted to drop the old thermostats and use something smarter. I live in Italy.
My setup:

  • underfloor water heating
  • samsung heating pump (external unit)
  • samsung hydro module (internal unit)
  • Actuator Valves 230v (on/off)

I was thinking of going with:

  • Aqara Temperature and Humidity sensor (Temperature and Humidity Sensor - Aqara)
  • Shelly 1 gen4 to open or close the actuator based on the room’s temp.
  • optional: do something with humidity values and the controlled mechanical ventilation unit (TODO for the future)

My questions:

  1. would this setup work fine as smart thermostat?
  2. would you suggest other sensors? I like the Aqara because it supports Mattter and HA officially.
  3. should I setup a simple hysteresis for the thermostat (e.g. tolerance -1C, +1C) or should I build some more complex logic like PID or PID+PWM (simulated via software since I have only on/off actuators). I was thinking simple hystersis since the underfloor water heating is something that one set and leave it as is.

To my opinion that’s 10x better than any smart thermostat available.
I don’t personally know that Aqara, but you can use any TH sensor you like.
Floor heating is slow at temperature changes, go with some simple approach and adjust when you get some data from actual setup.

HA has a template thermostat (i.e. in-software). It recently got GUI support as “Generic thermostat (Helper)” and you can add it like any other device.

Here’s its configuration:

So you tell it where it gets its temperature from, how to turn on the heat, how close it should try to keep the actual temp to the set one, how quickly it is allowed to turn on and off the heat, and the hard temp limits. (And I think there’s more on the next page.)

In the UI it then looks like any hardware thermostat, here’s one of mine:

Mine’s older than the GUI integration, so I still have it set up in yaml:

  - platform: generic_thermostat
    name: arenathermos
    unique_id: arenathermos
    heater: switch.shellyplug_e28707
    target_sensor: sensor.lanyard_mini_hygrometer_1d2a_temperature
    min_temp: 25
    max_temp: 30
    ac_mode: false
    cold_tolerance: 0.2
    hot_tolerance: 0.1
    min_cycle_duration:
      seconds: 30
    initial_hvac_mode: "heat"
    away_temp: 25.5
    home_temp: 28.5
    precision: 0.1
    target_temp_step: 0.5
    keep_alive: 00:10:00

My heater is on a Shelly Plug and my temperature source is a simple cheap Bluetooth thermometer, but any source of temperature in HA and and switch HA can use would work.

You seem to want to use simple on/off valves, so that’s an easy case that works out of the box. If you wanted to use valves or a heater that can do more than simple on/off, you’d need additional automation to set it according to e.g. difference between target and actual temperature. Doable, but more work.

And, by the way, the target temperature can be set within HA by any automation you can dream up. The one I posted above is controlled by the position of the sun to give a fake day cycle for my pet ants:

Fantastic, thanks a lot that’s really useful to know :slight_smile:

The only missing bit is to understand whether or not I need an extra shelly for the hydro module (SAMSUNG AE160BNYDGH/EU).

Usually, I know that there is a “CH demand” or similar contact for asking for water. But I can’t seem to find anything in the manual and samsung support is not answering xD
Obviously, both the plumber and the electrician are clueless about this topic, so I’m on my own.

Yeah, getting such information is a pain.

What sometimes works is to dumb down the question and ask for a simple (light) switch to be wired in. The blue Shellys can then be used to be that switch, no matter what those two wires you get are.

Of course, when you know what voltage is on them, you can be more specific, e.g. use an Shelly Uni if it’s low voltage (gives you two outputs and a temp sensor input), or a red Shelly if it’s line voltage.

In other cases, getting hold of the installer manual for a product is the key. It often lists all kinds of ways to wire up something, and with some common sense you can adapt parts of a wiring diagram for some complicated/commercial/big setup to find out how to inject your automation.

I was able to talk with a Samsung representative who knew this stuff, and I got the green light from him. He also confirmed me that the hydro module needs a dry contact switch for ch demand (B20-B22) :slight_smile:

1 Like