Python Plugin: Smart Virtual Thermostat

For heating/cooling related questions in Domoticz

Moderator: leecollings

dheuts
Posts: 65
Joined: Monday 25 March 2019 15:14
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Brunssum, Netherlands
Contact:

Re: Python Plugin: Smart Virtual Thermostat

Post by dheuts »

Gerwin wrote: Tuesday 11 May 2021 7:05 Hello,
the version i have is 0.4.11 is this the last one on this moment

Gerwin
Yes it is, please check: https://github.com/999LV/SmartVirtualTh ... istory.txt
Raspberry Pi 4 With Domoticz - RFXCom - Tuya Wifi LED lights - Chuango Alarm - Zwave+ - Zigbee2MQTT - Anna Thermostat - Broadlink IR, P1 - Eufy Robo Vacuum - Worx Robo Mower
Gerwin
Posts: 84
Joined: Friday 12 August 2016 13:08
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python Plugin: Smart Virtual Thermostat

Post by Gerwin »

Hello i have copied the files :To implement, copy files in the domoticz/plugins/SVT/viewer/ folder to the
domoticz/www/templates/ folder and reload/restart domoticz.
i see te new smart thermostats menu but it is empty how can i solve that

Gerwin
knasson
Posts: 5
Joined: Sunday 02 May 2021 22:53
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python Plugin: Smart Virtual Thermostat

Post by knasson »

Hi,

My heaters Switches are "off" when they heat
And "on" if stopped.
How to manage that with the plugin?
Thanks you for help..

Regards knasson
jake
Posts: 742
Joined: Saturday 30 May 2015 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Contact:

Re: Python Plugin: Smart Virtual Thermostat

Post by jake »

knasson wrote:Hi,

My heaters Switches are "off" when they heat
And "on" if stopped.
How to manage that with the plugin?
Thanks you for help..

Regards knasson
Just create another heat switch that inverses the svt switch.

Edit the svt heating switch in the GUI and put the code from this page in it: https://www.domoticz.com/wiki/Domoticz_ ... h_on.2Foff
knasson
Posts: 5
Joined: Sunday 02 May 2021 22:53
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python Plugin: Smart Virtual Thermostat

Post by knasson »

Thank you Jake perfect!
Cdzn
Posts: 18
Joined: Monday 02 March 2020 10:09
Target OS: -
Domoticz version:
Contact:

Re: Python Plugin: Smart Virtual Thermostat

Post by Cdzn »

Hi. Guys please how check relay which turn On/Off boiler thermostat. How to make periodically check and sending to SVT thermostat or how to SVT thermostat should check all of his data (periodically) and send state to relay.
jake
Posts: 742
Joined: Saturday 30 May 2015 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Contact:

Re: Python Plugin: Smart Virtual Thermostat

Post by jake »

Cdzn wrote:Hi. Guys please how check relay which turn On/Off boiler thermostat. How to make periodically check and sending to SVT thermostat or how to SVT thermostat should check all of his data (periodically) and send state to relay.
I don't fully understand your question, but svt only switches a (virtual) heating switch in domoticz, when the boiler is supposed to turn on/off. It is up to you as a user to connect it to a physical relay towards your boiler. SVT doesn't handle any communication from the boiler.
jeremushka
Posts: 3
Joined: Saturday 27 November 2021 17:36
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python Plugin: Smart Virtual Thermostat

Post by jeremushka »

Hello,

2 weeks ago i have installed Domoticz on a raspberry pi in order to evaluate the capabilities as i am curious. I am currently using Home Assistant but i would like to have a look to this nice open source home automation.
So far so good: installation, adding some of my smart devices etc...
Regading the SVT, i am using it by controlling 2 inertia electrical convector NOIROT which have embedded thermostat as well. (in 1 bedroom and one room which is use as a office). Of course, i keep my current configuration with HA for the main living area: bedroom + Living room and kitchen.

After 5 days leaving the SVT in auto learning mode as described in the wiki, i am surprised by the results. I have some questions to be sure i have understood everything.

I noticed 3 points:


1. In the hardware configuration i have set "Apply minimum heating per cycle" at "only when heating required".

However, in the first days that even if the SETPOINT is reached ( i fix 20°C) the SVT will trigger ON the one actuator i have at the heater side but for only few minutes. as below:

Code: Select all

2021-12-06 14:41:25.090 Status: Thermostat: (Thermostat) Next calculation time will be : 2021-12-06 15:11:25.089578
2021-12-06 14:41:25.138 Status: Thermostat: (Thermostat) Temperatures: Inside = 20.1 / Outside = 7.6
2021-12-06 14:41:25.139 Status: Thermostat: (Thermostat) New calc for ConstT = 1.7004097903438664
2021-12-06 14:41:25.139 Status: Thermostat: (Thermostat) ConstT updated to 4.9
2021-12-06 14:41:25.139 Status: Thermostat: (Thermostat) Calculation: Power = 18.2 -> heat duration = 5 minutes
My question, is it normal that even for very short period the SVT trigger the heater ON as i have defined in the hardware setting to trigger on when HEATING IS REQUIRED, or i am wrong ?

2. In the hardware setting page i have also setup :
- MINIMUM HEATING TIME IN PERCENTAGE BY CYCLE. I put 10%
- Periodic SVT calculation time at 30minutes.
and Whan i understand is: The minimum heating period will be 10% of 30min (3min) when HEATING is required which means under the SETPOINT that i setup at 20°C. However, during the auto-learning mode this value is never used.
Does it mean this configuration is used only when the auto learning is off ? What i noticed in the log is that WHEN HEATING is REQUIRED, SVT will trigger at max power during 30MIN. I have this behavior for already 5 days.

Code: Select all

2021-12-06 13:10:55.147 Status: Thermostat: (Thermostat) Temperatures: Inside = 19.9 / Outside = 7.1
2021-12-06 13:10:55.148 Status: Thermostat: (Thermostat) New calc for ConstT = 8.520338367556864
2021-12-06 13:10:55.148 Status: Thermostat: (Thermostat) ConstT updated to 5.5
2021-12-06 13:10:55.148 Status: Thermostat: (Thermostat) Calculation: Power = 100 -> heat duration = 30 minutes
2021-12-06 13:10:55.187 Status: User: Admin (IP: 127.0.0.1) initiated a switch command (15/Sonoff Pow R2 - Heater/On)
2021-12-06 13:41:15.053 Status: Thermostat: (Thermostat) Next calculation time will be : 2021-12-06 14:11:15.052878
2021-12-06 13:41:15.103 Status: Thermostat: (Thermostat) Temperatures: Inside = 20.0 / Outside = 7.2
2021-12-06 13:41:15.103 Status: Thermostat: (Thermostat) New calc for ConstC = 429.79469056766663
2021-12-06 13:41:15.103 Status: Thermostat: (Thermostat) ConstC updated to 426.0
2021-12-06 13:41:15.103 Status: Thermostat: (Thermostat) Calculation: Power = 70.4 -> heat duration = 21 minutes
2021-12-06 13:56:25.106 Status: Incoming connection from: 127.0.0.1
2021-12-06 14:02:25.105 Status: User: Admin (IP: 127.0.0.1) initiated a switch command (15/Sonoff Pow R2 - Heater/Off)
2021-12-06 14:11:15.084 Status: Thermostat: (Thermostat) Next calculation time will be : 2021-12-06 14:41:15.084039
2021-12-06 14:11:15.134 Status: Thermostat: (Thermostat) Temperatures: Inside = 20.2 / Outside = 7.4
2021-12-06 14:11:15.134 Status: Thermostat: (Thermostat) New calc for ConstT = -1.156170857187476
2021-12-06 14:11:15.134 Status: Thermostat: (Thermostat) ConstT updated to 5.1
2021-12-06 14:11:15.135 Status: Thermostat: (Thermostat) Calculated power is 0, applying minimum power of 10
2021-12-06 14:11:15.135 Status: Thermostat: (Thermostat) Calculation: Power = 10 -> heat duration = 3 minutes
2021-12-06 14:11:15.183 Status: User: Admin (IP: 127.0.0.1) initiated a switch command (15/Sonoff Pow R2 - Heater/On)
2021-12-06 14:14:25.112 Status: User: Admin (IP: 127.0.0.1) initiated a switch command (15/Sonoff Pow R2 - Heater/Off)
3. About the ConstantC and ConstantT. After this trial, i can see that the ConstantC is very very. By your experience is it normal to have such kind of high Value?

Code: Select all

{'ConstC': 426.0, 'ConstT': 4.9, 'nbCC': 5, 'nbCT': 22, 'LastPwr': 100, 'LastInT': 19.4, 'LastOutT': 6.0, 'LastSetPoint': 20.0, 'ALStatus': 1}
Will it be better if i setup the internal thermostat of both of my electrical convector 4 to 5°C up to SETPOINT specific in SVT ?


I hope that some of you have more expertise during several years than me on this plugin to have an objective answer :)

Thanks for your support.
rrozema
Posts: 470
Joined: Thursday 26 October 2017 13:37
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Delft
Contact:

Re: Python Plugin: Smart Virtual Thermostat

Post by rrozema »

It is my believe that the constT offset calculation is wrong. This constT should be a correction for differences in the outside temperature. But in reality it changes far too fast and by doing so it causes the constC calculation to go wrong: it grows far to high. As you've noticed too. That high constC value is what causes your power to go from 0 to 100%, at 100% power your room will overheat and until the room has cooled down your power will be at 0% again. Effectively the thermostat works like an on-of thermostat.

I don't know how to fix the constT bug yet. But I do know a workaround: remove the idx for the outside temperature sensor. The svt will then no longer calculate the constT and the constC calculation will no longer be influenced by the bug.

You still need to reset your high constC value or it will take a very long time to fall to a more reasonable value. To reset your constC value, disable the svt hardware, then edit the user variable to constC 60 and it's counter to 1, so it learns as fast as possible. Now re-enable the svt hardware and it will restart itself with the new constC value. The value for constT and it's counter are no longer used if you leave the outside temperature sensor idx empty so you don't need to edit these.

There is another thing I did, but this requires you to edit the plugin code. The plugin.py code has 2 things I didn't like
1- the code has a delta value of 0.2 degrees( in later versions it was raised a little but still not enough), which makes that the thermostat can't overshoot more than .2 degrees over the setpoint. This is actually a bug as the mechanism needs to make errors to learn the correct constC. I changed it to a much higher value. I think I used 5 degrees.
2- the constC value is rounded to 2 decimals, the error can however be much smaller and this rounding causes the constC calculation to be less accurate resulting in it bouncing around the proper value for your room & heating. I have removed the rounding completely resulting in much better behavior of the thermostat.
pkriek
Posts: 6
Joined: Monday 28 March 2016 11:49
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python Plugin: Smart Virtual Thermostat

Post by pkriek »

Hi

I want to start using this amazing plugin in domoticz, so I am on the latest version of domoticz.
I followed the installation steps. but under hardware the virtual thermostat is not there.
any body have an idea what I do wrong?

thanks
pkriek
Posts: 6
Joined: Monday 28 March 2016 11:49
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python Plugin: Smart Virtual Thermostat

Post by pkriek »

found it... was ovelooking it. :)
JonyBCN
Posts: 39
Joined: Tuesday 24 May 2016 22:39
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Python Plugin: Smart Virtual Thermostat

Post by JonyBCN »

I don't know if plugin maintenance is still working, or if someone would dare to fork, but I have a few questions:

-Making tests to check how long a radiator takes to heat up, I have put the thermostat in FORCED mode. When deactivating it, it does not turn off the radiator even if the setpoint has been exceeded by a long time. It is normal? A bug?

-I have a small radiator in the bathroom and I intend to use the plugin to keep it at a comfortable temperature without spending a lot of electricity. The radiator fulfills the function of maintaining the temperature and I hope that once the plugin learns it will do so efficiently. The problem is that although the radiator is more than enough to keep the bathroom warm, it costs more to raise the temperature. For that I intend to use an auxiliary heater, but I understand that if I use it with the active pluin it will break the learning in some way.
Does forced mode cancel learning? I mean, can I activate a little script in blockly that activates forced mode and auxiliary heater without breaking anything? Or should the script turn off the plugin and then turn on the auxiliary heater?

My idea would be: when going to shower, activate the "shower mode" that would turn off the plugin (or put it in FORCED mode), turn on the auxiliary heater, and once the desired temperature is reached, turn off the auxiliary heater and turn the plugin back on. . But I don't want to break the learning in the wrong direction.
rrozema
Posts: 470
Joined: Thursday 26 October 2017 13:37
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Delft
Contact:

Re: Python Plugin: Smart Virtual Thermostat

Post by rrozema »

The svt doesn't learn while in forced, off or paused mode. So theoretically switching svt to off or forced mode while applying the additional heat source would be a good way to add some heat in the rooom without affecting the constc learning. In practive however I wouldn't know how the svt will respond. As you indicate yourself the svt has some practical shortcomings. I'd say give it a try and let us know.

Can you share with us what your intentions are measuring the time for the radiator to heat up? I'm curious to know how that information relates to anything we can configure in svt?
rrozema
Posts: 470
Joined: Thursday 26 October 2017 13:37
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Delft
Contact:

Re: Python Plugin: Smart Virtual Thermostat

Post by rrozema »

JonyBCN wrote: Monday 27 December 2021 19:28 -Making tests to check how long a radiator takes to heat up, I have put the thermostat in FORCED mode. When deactivating it, it does not turn off the radiator even if the setpoint has been exceeded by a long time. It is normal? A bug?
I don't know if it is a bug or by design (although in my opinion it's a bug), but it's caused by this bit of code in onCommand():

Code: Select all

        if Unit in (1, 2, 4, 5): # force recalculation if control or mode or a setpoint changed
            self.nextcalc = now
            self.learn = False
            self.onHeartbeat()
3 is the pause switch and it's missing in that list. If you add 3, to that list the thermostat will start a new calculation period after the pause mode is lifted.
Sorry, I somehow misread your text that you used Pause mode to stop the heating, and for that the missing 3 is an explanation, not for force mode.
JonyBCN
Posts: 39
Joined: Tuesday 24 May 2016 22:39
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Python Plugin: Smart Virtual Thermostat

Post by JonyBCN »

rrozema wrote: Tuesday 28 December 2021 12:44 The svt doesn't learn while in forced, off or paused mode. So theoretically switching svt to off or forced mode while applying the additional heat source would be a good way to add some heat in the rooom without affecting the constc learning. In practive however I wouldn't know how the svt will respond. As you indicate yourself the svt has some practical shortcomings. I'd say give it a try and let us know.

Can you share with us what your intentions are measuring the time for the radiator to heat up? I'm curious to know how that information relates to anything we can configure in svt?
Well, last week I did tests with the SVT, and I intended to continue testing and experimenting. But, thanks to the wonders of global warming, in Spain this year we have apparently only had a cold week. Right now the bathroom temperature does not drop below 19.5 degrees with the heating off, so I have to wait to continue testing.
JonyBCN
Posts: 39
Joined: Tuesday 24 May 2016 22:39
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Python Plugin: Smart Virtual Thermostat

Post by JonyBCN »

Well, after a drop in temperature in my area I am about to test the plugin.
I think this is beyond my abilities, because after looking at the log I don't understand anything about what is happening.
My settings:
1 outdoor temperature sensor.
2 sensors inside the bathroom.
1 electric radiator. It is not extremely powerful, but it has a respectable thermal performance.

After testing the radiator, I have come to the conclusion that for it to get hot enough to affect the surroundings and gain some inertia, it needs a minimum of 8 minutes on. Turning it on less is wasting energy.

So I have configured the following: 30,25,2,1,45,0.9
Min. Heatig = Calc. Cycle = 30, Heating time = 25 (8 minutes), Delta MAx = 0.9.

I have the setpoint at 21.5 degrees. So far, I think everything is OK. the problem is that the temperature does not rise. And that the pace was slow would not surprise me, but looking at the log I do not understand anything:
Spoiler: show
2022-01-07 10:55:53.079 Status: Calefaccion Baño: (Calefaccion Baño) Next calculation time will be : 2022-01-07 11:25:53.079362
2022-01-07 10:55:53.191 Status: Calefaccion Baño: (Calefaccion Baño) Temperatures: Inside = 19.7 / Outside = 8.4
2022-01-07 10:55:53.191 Status: Calefaccion Baño: (Calefaccion Baño) New calc for ConstC = 0.0
2022-01-07 10:55:53.192 Status: Calefaccion Baño: (Calefaccion Baño) ConstC updated to 0.0
2022-01-07 10:55:53.192 Status: Calefaccion Baño: (Calefaccion Baño) Calculated power is 13.1, applying minimum power of 25
2022-01-07 10:55:53.192 Status: Calefaccion Baño: (Calefaccion Baño) Calculation: Power = 25 -> heat duration = 8 minutes
2022-01-07 10:55:53.350 Status: User: jony (IP: ::1) initiated a switch command (692/Encendido toallero/On)

2022-01-07 11:25:53.096 Status: Calefaccion Baño: (Calefaccion Baño) Next calculation time will be : 2022-01-07 11:55:53.095886
2022-01-07 11:25:53.212 Status: Calefaccion Baño: (Calefaccion Baño) Temperatures: Inside = 19.8 / Outside = 8.8
2022-01-07 11:25:53.214 Status: Calefaccion Baño: (Calefaccion Baño) New calc for ConstC = 0.0
2022-01-07 11:25:53.214 Status: Calefaccion Baño: (Calefaccion Baño) ConstC updated to 0.0
2022-01-07 11:25:53.214 Status: Calefaccion Baño: (Calefaccion Baño) Calculated power is 12.7, applying minimum power of 25
2022-01-07 11:25:53.214 Status: Calefaccion Baño: (Calefaccion Baño) Calculation: Power = 25 -> heat duration = 8 minutes
2022-01-07 11:25:53.364 Status: User: jony (IP: ::1) initiated a switch command (692/Encendido toallero/On)

2022-01-07 11:56:03.056 Status: Calefaccion Baño: (Calefaccion Baño) Nextcalculation time will be : 2022-01-07 12:26:03.055911
2022-01-07 11:56:03.185 Status: Calefaccion Baño: (Calefaccion Baño)Temperatures: Inside = 19.8 / Outside = 9.2
2022-01-07 11:56:03.186 Status: Calefaccion Baño: (Calefaccion Baño) Newcalc for ConstT = 1.0
2022-01-07 11:56:03.186 Status: Calefaccion Baño: (Calefaccion Baño)ConstT updated to 1.0
2022-01-07 11:56:03.186 Status: Calefaccion Baño: (Calefaccion Baño)Calculated power is 12.3, applying minimum power of 25
2022-01-07 11:56:03.186 Status: Calefaccion Baño: (Calefaccion Baño)Calculation: Power = 25 -> heat duration = 8 minutes

2022-01-07 12:26:03.067 Status: Calefaccion Baño: (Calefaccion Baño) Nextcalculation time will be : 2022-01-07 12:56:03.066876
2022-01-07 12:26:03.170 Status: Calefaccion Baño: (Calefaccion Baño)Temperatures: Inside = 19.6 / Outside = 9.7
2022-01-07 12:26:03.170 Status: Calefaccion Baño: (Calefaccion Baño) Newcalc for ConstT = 1.0
2022-01-07 12:26:03.170 Status: Calefaccion Baño: (Calefaccion Baño)ConstT updated to 1.0
2022-01-07 12:26:03.171 Status: Calefaccion Baño: (Calefaccion Baño)Calculated power is 11.8, applying minimum power of 25
2022-01-07 12:26:03.171 Status: Calefaccion Baño: (Calefaccion Baño)Calculation: Power = 25 -> heat duration = 8 minutes

2022-01-07 12:56:13.096 Status: Calefaccion Baño: (Calefaccion Baño) Nextcalculation time will be : 2022-01-07 13:26:13.095707
2022-01-07 12:56:13.205 Status: Calefaccion Baño: (Calefaccion Baño)Temperatures: Inside = 19.3 / Outside = 10.5
2022-01-07 12:56:13.207 Status: Calefaccion Baño: (Calefaccion Baño) Newcalc for ConstT=1.0
2022-01-07 12:56:13.209 Status: Calefaccion Baño: (Calefaccion Baño)ConstT updated to 1.0
2022-01-07 12:56:13.210 Status: Calefaccion Baño: (Calefaccion Baño)Calculated power is 11.0, applying minimum power of 25
2022-01-07 12:56:13.211 Status: Calefaccion Baño: (Calefaccion Baño)Calculation: Power = 25 -> heat duration = 8 minutes

2022-01-07 13:56:33.097 Status: Calefaccion Baño: (Calefaccion Baño) Nextcalculation time will be : 2022-01-07 14:26:33.096448
2022-01-07 13:56:33.207 Status: Calefaccion Baño: (Calefaccion Baño)Temperatures: Inside = 19.2 / Outside = 13.9
2022-01-07 13:56:33.207 Status: Calefaccion Baño: (Calefaccion Baño) Newcalc for ConstT = 1.0
2022-01-07 13:56:33.207 Status: Calefaccion Baño: (Calefaccion Baño)ConstT updated to 1.0
2022-01-07 13:56:33.208 Status: Calefaccion Baño: (Calefaccion Baño)Calculated power is 7.6, applying minimum power of 25
2022-01-07 13:56:33.208 Status: Calefaccion Baño: (Calefaccion Baño)Calculation: Power = 25 -> heat duration = 8 minutes

2022-01-07 14:26:43.094 Status: Calefaccion Baño: (Calefaccion Baño) Nextcalculation time will be:2022-01-07 14:56:43.094336
2022-01-07 14:26:43.196 Status: Calefaccion Baño: (Calefaccion Baño)Temperatures: Inside = 19.1 / Outside = 16.0
2022-01-07 14:26:43.199 Status: Calefaccion Baño: (Calefaccion Baño) Newcalc for ConstT = 1.0
2022-01-07 14:26:43.201 Status: Calefaccion Baño: (Calefaccion Baño)ConstT updated to 1.0
2022-01-07 14:26:43.202 Status: Calefaccion Baño: (Calefaccion Baño)Calculated power is 5.5, applying minimum power of 25
2022-01-07 14:26:43.202 Status: Calefaccion Baño: (Calefaccion Baño)Calculation: Power = 25 -> heat duration = 8 minutes

2022-01-07 14:56:53.058 Status: Calefaccion Baño: (Calefaccion Baño) Next calculation time will be : 2022-01-07 15:26:53.058366
2022-01-07 14:56:53.174 Status: Calefaccion Baño: (Calefaccion Baño) Temperatures: Inside = 19.1 / Outside = 17.6
2022-01-07 14:56:53.174 Status: Calefaccion Baño: (Calefaccion Baño) New calc for ConstT = 1.0
2022-01-07 14:56:53.175 Status: Calefaccion Baño: (Calefaccion Baño) ConstT updated to 1.0
2022-01-07 14:56:53.175 Status: Calefaccion Baño: (Calefaccion Baño) Calculated power is 3.9, applying minimum power of 25
2022-01-07 14:56:53.175 Status: Calefaccion Baño: (Calefaccion Baño) Calculation: Power = 25 -> heat duration = 8 minutes
At a quick glance, I see that the internal temperature does not rise, it even drops at times, and yet the Calculated power is less and less, and the system always applies the minimum power of 8 minutes.
What am I missing? I do not understand?
jake
Posts: 742
Joined: Saturday 30 May 2015 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Contact:

Re: Python Plugin: Smart Virtual Thermostat

Post by jake »

In your log I see that the ConstC value is 0. This means that the delta temperature (setpoint- inside temperature) is multiplied with 0, resulting in 0, meaning no influence on the hearing duration.

Solution: update the user variable of svt by changing the ConstC to 20 for a start. Then go to hardware in domoticz, select the svt and click on 'update'. This will restart the plugin and read the values from the user variable. This is important, without restarting the plugin will overwrite the user variable at the next heating interval.
JonyBCN
Posts: 39
Joined: Tuesday 24 May 2016 22:39
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Python Plugin: Smart Virtual Thermostat

Post by JonyBCN »

done, thanks for the help.
It seems that now the calculation is more correct. We will see how it works in the long term.
any idea how it could go to 0?
Spoiler: show
. 2022-01-07 18:22:49.093 Status: Calefaccion Baño: (Calefaccion Baño) Next calculation time will be : 2022-01-07 18:52:49.093344
2022-01-07 18:22:49.192 Status: Calefaccion Baño: (Calefaccion Baño) Temperatures: Inside = 19.0 / Outside = 12.0
2022-01-07 18:22:49.192 Status: Calefaccion Baño: (Calefaccion Baño) Calculation: Power = 59.5 -> heat duration = 18 minutes
jake
Posts: 742
Joined: Saturday 30 May 2015 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Contact:

Re: Python Plugin: Smart Virtual Thermostat

Post by jake »

I think that the recalculation algorithm is far from perfect. In my case the constT ended up with a negative value, totally impossible, the cooler it would be outside, the less best was required..... according SVT.

I made some adaptions trip the constT calculation and will let it go for a week or what to see if it performs well.

My way of reasoning now:

The heating is on for a certain percentage with the idea to reach setpoint.
At the next calculation I check the reached temperature.
When it differs from the setpoint, I make the same calculation, with the reached temperature acting as setpoint. My chosen variable is than constT, keeping the same heating percentage as a result.
This results in the 'perfect' constT value that matches with the calculated power and the reached temperature.
I have kept the averaging part of the calculation to smooth out big steps in constT results.
So far the results are ok, only slight adjustments to ConstT. Tonight the temperature dropped 0.3 degrees under the setpoint, so I sped up the learning process today by manually increasing the constT value
rrozema
Posts: 470
Joined: Thursday 26 October 2017 13:37
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Delft
Contact:

Re: Python Plugin: Smart Virtual Thermostat

Post by rrozema »

The source code for SVT has a sub folder called "viewer" with 2 files "Smart Thermostats.html" and "svt_viewer.js" in it. What are these files used for? I was hoping they could be opened from the "Custom" menu, but if this is what they are intended for, I haven't found how to activate them yet.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests