.afterSec(xx) not working? :(
Posted: Friday 22 November 2024 21:35
hi all,
can somebody help me out why my delay does not work?
i'm trying to make a heating script with zones, a buffertank with pump and an weather temperature based heatpump with an on/off input.
the rest of the scripts works (with thermostats, heatcommand to heatpump and opening the valves,
but i want to have my tankpump to have a delay of 3 minutes before it goes ON due opening of the valves that takes some minutes before they are open...
This code
works correctly but does not have any delay. when one of the valves has turned ON the pump is also going ON directly.
The next code does NOT work
I was hoping this would do the trick, but then i'm getting an error:
Why does this delay not work?
Many thanks!
can somebody help me out why my delay does not work?
i'm trying to make a heating script with zones, a buffertank with pump and an weather temperature based heatpump with an on/off input.
the rest of the scripts works (with thermostats, heatcommand to heatpump and opening the valves,
but i want to have my tankpump to have a delay of 3 minutes before it goes ON due opening of the valves that takes some minutes before they are open...
This code
Code: Select all
local heating if hp.heater ~= nil then heating = dz.devices(hp.heater) end
The next code does NOT work

Code: Select all
local Delay = 30
local heating if hp.heater ~= nil then heating = dz.devices(t.heater).afterSec(Delay) end
Code: Select all
attempt to call a nil value (field 'afterSec')
Many thanks!