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

Missed 'min cycles' after call reload service #128

Closed
GoNzCiD opened this issue Feb 8, 2023 · 8 comments
Closed

Missed 'min cycles' after call reload service #128

GoNzCiD opened this issue Feb 8, 2023 · 8 comments

Comments

@GoNzCiD
Copy link

GoNzCiD commented Feb 8, 2023

Describe the bug
After call to the reload service, the min periods (at least min_cycle_duration and min_off_cycle_duration) are not taken in account anymore.

To Reproduce
Steps to reproduce the behavior:

  1. Define min_cycle_duration in the yaml config file.
  2. Call the reload service
  3. Note that the periods the thermostat is open are shorter than the defined in the min_cycle_duration

Expected behavior
Respect the time of the "min..." periods.

Screenshots
imagen
Same configuration, but during the morning min times are not applied (I performed a reload last night), during the evening after a HA restart.

  min_cycle_duration: 00:50:00
  min_off_cycle_duration: 00:05:00
@ScratMan
Copy link
Owner

ScratMan commented Feb 9, 2023

Hello, please test with master branch.
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.

@GoNzCiD
Copy link
Author

GoNzCiD commented Feb 9, 2023

OK, I'll try it, I just upgraded it following the HACS notification, and I'm running 2023.1.1

@GoNzCiD
Copy link
Author

GoNzCiD commented Feb 9, 2023

6 Hours ago (more or less) I download the master version, restart HA, and call the reload service. So, @ScratMan, you are right, in this versions seems to works!

Do you plan to release a version with a mayor number to avoid the HACS repository alert you with a new update?

Thanks!

@ScratMan
Copy link
Owner

ScratMan commented Feb 9, 2023

Yes, i'll push a release.

@GoNzCiD
Copy link
Author

GoNzCiD commented Feb 11, 2023

Hi again @ScratMan, I guess something similar is happening with the constants kp, ki, kd & ke... They are not updated if the yaml is modified...

@ScratMan
Copy link
Owner

That's normal. The PID gains and preset temperatures are always restored from previous state stored in HA database. Once HA is running, gains and preset should be modified using the corresponding services, they are applied without need of reboot.
The values in the YAML is only used for first start or if the database is deleted or corrupted.

I recommend to update the YAML once you've found the best settings that fit your needs.

@GoNzCiD
Copy link
Author

GoNzCiD commented Feb 11, 2023

ACK, I added it by the service once I noticed they weren't updated from the yaml. Thanks for clarify it.

@teklabania
Copy link

@ScratMan, I'm using version 2023.10.0 and also noticed that min_cycle_duration is not honored. I've set it to 00:15:00 but I can see that heaters are switched for example for 3 minutes.

- platform: smart_thermostat
  name: Thermostat X
  heater: light.heater_x
  target_sensor: sensor.temperature_x
  kp: 100
  ki: 0.0005
  kd: 100000
  ke: 0.6
  outdoor_sensor: sensor.tomorrow_io_dom_temperature
  min_temp: 15
  max_temp: 25
  away_temp: 20
  boost_pid_off: true
  precision: 0.1
  keep_alive: 00:01:00
  pwm: 02:00:00
  min_cycle_duration: 00:15:00
  target_temp: 21
  boost_temp: 21.5

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

3 participants