🔥 Advanced Heating Control

Regarding calibration, in the eq-3 integration i can add an external temperature sensor to the TRV (it has no internal one), but this prevents calibration.

How would calibration take place without this sensor?
eq-3 has an offset range from +/-3.5.
Could AHC use the set temperature rather then the current one coming from the ext. sensor?

For now i use generic calibration.
How does aggressive mode interacts with generic calibration?

i cannot find how to switch on debugging.

Ah, ok. The calibration entity takes the value of the external temperature sensor and the offset entity just the difference between thermostat and room temperature.

//EDIT: at the end of the latest blueprint you simply can select the log level. set it to warning and the loggs will be shown up in your log. No need to add something in your configuration.yaml anymore.

yes, i found it, i worked a longer time on the post and now it had sent an very old version of it ???

I heve an error

Maximum number of runs exceeded (occured 8 times)

step: 0.5
min_calibration_value: -3.5
max_calibration_value: 3.5
calibration_sensor_temperature: 21.2
new_calibration_value: 0.1999999999999993
new_calibration_value_ext: 0.1999999999999993
offset_old: 0.0
offset_new: 0.0

doesnt it need to take into account how much the valve is opened/if its heating/when temp. was changed last?

Hmm, it seems there is a issue (might be caused the quirk as well).

The calibration values are not interpreted correct by zhaquirks.

e.g. the calibration value -0.4 from the AHC blueprint becomes -4 in the device attribute for some reason.

Values below -0.6 and above 0.6 are not displayed correct since the min/max range for the slider of the device is -6 to 6. So a AHC calibration value of -2.5 becomes -6 in the UI (set to -25 in the attribute variable anyway)

From the zha quirk i can see it expects a int32 value for this attribute:
SASWELL_TEMP_CORRECTION_ATTR = 0x021B # uint32 - temp correction 539

    attributes.update(
        {
            SASWELL_ONOFF_ATTR: ("on_off", t.uint8_t, True),
            SASWELL_TARGET_TEMP_ATTR: ("target_temperature", t.uint32_t, True
            SASWELL_ROOM_TEMP_ATTR: ("current_room_temp", t.uint32_t, True),
            SASWELL_CHILD_LOCK_ATTR: ("child_lock", t.uint8_t, True),
            SASWELL_SCHEDULE_MODE_ATTR: ("schedule_mode", t.uint8_t, True),
            SASWELL_WINDOW_DETECT_ATTR: ("window_detection", t.uint8_t, True)
            SASWELL_ANTI_FREEZE_ATTR: ("anti_freeze_protection", t.uint8_t, T
            SASWELL_LIMESCALE_PROTECT_ATTR: ("limescale_protection", t.uint8_
            SASWELL_AWAY_MODE_ATTR: ("away_mode", t.uint8_t, True),
            SASWELL_BATTERY_ALARM_ATTR: ("battery_low", t.uint8_t, True),
            SASWELL_TEMP_CORRECTION_ATTR: (
                "room_temperature_correction",
                t.int32s,
                True,
            ),
        }
    )

Not an error. You automation got triggered too much. Could you try this:

  1. disable your automaton
  2. set values of calibration and offset entity to 0
  3. be sure you’re using verision 4.0_beta18
  4. set the calibration timeout at least to 2s
  5. enable automation again

Not the valve position but the current temperatures. The thermostat cantrolls the valve automatically based on its calibrated temperature values.

There are some custom quirks out there. Found with this one:

There aren’t all attributes given but maybe you could fix yours. Also don’t know if it works with it. :smiley:

//EDIT: are both values are getting interpreted false? calibration and offset?

i use the quirk trv_saswell.py from @jacekk015 here since this seems to be the one to make the thermostats usable in zha.

The offset value is right. The calibration value is wrong.
image

i updated it some time ago.
generic calibration is on and timeout is already 15min.
not sure, where to do 2.

i just see, valve has not changed for several hours, maybe connection problem (but not unavailable).

Try to set the calibration value to 0. It never got touched again by the automaton. (for the moment xD )

//EDIT: I just wonder why the calibration entity takes values of -25 when its min and max is limited to +/- 6.

1 Like

Try to set the delta to 0 and the timeout to 2 seconds.

seems you can set this limit for the UI to anything you want in the quirk code:
now it’s down to -66 :slight_smile: So -6 to 6 seems to be a “default range” or something for the web UI but it accepts larger values.
image

just modified the quirk code.

        self._update_attribute(self.attributes_by_name["max_present_value"].id, 6)
        self._update_attribute(self.attributes_by_name["min_present_value"].id, -66)
        self._update_attribute(self.attributes_by_name["resolution"].id, 1)
        self._update_attribute(self.attributes_by_name["application_type"].id, 13 << 16)
        self._update_attribute(self.attributes_by_name["engineering_units"].id, 62)

Haha ok.

  1. Does calibration work for you now?
  2. Am I right if the calibration entity takes the value of the external sensor?
  3. If yes, I could make my code a little more dynamically in focus of calibration.
  4. What do you personally would prefer? Calibration by an offset or by the calibration entity?

whithout generic cal.?

  1. AHC works for me even if the calibration feature in combination with the zhaquirk seems to be buggy. I don’t see the overheating problem anymore since you did the refactoring of the code a few days ago (v4_ref which is now v4). Actually the overshooting to max heat is gone for quite some time now.
  2. Right i use a external sensor for the room. This is the yaml code for the AHC automation:
alias: Arbeitszimmer Advanced Heating Control v4
description: ""
use_blueprint:
  path: panhans/heating_control_v4.yaml
  input:
    input_trvs:
      - climate.arbeitszimmer_heizung_thermostat
    input_temperature_minimum_static: 18.5
    input_temperature_minimum: input_number.arbeitszimmer_min_temp
    input_temperature_comfort: input_number.arbeitszimmer_comf_temp
    input_schedulers:
      - schedule.arbeitszimmer_zeitplan_heizung
    input_mode_party: timer.arbeitszimmer_partytimer
    input_windows:
      - binary_sensor.lumi_lumi_sensor_magnet_aq2_opening_3
    input_temperature_sensor: sensor.arbeitszimmer_temperatur_und_feuchtigkeit_temperature
    input_calibration_rounding_full_values: true
    input_mode_winter: input_boolean.wintermodus_heizsaison
    input_mode_outside_temperature: sensor.lumi_lumi_weather_temperature_4
    input_mode_outside_temperature_threshold: 17
    input_reset_comfort_temperature: true
    input_change_comfort_temperature_on_physical_change: true
    input_start_party_timer_on_physical_change: true
  1. I appreciate your work and patience :slight_smile: It’s not mandatory for me so please don’t hesitate or even postpone a new stable release of AHC because of my issues. It’s probably affecting only a fraction of the users here.
  2. I actually don’t know. I’m not an expert in this and this is the first time i dive into the inner workings of quirk codes and blueprints in home assistant :slight_smile: Kind of a noob here. At the moment i can’t identify the problem why the correct offset value is handled wrong in the quirk (offset -2.5 becomes calibration value -25 and so on).
1 Like

Ok, thanks for your thought.

I think I will prefer calibration entities. If there aren’t some I will fallback to offset entities.

I can never rule out my mistakes. That’s why I take every problem here seriously.
In your case, the Quirk is causing problems. But I’ve learned something from it again. I don’t use most of the features and tweaks myself.
I’ll make this minor change tomorrow and then wait a little longer.

Thanks for your help.

1 Like

Depends on your thermostats. Is there a reason why you using generic calibration? Have you had no problems? Or do your thermostats have no entities for this?

i added the same temp sensor to this TRV as i want to use for calibration.

Ok but when you are able to add an external sensor to your climate entity it is fully calibrated allready.

Calibration is for thermostat which owns an internal temperature sensor. Because they hang right next to the radiator or are perhaps covered. This measures a much higher temperature than the temperature in the room, e.g. on the sofa.
This difference is compensated for with the calibration.

If you specify the same sensor, your thermostat will never be calibrated because it already is. :stuck_out_tongue:

But my cheap bluetooth TRV does not know, the HA integration added an thermometer for showing in climate cards :frowning: