999LV / SmartVirtualThermostat

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

Delta as parameter #23

Open josemi73 opened 4 years ago

josemi73 commented 4 years ago

Hi, Winter is coming. Thank you for the plugin, but it is so smart that I think it is not valid for my heater, because heater is swithing on and off too quickly, and I wish, for instance, to be switched on for more delta temperature because the inertia than configurated one (delta=0.2). My heater/boiler lasts one hour until the water circuit starts to submit heat. I wish when it switch on, at least, it heats until normal temperature + delta (0.8 for instance) is reached. I have modified Delta max in plugin.py in my local pull, but I think it would be well if it would be available as parameter (in the line of csv parameters in the plugin for instance). What do you think?

jakenl commented 4 years ago

I'm glad I found your post. I was researching why my room temperature reached a minimum of 0.4'C below setpoint. With floor heating I need a very long calculation period (120min). However 2 hours before SVT switched the heater on, SVT decided to skip that period, while the room temperature was only 0.3'C above setpoint. Manually I could cacluate the necessary 'on' time, resulting in a value of 8.76%, enough to put the heater on! I crawled through the python code and came across the same 0.2 deltamax value. This value will prevent any heating when the room temperature is > 0.2'C above setpoint. Very strange, since it is much more important to base the decision on the calculation, based on the ConstC and ConstT values. I will increase it myself straight in the code, because there is no parameter option for this. Would be welcome. I also would like to understand what kind of safety this is adding to the system.

ConstC: 50 ConstC: 1.3

When Setpoint - outside Temp = 20, than: (20 x 1.3) / 50 = 0.52. This means that only for a deltamax > 0.52'C the heat request is negative ( -0.52 x 50 + 20 x 1.3 = 0%) When it is even colder than, let's say 18'C - (-2'C) the 0.52 is not even sufficient. I will go for a 30' temperature difference -12'C outside @ 18'C setpoint: (30 x 1.3) / 50 = 0,78'C -> deltamax = 0.8

999LV commented 4 years ago

Thanks to both for your suggestions. I’ll implement in a new version a new setup parameter for deltamax.

josemi73 commented 4 years ago

Thank you, I knew it was going to be interesting for everybody. Regards.

jakenl commented 4 years ago

Ah, nice. I did the update last night. Today I checked my logs from this night and the 2nd time it decided to do a minimum 'burn' of 10%, while the calculation was 0, (looks like the number wasn't completed). (ConstC = 50 and ConstT = 1.3 and setpoint = 18 and manual updated deltamax = 0.8 and heating on: only when required) 2019-11-21 03:27:07.368 Status: (SVT) Next calculation time will be : 2019-11-21 05:27:07.367427 2019-11-21 03:27:07.437 Status: (SVT) Temperatures: Inside = 19.3 / Outside = 1.4 2019-11-21 03:27:07.437 Status: (SVT) Temperature exceeds setpoint) 2019-11-21 03:27:07.437 Status: (SVT) Calculation: Power = 0 -> heat duration = 0 minutes

2nd time: 2019-11-21 05:27:09.201 Status: (SVT) Next calculation time will be : 2019-11-21 07:27:09.201108 2019-11-21 05:27:09.273 Status: (SVT) Temperatures: Inside = 18.7 / Outside = 1.5 2019-11-21 05:27:09.274 Status: (SVT) Calculated power is 0, applying minimum power of 10 2019-11-21 05:27:09.274 Status: (SVT) Calculation: Power = 10 -> heat duration = 12 minutes

Calculation: (18-18.7) x 50 + (18-1.5) x 1.3 = -13.5%

So, something goes wrong there.

I would prefer to have added to the above log lines: -ConstC -ConstT -Setpoint temperature -The calculation time like shown above. This makes trouble shooting very easy.

The third log lines show good behaviour: 2019-11-21 07:27:10.917 Status: (SVT) Next calculation time will be : 2019-11-21 09:27:10.916422 2019-11-21 07:27:10.993 Status: (SVT) Temperatures: Inside = 18.2 / Outside = 1.7 2019-11-21 07:27:10.997 Status: (SVT) New calc for ConstT = 1.2847178992851798 2019-11-21 07:27:10.997 Status: (SVT) ConstT updated to 1.3 2019-11-21 07:27:10.997 Status: (SVT) Calculation: Power = 11.2 -> heat duration = 13 minutes

ConstC is not updated? When does that happen?

piotrux commented 3 years ago

Hello I have a question. I have a regulator in which you can control the temperature, not on / off. That means, my thermostat controls the stove, I would like a virtual thermostat to control this thermostat depending on the temperature read from netatmo, internal and external temperature. there is a possibility? I can't turn the stove on and off

ultrasuperpingu commented 3 years ago

temperature delta max as parameter is implemented by #41 which has been merged so it should work...