Page 8 of 21

Re: Python Plugin: Smart Virtual Thermostat

Posted: Monday 25 June 2018 7:48
by SzuR
Ok thanks so i have to try till it works. :-D
Are you using stable domoticz or beta?

Wysłane z mojego D6503 przy użyciu Tapatalka


Edit
So frozen domoticz was an issue with last domoticz update. Couple people have same issue and it is connected with mydomoticz allowed in settings...

Re: Python Plugin: Smart Virtual Thermostat

Posted: Thursday 05 July 2018 16:49
by pipiche
This is a pretty impressive plugin.

You mentioned that the plugin required 2 to 3 days to learn. What's happen in case of restart of domoticz or even the hosts system. Are we back to 2 to 3 days of learning ?

Re: Python Plugin: Smart Virtual Thermostat

Posted: Thursday 05 July 2018 17:00
by Logread
pipiche wrote: Thursday 05 July 2018 16:49 You mentioned that the plugin required 2 to 3 days to learn. What's happen in case of restart of domoticz or even the hosts system. Are we back to 2 to 3 days of learning ?
The plugin saves the « learning » in a dedicated user variable that it creates. This survives a restart or a reboot (and is backed up as you make backups of domoticz). Only if you delete that user variable will learning be lost.

Re: Python Plugin: Smart Virtual Thermostat

Posted: Thursday 05 July 2018 18:20
by pipiche
The plugin saves the « learning » in a dedicated user variable that it creates.
Interesting, I'll have a look. I was not aware that a uservariable could be created .

Thanks

Re: Python Plugin: Smart Virtual Thermostat

Posted: Friday 06 July 2018 22:31
by jake
pipiche wrote:
The plugin saves the « learning » in a dedicated user variable that it creates.
Interesting, I'll have a look. I was not aware that a uservariable could be created .

Thanks
You can't create it, but you can 'modify' it, if you know what you're dining. Worst case you simply delete the content and let the plugin recreate it.

Re: Python Plugin: Smart Virtual Thermostat

Posted: Tuesday 24 July 2018 11:48
by HvdW
Still having problems with Domoticz crashing.
Pity.
Just by reading about it it seems the easyest and best solution to create modulation on my 19 years old boiler.
Waiting for a version without bugs.

Anyway: Thanks for all efforts you have put and still put into it.
Great job @Logread!

PS
What is the most gracefull way of deleting Smart Virtual Thermostat from RPI.
I do it by deleting SVT directory and a restart.
I have the impression there is more to delete.

Re: Python Plugin: Smart Virtual Thermostat

Posted: Thursday 30 August 2018 14:30
by pacioc193
What about this error?

2018-08-30 14:29:07.288 Error: (Termostato) Error calling 'http://localhost:8080/json.htm?type=dev ... order=Name'
2018-08-30 14:29:07.288 Error: (Termostato) No Inside Temperature found... Switching Thermostat Off
2018-08-30 14:29:07.303 Error: (Termostato) Error calling 'http://localhost:8080/json.htm?type=dev ... order=Name'
2018-08-30 14:29:07.304 Error: (Termostato) 'onHeartbeat' failed 'KeyError'.
2018-08-30 14:29:07.304 Error: (Termostato) ----> Line 599 in /home/pi/domoticz/plugins/SVT/plugin.py, function onHeartbeat
2018-08-30 14:29:07.304 Error: (Termostato) ----> Line 352 in /home/pi/domoticz/plugins/SVT/plugin.py, function onHeartbeat
2018-08-30 14:29:07.304 Error: (Termostato) ----> Line 469 in /home/pi/domoticz/plugins/SVT/plugin.py, function switchHeat

I've set as internal sensor idx 9

attach a photo!

This is the webpage!


{
"ActTime" : 1535632419,
"AstrTwilightEnd" : "21:55",
"AstrTwilightStart" : "04:55",
"CivTwilightEnd" : "20:38",
"CivTwilightStart" : "06:12",
"DayLength" : "13:24",
"NautTwilightEnd" : "21:15",
"NautTwilightStart" : "05:35",
"ServerTime" : "2018-08-30 14:33:39",
"SunAtSouth" : "13:05",
"Sunrise" : "06:43",
"Sunset" : "20:07",
"app_version" : "4.9700",
"result" : [
{
"AddjMulti" : 1.0,
"AddjMulti2" : 1.0,
"AddjValue" : 0.0,
"AddjValue2" : 0.0,
"BatteryLevel" : 255,
"CustomImage" : 0,
"Data" : "Off",
"Description" : "",
"DimmerType" : "none",
"Favorite" : 0,
"HardwareID" : 3,
"HardwareName" : "GPIO",
"HardwareType" : "Raspberry's GPIO port",
"HardwareTypeVal" : 32,
"HaveDimmer" : false,
"HaveGroupCmd" : false,
"HaveTimeout" : false,
"ID" : "0",
"Image" : "Light",
"IsSubDevice" : false,
"LastUpdate" : "2018-08-29 21:55:13",
"Level" : 0,
"LevelInt" : 0,
"MaxDimLevel" : 0,
"Name" : "Relè",
"Notifications" : "false",
"PlanID" : "0",
"PlanIDs" : [ 0 ],
"Protected" : false,
"ShowNotifications" : true,
"SignalLevel" : "-",
"Status" : "Off",
"StrParam1" : "",
"StrParam2" : "",
"SubType" : "Impuls",
"SwitchType" : "On/Off",
"SwitchTypeVal" : 0,
"Timers" : "false",
"Type" : "Lighting 1",
"TypeImg" : "lightbulb",
"Unit" : 21,
"Used" : 1,
"UsedByCamera" : false,
"XOffset" : "0",
"YOffset" : "0",
"idx" : "2"
},
{
"AddjMulti" : 1.0,
"AddjMulti2" : 1.0,
"AddjValue" : 0.0,
"AddjValue2" : 0.0,
"BatteryLevel" : 255,
"CustomImage" : 15,
"Data" : "Off",
"Description" : "",
"DimmerType" : "none",
"Favorite" : 1,
"HardwareID" : 4,
"HardwareName" : "Termostato",
"HardwareType" : "Smart Virtual Thermostat",
"HardwareTypeVal" : 94,
"HaveDimmer" : true,
"HaveGroupCmd" : true,
"HaveTimeout" : false,
"ID" : "00040001",
"Image" : "Heating",
"IsSubDevice" : false,
"LastUpdate" : "2018-08-30 14:33:05",
"Level" : 0,
"LevelActions" : "fHw=",
"LevelInt" : 0,
"LevelNames" : "T2ZmfEF1dG98Rm9yY2Vk",
"LevelOffHidden" : false,
"MaxDimLevel" : 100,
"Name" : "OFF / Auto / Force",
"Notifications" : "false",
"PlanID" : "0",
"PlanIDs" : [ 0 ],
"Protected" : false,
"SelectorStyle" : 0,
"ShowNotifications" : true,
"SignalLevel" : "-",
"Status" : "Off",
"StrParam1" : "",
"StrParam2" : "",
"SubType" : "Selector Switch",
"SwitchType" : "Selector",
"SwitchTypeVal" : 18,
"Timers" : "false",
"Type" : "Light/Switch",
"TypeImg" : "Light",
"Unit" : 1,
"Used" : 1,
"UsedByCamera" : false,
"XOffset" : "0",
"YOffset" : "0",
"idx" : "3"
},
{
"AddjMulti" : 1.0,
"AddjMulti2" : 1.0,
"AddjValue" : 0.0,
"AddjValue2" : 0.0,
"BatteryLevel" : 255,
"CustomImage" : 15,
"Data" : "On",
"Description" : "",
"DimmerType" : "none",
"Favorite" : 1,
"HardwareID" : 4,
"HardwareName" : "Termostato",
"HardwareType" : "Smart Virtual Thermostat",
"HardwareTypeVal" : 94,
"HaveDimmer" : true,
"HaveGroupCmd" : true,
"HaveTimeout" : false,
"ID" : "00040002",
"Image" : "Heating",
"IsSubDevice" : false,
"LastUpdate" : "2018-08-30 07:21:04",
"Level" : 10,
"LevelActions" : "fHw=",
"LevelInt" : 10,
"LevelNames" : "T2ZmfE5vcm1hbHxFY29ub215",
"LevelOffHidden" : true,
"MaxDimLevel" : 100,
"Name" : "Economy/Normale",
"Notifications" : "false",
"PlanID" : "0",
"PlanIDs" : [ 0 ],
"Protected" : false,
"SelectorStyle" : 0,
"ShowNotifications" : true,
"SignalLevel" : "-",
"Status" : "On",
"StrParam1" : "",
"StrParam2" : "",
"SubType" : "Selector Switch",
"SwitchType" : "Selector",
"SwitchTypeVal" : 18,
"Timers" : "false",
"Type" : "Light/Switch",
"TypeImg" : "Light",
"Unit" : 2,
"Used" : 1,
"UsedByCamera" : false,
"XOffset" : "0",
"YOffset" : "0",
"idx" : "4"
},
{
"AddjMulti" : 1.0,
"AddjMulti2" : 1.0,
"AddjValue" : 0.0,
"AddjValue2" : 0.0,
"BatteryLevel" : 255,
"CustomImage" : 9,
"Data" : "Off",
"Description" : "",
"DimmerType" : "none",
"Favorite" : 0,
"HardwareID" : 4,
"HardwareName" : "Termostato",
"HardwareType" : "Smart Virtual Thermostat",
"HardwareTypeVal" : 94,
"HaveDimmer" : true,
"HaveGroupCmd" : true,
"HaveTimeout" : false,
"ID" : "00040003",
"Image" : "Generic",
"IsSubDevice" : false,
"LastUpdate" : "2018-08-29 21:45:38",
"Level" : 0,
"LevelInt" : 0,
"MaxDimLevel" : 100,
"Name" : "Pausa Termostato",
"Notifications" : "false",
"PlanID" : "0",
"PlanIDs" : [ 0 ],
"Protected" : false,
"ShowNotifications" : true,
"SignalLevel" : "-",
"Status" : "Off",
"StrParam1" : "",
"StrParam2" : "",
"SubType" : "Switch",
"SwitchType" : "On/Off",
"SwitchTypeVal" : 0,
"Timers" : "false",
"Type" : "Light/Switch",
"TypeImg" : "lightbulb",
"Unit" : 3,
"Used" : 1,
"UsedByCamera" : false,
"XOffset" : "0",
"YOffset" : "0",
"idx" : "5"
}
],
"status" : "OK",
"title" : "Devices"
}

Re: Python Plugin: Smart Virtual Thermostat

Posted: Thursday 30 August 2018 15:47
by Logread
pacioc193 wrote: Thursday 30 August 2018 14:30 What about this error?

2018-08-30 14:29:07.288 Error: (Termostato) Error calling 'http://localhost:8080/json.htm?type=dev ... order=Name'
2018-08-30 14:29:07.288 Error: (Termostato) No Inside Temperature found... Switching Thermostat Off
2018-08-30 14:29:07.303 Error: (Termostato) Error calling 'http://localhost:8080/json.htm?type=dev ... order=Name'
2018-08-30 14:29:07.304 Error: (Termostato) 'onHeartbeat' failed 'KeyError'.
2018-08-30 14:29:07.304 Error: (Termostato) ----> Line 599 in /home/pi/domoticz/plugins/SVT/plugin.py, function onHeartbeat
2018-08-30 14:29:07.304 Error: (Termostato) ----> Line 352 in /home/pi/domoticz/plugins/SVT/plugin.py, function onHeartbeat
2018-08-30 14:29:07.304 Error: (Termostato) ----> Line 469 in /home/pi/domoticz/plugins/SVT/plugin.py, function
Do not use « localhost » as IP in the plugin configuration page... use 127.0.0.1

And yes your dummy temp sensor with idx 9 should be ok then

Re: Python Plugin: Smart Virtual Thermostat

Posted: Sunday 23 September 2018 11:04
by renerene
same error here:
2018-09-23 10:58:25.410 Error: (thermostaat) 'onHeartbeat' failed 'KeyError'.
2018-09-23 10:58:25.410 Error: (thermostaat) ----> Line 596 in '/home/pi/domoticz/plugins/SVT/plugin.py', function onHeartbeat
2018-09-23 10:58:25.410 Error: (thermostaat) ----> Line 279 in '/home/pi/domoticz/plugins/SVT/plugin.py', function onHeartbeat

Following is not succesfull
- using 127.0.0.1 instead of localhost in hardware settings of SVT
- removing login info in hardware settings of SVT
- removing login of both domoticz and SVT

update:

error is probably because no devices are added bij Domoticz after adding a SVT hardware item

Re: Python Plugin: Smart Virtual Thermostat

Posted: Tuesday 25 September 2018 8:47
by Logread
renerene wrote: Sunday 23 September 2018 11:04 same error here:
2018-09-23 10:58:25.410 Error: (thermostaat) 'onHeartbeat' failed 'KeyError'.
2018-09-23 10:58:25.410 Error: (thermostaat) ----> Line 596 in '/home/pi/domoticz/plugins/SVT/plugin.py', function onHeartbeat
2018-09-23 10:58:25.410 Error: (thermostaat) ----> Line 279 in '/home/pi/domoticz/plugins/SVT/plugin.py', function onHeartbeat

Following is not succesfull
- using 127.0.0.1 instead of localhost in hardware settings of SVT
- removing login info in hardware settings of SVT
- removing login of both domoticz and SVT

update:

error is probably because no devices are added bij Domoticz after adding a SVT hardware item
You are correct, domoticz does not create the devices if you so not allow it to: see the settings page and allow new devices to be created. This should resolve your issue.

Re: Python Plugin: Smart Virtual Thermostat

Posted: Tuesday 25 September 2018 10:47
by elgarne
pipiche wrote: Thursday 05 July 2018 16:49 This is a pretty impressive plugin.

You mentioned that the plugin required 2 to 3 days to learn. What's happen in case of restart of domoticz or even the hosts system. Are we back to 2 to 3 days of learning ?
Similar question: what happens if the target temperature changes over day? Does the learning persist?
Thanks.

Re: Python Plugin: Smart Virtual Thermostat

Posted: Monday 08 October 2018 7:33
by Logread
Plugin version 0.4.4 is now available on GitHub.

This does not bring any new functionality but improves handling of some errors or incorrect configuration parameters, based on users feedback (always welcome...).

Install/upgrade instructions as usual on Domoticz wiki at https://www.domoticz.com/wiki/Plugins/S ... ostat.html

Re: Python Plugin: Smart Virtual Thermostat

Posted: Monday 08 October 2018 8:26
by jake

elgarne wrote: Similar question: what happens if the target temperature changes over day? Does the learning persist?
Thanks.
The target temperature has nothing to do with the learning. Just read the description on the plug-in page. The learning is all about the room characteristics and those are applicable for all temperatures.

"an advanced virtual thermostat based on time modulation and self learning of relevant room thermal characteristics (including insulation level) rather then more conventional hysteresis methods"

Re: Python Plugin: Smart Virtual Thermostat

Posted: Friday 12 October 2018 15:21
by elgarne
You're right. Thanks.

Re: Python Plugin: Smart Virtual Thermostat

Posted: Monday 15 October 2018 23:25
by alfpresa
@Logread Thank you very much for your work. I've installed it without issues and I've been able to connect it through a Remotec ZXT-120 to my AC with heat pump (which doesn't have an on/off switch, but I've been able to emulate it with a virtual switch and a simple blocky script). I was wondering if, as remotec has the chance to set the air temperature, if it could be posible to turn this into a smart virtual modulating thermostat instead of just an on/off one :). May be it could be as easy as, instead of using an on/off switch, it could use optionally an level selector switch to control heat intensity.

Keep up the good work!!

Re: Python Plugin: Smart Virtual Thermostat

Posted: Wednesday 17 October 2018 7:20
by Logread
@alfpresa, thanks for your appreciation. I am afraid your suggestion of proportional vs. binary (on/off) heating control will be difficult to implement: it would require a totally different logic than what the plugin is based on.

Re: Python Plugin: Smart Virtual Thermostat

Posted: Wednesday 17 October 2018 7:35
by alfpresa
@Logread What a pity, but totally understandable. It's anyway an awesome plugin, so keep it up!

May I also ask you some advice about the plugin configuration for my use case (with an AC heating pump). I've the feeling that with my setup I might require an smaller calculation time span (may be 15 minutes?), as AC heating is pretty fast heating the air, but not that fast heating the structure itself, so the temperature varies in very short cycles. The problem is that I'm unsure of what the impact of smaller time spans is for the system (unstability?, less predictable? resources consuming? ....). Which would you say that are the lowest and highest recommended limits of the Calculation Time setting?

Thanks!

Re: Python Plugin: Smart Virtual Thermostat

Posted: Wednesday 17 October 2018 22:32
by Logread
@alfpresa, it’s all about trying. Low inertia heating requires shorter cycles indeedx. 15mins is what I am using with electric converters that have indeed minimum inertia. The plugin takes values >= 5 mins.

Re: Python Plugin: Smart Virtual Thermostat

Posted: Wednesday 17 October 2018 23:20
by jake
Logread wrote:@alfpresa, thanks for your appreciation. I am afraid your suggestion of proportional vs. binary (on/off) heating control will be difficult to implement: it would require a totally different logic than what the plugin is based on.
In my Domoticz system I also have an OTGW (Opentherm Gateway) implemented. This is an in-the-middle-device between the opentherm Remeha iSense thermostat and boiler.

Nowaydays I use the SVT to control the system:
SVT controls the virtual switch 'boiler on/off'
dzVents LUA scripts is trigged by this switch and increases the iSense setpoint above the current room temperature (+0.5'C) when the switch is 'on' and -0.5'C when the switch is 'off'
The 0.5'C change triggers the boiler to start/stop heating.

With the mentioned setup, I have made the temperature dip half the size. The iSense doesn't turn on the boiler until -0.2'C below the setpoint. With floor heating this is much too late. The other way around too: it doesn't stop heating unless the temperature is +0.2'C above the setpoint.
Actually, the SVT takes care that the temperature lands on the setpoint line and more or less stays there.

To secure proper working, I made a 2nd dzVents script that monitors the behaviour of the first script. When it discovers an error, it will notifiy me and put the SVT in the 'away' mode.

Re: Python Plugin: Smart Virtual Thermostat

Posted: Saturday 03 November 2018 18:38
by Electrocut
Hi!

I had a little problem with the plugin 2 days ago.
Inside temperature was bellow stepping, but the heater did not start.

I restarted domoticz and everything went back to normal.

Do you know what appended?

I'm running Domoticz beta 3.8450 (Should update to last stable version when I will have time!)

Code: Select all

2018-11-01 17:00:01.998  Schedule item started! Name: Thermostat - Mode chauffage, Type: On Time, DevID: 131, Time: 2018-11-01 17:00:01
2018-11-01 22:30:01.712  Schedule item started! Name: Thermostat - Mode chauffage, Type: On Time, DevID: 131, Time: 2018-11-01 22:30:01
2018-11-02 00:20:10.203  Error: (Thermostat) skipping timed out temperature sensor 'Température Extérieure'
2018-11-02 02:05:11.450  Error: (Thermostat) 'onHeartbeat' failed 'AttributeError':''module' object has no attribute 'Status''.
2018-11-02 02:05:11.450  Error: (Thermostat) ----> Line 632 in /home/pi/domoticz/plugins/SmartVirtualThermostat/plugin.py, function onHeartbeat
2018-11-02 02:05:11.450  Error: (Thermostat) ----> Line 359 in /home/pi/domoticz/plugins/SmartVirtualThermostat/plugin.py, function onHeartbeat
2018-11-02 02:05:11.450  Error: (Thermostat) ----> Line 512 in /home/pi/domoticz/plugins/SmartVirtualThermostat/plugin.py, function readTemps
2018-11-02 02:05:11.450  Error: (Thermostat) ----> Line 605 in /home/pi/domoticz/plugins/SmartVirtualThermostat/plugin.py, function SensorTimedOut
2018-11-02 02:10:11.527  Error: (Thermostat) 'onHeartbeat' failed 'AttributeError':''module' object has no attribute 'Status''.
2018-11-02 02:10:11.528  Error: (Thermostat) ----> Line 632 in /home/pi/domoticz/plugins/SmartVirtualThermostat/plugin.py, function onHeartbeat
2018-11-02 02:10:11.528  Error: (Thermostat) ----> Line 359 in /home/pi/domoticz/plugins/SmartVirtualThermostat/plugin.py, function onHeartbeat
2018-11-02 02:10:11.528  Error: (Thermostat) ----> Line 512 in /home/pi/domoticz/plugins/SmartVirtualThermostat/plugin.py, function readTemps
2018-11-02 02:10:11.528  Error: (Thermostat) ----> Line 605 in /home/pi/domoticz/plugins/SmartVirtualThermostat/plugin.py, function SensorTimedOut
[..]
2018-11-02 05:00:01.151  Schedule item started! Name: Thermostat - Mode chauffage, Type: On Time, DevID: 131, Time: 2018-11-02 05:00:01
2018-11-02 05:00:01.234  Error: (Thermostat) 'onCommand' failed 'AttributeError':''module' object has no attribute 'Status''.
2018-11-02 05:00:01.234  Error: (Thermostat) ----> Line 627 in /home/pi/domoticz/plugins/SmartVirtualThermostat/plugin.py, function onCommand
2018-11-02 05:00:01.234  Error: (Thermostat) ----> Line 277 in /home/pi/domoticz/plugins/SmartVirtualThermostat/plugin.py, function onCommand
2018-11-02 05:00:01.234  Error: (Thermostat) ----> Line 349 in /home/pi/domoticz/plugins/SmartVirtualThermostat/plugin.py, function onHeartbeat
2018-11-02 05:00:01.234  Error: (Thermostat) ----> Line 512 in /home/pi/domoticz/plugins/SmartVirtualThermostat/plugin.py, function readTemps
2018-11-02 05:00:01.234  Error: (Thermostat) ----> Line 605 in /home/pi/domoticz/plugins/SmartVirtualThermostat/plugin.py, function SensorTimedOut
2018-11-02 05:05:03.705  Error: (Thermostat) 'onHeartbeat' failed 'AttributeError':''module' object has no attribute 'Status''.
2018-11-02 05:05:03.705  Error: (Thermostat) ----> Line 632 in /home/pi/domoticz/plugins/SmartVirtualThermostat/plugin.py, function onHeartbeat
2018-11-02 05:05:03.705  Error: (Thermostat) ----> Line 359 in /home/pi/domoticz/plugins/SmartVirtualThermostat/plugin.py, function onHeartbeat
2018-11-02 05:05:03.705  Error: (Thermostat) ----> Line 512 in /home/pi/domoticz/plugins/SmartVirtualThermostat/plugin.py, function readTemps
2018-11-02 05:05:03.705  Error: (Thermostat) ----> Line 605 in /home/pi/domoticz/plugins/SmartVirtualThermostat/plugin.py, function SensorTimedOut
Cheers!