999LV / SmartVirtualThermostat

Smart Virtual Thermostat python plugin for Domoticz home automation system
MIT License
41 stars 31 forks source link

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

Open rrozema opened 3 years ago

rrozema commented 3 years ago

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.

jakenl commented 3 years ago

+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 commented 2 years ago

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 commented 2 years ago

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