Page 1 of 1
Problem updating thermostat Setpoint
Posted: Thursday 03 January 2019 16:29
by lastofthejediknights
Hi,
I have made a smart thermostat (among other things), all works, bar one aspect, I cannot set a new setpoint for the thermostat via scripting, when using a variable.
If I change the setpoint, via the web interface, it all works as expected.
In DzVents, I am wanting to modify the setpoint, dependant on who is at home.
I have a preferred temperature virtual thermostat setpoint, as does my wife, there is a third, for nobodyhome.
In Dzvents, if i write
Code: Select all
averagePreferredSP = ((domoticz.devices('Nigel Preferred Temperature').setPoint) + (domoticz.devices('Emma Preferred Temperature').setPoint))/2
emmaSP = (domoticz.devices('Emma Preferred Temperature').setPoint)
nigelSP = (domoticz.devices('Nigel Preferred Temperature').setPoint)
nobodySP = (domoticz.devices('Nobody Home').setPoint)
-- emmaSP = 23.00
-- nigelSP = 21.00
-- nobodySP = 17.50
domoticz.devices('Living Rm Thermostat').updateSetPoint(22) -- this works
domoticz.devices('Living Rm Thermostat').updateSetPoint(23.50) -- this works
domoticz.devices('virtualthermostat').updateSetPoint(nigelSP) --created virtual thermostat for testing, this works / updates
domoticz.devices('Living Rm Thermostat').updateSetPoint(nigelSP) -- this doesn't work / update
I have written the values out to log, and all seems fine, I then created a virtual thermostat, just so I could use it for testing, and that works fine.
Am I doing something wrong, or is what I wish to do unsupported?
Re: Problem updating thermostat Setpoint
Posted: Thursday 03 January 2019 16:40
by waaren
lastofthejediknights wrote: ↑Thursday 03 January 2019 16:29
I have made a smart thermostat (among other things), all works, bar one aspect, I cannot set a new setpoint for the thermostat via scripting, when using a variable.
I have written the values out to log, and all seems fine, I then created a virtual thermostat, just so I could use it for testing, and that works fine.
Am I doing something wrong, or is what I wish to do unsupported?
This should work. Please show the complete script so that forum users can test / check and add a couple of
Code: Select all
domoticz.log(" var1: " .. tostring(var1),domoticz.LOG_FORCE)
lines to the script to see what happens and see value of the various variables.
Re: Problem updating thermostat Setpoint
Posted: Thursday 03 January 2019 18:25
by lastofthejediknights
Code: Select all
return {
on = {
devices = {
'Nigel At Home' , 'Emma At Home', 'Emma Preferred Temperature', 'Nigel Preferred Temperature'
},
-- timer = {
-- 'every 10 minute'
-- },
},
execute = function(domoticz, device)
averagePreferredSP = ((domoticz.devices('Nigel Preferred Temperature').setPoint) + (domoticz.devices('Emma Preferred Temperature').setPoint))/2
emmaSP = (domoticz.devices('Emma Preferred Temperature').setPoint)
nigelSP = (domoticz.devices('Nigel Preferred Temperature').setPoint)
nobodySP = (domoticz.devices('Nobody Home').setPoint)
-- emmaSP = 23.00
-- nigelSP = 21.00
-- nobodySP = 17.50
if ( (domoticz.devices('Emma At Home').state == 'On') and (domoticz.devices('Nigel At Home').state == 'On' ) ) then
domoticz.log('both Emma and Nigel home ' )
domoticz.log('Living Rm Thermostat ' .. averagePreferredSP .. ' SHOULD be Set', domoticz.LOG_INFO)
domoticz.devices('virtualthermostat').updateSetPoint(averagePreferredSP) --virtualthermostat
domoticz.devices('Living Rm Thermostat').updateSetPoint(averagePreferredSP)
domoticz.variables('WhoisHomeVar').set(3)
-- domoticz.devices('WhoisHome').updateSetPoint(3)
elseif ( domoticz.devices('Emma At Home').state == 'On' and domoticz.devices('Nigel At Home').state == 'Off' ) then
domoticz.log('Just Emma home ' )
domoticz.log('Living Rm Thermostat ' .. domoticz.devices('Emma Preferred Temperature').state .. ' SHOULD be Set', domoticz.LOG_INFO)
domoticz.devices('virtualthermostat').updateSetPoint(emmaSP) --virtualthermostat
domoticz.devices('Living Rm Thermostat').updateSetPoint(emmaSP)
domoticz.variables('WhoisHomeVar').set(2)
-- domoticz.devices('WhoisHome').updateSetPoint(2)
elseif ( domoticz.devices('Nigel At Home').state == 'On' and domoticz.devices('Emma At Home').state == 'Off' ) then
domoticz.log('Just Nigel home ' )
domoticz.log('Living Rm Thermostat ' .. domoticz.devices('Nigel Preferred Temperature').state .. ' SHOULD be Set', domoticz.LOG_INFO)
domoticz.devices('virtualthermostat').updateSetPoint(nigelSP) --virtualthermostat
domoticz.devices('Living Rm Thermostat').updateSetPoint(nigelSP)
domoticz.variables('WhoisHomeVar').set(1)
-- domoticz.devices('WhoisHome').updateSetPoint(1)
else --( domoticz.devices('Nigel At Home').state == 'Off' and domoticz.devices('Emma At Home').state == 'Off' ) then
domoticz.log('NoOne Home ' )
domoticz.log('Living Rm Thermostat ' .. domoticz.devices('Nobody Home').state .. ' SHOULD be Set', domoticz.LOG_INFO)
domoticz.devices('virtualthermostat').updateSetPoint(nobodySP) --virtualthermostat
domoticz.devices('Living Rm Thermostat').updateSetPoint(nobodySP)
domoticz.variables('WhoisHomeVar').set(5)
-- domoticz.devices('WhoisHome').updateSetPoint(5)
end
domoticz.log('Living Rm Thermostat ' .. domoticz.devices('Living Rm Thermostat').state .. ' was Set', domoticz.LOG_INFO)
domoticz.devices('WhoisHome').updateSetPoint(domoticz.variables('WhoisHomeVar').value)
-- domoticz.devices('Living Rm Thermostat').updateSetPoint(22)
domoticz.log(" averagePreferredSP: " .. tostring(averagePreferredSP),domoticz.LOG_FORCE)
domoticz.log(" emmaSP: " .. tostring(emmaSP),domoticz.LOG_FORCE)
domoticz.log(" nigelSP: " .. tostring(nigelSP),domoticz.LOG_FORCE)
domoticz.log(" nobodySP: " .. tostring(nobodySP),domoticz.LOG_FORCE)
end
}
Begin log *******************************************************************************************
2019-01-03 17:21:59.685 (Dummy) Thermostat (Nigel Preferred Temperature)
2019-01-03 17:21:59.729 Status: dzVents: Info: Handling events for: "Nigel Preferred Temperature", value: "21.50"
2019-01-03 17:21:59.729 Status: dzVents: Info: ------ Start internal script: SetTemp on Who is Home: Device: "Nigel Preferred Temperature (Dummy)", Index: 412
2019-01-03 17:21:59.731 Status: dzVents: Info: Just Nigel home
2019-01-03 17:21:59.731 Status: dzVents: Info: Living Rm Thermostat 21.50 SHOULD be Set
2019-01-03 17:21:59.731 Status: dzVents: Info: Living Rm Thermostat 23.00 was Set (this is the existing setpoint on the hardware thermostat, readback)
2019-01-03 17:21:59.732 Status: dzVents: !Info: averagePreferredSP: 22.5
2019-01-03 17:21:59.732 Status: dzVents: !Info: emmaSP: 23.5
2019-01-03 17:21:59.732 Status: dzVents: !Info: nigelSP: 21.5
2019-01-03 17:21:59.732 Status: dzVents: !Info: nobodySP: 17.5
2019-01-03 17:21:59.732 Status: dzVents: Info: ------ Finished SetTemp on Who is Home
End Log ****************************************************************
Many thanks
Re: Problem updating thermostat Setpoint
Posted: Thursday 03 January 2019 18:53
by waaren
lastofthejediknights wrote: ↑Thursday 03 January 2019 18:25
Code: Select all
nigelSP = (domoticz.devices('Nigel Preferred Temperature').setPoint)
domoticz.log('Just Nigel home ' )
domoticz.log('Living Rm Thermostat ' .. domoticz.devices('Nigel Preferred Temperature').state .. ' SHOULD be Set', domoticz.LOG_INFO)
domoticz.devices('virtualthermostat').updateSetPoint(nigelSP) --virtualthermostat
domoticz.devices('Living Rm Thermostat').updateSetPoint(nigelSP)
domoticz.log(" nigelSP: " .. tostring(nigelSP),domoticz.LOG_FORCE)
Correct me if I am wrong but if you try to read the device setPoints back in the same script as you used to change them it will not give you the expected values. dzVents or Lua ask domoticz to perform the actions after the script finished by handing back an object with all requested changes. So if you change something in domoticz in the script it will only be visible after the script has finished.
Re: Problem updating thermostat Setpoint
Posted: Thursday 03 January 2019 19:06
by lastofthejediknights
Hi,
You may well be right, however in any event, the actual device isn't updated.
I put the log entries in to see what was happening.
The virtual thermostats (Preferred temperatures) don't get changed in the script, the "Real" thermostat, gets its setpoint modified, dependant on who is home.
Re: Problem updating thermostat Setpoint
Posted: Thursday 03 January 2019 20:35
by waaren
I don't see why your script does not work as expected. Can you please try this one ?
Code: Select all
return {
on = {
timer = { 'every minute' }, -- Just during debugging and test
devices = { 'Nigel At Home',
'Emma At Home',
'Emma Preferred Temperature',
'Nigel Preferred Temperature',
},
},
logging = {
level = domoticz.LOG_DEBUG,
marker = "setpoint"
},
execute = function(dz)
local NigelSetPoint = dz.devices('Nigel Preferred Temperature').setPoint
local EmmaSetPoint = dz.devices('Emma Preferred Temperature').setPoint
local nobodySetPoint = dz.devices('Nobody Home').setPoint
local averageSetPoint = dz.utils.round((NigelSetPoint + EmmaSetPoint)/2,1)
local EmmaAtHome = dz.devices('Emma At Home').state == 'On'
local NigelAtHome = dz.devices('Nigel At Home').state == 'On'
local virtualThermostat = dz.devices('virtualthermostat')
local livingRoomThermostat = dz.devices('Living Rm Thermostat')
local whoisHomeVar = dz.variables('WhoisHomeVar')
local Emma = 2
local Nigel = 1
local both = 3
local neither = 5
local function logWrite(str,level)
dz.log(tostring(str),level or dz.LOG_DEBUG)
end
local function dump2Log()
logWrite("EmmaSetPoint: " .. tostring(NigelSetPoint) )
logWrite("NigelSetPoint: " .. tostring(EmmaSetPoint) )
logWrite("averagePreferredSetPoint: " .. tostring(averageSetPoint))
logWrite("nobodySetPoint: " .. tostring(nobodySetPoint) )
logWrite("EmmaAtHome: " .. tostring(EmmaAtHome) )
logWrite("NigelAtHome: " .. tostring(EmmaAtHome) )
end
local function setSetPoints(setPoint, home)
virtualThermostat.updateSetPoint(setPoint)
livingRoomThermostat.updateSetPoint(setPoint)
whoisHomeVar.set(home)
return tostring(setPoint)
end
dump2Log()
if EmmaAtHome and NigelAtHome then
logWrite('Both Emma and Nigel home, setpoints set to ' .. setSetPoints(averageSetPoint,both))
elseif EmmaAtHome and not NigelAtHome then
logWrite('Just Emma home, setpoints set to ' .. setSetPoints(EmmaSetPoint,Emma))
elseif NigelAtHome and not EmmaAtHome then
logWrite('Just Nigel home, setpoints set to ' .. setSetPoints(NigelSetPoint,Nigel))
else
logWrite('NoOne home, setpoints set to ' .. setSetPoints(nobodySetPoint,neither))
end
end
}
Re: Problem updating thermostat Setpoint
Posted: Thursday 03 January 2019 21:32
by lastofthejediknights
Hi,
Many thanks for this.
I created the new script, the log output is as below.
Begin Log *************************************
2019-01-03 20:30:30.657 (Dummy) Light/Switch (Emma At Home)
2019-01-03 20:30:30.655 Status: User: Admin initiated a switch command (410/Emma At Home/On)
2019-01-03 20:30:30.700 Status: dzVents: Info: Handling events for: "Emma At Home", value: "On"
2019-01-03 20:30:30.701 Status: dzVents: Info: setpoint: ------ Start internal script: settemp trial: Device: "Emma At Home (Dummy)", Index: 410
2019-01-03 20:30:30.701 Status: dzVents: Debug: setpoint: Processing device-adapter for Nigel Preferred Temperature: Thermostat setpoint device adapter
2019-01-03 20:30:30.701 Status: dzVents: Debug: setpoint: Processing device-adapter for Emma Preferred Temperature: Thermostat setpoint device adapter
2019-01-03 20:30:30.702 Status: dzVents: Debug: setpoint: Processing device-adapter for Nobody Home: Thermostat setpoint device adapter
2019-01-03 20:30:30.702 Status: dzVents: Error (2.4.6): setpoint: An error occured when calling event handler settemp trial
2019-01-03 20:30:30.702 Status: dzVents: Error (2.4.6): setpoint: .../var/scripts/dzVents/generated_scripts/settemp trial.lua:21: attempt to index field 'round' (a function value)
2019-01-03 20:30:30.702 Status: dzVents: Info: setpoint: ------ Finished settemp trial
End Log ****************************************
Re: Problem updating thermostat Setpoint
Posted: Thursday 03 January 2019 21:51
by waaren
lastofthejediknights wrote: ↑Thursday 03 January 2019 21:32
Hi,
Many thanks for this.
I created the new script, the log output is as below.
Corrected the error please reload my posted script.
Re: Problem updating thermostat Setpoint
Posted: Thursday 03 January 2019 22:15
by lastofthejediknights
Revised script log file
Begin Log **********************************************
2019-01-03 21:07:03.748 (Dummy) Thermostat (virtualthermostat)
2019-01-03 21:07:03.131 Status: User: Admin initiated a switch command (410/Emma At Home/Off)
2019-01-03 21:07:03.177 Status: dzVents: Info: Handling events for: "Emma At Home", value: "Off"
2019-01-03 21:07:03.177 Status: dzVents: Info: setpoint: ------ Start internal script: settemp trial: Device: "Emma At Home (Dummy)", Index: 410
2019-01-03 21:07:03.178 Status: dzVents: Debug: setpoint: Processing device-adapter for Nigel Preferred Temperature: Thermostat setpoint device adapter
2019-01-03 21:07:03.178 Status: dzVents: Debug: setpoint: Processing device-adapter for Emma Preferred Temperature: Thermostat setpoint device adapter
2019-01-03 21:07:03.178 Status: dzVents: Debug: setpoint: Processing device-adapter for Nobody Home: Thermostat setpoint device adapter
2019-01-03 21:07:03.179 Status: dzVents: Debug: setpoint: Processing device-adapter for Nigel At Home: Switch device adapter
2019-01-03 21:07:03.179 Status: dzVents: Debug: setpoint: Processing device-adapter for virtualthermostat: Thermostat setpoint device adapter
2019-01-03 21:07:03.179 Status: dzVents: Debug: setpoint: Processing device-adapter for Living Rm Thermostat: Thermostat setpoint device adapter
2019-01-03 21:07:03.179 Status: dzVents: Debug: setpoint: EmmaSetPoint: 21.5
2019-01-03 21:07:03.179 Status: dzVents: Debug: setpoint: NigelSetPoint: 23.5
2019-01-03 21:07:03.179 Status: dzVents: Debug: setpoint: averagePreferredSetPoint: 22.5
2019-01-03 21:07:03.179 Status: dzVents: Debug: setpoint: nobodySetPoint: 17.5
2019-01-03 21:07:03.180 Status: dzVents: Debug: setpoint: EmmaAtHome: false
2019-01-03 21:07:03.180 Status: dzVents: Debug: setpoint: NigelAtHome: false
2019-01-03 21:07:03.180 Status: dzVents: Debug: setpoint: Constructed timed-command: 21.5
2019-01-03 21:07:03.180 Status: dzVents: Debug: setpoint: Constructed timed-command: 21.5
2019-01-03 21:07:03.180 Status: dzVents: Debug: setpoint: Just Nigel home, setpoints set to 21.5
2019-01-03 21:07:03.180 Status: dzVents: Info: setpoint: ------ Finished settemp trial
2019-01-03 21:07:03.232 Status: EventSystem: Script event triggered: /usr/local/domoticz/dzVents/runtime/dzVents.lua
2019-01-03 21:07:03.266 Status: Set UserVariable WhoisHomeVar = 1
End Log ************************************************************************
The setpoint has indeed updated, and been transferred as "normal" to the thermostat hardware. Thank You.
Fundamentally, what is the difference between your script and mine? i.e. why does your script work, and my (clumsier) script not?
I see that there is a timed aspect to this, as intimated by the log, but I don't see where this is in the script.
Many thanks Nigel
Re: Problem updating thermostat Setpoint
Posted: Thursday 03 January 2019 23:30
by waaren
lastofthejediknights wrote: ↑Thursday 03 January 2019 22:15
Fundamentally, what is the difference between your script and mine? i.e. why does your script work, and my (clumsier) script not?
I see that there is a timed aspect to this, as intimated by the log, but I don't see where this is in the script.
The timed aspect is a standard message from dzVents. I see that also if I use your initial script. The only remaining fundamental difference that I see is that I don't do a domoticz.devices('WhoisHome').updateSetPoint(domoticz.variables('WhoisHomeVar').value) but the syntax of this command should not cause problems.
If I create the same variable, devices and sensors on my test-system and execute your original script I don't get an error and the setpoints do change as expected.
- Spoiler: show
Code: Select all
2019-01-03 23:05:19.241 Status: User: Admin initiated a switch command (1286/Nigel At Home/Off)
2019-01-03 23:05:19.254 (Virtual2) Light/Switch (Nigel At Home)
2019-01-03 23:05:19.657 Status: dzVents: Info: setpoint: ------ Start external script: dumper46.lua: Device: "Nigel At Home (Virtual2)", Index: 1286
2019-01-03 23:05:19.660 Status: dzVents: Debug: setpoint: Processing device-adapter for Nigel Preferred Temperature: Thermostat setpoint device adapter
2019-01-03 23:05:19.662 Status: dzVents: Debug: setpoint: Processing device-adapter for Emma Preferred Temperature: Thermostat setpoint device adapter
2019-01-03 23:05:19.665 Status: dzVents: Debug: setpoint: Processing device-adapter for Nobody Home: Thermostat setpoint device adapter
2019-01-03 23:05:19.668 Status: dzVents: Debug: setpoint: Processing device-adapter for Emma At Home: Switch device adapter
2019-01-03 23:05:19.668 Status: dzVents: Debug: setpoint: NoOne Home
2019-01-03 23:05:19.668 Status: dzVents: Debug: setpoint: Living Rm Thermostat 20.5 SHOULD be Set
2019-01-03 23:05:19.670 Status: dzVents: Debug: setpoint: Processing device-adapter for virtualthermostat: Thermostat setpoint device adapter
2019-01-03 23:05:19.671 Status: dzVents: Debug: setpoint: Constructed timed-command: 20.5
2019-01-03 23:05:19.673 Status: dzVents: Debug: setpoint: Processing device-adapter for Living Rm Thermostat: Thermostat setpoint device adapter
2019-01-03 23:05:19.676 Status: dzVents: Debug: setpoint: Constructed timed-command: 20.5
2019-01-03 23:05:19.677 Status: dzVents: Debug: setpoint: Living Rm Thermostat 20.50 was Set
2019-01-03 23:05:19.678 Status: dzVents: Debug: setpoint: Processing device-adapter for WhoisHome: Thermostat setpoint device adapter
2019-01-03 23:05:19.679 Status: dzVents: Debug: setpoint: Constructed timed-command: 1
2019-01-03 23:05:19.679 Status: dzVents: !Info: setpoint: averagePreferredSP: 20.5
2019-01-03 23:05:19.679 Status: dzVents: !Info: setpoint: emmaSP: 20.5
2019-01-03 23:05:19.679 Status: dzVents: !Info: setpoint: nigelSP: 20.5
2019-01-03 23:05:19.679 Status: dzVents: !Info: setpoint: nobodySP: 20.5
2019-01-03 23:05:19.680 Status: dzVents: Info: setpoint: ------ Finished dumper46.lua
2019-01-03 23:05:19.851 Status: Set UserVariable WhoisHomeVar = 5
2019-01-03 23:05:20.468 (Virtual2) Thermostat (virtualthermostat)
2019-01-03 23:05:20.534 (Virtual2) Thermostat (Living Rm Thermostat)
2019-01-03 23:05:20.540 (Virtual2) Thermostat (WhoisHome)
2019-01-03 23:07:18.923 Status: dzVents: Info: setpoint: ------ Start external script: dumper46.lua: Device: "Nigel At Home (Virtual2)", Index: 1286
2019-01-03 23:07:18.959 Status: dzVents: Debug: setpoint: Processing device-adapter for Nigel Preferred Temperature: Thermostat setpoint device adapter
2019-01-03 23:07:18.978 Status: dzVents: Debug: setpoint: Processing device-adapter for Emma Preferred Temperature: Thermostat setpoint device adapter
2019-01-03 23:07:18.997 Status: dzVents: Debug: setpoint: Processing device-adapter for Nobody Home: Thermostat setpoint device adapter
2019-01-03 23:07:19.014 Status: dzVents: Debug: setpoint: Processing device-adapter for Emma At Home: Switch device adapter
2019-01-03 23:07:19.015 Status: dzVents: Info: setpoint: Just Nigel home
2019-01-03 23:07:19.016 Status: dzVents: Debug: setpoint: Living Rm Thermostat 21.00 SHOULD be Set
2019-01-03 23:07:19.022 Status: dzVents: Debug: setpoint: Processing device-adapter for virtualthermostat: Thermostat setpoint device adapter
2019-01-03 23:07:19.023 Status: dzVents: Debug: setpoint: Constructed timed-command: 21
2019-01-03 23:07:19.027 Status: dzVents: Debug: setpoint: Processing device-adapter for Living Rm Thermostat: Thermostat setpoint device adapter
2019-01-03 23:07:19.027 Status: dzVents: Debug: setpoint: Constructed timed-command: 21
2019-01-03 23:07:19.029 Status: dzVents: Debug: setpoint: Living Rm Thermostat 20.50 was Set
2019-01-03 23:07:19.032 Status: dzVents: Debug: setpoint: Processing device-adapter for WhoisHome: Thermostat setpoint device adapter
2019-01-03 23:07:19.033 Status: dzVents: Debug: setpoint: Constructed timed-command: 5
2019-01-03 23:07:19.033 Status: dzVents: !Info: setpoint: averagePreferredSP: 20.75
2019-01-03 23:07:19.033 Status: dzVents: !Info: setpoint: emmaSP: 20.5
2019-01-03 23:07:19.033 Status: dzVents: !Info: setpoint: nigelSP: 21
2019-01-03 23:07:19.033 Status: dzVents: !Info: setpoint: nobodySP: 20.5
2019-01-03 23:07:19.065 Status: dzVents: Info: setpoint: ------ Finished dumper46.lua
2019-01-03 23:07:19.285 Status: Set UserVariable WhoisHomeVar = 1
2019-01-03 23:07:19.824 (Virtual2) Thermostat (virtualthermostat)
2019-01-03 23:07:19.908 (Virtual2) Thermostat (Living Rm Thermostat)
2019-01-03 23:07:19.918 (Virtual2) Thermostat (WhoisHome)
2019-01-03 23:07:48.721 Status: dzVents: Info: setpoint: ------ Start external script: dumper46.lua: Device: "Nigel Preferred Temperature (Virtual2)", Index: 1289
2019-01-03 23:07:48.724 Status: dzVents: Debug: setpoint: Processing device-adapter for Emma Preferred Temperature: Thermostat setpoint device adapter
2019-01-03 23:07:48.726 Status: dzVents: Debug: setpoint: Processing device-adapter for Nobody Home: Thermostat setpoint device adapter
2019-01-03 23:07:48.727 Status: dzVents: Debug: setpoint: Processing device-adapter for Emma At Home: Switch device adapter
2019-01-03 23:07:48.729 Status: dzVents: Debug: setpoint: Processing device-adapter for Nigel At Home: Switch device adapter
2019-01-03 23:07:48.729 Status: dzVents: Info: setpoint: Just Nigel home
2019-01-03 23:07:48.729 Status: dzVents: Debug: setpoint: Living Rm Thermostat 22.50 SHOULD be Set
2019-01-03 23:07:48.730 Status: dzVents: Debug: setpoint: Processing device-adapter for virtualthermostat: Thermostat setpoint device adapter
2019-01-03 23:07:48.730 Status: dzVents: Debug: setpoint: Constructed timed-command: 22.5
2019-01-03 23:07:48.732 Status: dzVents: Debug: setpoint: Processing device-adapter for Living Rm Thermostat: Thermostat setpoint device adapter
2019-01-03 23:07:48.732 Status: dzVents: Debug: setpoint: Constructed timed-command: 22.5
2019-01-03 23:07:48.733 Status: dzVents: Debug: setpoint: Living Rm Thermostat 21.00 was Set
2019-01-03 23:07:48.734 Status: dzVents: Debug: setpoint: Processing device-adapter for WhoisHome: Thermostat setpoint device adapter
2019-01-03 23:07:48.734 Status: dzVents: Debug: setpoint: Constructed timed-command: 1
2019-01-03 23:07:48.734 Status: dzVents: !Info: setpoint: averagePreferredSP: 21.5
2019-01-03 23:07:48.735 Status: dzVents: !Info: setpoint: emmaSP: 20.5
2019-01-03 23:07:48.735 Status: dzVents: !Info: setpoint: nigelSP: 22.5
2019-01-03 23:07:48.735 Status: dzVents: !Info: setpoint: nobodySP: 20.5
2019-01-03 23:07:48.736 Status: dzVents: Info: setpoint: ------ Finished dumper46.lua
2019-01-03 23:09:02.610 Status: dzVents: Info: setpoint: ------ Start external script: dumper46.lua: Device: "Emma Preferred Temperature (Virtual2)", Index: 1288
2019-01-03 23:09:02.612 Status: dzVents: Debug: setpoint: Processing device-adapter for Nigel Preferred Temperature: Thermostat setpoint device adapter
2019-01-03 23:09:02.614 Status: dzVents: Debug: setpoint: Processing device-adapter for Nobody Home: Thermostat setpoint device adapter
2019-01-03 23:09:02.615 Status: dzVents: Debug: setpoint: Processing device-adapter for Emma At Home: Switch device adapter
2019-01-03 23:09:02.617 Status: dzVents: Debug: setpoint: Processing device-adapter for Nigel At Home: Switch device adapter
2019-01-03 23:09:02.617 Status: dzVents: Info: setpoint: Just Nigel home
2019-01-03 23:09:02.617 Status: dzVents: Debug: setpoint: Living Rm Thermostat 25.00 SHOULD be Set
2019-01-03 23:09:02.618 Status: dzVents: Debug: setpoint: Processing device-adapter for virtualthermostat: Thermostat setpoint device adapter
2019-01-03 23:09:02.618 Status: dzVents: Debug: setpoint: Constructed timed-command: 25
2019-01-03 23:09:02.620 Status: dzVents: Debug: setpoint: Processing device-adapter for Living Rm Thermostat: Thermostat setpoint device adapter
2019-01-03 23:09:02.620 Status: dzVents: Debug: setpoint: Constructed timed-command: 25
2019-01-03 23:09:02.621 Status: dzVents: Debug: setpoint: Living Rm Thermostat 25.00 was Set
2019-01-03 23:09:02.622 Status: dzVents: Debug: setpoint: Processing device-adapter for WhoisHome: Thermostat setpoint device adapter
2019-01-03 23:09:02.622 Status: dzVents: Debug: setpoint: Constructed timed-command: 1
2019-01-03 23:09:02.622 Status: dzVents: !Info: setpoint: averagePreferredSP: 23.75
2019-01-03 23:09:02.622 Status: dzVents: !Info: setpoint: emmaSP: 22.5
2019-01-03 23:09:02.622 Status: dzVents: !Info: setpoint: nigelSP: 25
2019-01-03 23:09:02.622 Status: dzVents: !Info: setpoint: nobodySP: 17.5
2019-01-03 23:09:02.623 Status: dzVents: Info: setpoint: ------ Finished dumper46.lua
2019-01-03 23:09:02.833 Status: Set UserVariable WhoisHomeVar = 1
2019-01-03 23:09:03.332 (Virtual2) Thermostat (virtualthermostat)
2019-01-03 23:09:03.366 (Virtual2) Thermostat (Living Rm Thermostat)
2019-01-03 23:09:03.371 (Virtual2) Thermostat (WhoisHome)
2019-01-03 23:09:13.733 Status: dzVents: Info: setpoint: ------ Start external script: dumper46.lua: Device: "Emma At Home (Virtual2)", Index: 1287
2019-01-03 23:09:13.735 Status: dzVents: Debug: setpoint: Processing device-adapter for Nigel Preferred Temperature: Thermostat setpoint device adapter
2019-01-03 23:09:13.737 Status: dzVents: Debug: setpoint: Processing device-adapter for Emma Preferred Temperature: Thermostat setpoint device adapter
2019-01-03 23:09:13.739 Status: dzVents: Debug: setpoint: Processing device-adapter for Nobody Home: Thermostat setpoint device adapter
2019-01-03 23:09:13.741 Status: dzVents: Debug: setpoint: Processing device-adapter for Nigel At Home: Switch device adapter
2019-01-03 23:09:13.741 Status: dzVents: Info: setpoint: both Emma and Nigel home
2019-01-03 23:09:13.741 Status: dzVents: Debug: setpoint: Living Rm Thermostat 23.75 SHOULD be Set
2019-01-03 23:09:13.743 Status: dzVents: Debug: setpoint: Processing device-adapter for virtualthermostat: Thermostat setpoint device adapter
2019-01-03 23:09:13.743 Status: dzVents: Debug: setpoint: Constructed timed-command: 23.75
2019-01-03 23:09:13.745 Status: dzVents: Debug: setpoint: Processing device-adapter for Living Rm Thermostat: Thermostat setpoint device adapter
2019-01-03 23:09:13.745 Status: dzVents: Debug: setpoint: Constructed timed-command: 23.75
2019-01-03 23:09:13.747 Status: dzVents: Debug: setpoint: Living Rm Thermostat 25.00 was Set
2019-01-03 23:09:13.749 Status: dzVents: Debug: setpoint: Processing device-adapter for WhoisHome: Thermostat setpoint device adapter
2019-01-03 23:09:13.749 Status: dzVents: Debug: setpoint: Constructed timed-command: 1
2019-01-03 23:09:13.749 Status: dzVents: !Info: setpoint: averagePreferredSP: 23.75
2019-01-03 23:09:13.749 Status: dzVents: !Info: setpoint: emmaSP: 22.5
2019-01-03 23:09:13.749 Status: dzVents: !Info: setpoint: nigelSP: 25
2019-01-03 23:09:13.750 Status: dzVents: !Info: setpoint: nobodySP: 17.5
2019-01-03 23:09:13.751 Status: dzVents: Info: setpoint: ------ Finished dumper46.lua
2019-01-03 23:09:13.951 Status: Set UserVariable WhoisHomeVar = 3
2019-01-03 23:09:14.483 (Virtual2) Thermostat (virtualthermostat)
2019-01-03 23:09:14.516 (Virtual2) Thermostat (Living Rm Thermostat)
2019-01-03 23:09:14.521 (Virtual2) Thermostat (WhoisHome)
2019-01-03 23:10:33.329 Status: dzVents: Info: setpoint: ------ Start external script: dumper46.lua: Device: "Nigel At Home (Virtual2)", Index: 1286
2019-01-03 23:10:33.333 Status: dzVents: Debug: setpoint: Processing device-adapter for Nigel Preferred Temperature: Thermostat setpoint device adapter
2019-01-03 23:10:33.334 Status: dzVents: Debug: setpoint: Processing device-adapter for Emma Preferred Temperature: Thermostat setpoint device adapter
2019-01-03 23:10:33.336 Status: dzVents: Debug: setpoint: Processing device-adapter for Nobody Home: Thermostat setpoint device adapter
2019-01-03 23:10:33.338 Status: dzVents: Debug: setpoint: Processing device-adapter for Emma At Home: Switch device adapter
2019-01-03 23:10:33.338 Status: dzVents: Info: setpoint: Just Emma home
2019-01-03 23:10:33.338 Status: dzVents: Debug: setpoint: Living Rm Thermostat 22.50 SHOULD be Set
2019-01-03 23:10:33.340 Status: dzVents: Debug: setpoint: Processing device-adapter for virtualthermostat: Thermostat setpoint device adapter
2019-01-03 23:10:33.340 Status: dzVents: Debug: setpoint: Constructed timed-command: 22.5
2019-01-03 23:10:33.342 Status: dzVents: Debug: setpoint: Processing device-adapter for Living Rm Thermostat: Thermostat setpoint device adapter
2019-01-03 23:10:33.342 Status: dzVents: Debug: setpoint: Constructed timed-command: 22.5
2019-01-03 23:10:33.343 Status: dzVents: Debug: setpoint: Living Rm Thermostat 23.75 was Set
2019-01-03 23:10:33.345 Status: dzVents: Debug: setpoint: Processing device-adapter for WhoisHome: Thermostat setpoint device adapter
2019-01-03 23:10:33.345 Status: dzVents: Debug: setpoint: Constructed timed-command: 3
2019-01-03 23:10:33.345 Status: dzVents: !Info: setpoint: averagePreferredSP: 23.75
2019-01-03 23:10:33.345 Status: dzVents: !Info: setpoint: emmaSP: 22.5
2019-01-03 23:10:33.345 Status: dzVents: !Info: setpoint: nigelSP: 25
2019-01-03 23:10:33.345 Status: dzVents: !Info: setpoint: nobodySP: 17.5
2019-01-03 23:10:33.347 Status: dzVents: Info: setpoint: ------ Finished dumper46.lua
2019-01-03 23:10:33.519 Status: Set UserVariable WhoisHomeVar = 2
2019-01-03 23:10:34.058 (Virtual2) Thermostat (virtualthermostat)
2019-01-03 23:10:34.091 (Virtual2) Thermostat (Living Rm Thermostat)
2019-01-03 23:10:34.096 (Virtual2) Thermostat (WhoisHome)
The only way to find out is to switch on the script debug with
Code: Select all
logging = {
level = domoticz.LOG_DEBUG,
marker = "setpoint"
},
Re: Problem updating thermostat Setpoint
Posted: Friday 04 January 2019 9:58
by lastofthejediknights
Well, Many thanks for the help, I'll muck about some more to try and understand why mine didn't work, but the issue is very well resolved.
Thank you.
Regards
Nigel