25.01.2021, 08:54
Code:
--Set temperature
Tc = '11/0/5' -- 09.001 Temperature (2Bytes)
--Reference Temperature
TRef = '11/0/20' -- 09.001 Temperature (2Bytes)
--Output object that enables resident script
addr = '11/0/32' --01. 1 bit (boolean)
--Countdown in days
RstDays = '11/0/31' --1 Bytes unsigned integer
--Countdown in hours
RstHours = '11/0/30' --1 Bytes unsigned integer
----------------------------------------------------------------------
-- find required object
obj = grp.find(addr)
-- object exists and current state is "on"
if obj and obj.data then
-- delta is in seconds
delta = os.time() - obj.updatetime
-- switch off when timer expires
if delta >= (((grp.getvalue(RstDays)*60)*24) + (grp.getvalue(RstHours)*60)) * 60 then
grp.write(addr, false)
grp.write(Tc, grp.getvalue(TRef))
end
end
Hello, I modified this script to reset the temperature of a pool. How can I embed a 250 Byte String object for the remaining time state?