I have a problem that I cannot update a virtual thermostat setpoint using commandarray and am hoping I have done something silly that someone else will spot!
The script will run for more than 10 seconds. If I change the setpoint to type temperature, rather than thermostat setpoint - everything works OK. The script scans through a dozen or more zones so I potentially could have multiple setpoint updates from the same pass of the script. I'd prefer to use a setpoint rather than a straight temperature device for the extra functionality you get on the web gui.
The setpoint device looks like this in the devices list:
280 test dummy 0014167 1 HC_DiningRoom_Setpoint Thermostat SetPoint 21.2
The code that updates the devices is shown below and - as I say works for every other device - apart from thermostat setpoint.
I have searched in the forums and did find this issue:
http://easydomoticz.com/forum/viewtopic ... 8&start=10
but the only solution appeared to be JSON URL based which I don't want to implement having had problems with os.execute curl calls before.
Code: Select all
function issueDeviceUpdate(deviceID, deviceValue)
commandArray[commandArrayIndex] = {['UpdateDevice'] = deviceID .. "|0|" .. tostring(deviceValue)}
commandArrayIndex = commandArrayIndex + 1
end
Please can anyone offer any ideas as to what may be wrong?2016-03-29 12:19:00.420 LUA: (HeatingCoordinator) Temp = '-1', Setpoint = '5.2', Heat Needed = 'On'
2016-03-29 12:19:00.420 LUA: ==== ZONE: 5 HotWater =========
2016-03-29 12:19:00.421 LUA: (HeatingCoordinator) Zone is Unoccupied and turned Off
2016-03-29 12:19:00.421 LUA: (HeatingCoordinator) Temp = '17.3', Setpoint = '5.2', Heat Needed = 'Off'
2016-03-29 12:19:00.421 LUA:
******** BOILER **********
2016-03-29 12:19:00.421 LUA: Heat Needed by 1 of 5 radiator zones
2016-03-29 12:19:00.421 LUA: Boiler state HCN_Boiler remains On
2016-03-29 12:19:00.421 LUA: Radiator Zone valve HCN_HeatingValve remains On
2016-03-29 12:19:00.421 LUA: (HeatingCoordinator) END
2016-03-29 12:19:00.423 EventSystem: Sending SetPoint to device....
2016-03-29 12:19:10.411 Error: EventSystem: Warning!, lua script /home/pi/domoticz/scripts/lua/script_time_heatingcoordinator.lua has been running for more than 10 seconds
2016-03-29 12:19:00.423 (test dummy) Thermostat (HC_DiningRoom_Setpoint)
(UPDATE: 18:21 29th mar Since the original post I have discovered that the setpoint does change to the required value - eventually. The script times out and sometime after that - the value updates.)
Thanks
Coppo