Featured image of post Done with Annoying Thermostats! Shelly Makes Your Heating Smart

Done with Annoying Thermostats! Shelly Makes Your Heating Smart

Analog thermostats with mysterious numbers or digital ones with tiny buttons? I'll show you how to build a smart, self-sufficient heating control system using Shelly relays.

Ever dealt with thermostats like these? Whether it’s an analog dial with numbers 1–6 or a digital thermostat with tiny buttons — they drove me crazy. That’s why, three years ago, I replaced almost all my room thermostats with Shelly relays paired with temperature sensors.

The result after three years: It was the best Smart Home decision I ever made. See for yourself in the video.

YouTube Video
To load the video, please click the image. Please note that by doing so, data will be transmitted to YouTube.

Why Classic Thermostats Are Frustrating

The Problem with Analog Thermostats

Analog rotary thermostats with a scale from 1 to 5 are completely abstract and disconnected from reality. What does level 3 actually mean? What temperature does that correspond to? Nobody really knows.

The worst part: you always have to adjust them manually:

  • Turn the heating down in the evening
  • Turn it back up in the morning
  • Lower it before going on holiday
  • Come home from holiday to a cold flat

Digital Thermostats: Not Much Better

Digital thermostats can display temperatures and often include scheduling features, but using them is frustrating:

  • Tiny buttons that require a firm press
  • Complicated menus that are barely understandable without the manual
  • Holiday mode that works in only 50% of cases
  • Expensive — often over €100 per device

In the video I demonstrate these problems live — you’ll definitely recognise the situation!

The Shelly Solution: Smart, Affordable, Reliable

Why Shelly Instead of Expensive Smart Thermostats?

While branded smart thermostats often cost over €150, Shelly gives you a fully capable solution for under €50:

  • Shelly 1 or Shelly Plus 1: The core component (approx. €15–20)
  • Shelly Plus Add-on: For the temperature sensor (approx. €15)
  • DHT22 temperature sensor: For measurement (approx. €5)

The brilliant part: The system runs completely standalone. Even if your Wi-Fi goes down or your Smart Home system has issues, the Shelly continues to regulate your heating!

Hardware Overview from the Video

In the video I walk through all the components in detail:

  1. Shelly first vs. new generation — differences and pros/cons
  2. Shelly Plus Add-on — why external sensors beat centralised solutions
  3. DHT22/AM2302 temperature sensor — affordable, reliable, and widely available
  4. Wiring and pin assignments — shown step by step

The Wiring Secret

An important point from the video: The Shelly generates heat inside the in-wall box, which affects the temperature reading.

My solution: Foam padding between the Shelly and the sensor, plus correct calibration using the temperature offset setting. The video shows exactly how this works.

Temperature Calibration: The Key to Success

Why Calibration Matters

Even with foam insulation, there remains a temperature difference between the in-wall box and the actual room temperature. The solution: Temperature offset in the Shelly settings.

I demonstrate live in the video:

  • Comparing Shelly readings against a room thermometer
  • Setting the offset on older Shellys (External Sensors)
  • Setting the offset on newer Shellys (Temperature Offset)
  • Differences of 0.6 to 4 degrees depending on the installation

Setting Up Standalone Heating Control

This is the core of the solution: The Shelly controls the heating completely independently, without relying on your Smart Home system.

For Shelly 1 (first generation):

  • Enable Temperature Automation
  • Relay Off temperature: e.g. 21°C
  • Relay On temperature: e.g. 21.5°C
  • Done!

For Shelly Plus (new generation):

  • Create two actions: “Heating on” and “Heating off”
  • Trigger: temperature change
  • Conditions: above/below target temperature
  • Action: output on/off

The video shows both variants step by step!

Home Assistant Integration for Power Users

A Dashboard for All Radiators

Why the video is especially valuable: I show you my complete heating dashboard after three years of real-world use:

  • Overview of all rooms with current temperature
  • Individual setpoints for day and night
  • Schedules for automatic setback
  • Status display showing when each radiator was active

REST API Integration: The Pro Trick

Here’s where it gets technical: The standard Shelly integration in Home Assistant cannot set temperature values.

The solution: Call the REST API directly:

  • REST sensors to read current settings
  • REST commands to set new target temperatures
  • Different endpoints for old vs. new Shellys

The video shows the complete code and how to add it to your configuration.yaml.

Reading Temperature: REST Sensors

For Shelly 1 (first generation):

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
rest:
  - resource: 'http://shelly1-hostname/settings/ext_temperature/0'
    sensor:
      - name: "Heating Target Temperature"
        value_template: >
          {{ value_json.overtemp_threshold_tC }}          
        unit_of_measurement: "°C"
        json_attributes_path: "$"
        json_attributes:
          - "overtemp_threshold_tC"
          - "undertemp_threshold_tC"
          - "overtemp_act"
          - "undertemp_act"
          - "offset_tC"

For Shelly Plus (new generation):

1
2
3
4
5
6
7
rest:
  - resource: 'http://shellyplus-hostname/rpc/Webhook.List?id=1'
    sensor:
      - name: "Heating Target Temperature"
        value_template: >
          {{ value_json.hooks[1].condition[7:] }}          
        unit_of_measurement: "°C"

What’s happening here?

  • resource: The URL of your Shelly device from which the data is fetched
  • sensor: Defines a new sensor in Home Assistant
  • name: The name under which the sensor will be displayed
  • value_template: Extracts the temperature value from the JSON response
  • json_attributes: Stores additional values as sensor attributes

Advantage: You get not just the current setpoint, but also other useful information displayed directly in Home Assistant!

Setting Temperature: REST Commands

1
2
3
4
5
6
7
rest_command:
  set_shelly1_heating:
    url: 'http://{{host}}/settings/ext_temperature/0?overtemp_threshold_tC={{((temp|float)|string)}}&undertemp_threshold_tC={{((temp|float - 0.5)|string)}}'
  set_shelly1plus_heating_high:
    url: 'http://{{host}}/rpc/Webhook.Update?id=2&condition="ev.tC%20>%20{{((temp|float)|string)}}"'
  set_shelly1plus_heating_low:
    url: 'http://{{host}}/rpc/Webhook.Update?id=1&condition="ev.tC%20<%20{{((temp|float - 0.5)|string)}}"'

What’s happening here?

For Shelly 1: A single HTTP GET sets both temperature values at once:

  • overtemp_threshold_tC: The upper temperature (heating off)
  • undertemp_threshold_tC: The lower temperature (heating on, 0.5°C lower)

For Shelly Plus: Two separate calls are required:

  • set_shelly1plus_heating_high: Sets the upper temperature threshold
  • set_shelly1plus_heating_low: Sets the lower temperature threshold

Parameter explanation:

  • {{host}}: Variable for the Shelly IP address
  • {{temp}}: Variable for the desired target temperature
  • temp|float - 0.5: Automatically calculates the hysteresis (0.5°C difference)

Using REST Commands in Automations

How to use the REST commands in Home Assistant:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
automation:
  - alias: "Set Heating Temperature"
    trigger:
      - platform: state
        entity_id: input_number.heizung_soll_temperatur
    action:
      - service: rest_command.set_shelly1_heating
        data:
          host: "192.168.1.100"
          temp: "{{ states('input_number.heizung_soll_temperatur') }}"

Advanced Automations Are Possible

The system can be extended with:

  • Window sensors: Turn off heating when a window is open
  • Presence detection: Setback when nobody’s home
  • Weather forecast: Predictive control

Why I skip these: With underfloor heating the system is too sluggish for short-term adjustments.

Three Years in Practice: My Honest Verdict

What Works Perfectly

After three years I can say: The system runs absolutely reliably:

  • Not a single notable failure
  • No Wi-Fi issues like those seen with other Smart Home devices
  • Precise temperature control after calibration
  • Maintenance-free — set it once and forget it

Cost Comparison with the Alternative

My old Jung thermostats cost over €100 per unit and offered fewer features. The Shelly solution:

  • Cheaper to buy
  • More flexible to program
  • More future-proof thanks to open standards
  • Easier to repair if something breaks

Energy-Saving Experiment in Progress

I’m currently testing: Does nighttime setback actually save energy with underfloor heating? To find out, I’ve set identical day and night temperatures in my dashboard and am comparing energy consumption.

The video also shows these details from my day-to-day use.

What You’ll Learn in the Video

This video is especially valuable because you’ll see:

  1. Live demonstration of all hardware components
  2. Practical wiring inside a real in-wall box
  3. Calibration process with actual values
  4. Dashboard configuration from three years of experience
  5. Code examples for Home Assistant integration
  6. Honest assessment after long-term use

Suitable for All Experience Levels

Whether you’re a beginner or a pro:

  • Hardware basics explained clearly
  • Step-by-step instructions you can follow along
  • Advanced integration for Home Assistant users
  • Extension ideas for your own projects

Note: Links marked with affiliate link are affiliate links. As an Amazon Associate I earn from qualifying purchases. This means I receive a small commission if you purchase through these links — at no extra cost to you. The revenue helps me run this blog and YouTube channel and keep creating content. Thank you for your support!

Joachim
To load the comments, please click 'Show comments'. Please note that by doing so, data will be transmitted to Disqus.
Show comments
Built with Hugo
Theme Stack designed by Jimmy