Page 12 of 21

Re: Python Plugin: Smart Virtual Thermostat

Posted: Friday 28 December 2018 9:06
by Logread
EmKaRo wrote: Thursday 27 December 2018 19:05 Is it possibile to avoid few second on/off triggers like below?

2018-12-27 19:01:01.384 Status: User: Admin initiated a switch command (14/Piec dół/On)
2018-12-27 19:01:02.956 (Piec) Light/Switch (Piec dół)
2018-12-27 19:01:02.947 Status: User: Admin initiated a switch command (14/Piec dół/Off)
2018-12-27 19:04:01.110 Status: User: Admin initiated a switch command (14/Piec dół/On)
2018-12-27 19:04:06.895 (Piec) Light/Switch (Piec dół)
2018-12-27 19:04:06.888 Status: User: Admin initiated a switch command (14/Piec dół/Off)
Without context it is difficult to tell, but I suspect the heating period in a given cycle is calculated as minimal... then you should adjust the minimum heating parameter to avoid too short on/offs. The meaning of these parameters is described in the wiki.

Re: Python Plugin: Smart Virtual Thermostat

Posted: Friday 28 December 2018 20:38
by jake
EmKaRo wrote:Is it possibile to avoid few second on/off triggers like below?

2018-12-27 19:01:01.384 Status: User: Admin initiated a switch command (14/Piec dół/On)
2018-12-27 19:01:02.956 (Piec) Light/Switch (Piec dół)
2018-12-27 19:01:02.947 Status: User: Admin initiated a switch command (14/Piec dół/Off)
2018-12-27 19:04:01.110 Status: User: Admin initiated a switch command (14/Piec dół/On)
2018-12-27 19:04:06.895 (Piec) Light/Switch (Piec dół)
2018-12-27 19:04:06.888 Status: User: Admin initiated a switch command (14/Piec dół/Off)
I see that 'admin' is doing the switch off. You might want to investigate in that direction.

Re: Python Plugin: Smart Virtual Thermostat

Posted: Saturday 29 December 2018 23:43
by MFxMF
Erwanweb wrote: Saturday 01 December 2018 10:19
First, adding in the SVT one dummy named for example "Heating request",
Hi I did something similar in my fork.

https://github.com/MFxMF/SmartVirtualThermostat

I added two additional devices.
One of them is heating switch.
You can easily remove the second one.

In the SVT configuration I setting up a dummy heating switch in each heating zone.
Each heating zone have own dummy heating switch and the SVT turning on/off this dummy swich.
Then a lua script, checks all dummy heating switches from all SVT, and if minimum one of them is on then lua script turning on a boiler.
Such an approach eliminated a conflict what you mentioned.

Re: Python Plugin: Smart Virtual Thermostat

Posted: Tuesday 01 January 2019 8:57
by Erwanweb
Hi,

Thanks for this info.

I am working on presence detection using PIR sensors or other for SVT. Just, all is ok if only 1 ID, but if several, if not all ON, it do not works.
Someone would have any idea ? Here is the part of the code:

PresenceDT = {}
devicesAPI = DomoticzAPI("type=devices&filter=light&used=true&order=Name")
if devicesAPI:
for device in devicesAPI["result"]: # parse the presence/motion sensors (DT) device
idx = int(device["idx"])
if idx in self.DTpresence: # this is one of our DT
if "Status" in device:
PresenceDT[idx] = True if device["Status"] == "On" else False
Domoticz.Debug("DT switch {} currently is '{}'".format(idx,device["Status"]))
if device["Status"] == "On":
self.PresenceDetected = True
Domoticz.Debug("At mini 1 DT is ON...")
else:
self.PresenceDetected = False
else:
Domoticz.Error("Device with idx={} does not seem to be a DT !".format(idx))

How can I do for something like : If At mini 1 DT is ON = selfpresencedetected = true ?????? :roll: :?:

Re: Python Plugin: Smart Virtual Thermostat

Posted: Thursday 03 January 2019 8:07
by alarm_guy1
Hi guys,

Just a quick one, my SVT has randomly started to switch to OFF for no reason.

I leave it on auto and it switches at 10pm to economy and back to normal at 05:45

any reason why I come down some mornings and it is set to Off.
there are only 2 of us in the house and my wife wouldnt know where to begin

cheers

Re: Python Plugin: Smart Virtual Thermostat

Posted: Thursday 03 January 2019 9:07
by Logread
alarm_guy1 wrote: Thursday 03 January 2019 8:07 Just a quick one, my SVT has randomly started to switch to OFF for no reason.
There has to be a reason though ;)
I suspect this is due to the inside temperature sensor(s) timing out. As previously discussed in that thread, the SVT then switches off as a safety precaution to avoid overheating. Suggest you check the logs for the culprit sensor. As for a remedy, either you can adjust the sensor to be more reliable, increase the sensor timeout in the domoticz settings or you add more temperature sensors (chances that multiple sensors all time out at the same time are more remote).

Re: Python Plugin: Smart Virtual Thermostat

Posted: Thursday 03 January 2019 13:57
by alarm_guy1
Cheers, I'll take a look.
I would be surprised if it is the temp sensor as it is a hardwired 1wire sensor on the PI, what other sensors are available?

and would you know if I could run a 2nd Pi and run 1wire temp sensors on that and have them in Domoticz, or is that way beyond the scope of this thread.

cheers

Re: Python Plugin: Smart Virtual Thermostat

Posted: Thursday 03 January 2019 15:16
by Squalo
My answer is for sure beyond the scope, but check cables on 1wire bus, check supply to the sensor, and check for the pull-up resistor.
BTW you could have DS18B20 hardwired to ESP8266, and if the ESP disconnects from WIFI you have unresponsive sensor.
...closing the OT.

Re: Python Plugin: Smart Virtual Thermostat

Posted: Thursday 03 January 2019 18:26
by alarm_guy1
cheers, i'll delve deeper. :-)

Re: Python Plugin: Smart Virtual Thermostat

Posted: Saturday 05 January 2019 10:58
by Logread
New version 0.4.7 has been pulled to GitHub. Mostly cosmetic changes dealing with logging in verbose mode.

Re: Python Plugin: Smart Virtual Thermostat

Posted: Saturday 05 January 2019 21:04
by uzturre
Logread wrote: Saturday 05 January 2019 10:58 New version 0.4.7 has been pulled to GitHub. Mostly cosmetic changes dealing with logging in verbose mode.
Thanks very much.!!

Re: Python Plugin: Smart Virtual Thermostat

Posted: Wednesday 16 January 2019 18:12
by vulbas
thank you for this plugin,
it is very easy to use for a beginner like me :D

Re: Python Plugin: Smart Virtual Thermostat

Posted: Saturday 19 January 2019 9:59
by gmarchionni
Thanks for this....it's another great piece of software...specially combined with domoticz.

Re: Python Plugin: Smart Virtual Thermostat

Posted: Tuesday 29 January 2019 14:50
by Gerwin
A great plugin :D .

Is it possible to implement a floor heating set point ,that would be great .
We have a floor temperature sensor ,
if we go to the room temperature heating the floor cools down too much so the floor needs to warm up again and then it gets too hot I need the room

Gerwin

Re: Python Plugin: Smart Virtual Thermostat

Posted: Tuesday 29 January 2019 20:18
by Logread
Gerwin wrote: Tuesday 29 January 2019 14:50 A great plugin :D .

Is it possible to implement a floor heating set point ,that would be great .
We have a floor temperature sensor ,
if we go to the room temperature heating the floor cools down too much so the floor needs to warm up again and then it gets too hot I need the room

Gerwin
This gets very complex. I have a similar setup at my vacation place... the floor heating is driven by an outside temperature sensor and its own logic to provide heating for about 15 degrees celsius without any other heating. And the SVT does the rest with the electric convectors. I am not trying to drive the floor heating with the SVT and I cannot think of any way to do it given the very different inertia of the heating sources.

Re: Python Plugin: Smart Virtual Thermostat

Posted: Monday 11 February 2019 19:17
by marcojpolet
Hi all,

I'm starting to use this plugin and think it's great! I've got it working, I think :-) but there is something strange. I have a virtual switch which is the heater. If I check from a LUA script or look at the variables values (from the script editor window), than I see this switch being turned on and off by SVT. BUT if I look in the Domoticz dashboard, this switch stays 'Off' and does not seem to react to SVT. Any idea why this is?

I'm using latest SVT and almost latest beta Domoticz.

Regards,
Marco

Re: Python Plugin: Smart Virtual Thermostat

Posted: Tuesday 12 February 2019 21:30
by Bazooka
Gentlemen,

I discovered this plugin today and started fiddling. Seems like a very prompt plugin, although it doesn't seem to be a "true" pwm. Anyhow, great work!

I see others than I who runs combo thermometers (temp +hum). Initially I set up a dummy thermometer with the splitted value from the irl thermometer. I can't get this to work. Can anyone confirm that this is doable?

Cheers!

Edit: Spelling

Re: Python Plugin: Smart Virtual Thermostat

Posted: Wednesday 13 February 2019 21:47
by jake
What is it that you can't get to work? Splitting the temperature to a separate device, or using the correctly splitted temp. sensor in the SVT plugin.

If splitting is the issue, there is a wiki on how to do this in LUA. There is an example in dzVents LUA as well. The dzVents LUA version is much easier to understand.

Re: Python Plugin: Smart Virtual Thermostat

Posted: Wednesday 13 February 2019 22:01
by jake
My SVT setup works great when the setpoint is lower than the room temperature: SVT is able to ramp down the room temperature to exactly the setpoint temperature and keep it here with +/- 0.1'C

However, a higher setpoint temp. than room temp. gives quite a bit of overshoot, I therefore would like to tweak the parameters in the user variables. Today 2 partial heating cycles of 75 minutes were needed to reach setpoint (with overhoot after the 2nd cycle). Multiple cycles are OK for me, since the floor needs the 'off-time' to release more of its heat in the room.

My parameter values: {'LastSetPoint': 19.0, 'nbCC': 50, 'ConstC': 95.5, 'ConstT': 1.3, 'LastInT': 18.4, 'LastPwr': 75.9, 'ALStatus': 1, 'nbCT': 50, 'LastOutT': 4.7}

Type of heating: floor heating
Since I see overshoot, going upwards, I assume that the slow reaction of the floor heating results in a too long heating time %. I therefore want to decrease the ConstC factor to reduce this % (I already increased the heating cycle already from 60 to 75 minutes to increase the actual idle time. I don't want to increase that further, otherwise the convectors on the other floor level (complete opposite behaviour than the floor heating) would be off way too long.

Questions:
1: I changed the ConstC value from 90.3 to 70. 24hr later the value is 95.5. How is that possible since nbCC is 50 for the longest time and learning should be finished
2: How often is ConstC changed by itself?
3: Why is ConstC increasing while there is overshoot?
3: What is the result when putting ALstatus (AL is AutoLearn, I guess) to 0 or to 2?

Re: Python Plugin: Smart Virtual Thermostat

Posted: Wednesday 13 February 2019 22:41
by Logread
jake wrote: Wednesday 13 February 2019 22:01 Questions:
1: I changed the ConstC value from 90.3 to 70. 24hr later the value is 95.5. How is that possible since nbCC is 50 for the longest time and learning should be finished
2: How often is ConstC changed by itself?
3: Why is ConstC increasing while there is overshoot?
3: What is the result when putting ALstatus (AL is AutoLearn, I guess) to 0 or to 2?
@jake,
As you may have noticed, I just ported code written by others to domoticz... I am not an engineer in heating. But let me give my two cents on your questions:
1. Learning is not finished when nbCC reaches 50. Just the weight of each new learning is capped at 1/50th. Make perfect sense as while learning is mostly done, things are never cast in stone.
2. That should be not be the case is the overshoot is indeed as determined by the plugin logic (new temp at end of cycle > setpoint+0.2C). Would be good to see debug logs.
3. I have to say this is legacy code from the original Vera plugin, but this is meant to address wether plugin is starting from a clean sheet or not.
Appreciate this is not an outright answer, but please understand I just meant to port to domoticz a logic I found great when I was running my HA with a Vera controller... Any ideas to improve the logic are more than welcome... please submit code suggestions in GitHub.