Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Output control not linked to control_output #121

Closed
HermesHonshappo opened this issue Jan 31, 2023 · 29 comments
Closed

Output control not linked to control_output #121

HermesHonshappo opened this issue Jan 31, 2023 · 29 comments

Comments

@HermesHonshappo
Copy link

HermesHonshappo commented Jan 31, 2023

Describe the bug
I did upgrade to the latest version today.
I'm using 5 instances of smart_thermostat.
On the one controlling my heated floor, I noticed when I bumped the temperature up that the water pump was not constantly on.

So I checked values, and even though the control_output was at 100%, hvac_action was staying on "heating" for maximum 1 minute. And the switch controlling the water pump was only staying "on" for one minute as well. It wasn't respecting the min cycle, which I set at 3 minutes
So there doesn't seem to be a correct compute of "hvac_action" when control_output is at 100%. I haven't tried with other values, but I could if required.

I have done a fallback to version 2022.2.1, and hvac_action is staying in "heating", and the water pump is on constantly. It has been on for over 15 minutes.

Expected behavior
When control_output is at 100%, the hvac_action: should be constantly "heating" (=on), and the output switch should be constantly on. Wasn't the case with the latest version

Screenshots
Here is graph over time. I have templates that extract hvac_action, to be able to create the graphs below.

Screenshot 2023-01-31 at 14 59 04

Here is with 2023.1.1. Output was on for 1 minute max
Screenshot 2023-01-31 at 14 52 28
The dark grey bars are when I rebooted HA. I have tried several reboots, to troubleshoot.

Here is back with 2022.2.1, output has been on for 16 mins
Screenshot 2023-01-31 at 15 03 07

Desktop (please complete the following information):

  • OS: MacOS
  • Browser Firefox

Additional context
Here is the config.yaml for this thermostat

- platform: smart_thermostat
  name: Thermostat Ch. Ian PID Dalle
  unique_id: c8d8a872-84ac-41dd-9cf5-7e3a28868de5
  heater: switch.switch_tableau_electrique_m1_pompe_chauffage
  target_sensor: sensor.temp_dalle_ch_ian_average_temperature_hacs_1h
  ac_mode: False
  keep_alive:
    seconds: 60
  pwm : 1800                  #30 minutes
  sampling_period: 00:05:00
  min_cycle_duration: 180     #3 minutes
  cold_tolerance: 0
  hot_tolerance: 0.1
  min_temp: 10
  max_temp: 27
  away_temp: 15
  sleep_temp: 22
  comfort_temp: 25
  preset_sync_mode: sync
  kp : 40
  ki : 0.0009
  kd : 30000
  outdoor_sensor: sensor.temperature_exterieur_temperature
  ke: 1.5
#  debug: true

Also: I had debug set to "true", since I'm graphing & displaying the various pid_p, etc.
While I was still on 2023.1.1, I commented this line and rebooted HA, to see if it was linked to debug mode, but it didn't change anything

Let me know if I can test something.

@ScratMan
Copy link
Owner

ScratMan commented Feb 1, 2023

Hi, i can't see this behaviour on my setup. Could you please activate the logger for the thermostat adding the lines below in the configuration.yaml from HA, reinstall 2023.1.1, reproduce the issue, save the log content and post it here?

logger:
  logs:
    custom_components.smart_thermostat: debug

Thanks.

@HermesHonshappo
Copy link
Author

HermesHonshappo commented Feb 1, 2023

OK here goes. I just reinstalled 2023.1.1, and set the target temp t 27°C. The PID thermostat version 2022.2.1 had successfully brought the floor to 25°C before.

Pics below

The pump activity. Turns on for 1 min, then off for 2 mins
Screenshot 2023-02-01 at 12 03 56

The graph. the switch to 2023.1.1 is when you see the small dark grey bar in the timeline. As you can see before I had long cycles, that was 2022.2.1 maintaining the 25°C temp
Screenshot 2023-02-01 at 12 04 27
After the reboot, I bump the target temp to 27°C, after a minute, the smart thermostat computes a new control_output to 100%, and the behavior re-appears

Log below
home-assistant_2023-02-01T11-05-22.644Z.log

@HermesHonshappo
Copy link
Author

Made another try. This time I set the target temp to 25.5
The idea was to have the control-output to a value that is not zero, and not 100%

Pic:
Screenshot 2023-02-01 at 12 24 49

So control output is now 55.4%

However, the pump only turned on for 32 seconds, after 12mins 28 secs of inactivity

Screenshot 2023-02-01 at 12 26 44

Associated log (I started the file just after the last line of the file above

home-assistant_2023-02-01T11-27-45.571Z.log

@HermesHonshappo
Copy link
Author

HermesHonshappo commented Feb 1, 2023

Last, the pics and log with 2022.2.1 (I downloaded old version, rebooted, and set the temp to 27°C again). Now the control output is 95.5%. hvac-action has been "heating" and pump switch has been on for over 4 mins now, and pump if flowing water.

Screenshot 2023-02-01 at 12 49 54

Log file

home-assistant_2023-02-01T11-50-05.038Z.log

Let me know if I can try anything else

@matusk
Copy link

matusk commented Feb 3, 2023

Sorry for off topic.
@HermesHonshappo I like your chart, how did you add the time frame and date range?
Can you please share your code?

@HermesHonshappo
Copy link
Author

I extract "hvac-action" attribute from the thermostat with a template

- sensor:
  - name: "Mode thermostat Pièce"
    unique_id: 46545436c250-d1ce-4fc7-895d-ce6c1654413b
    icon: mdi:heating-coil
    state: "{{ state_attr('climate.thermostat_ch_parents', 'hvac_action') }}"

I also generate a few values to create the graph with the orange vertical bars, and the purple target temp. I wanted to re-create something that looks like the "history" tab of HA.

  - name: "Temp. thermostat Pièce"
    unique_id: 5785692f-2aa3-45af-bed4-536225eed3f0
    icon: mdi:thermostat
    state: "{{ state_attr('climate.thermostat_ch_parents', 'temperature') }}"
  - name: "Heating curve thermostat Pièce"
    unique_id: 95e2bf2b-9874-455d-8e55-48cc3949a78d
    icon: mdi:heat-wave
    unit_of_measurement: "°C"
    state: >
        {% set Temp = states('sensor.temperature_chambre_parents_temperature') %}
        {% set Status = states('sensor.mode_thermostat_piece') %}
        {% if (Status == 'heating') %}
            {{ Temp }}
        {% else %} 0
        {% endif %}

Then it is displayed with an add-on called "history-explorer-card"

type: custom:history-explorer-card
showUnavailable: false
decimation: fast
refresh:
  interval: 60
statistics:
  enabled: true
  mode: mean
  period: hour
header: hide
uiLayout:
  toolbar: bottom
  selector: hide
cardName: historycard-temp-ch_parents
combineSameUnits: false
tooltipShowDuration: true
defaultTimeRange: 1d
stateColors:
  door.on: blue
  motion.on: yellow
  unavailable: darkgray
  idle: lightgray
  heating: orange
  'off': darkblue
graphs:
  - type: line
    options:
      showTimeLabels: false
      ymin: 10
    entities:
      - entity: sensor.temperature_chambre_parents_temperature
        name: T° Ch. Parents
        color: '#FF4000A0'
        width: 2
      - entity: sensor.heating_curve_thermostat_piece
        name: Chauffage
        color: transparent
        fill: '#FF8000A0'
        width: 1
        lineMode: stepped
      - entity: sensor.temp_thermostat_piece
        name: T° consigne
        color: purple
        fill: rgba(230,230,230,1)
        width: 1
        lineMode: stepped
  - type: timeline
    entities:
      - entity: sensor.mode_thermostat_piece

@ScratMan
Copy link
Owner

ScratMan commented Feb 4, 2023

Hello, I looked at the logs, but could not identify what switches off the heater.

I pushed some commits to get more explicit logs to be able to identify what is requesting the switch. It occurs after the keep alive period, so it looks like there is a condition somewhere in the code that allows to switch off the heater while the on time is not elapsed.

I'm suspecting it comes from this block, but can't figure why:

            if not self._active or self._attr_hvac_mode == HVACMode.OFF:
                if self._attr_hvac_mode == HVACMode.OFF and self._is_device_active:
                    _LOGGER.debug("%s: %s is active while HVAC mode is %s. Turning it OFF.",
                                  self.entity_id, self._heater_entity_id, self._attr_hvac_mode)
                    if self._pwm:
                        await self._async_heater_turn_off(force=True)
                    else:
                        self._control_output = 0
                        data = {ATTR_ENTITY_ID: self._heater_entity_id,
                                ATTR_VALUE: self._control_output}
                        await self.hass.services.async_call(NUMBER_DOMAIN, SERVICE_SET_VALUE, data)
                await self.async_update_ha_state()
                return

Maybe the self._attr_hvac_mode is not set correctly.

Could you please switch your install to the master branch to point on the latest commits and test again ?
We should see in the logs one of these messages when the switch toggles OFF after the keep-alive period:

_LOGGER.debug("%s: Turn OFF heater from async_set_hvac_mode(%s)", self.entity_id, hvac_mode)
_LOGGER.debug("%s: %s is active while HVAC mode is %s. Turning it OFF.", self.entity_id, self._heater_entity_id, self._attr_hvac_mode)
_LOGGER.info("%s: Output is 0. Request turning OFF %s", self.entity_id, self._heater_entity_id)
_LOGGER.info("%s: ON time passed. Request turning OFF %s", self.entity_id, self._heater_entity_id)

@HermesHonshappo
Copy link
Author

HermesHonshappo commented Feb 6, 2023

Could you please switch your install to the master branch to point on the latest commits and test again ?

I'm OK but not sure how to do this.
I'm using HA on a dedicated machine, HAOS, and using the Smart thermostat as an integration installed with HACS.
How would I install a specific version with HACS? BY using a custom repo in HACS and entering this github?

@matusk
Copy link

matusk commented Feb 6, 2023

@HermesHonshappo you can redownload Smart thermostat (PID) via HACS and from version selector choose "master" branch.

@dstewartwhite
Copy link

I have had the same issue, be it simpler, Since upgrading the output was in short pulses (10sec) only every 16 minutes. I have since reverted to the previous version 2022.2.1 and the output is now correct and the temperature required is being maintained

@ScratMan
Copy link
Owner

ScratMan commented Feb 7, 2023

@dstewartwhite, @HermesHonshappo, do you use some integration reload services in your home assistant automations or scripts?

@dstewartwhite
Copy link

No I do not use either as I have only started using HA some 4 months ago and still learning

@HermesHonshappo
Copy link
Author

HermesHonshappo commented Feb 7, 2023

@dstewartwhite, @HermesHonshappo, do you use some integration reload services in your home assistant automations or scripts?

Yes, I do, but not for this integration. I'm reloading the LG integration when I detect that it no longer reports the status from my fridge.

Didn't have the time to make new tests with master branch, but hopefully tomorrow

@ScratMan
Copy link
Owner

ScratMan commented Feb 7, 2023

I could reproduce the issue when having multiple thermostats and using the reload service. It looks as if the keep_alive timer were merged all together. I'm now checking the behaviour after a reboot.

@HermesHonshappo
Copy link
Author

OK tested the master branch this morning

Set temp to 27°, PID output is 100%, pump cycles after 1 minute:

Screenshot 2023-02-08 at 08 39 39

Associated log

home-assistant_2023-02-08T07-40-39.285Z.log

@ScratMan
Copy link
Owner

ScratMan commented Feb 8, 2023

It seems the installation is not on the master branch. The messages in the log should be like
[custom_components.smart_thermostat.climate] climate.thermostat_ch_ian_pid_dalle: <log message>

To install master branch on french HA, go to HACS, click on "Intégrations", select the Smart Thermostat (PID), click on the three dots menu in the top right corner and select "Retélécharger". Wait for the "Sélectionner la version" field to be available, and select master in the bottom of the list, next click on "Télécharger". Once the integration is installed, reboot HA.

@HermesHonshappo
Copy link
Author

OK I may have downloaded the wrong version. Tried again with the master branch

Screenshot 2023-02-08 at 09 50 57

Screenshot 2023-02-08 at 09 51 12

Pump cycles every minute

Screenshot 2023-02-08 at 10 35 51

Logfile

home-assistant_2023-02-08T09-35-59.163Z.log

@ScratMan
Copy link
Owner

ScratMan commented Feb 8, 2023

OK, much better. So it looks like the HVAC_Mode is seen as OFF, so when the keep_alive timer triggers a check, it sees the heater as ON while the thermostat is supposed to be OFF. May be linked to a configuration with multiple thermostats, that's why I didn't see the issue at first with only one set at home.

Could you please provide the configuration Yaml for all your smart_thermostat instances ?

@HermesHonshappo
Copy link
Author

Sure. It's all in a climate.yaml file that is imported at HA start

- platform: smart_thermostat
  name: Thermostat Salon
  unique_id: dfa26e22-f6f3-4b7d-9c3d-0b1cfef1a3a3
  heater: input_boolean.commande_chauffage_salon
  target_sensor: sensor.temperature_salon_temperature
  ac_mode: False
  target_temp_step: 0.1
  keep_alive:
    seconds: 60
  pwm: 00:15:00
  min_cycle_duration: 00:03:00
  cold_tolerance: 0
  hot_tolerance: 0
  min_temp: 10
  max_temp: 24
  away_temp: 12
  sleep_temp: 15.5
  comfort_temp: 18
  preset_sync_mode: sync
  kp : 50
  ki : 0.005
  kd : 50000
  outdoor_sensor: sensor.temperature_exterieur_temperature
  ke: 4

- platform: smart_thermostat
  name: Thermostat SdB M2
  unique_id: 580e04e0-9da4-4da4-9eae-c48d047bd002
  heater: input_boolean.commande_chauffage_salle_de_bain_m2
  target_sensor: sensor.temperature_salle_de_bain_temperature
  ac_mode: False
  target_temp_step: 0.1
  keep_alive:
    seconds: 60
  pwm: 00:15:00
  min_cycle_duration: 00:03:00
  cold_tolerance: 0
  hot_tolerance: 0
  min_temp: 10
  max_temp: 24
  away_temp: 12
  sleep_temp: 15.5
  comfort_temp: 18
  preset_sync_mode: sync
  kp : 50
  ki : 0.008
  kd : 50000
  outdoor_sensor: sensor.temperature_exterieur_temperature
  ke: 4
#  debug: true

- platform: smart_thermostat
  name: Thermostat Ch. Parents
  unique_id: d28ba05c-63f4-4893-8df3-48594e3fe77d
  heater: input_boolean.commande_chauffage_ch_parents
  target_sensor: sensor.temperature_chambre_parents_temperature
  ac_mode: False
  target_temp_step: 0.1
  keep_alive:
    seconds: 60
  pwm: 00:15:00
  min_cycle_duration: 00:03:00
  cold_tolerance: 0
  hot_tolerance: 0
  min_temp: 10
  max_temp: 24
  away_temp: 12
  sleep_temp: 15.5
  comfort_temp: 18
  preset_sync_mode: sync
  kp : 50
  ki : 0.008
  kd : 50000
  outdoor_sensor: sensor.temperature_exterieur_temperature
  ke: 4
#  debug: true

- platform: smart_thermostat
  name: Thermostat Ch. Mômes
  unique_id: 15263b8f-e428-4872-8cb6-d263b8c3b9d8
  heater: input_boolean.commande_chauffage_ch_momes
  target_sensor: sensor.temperature_chambre_momes_temperature
  ac_mode: False
  target_temp_step: 0.1
  keep_alive:
    seconds: 60
  pwm: 00:15:00
  min_cycle_duration: 00:03:00
  cold_tolerance: 0
  hot_tolerance: 0
  min_temp: 10
  max_temp: 24
  away_temp: 12
  sleep_temp: 15.5
  comfort_temp: 18
  preset_sync_mode: sync
  kp : 50
  ki : 0.005
  kd : 50000
  outdoor_sensor: sensor.temperature_exterieur_temperature
  ke: 4
#  debug: true

- platform: smart_thermostat
  name: Thermostat Ch. Ian PID
  unique_id: 59045b01-811b-47da-91da-194dcff41fee
  heater: switch.switch_tableau_electrique_m1_pompe_chauffage
  target_sensor: sensor.temperature_ch_ian_temperature
  target_temp_step: 0.1
  ac_mode: False
  keep_alive:
    seconds: 60
  pwm: 00:30:00
  sampling_period: 00:05:00
  min_cycle_duration: 00:03:00
  cold_tolerance: 0.1
  hot_tolerance: 0.1
  min_temp: 10
  max_temp: 24
  away_temp: 12
  sleep_temp: 16
  comfort_temp: 18
  preset_sync_mode: sync
#autotune results
#  kp : 7.23432
#  ki : 0.00184
#  kd : 2032.44078
  kp : 7.23432
  ki : 0.00184
  kd : 2032.44078
  outdoor_sensor: sensor.temperature_exterieur_temperature
  ke: 1
#  debug: true

- platform: smart_thermostat
  name: Thermostat Ch. Ian PID Dalle
  unique_id: c8d8a872-84ac-41dd-9cf5-7e3a28868de5
  heater: switch.switch_tableau_electrique_m1_pompe_chauffage
  target_sensor: sensor.temp_dalle_ch_ian_average_temperature_hacs_1h
  ac_mode: False
  keep_alive:
    seconds: 60
  pwm : 1800                  #30 minutes
  sampling_period: 00:05:00
  min_cycle_duration: 180     #3 minutes
  cold_tolerance: 0
  hot_tolerance: 0.1
  min_temp: 10
  max_temp: 27
  away_temp: 15
  sleep_temp: 22
  comfort_temp: 25
  preset_sync_mode: sync
  kp : 40
  ki : 0.0009
  kd : 30000
  outdoor_sensor: sensor.temperature_exterieur_temperature
  ke: 1.5
#  debug: true

@ScratMan
Copy link
Owner

ScratMan commented Feb 8, 2023

Thanks. You have two thermostats sharing the same heater entity, that's why you face the issue. If the first thermostat consider there is no need for heat while the second one needs to heat, the keep_alive loop of the first thermostat will force the heater off.
This is new in 2023.1.0 and made to ensure the thermostat keeps the control on the heater, otherwise the thermostat could consider the heater as off while the heater was physically on ; this could lead to infinite heating.

In your case you need to use Boolean inputs in thermostats configs and manage the switch.switch_tableau_electrique_m1_pompe_chauffage through an automation or a script to perform a logical OR between both inputs, and that will be triggered by the state changes of the inputs and a timer (to ensure the heater doesn't remains on forever if a state change is missed).

@dstewartwhite
Copy link

Hi. Not wishing to confuse the issue, but I have only one thermostat (config below), and the code is in the main configuration.yaml file. This configuration worked successfully over the last few months and is working now that I have reverted to version 2022.2.1

climate:

  • platform: smart_thermostat
    name: Smart Thermostat (PID)
    unique_id: smart_thermostat_01
    heater: switch.greenhouse_right_sockets_socket_1
    target_sensor: sensor.propagator_temperature_humidity_temperature
    outdoor_sensor: sensor.temperature_humidity_sensor_3_temperature
    min_temp: -10
    max_temp: 40
    ac_mode: False
    target_temp: 3
    keep_alive:
    seconds: 30
    sampling_period: 00:00:30
    target_temp_step: 0.1
    kp: 1.0
    ki: 0
    kd: 0
    #ke: 0.6
    #pwm: 00:01:00

@ScratMan
Copy link
Owner

ScratMan commented Feb 8, 2023

Hi. Not wishing to confuse the issue, but I have only one thermostat (config below), and the code is in the main configuration.yaml file. This configuration worked successfully over the last few months and is working now that I have reverted to version 2022.2.1

climate:

  • platform: smart_thermostat
    name: Smart Thermostat (PID)
    unique_id: smart_thermostat_01
    heater: switch.greenhouse_right_sockets_socket_1
    target_sensor: sensor.propagator_temperature_humidity_temperature
    outdoor_sensor: sensor.temperature_humidity_sensor_3_temperature
    min_temp: -10
    max_temp: 40
    ac_mode: False
    target_temp: 3
    keep_alive:
    seconds: 30
    sampling_period: 00:00:30
    target_temp_step: 0.1
    kp: 1.0
    ki: 0
    kd: 0
    #ke: 0.6
    #pwm: 00:01:00

Please post logs with master branch installed

@HermesHonshappo
Copy link
Author

HermesHonshappo commented Feb 8, 2023

In your case you need to use Boolean inputs in thermostats configs

OK, makes sense. It's something I had planned to do anyway, since the pump should not be directly controlled, but only opened if one of the thermostat is on. Later the thermostats will trigger independant valves on the floor water control unit. And the pump should be on if at least one of the floor circuit valves is open.

But do you mean that I can use boolean inputs directly in the thermostat config? I have done this:

In input_boolean.yaml that is included in configuration.yaml

commande_pompe_1:
  name: Commande Pompe chauffage - Circuit 1
  initial: false
  icon: mdi:pipe-valve
commande_pompe_2:
  name: Commande Pompe chauffage - Circuit 2
  initial: false
  icon: mdi:pipe-valve

Then in climate.yaml:

- platform: smart_thermostat
  name: Thermostat Ch. Ian PID
  unique_id: 59045b01-811b-47da-91da-194dcff41fee
  heater: input_boolean.commande_pompe_1
  target_sensor: sensor.temperature_ch_ian_temperature
  target_temp_step: 0.1
  ac_mode: False
  keep_alive:
    seconds: 60
  pwm: 00:30:00
  sampling_period: 00:05:00
  min_cycle_duration: 00:03:00
  cold_tolerance: 0.1
  hot_tolerance: 0.1
  min_temp: 10
  max_temp: 24
  away_temp: 12
  sleep_temp: 16
  comfort_temp: 18
  preset_sync_mode: sync
#autotune results
#  kp : 7.23432
#  ki : 0.00184
#  kd : 2032.44078
  kp : 7.23432
  ki : 0.00184
  kd : 2032.44078
  outdoor_sensor: sensor.temperature_exterieur_temperature
  ke: 1
#  debug: true

- platform: smart_thermostat
  name: Thermostat Ch. Ian PID Dalle
  unique_id: c8d8a872-84ac-41dd-9cf5-7e3a28868de5
  heater: input_boolean.commande_pompe_2
  target_sensor: sensor.temp_dalle_ch_ian_average_temperature_hacs_1h
  ac_mode: False
  keep_alive:
    seconds: 60
  pwm : 1800                  #30 minutes
  sampling_period: 00:05:00
  min_cycle_duration: 180     #3 minutes
  cold_tolerance: 0
  hot_tolerance: 0.1
  min_temp: 10
  max_temp: 27
  away_temp: 15
  sleep_temp: 22
  comfort_temp: 25
  preset_sync_mode: sync
  kp : 40
  ki : 0.0009
  kd : 30000
  outdoor_sensor: sensor.temperature_exterieur_temperature
  ke: 1.5
#  debug: true

I'm testing right now, to see how it behaves with the master branch. So far, the pump has been on for more than a minute, so it seems to work better.

@dstewartwhite
Copy link

dstewartwhite commented Feb 8, 2023 via email

@ScratMan
Copy link
Owner

ScratMan commented Feb 8, 2023

Hi Adrien As I have said previously, I am new to HA, so do not know or understand how to select the log with Master Branch installed. I have attach a log file that lists “custom_components.smart_thermostat.climate”, maybe this can be of help. You say that I am using only a kp of 1.0 will lead to a 1% duty-cycle for a 1° error. However this has proved, using trial and error to give me a less than 0.2C variation in desired temperature. Is it possible that somehow I have configured kp with a multiplier and that with the new version this has been removed and the kp was actually 1.0 so having no effect? Regards Dave

@dstewartwhite
To install master branch, go to HACS, click on "Integrations", select the Smart Thermostat (PID), click on the three dots menu in the top right corner and select "Redownload". Wait for the "Version select" drop down list to be available, and select master in the bottom of the list, next click on "Download". Once the integration is installed, reboot HA.

The log you provided is full of New PID control output for Smart Thermostat (PID) (climate.smart_thermostat_pid_2). 0.00 except one time where the output is 0.3 ; that means the heater switch will be ON 0.3% of the PWM period. As the pmw parameter is commented in your configuration, the PWM period is 900 seconds, so the heater will be on 900 * 0.3 / 100 = 2.7 seconds.
So either the log is not relevant vs the issue occurrence, or the issue is caused by too low gains. But comparing the code of 2022.2.1 and 2023.1.1, I can't see any difference that could explain this different behavior. The version in master should help detect if the issue comes from unexpected switching off of the heater switch.

@HermesHonshappo
Copy link
Author

In your case you need to use Boolean inputs in thermostats configs

OK, makes sense. It's something I had planned to do anyway, since the pump should not be directly controlled, but only opened if one of the thermostat is on. Later the thermostats will trigger independant valves on the floor water control unit. And the pump should be on if at least one of the floor circuit valves is open.

But do you mean that I can use boolean inputs directly in the thermostat config? I have done this:

In input_boolean.yaml that is included in configuration.yaml

commande_pompe_1:
  name: Commande Pompe chauffage - Circuit 1
  initial: false
  icon: mdi:pipe-valve
commande_pompe_2:
  name: Commande Pompe chauffage - Circuit 2
  initial: false
  icon: mdi:pipe-valve

Then in climate.yaml:

- platform: smart_thermostat
  name: Thermostat Ch. Ian PID
  unique_id: 59045b01-811b-47da-91da-194dcff41fee
  heater: input_boolean.commande_pompe_1
  target_sensor: sensor.temperature_ch_ian_temperature
  target_temp_step: 0.1
  ac_mode: False
  keep_alive:
    seconds: 60
  pwm: 00:30:00
  sampling_period: 00:05:00
  min_cycle_duration: 00:03:00
  cold_tolerance: 0.1
  hot_tolerance: 0.1
  min_temp: 10
  max_temp: 24
  away_temp: 12
  sleep_temp: 16
  comfort_temp: 18
  preset_sync_mode: sync
#autotune results
#  kp : 7.23432
#  ki : 0.00184
#  kd : 2032.44078
  kp : 7.23432
  ki : 0.00184
  kd : 2032.44078
  outdoor_sensor: sensor.temperature_exterieur_temperature
  ke: 1
#  debug: true

- platform: smart_thermostat
  name: Thermostat Ch. Ian PID Dalle
  unique_id: c8d8a872-84ac-41dd-9cf5-7e3a28868de5
  heater: input_boolean.commande_pompe_2
  target_sensor: sensor.temp_dalle_ch_ian_average_temperature_hacs_1h
  ac_mode: False
  keep_alive:
    seconds: 60
  pwm : 1800                  #30 minutes
  sampling_period: 00:05:00
  min_cycle_duration: 180     #3 minutes
  cold_tolerance: 0
  hot_tolerance: 0.1
  min_temp: 10
  max_temp: 27
  away_temp: 15
  sleep_temp: 22
  comfort_temp: 25
  preset_sync_mode: sync
  kp : 40
  ki : 0.0009
  kd : 30000
  outdoor_sensor: sensor.temperature_exterieur_temperature
  ke: 1.5
#  debug: true

I'm testing right now, to see how it behaves with the master branch. So far, the pump has been on for more than a minute, so it seems to work better.

OK, after a full night, a few reboots, and my ZigBee network crashing, I can now confirm that it seems to work OK

This is the one with the water pump: working

Screenshot 2023-02-09 at 09 34 36

Another one, with a electric radiator, working as well

Screenshot 2023-02-09 at 09 34 57

Thanks for the help Adrien

@dstewartwhite
Copy link

dstewartwhite commented Feb 10, 2023 via email

@ScratMan
Copy link
Owner

Hi Adrien Here is the log using the Master branch for the period overnight, when the outside temperature caused the thermostat to activate. I propose now, unless you request something else, to upgrade to the latest version and see what happens. Tonight is not expected to be as cold but cold enough to activate the thermostat Regards Dave

Please provide the logs as attachment, otherwise the thread becomes difficult to read due to very long logs displayed inline.
Your last log shows no switching of the heater, as the temperature is always above the setpoint and decreasing slowly.
Please confirm whether your issue is still present or not with the latest version, and attach logs in the thread when issue appears again.

@dstewartwhite
Copy link

dstewartwhite commented Feb 20, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants