Closed HermesHonshappo closed 1 year ago
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.
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
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
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
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:
So control output is now 55.4%
However, the pump only turned on for 32 seconds, after 12mins 28 secs of inactivity
Associated log (I started the file just after the last line of the file above
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.
Log file
home-assistant_2023-02-01T11-50-05.038Z.log
Let me know if I can try anything else
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?
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
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)
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?
@HermesHonshappo you can redownload Smart thermostat (PID) via HACS and from version selector choose "master" branch.
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
@dstewartwhite, @HermesHonshappo, do you use some integration reload services in your home assistant automations or scripts?
No I do not use either as I have only started using HA some 4 months ago and still learning
@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
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.
OK tested the master branch this morning
Set temp to 27°, PID output is 100%, pump cycles after 1 minute:
Associated log
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.
OK I may have downloaded the wrong version. Tried again with the master branch
Pump cycles every minute
Logfile
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 ?
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
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).
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:
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
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.
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
@.***
@.***
Sent from Mailhttps://go.microsoft.com/fwlink/?LinkId=550986 for Windows
From: Adrien @.> Sent: 08 February 2023 14:59 To: @.> Cc: @.>; @.> Subject: Re: [ScratMan/HASmartThermostat] Output control not linked to control_output (Issue #121)
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
Please post logs with master branch installed
— Reply to this email directly, view it on GitHubhttps://github.com/ScratMan/HASmartThermostat/issues/121#issuecomment-1422730335, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A3I7ONIZ4X6WFOKZOJMPIJDWWOYGXANCNFSM6AAAAAAUMPNONE. You are receiving this because you were mentioned.Message ID: @.***>
HACS (Home Assistant Community Store)
2023-02-08 17:45:14.839 INFO (MainThread) [homeassistant.setup] Setup of domain multiscrape took 17.9 seconds
2023-02-08 17:45:15.146 INFO (MainThread) [homeassistant.setup] Setting up nut
2023-02-08 17:45:15.146 INFO (MainThread) [homeassistant.setup] Setup of domain nut took 0.0 seconds
2023-02-08 17:45:15.150 INFO (MainThread) [homeassistant.components.sensor] Setting up sensor.multiscrape
2023-02-08 17:45:15.150 INFO (MainThread) [homeassistant.components.sensor] Setting up sensor.multiscrape
2023-02-08 17:45:15.343 INFO (MainThread) [homeassistant.setup] Setting up nmap_tracker
2023-02-08 17:45:15.343 INFO (MainThread) [homeassistant.setup] Setup of domain nmap_tracker took 0.0 seconds
2023-02-08 17:45:15.361 INFO (MainThread) [homeassistant.components.sensor] Setting up sensor.nut
2023-02-08 17:45:15.375 INFO (MainThread) [homeassistant.components.device_tracker] Setting up device_tracker.nmap_tracker
2023-02-08 17:45:15.726 INFO (MainThread) [homeassistant.setup] Setting up conversation
2023-02-08 17:45:15.727 INFO (MainThread) [homeassistant.setup] Setup of domain conversation took 0.0 seconds
2023-02-08 17:45:16.775 INFO (MainThread) [homeassistant.setup] Setting up radio_browser
2023-02-08 17:45:16.775 INFO (MainThread) [homeassistant.setup] Setup of domain radio_browser took 0.0 seconds
2023-02-08 17:45:16.779 INFO (MainThread) [homeassistant.setup] Setup of domain script took 3.6 seconds
2023-02-08 17:45:17.614 INFO (MainThread) [homeassistant.setup] Setting up upnp
2023-02-08 17:45:17.615 INFO (MainThread) [homeassistant.setup] Setup of domain upnp took 0.0 seconds
2023-02-08 17:45:18.448 INFO (MainThread) [homeassistant.setup] Setting up bluetooth_adapters
2023-02-08 17:45:18.449 INFO (MainThread) [homeassistant.setup] Setup of domain bluetooth_adapters took 0.0 seconds
2023-02-08 17:45:22.296 INFO (MainThread) [homeassistant.setup] Setting up tuya
2023-02-08 17:45:22.296 INFO (MainThread) [homeassistant.setup] Setup of domain tuya took 0.0 seconds
2023-02-08 17:45:22.338 INFO (MainThread) [custom_components.hacs]
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.
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
Another one, with a electric radiator, working as well
Thanks for the help Adrien
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
@.***
@.***
Sent from Mailhttps://go.microsoft.com/fwlink/?LinkId=550986 for Windows
From: Adrien @.> Sent: 08 February 2023 23:28 To: @.> Cc: @.>; @.> Subject: Re: [ScratMan/HASmartThermostat] Output control not linked to control_output (Issue #121)
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
@dstewartwhitehttps://github.com/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.
— Reply to this email directly, view it on GitHubhttps://github.com/ScratMan/HASmartThermostat/issues/121#issuecomment-1423372989, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A3I7ONPYW6CEM7FGM2NPJTDWWQT3LANCNFSM6AAAAAAUMPNONE. You are receiving this because you were mentioned.Message ID: @.***>
HACS (Home Assistant Community Store)
2023-02-09 18:55:16.088 INFO (MainThread) [homeassistant.setup] Setup of domain schedule took 9.1 seconds
2023-02-09 18:55:16.091 INFO (MainThread) [homeassistant.setup] Setup of domain input_boolean took 9.1 seconds
2023-02-09 18:55:16.092 INFO (MainThread) [homeassistant.setup] Setup of domain input_datetime took 9.0 seconds
2023-02-09 18:55:16.102 WARNING (MainThread) [homeassistant.components.sensor] Setup of sensor platform qnap is taking over 10 seconds.
2023-02-09 18:55:17.213 INFO (MainThread) [homeassistant.setup] Setting up dlna_dms
2023-02-09 18:55:17.213 INFO (MainThread) [homeassistant.setup] Setup of domain dlna_dms took 0.0 seconds
2023-02-09 18:55:17.347 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up qnap platform for sensor
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 301, in _async_setup_platform
await asyncio.gather(pending)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 442, in async_add_entities
await asyncio.gather(tasks)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 717, in _async_add_entity
await entity.add_to_platform_finish()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 814, in add_to_platform_finish
self.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 566, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 607, in _async_write_ha_state
state = self._stringify_state(available)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 572, in _stringify_state
if (state := self.state) is None:
File "/usr/src/homeassistant/homeassistant/components/sensor/init.py", line 466, in state
value = self.native_value
File "/usr/src/homeassistant/homeassistant/components/qnap/sensor.py", line 394, in native_value
data = self._api.data["bandwidth"][self.monitor_device]
KeyError: 'eth0'
2023-02-09 18:55:17.632 INFO (MainThread) [homeassistant.setup] Setting up ipp
2023-02-09 18:55:17.632 INFO (MainThread) [homeassistant.setup] Setup of domain ipp took 0.0 seconds
2023-02-09 18:55:18.794 INFO (MainThread) [homeassistant.setup] Setting up nmap_tracker
2023-02-09 18:55:18.795 INFO (MainThread) [homeassistant.setup] Setup of domain nmap_tracker took 0.0 seconds
2023-02-09 18:55:20.334 INFO (MainThread) [homeassistant.setup] Setting up multiscrape
2023-02-09 18:55:20.427 ERROR (MainThread) [homeassistant.components.mqtt.client] Failed to connect to MQTT server due to exception: [Errno -2] Name does not resolve
2023-02-09 18:55:21.200 INFO (MainThread) [homeassistant.components.binary_sensor] Setting up binary_sensor.mqtt
2023-02-09 18:55:21.200 INFO (MainThread) [homeassistant.components.climate] Setting up climate.mqtt
2023-02-09 18:55:21.201 INFO (MainThread) [homeassistant.components.light] Setting up light.mqtt
2023-02-09 18:55:21.202 INFO (MainThread) [homeassistant.components.select] Setting up select.mqtt
2023-02-09 18:55:21.210 INFO (MainThread) [homeassistant.components.scene] Setting up scene.mqtt
2023-02-09 18:55:21.211 INFO (MainThread) [homeassistant.components.sensor] Setting up sensor.mqtt
2023-02-09 18:55:21.212 INFO (MainThread) [homeassistant.components.update] Setting up update.mqtt
2023-02-09 18:55:21.351 INFO (MainThread) [homeassistant.setup] Setting up camera
2023-02-09 18:55:21.355 INFO (MainThread) [homeassistant.setup] Setup of domain camera took 0.0 seconds
2023-02-09 18:55:21.357 INFO (MainThread) [homeassistant.setup] Setting up device_tracker
2023-02-09 18:55:21.359 INFO (MainThread) [homeassistant.setup] Setting up switch
2023-02-09 18:55:21.361 INFO (MainThread) [homeassistant.setup] Setup of domain switch took 0.0 seconds
2023-02-09 18:55:21.409 INFO (SyncWorker_2) [homeassistant.loader] Loaded siren from homeassistant.components.siren
2023-02-09 18:55:21.410 INFO (MainThread) [homeassistant.components.device_tracker] Setting up device_tracker.nmap_tracker
2023-02-09 18:55:21.412 INFO (SyncWorker_9) [homeassistant.loader] Loaded text from homeassistant.components.text
2023-02-09 18:55:21.493 INFO (SyncWorker_0) [homeassistant.loader] Loaded lock from homeassistant.components.lock
2023-02-09 18:55:21.516 INFO (SyncWorker_6) [homeassistant.loader] Loaded fan from homeassistant.components.fan
2023-02-09 18:55:21.525 INFO (SyncWorker_11) [homeassistant.loader] Loaded cover from homeassistant.components.cover
2023-02-09 18:55:21.528 INFO (SyncWorker_5) [homeassistant.loader] Loaded alarm_control_panel from homeassistant.components.alarm_control_panel
2023-02-09 18:55:21.544 INFO (SyncWorker_7) [homeassistant.loader] Loaded number from homeassistant.components.number
2023-02-09 18:55:21.553 INFO (SyncWorker_1) [homeassistant.loader] Loaded button from homeassistant.components.button
2023-02-09 18:55:21.577 INFO (SyncWorker_10) [homeassistant.loader] Loaded vacuum from homeassistant.components.vacuum
2023-02-09 18:55:21.647 INFO (SyncWorker_8) [homeassistant.loader] Loaded humidifier from homeassistant.components.humidifier
2023-02-09 18:55:21.724 INFO (MainThread) [homeassistant.setup] Setting up ffmpeg
2023-02-09 18:55:22.296 INFO (MainThread) [homeassistant.components.camera] Setting up camera.mqtt
2023-02-09 18:55:22.297 INFO (MainThread) [homeassistant.components.switch] Setting up switch.mqtt
2023-02-09 18:55:22.304 INFO (MainThread) [homeassistant.setup] Setup of domain device_tracker took 0.9 seconds
2023-02-09 18:55:22.305 INFO (MainThread) [homeassistant.setup] Setting up siren
2023-02-09 18:55:22.307 INFO (MainThread) [homeassistant.setup] Setup of domain siren took 0.0 seconds
2023-02-09 18:55:22.308 INFO (MainThread) [homeassistant.setup] Setting up text
2023-02-09 18:55:22.309 INFO (MainThread) [homeassistant.setup] Setup of domain text took 0.0 seconds
2023-02-09 18:55:22.311 INFO (MainThread) [homeassistant.setup] Setting up lock
2023-02-09 18:55:22.311 INFO (MainThread) [homeassistant.setup] Setup of domain lock took 0.0 seconds
2023-02-09 18:55:22.319 INFO (MainThread) [homeassistant.setup] Setting up fan
2023-02-09 18:55:22.323 INFO (MainThread) [homeassistant.setup] Setup of domain fan took 0.0 seconds
2023-02-09 18:55:22.324 INFO (MainThread) [homeassistant.setup] Setting up cover
2023-02-09 18:55:22.328 INFO (MainThread) [homeassistant.setup] Setup of domain cover took 0.0 seconds
2023-02-09 18:55:22.329 INFO (MainThread) [homeassistant.setup] Setting up alarm_control_panel
2023-02-09 18:55:22.330 INFO (MainThread) [homeassistant.setup] Setup of domain alarm_control_panel took 0.0 seconds
2023-02-09 18:55:22.330 INFO (MainThread) [homeassistant.setup] Setting up number
2023-02-09 18:55:22.331 INFO (MainThread) [homeassistant.setup] Setup of domain number took 0.0 seconds
2023-02-09 18:55:22.332 INFO (MainThread) [homeassistant.setup] Setting up button
2023-02-09 18:55:22.333 INFO (MainThread) [homeassistant.setup] Setup of domain button took 0.0 seconds
2023-02-09 18:55:22.338 INFO (MainThread) [homeassistant.setup] Setting up vacuum
2023-02-09 18:55:22.345 INFO (MainThread) [homeassistant.setup] Setup of domain vacuum took 0.0 seconds
2023-02-09 18:55:22.347 INFO (MainThread) [homeassistant.setup] Setting up humidifier
2023-02-09 18:55:22.349 INFO (MainThread) [homeassistant.setup] Setup of domain humidifier took 0.0 seconds
2023-02-09 18:55:22.515 INFO (MainThread) [homeassistant.components.device_tracker] Setting up device_tracker.mqtt
2023-02-09 18:55:22.516 INFO (MainThread) [homeassistant.components.siren] Setting up siren.mqtt
2023-02-09 18:55:22.517 INFO (MainThread) [homeassistant.components.text] Setting up text.mqtt
2023-02-09 18:55:22.517 INFO (MainThread) [homeassistant.components.lock] Setting up lock.mqtt
2023-02-09 18:55:22.518 INFO (MainThread) [homeassistant.components.fan] Setting up fan.mqtt
2023-02-09 18:55:22.519 INFO (MainThread) [homeassistant.components.cover] Setting up cover.mqtt
2023-02-09 18:55:22.519 INFO (MainThread) [homeassistant.components.alarm_control_panel] Setting up alarm_control_panel.mqtt
2023-02-09 18:55:22.520 INFO (MainThread) [homeassistant.components.number] Setting up number.mqtt
2023-02-09 18:55:22.521 INFO (MainThread) [homeassistant.components.button] Setting up button.mqtt
2023-02-09 18:55:22.522 INFO (MainThread) [homeassistant.components.vacuum] Setting up vacuum.mqtt
2023-02-09 18:55:22.523 INFO (MainThread) [homeassistant.components.humidifier] Setting up humidifier.mqtt
2023-02-09 18:55:22.524 INFO (MainThread) [homeassistant.setup] Setting up script
2023-02-09 18:55:24.037 INFO (MainThread) [homeassistant.setup] Setting up conversation
2023-02-09 18:55:24.038 INFO (MainThread) [homeassistant.setup] Setup of domain conversation took 0.0 seconds
2023-02-09 18:55:24.283 INFO (MainThread) [homeassistant.setup] Setting up upnp
2023-02-09 18:55:24.283 INFO (MainThread) [homeassistant.setup] Setup of domain upnp took 0.0 seconds
2023-02-09 18:55:25.558 INFO (MainThread) [homeassistant.setup] Setting up radio_browser
2023-02-09 18:55:25.559 INFO (MainThread) [homeassistant.setup] Setup of domain radio_browser took 0.0 seconds
2023-02-09 18:55:25.577 INFO (MainThread) [homeassistant.setup] Setup of domain ffmpeg took 3.9 seconds
2023-02-09 18:55:25.688 WARNING (MainThread) [homeassistant.config_entries] Config entry 'EPSON ET-3750 Series' for ipp integration not ready yet: Invalid response from API: Error occurred while communicating with IPP server.; Retrying in background
2023-02-09 18:55:30.676 INFO (MainThread) [homeassistant.setup] Setting up influxdb
2023-02-09 18:55:30.879 WARNING (MainThread) [homeassistant.setup] Setup of multiscrape is taking over 10 seconds.
2023-02-09 18:55:30.888 INFO (MainThread) [custom_components.hacs]
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.
Hi Adrien
I have sorted out my previous issues, its seems that reloading the Master and then upgrading to the latest version has solved the issued I had.
Thanks
Sent from Mailhttps://go.microsoft.com/fwlink/?LinkId=550986 for Windows
From: Adrien @.> Sent: 19 February 2023 17:14 To: @.> Cc: @.>; @.> Subject: Re: [ScratMan/HASmartThermostat] Output control not linked to control_output (Issue #121)
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.
— Reply to this email directly, view it on GitHubhttps://github.com/ScratMan/HASmartThermostat/issues/121#issuecomment-1436041996, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A3I7ONIN3DO22DG3YN24JH3WYJIIXANCNFSM6AAAAAAUMPNONE. You are receiving this because you were mentioned.Message ID: @.***>
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.
Here is with 2023.1.1. Output was on for 1 minute max
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
Desktop (please complete the following information):
Additional context Here is the config.yaml for this thermostat
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.