Just a note: The temperature data comes from a MySensors node that I have set up to give me the temperatures of my drinking hot water, water heater flue temp, HVAC Supply Air Temp, HVAC Return Air Temp and the local space temp. I wanted to get a delta on the HVAC temp sensors. MySensors sends the temperatures to Domoticz in the Celcius scale and Domoticz converts it Fahrenheit. All worked well for the past two years until I started testing dzVents.
Code: Select all
--[[
Assume you have two temperature sensors and a third dummy sensor that should be the
difference of these two sensors (e.g. you want to see the difference between water temperature
going into a radiator and the temperature of the water going out of it
]]--
return {
active = true,
on = {
['timer'] = {'every minute'}
},
execute = function(domoticz)
local inTemp = domoticz.devices('HVAC Return Air Temp').temperature
local outTemp = domoticz.devices('HVAC Supply Air Temp').temperature
local delta = math.abs(outTemp - inTemp) -- how much did the temperature change?
-- update the dummy sensor
domoticz.devices('HVAC Delta').updateTemperature(delta)
end
}Code: Select all
--[[
Assume you have two temperature sensors and a third dummy sensor that should be the
difference of these two sensors (e.g. you want to see the difference between water temperature
going into a radiator and the temperature of the water going out of it
]]--
return {
active = true,
on = {
['timer'] = {'every minute'}
},
execute = function(domoticz)
local inTemp = domoticz.devices('HVAC Return Air Temp').temperature
local outTemp = domoticz.devices('HVAC Supply Air Temp').temperature
local delta = math.abs(outTemp - inTemp) -- how much did the temperature change?
delta = (delta - 32) / 1.8
-- update the dummy sensor
domoticz.devices('HVAC Delta').updateTemperature(delta)
end
}