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

weighted temperature sensors and power device (#46, #47, #48, #49, #50, #51) #52

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

rrozema
Copy link

@rrozema rrozema commented Feb 5, 2021

As explained in the mentioned issues here are some changes I made to your excellent thermostat to make it better match my needs. I hope others can benefit from these changes too.

Also avoid divide by zero when intemp equals last in temp
- remove rounding for constC and ConstT
- always learn over a period of 2 days
- allow for weighted averaging on temp sensors (if a sensor is listed twice that sensor will weigh twice in the average temperature)
@jakenl
Copy link

jakenl commented Feb 7, 2021

+1 for these double digits. I implemented that myself before, but lost it during a plugin update. I forgot that I changed it until I saw your comment. Same reason, with only 1 digit especially the ConstT parameter hardly changes, since it is already a very small number.

@999LV
Copy link
Owner

999LV commented Dec 18, 2021

Apologies for a long silence…. I am now resuming attention to the plugin and will review your PR over the holidays. Many thanks for contributing

@altserg
Copy link

altserg commented Dec 26, 2021

Hi all,

I have tried this PR for a while and suggest following improvements:

  1. Calculate num_periods over 24h (50 calculations 30 min time in between) like it was in the original plugin, i.e. change the line 216:
    self.num_periods = round( 24 * 60 / self.calculate_period)
    self.WriteLog("Calculate period (min) = {}, Learning periods = {}".format(self.calculate_period, self.num_periods), "Verbose")

  2. It looks like self.num_periods is not used anywhere. Maybe it should be used in the lines 420 and 433 ? The constant 50 is used there. self.Internals['nbCT'] = min(self.Internals['nbCT'] + 1, 50). Maybe needs to change to self.Internals['nbCT'] = min(self.Internals['nbCT'] + 1, self.num_periods )

  3. I think there is a mistake in ConstC and/or ConstT calculation. In my case I have underfloor heating and a very good isolated house. The inside temperature drop is about 1 degree per 24h assuming delta temperature inside/outside of 10 degrees. Basically, if there is above than 15 degrees outside during the day, the house should not be heated. However, I see that ConstT and ConstC are very high, while I would expect at least ConstT to be low. self.lastcalc should be updated only when power >0, not every time

  4. Add extra parameter - maximum applied power (symmetric to minimum power). The reason is that I see that current algo applies 100% power practically constantly, and overshoots a lot, if you use 360 min of self.calculate_period. See above for possible reasons

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

Successfully merging this pull request may close these issues.

4 participants