Alexwijn / SAT

The Smart Autotune Thermostat (SAT) is a custom component for Home Assistant that works with an OpenTherm Gateway (OTGW).
GNU General Public License v3.0
71 stars 16 forks source link

ESPHome max_modulation_level always set to 0 #59

Open clau-bucur opened 2 days ago

clau-bucur commented 2 days ago

Using latest SAT develop with ESPHome OpenTherm component and HA 2024.11.

All of the sudden SAT stopped working properly and I do not have an explanation for it. Whenever heating is required, max_modulation_level is set to 0.

I enabled debug for SAT and I see in the logs a ton of entries [custom_components.sat.esphome] Attempting to find the unique_id of ....

Here's my SAT config:

{
   "created_at":"2024-11-15T21:49:52.993377+00:00",
   "data":{
      "device":"85d362ce46e3b028855c73278f721deb",
      "heating_system":"radiators",
      "humidity_sensor_entity_id":"sensor.weather_outside_humidity",
      "inside_sensor_entity_id":"sensor.ble_temperature_living",
      "main_climates":[

      ],
      "minimum_setpoint":60.0,
      "mode":"esphome",
      "name":"SAT",
      "outside_sensor_entity_id":[
         "sensor.weather_outside_temperature"
      ],
      "overshoot_protection":true,
      "secondary_climates":[
         "climate.living",
         "climate.bedroom",
         "climate.office",
         "climate.sanctuary"
      ]
   },
   "disabled_by":null,
   "discovery_keys":{

   },
   "domain":"sat",
   "entry_id":"01JCRWVMZ19GDHMBGAWKV1V99K",
   "minor_version":0,
   "modified_at":"2024-11-20T10:52:37.404818+00:00",
   "options":{
      "activity_temperature":10.0,
      "automatic_duty_cycle":true,
      "automatic_gains_value":1.8,
      "away_temperature":10.0,
      "comfort_temperature":20.0,
      "derivative_time_weight":2.1,
      "heating_curve_coefficient":1.8,
      "heating_curve_version":"3",
      "heating_mode":"comfort",
      "home_temperature":18.0,
      "maximum_setpoint":60.0,
      "pid_controller_version":"2",
      "sensor_max_value_age":"06:00:00",
      "sleep_temperature":15.0,
      "sync_climates_with_mode":false,
      "sync_climates_with_preset":false,
      "window_minimum_open_time":"00:00:15",
      "window_sensors":[

      ]
   },
   "pref_disable_new_entities":false,
   "pref_disable_polling":false,
   "source":"user",
   "title":"SAT",
   "unique_id":"85d362ce46e3b028855c73278f721deb",
   "version":7
},

Home Assistant log with debug enabled for SAT and attempt to reproduce: home-assistant-log.zip

dexterionut commented 18 hours ago

I just installed SAT + Esphome opentherm and I have the same problem, max_modulation_level being set to 0 and a lot of 2024-11-19 13:16:59.244 DEBUG (MainThread) [custom_components.sat.esphome] Attempting to find the unique_id of .... logs

I also have the * Synchro entities saying they have a problem and then are immediately changed to cleared (no problem detected) image

sergeantd83 commented 17 hours ago

When SAT’s controller calculates a control Setpoint that is lower than the minimum setpoint of your system then the Normal operation changes to Low-Load Control.

What is the minimum setpoint?

Minimum setpoint is the lowest water temperature for your system regarding the minimum capacity of your boiler. In simple terms, if you have around 9-10 radiators and the minimum capacity of your boiler is around to 5.4kW, then the lowest water temperature that your boiler can keep steadily is around 50°C. This is completely normal and happens to the vast majority of appliances.

What is Normal operation?

It is the basic operation of the boiler when the calculated Control Setpoint is higher than the minimum setpoint. The controller calculates a value which is sent to the boiler ( Control Setpoint ) and the boiler is free to modulate itself ( Max modulation is set to 100% )

What is Low-Load Control?

The purpose of low load control allows the boiler to switch off the pump when the heat demand is lower than the minimum capacity of the boiler.

When the demand drops below the min capacity of the boiler and the boiler can no longer modulate lower, the boiler will maintain the pump running. This might lead to wasting electrical pump energy after a while as well as that it increase the heat loss of the piping system.

To avoid this inefficiency the algorithm switches to low-load control of the boiler and starts to cycles the boiler between low ( Max modulation = 0% ) and off ( Max modulation restores to 100% ) to match the lower demand. The low-load control is requesting a control setpoint from the boiler, which is as close as possible to the lowest capacity of the boiler ( minimum setpoint ).

Why when SAT operates in normal mode for the first 3 minutes operates at 0% modulation?

This is a feature that tries to minimize the thermal stress of boiler’s equipment. During this 3-minute 0% Max Modulation interval, the boiler slowly preheats its parts. We introduced this feature in order to maximize the boiler equipments health.

Which is the purpose of the synchros?

The synchros is a very useful mechanism in order to detect a communication issue between SAT and the OpenTherm board. It is a fail-safe mechanism that ensures all the commands ( Control Setpoint, CH and Max modulation ) are delivered correctly to the boiler. So it is completely normal to flip momentary from Problem to Clear. The real issue will be when they report steadily Problem.

Hope this post explains the very basic SAT operation.

dexterionut commented 14 hours ago

@sergeantd83 Thank you for explaining. I let the SAT run for the last few hours and I can confirm that for me it's working properly and it kept a steady temperature.

However, what about all of those 2024-11-19 13:16:59.244 DEBUG (MainThread) [custom_components.sat.esphome] Attempting to find the unique_id of .... logs?

2024-11-23 06:28:42.546 DEBUG (MainThread) [custom_components.sat.esphome] Attempting to find the unique_id of 48:55:19:D2:68:E6-number-ch_setpoint_temperature
2024-11-23 06:28:42.546 DEBUG (MainThread) [custom_components.sat.esphome] Attempting to find the unique_id of 48:55:19:D2:68:E6-number-ch_setpoint_temperature
2024-11-23 06:28:42.546 DEBUG (MainThread) [custom_components.sat.esphome] Attempting to find the unique_id of 48:55:19:D2:68:E6-number-ch_setpoint_temperature
2024-11-23 06:28:42.546 DEBUG (MainThread) [custom_components.sat.esphome] Attempting to find the unique_id of 48:55:19:D2:68:E6-number-ch_setpoint_temperature
2024-11-23 06:28:42.546 DEBUG (MainThread) [custom_components.sat.esphome] Attempting to find the unique_id of 48:55:19:D2:68:E6-number-ch_setpoint_temperature
2024-11-23 06:28:42.547 DEBUG (MainThread) [custom_components.sat.esphome] Attempting to find the unique_id of 48:55:19:D2:68:E6-number-ch_setpoint_temperature
2024-11-23 06:28:42.547 DEBUG (MainThread) [custom_components.sat.esphome] Attempting to find the unique_id of 48:55:19:D2:68:E6-number-ch_setpoint_temperature
2024-11-23 06:28:42.547 DEBUG (MainThread) [custom_components.sat.esphome] Attempting to find the unique_id of 48:55:19:D2:68:E6-number-ch_setpoint_temperature
clau-bucur commented 13 hours ago

Thanks @sergeantd83 for the nice explanation. It helps better understanding the way SAT works.

However in my situation the max modulation level remains 0 all the time or most of the time while heat is requested.

It happened that SAT requested heat during the night but max modulation level was almost constantly set to 0 and heater was running on empty and during a 4 hours interval in which the heater was running the temperature did not increase at all. I've stopped using SAT monetarily until this is fixed but I reproduced the issue and the logs from the initial post reflect it.

If needed I can reproduce it again and collect all required data, just let me know what's needed.

clau-bucur commented 13 hours ago

However, what about all of those 2024-11-19 13:16:59.244 DEBUG (MainThread) [custom_components.sat.esphome] Attempting to find the unique_id of .... logs?

A good question, exactly. If you look at the attached log file, in a 5 minute interval it generated about 10k log entries with this statement. Debug level indeed, but does not seem a normal behavior.

clau-bucur commented 13 hours ago

I made a quick chart showing the behavior for that 4 hours interval I previously mentioned. image

sergeantd83 commented 5 hours ago

@clau-bucur you can test the latest develop version. The undershoot issue is probably fixed.

clau-bucur commented 5 hours ago

Alright, will test and report back!

clau-bucur commented 5 hours ago

@sergeantd83 do I need to update my ESPHome configuration due to https://github.com/Alexwijn/SAT/pull/58? I see it uses different names for the Opentherm sensors and controls.

dexterionut commented 4 hours ago

@sergeantd83 do I need to update my ESPHome configuration due to #58? I see it uses different names for the Opentherm sensors and controls.

Yes, you can now stop using the fork and use esphome opentherm directly from esp core instead of external_components and it will work out of the box with the latest develop