Since we are away a lot of weekends to the Belgian coast I have made some code to heat up my house gradually before we travel home again.
Idea is that I switch a dummy to start up the code.
What I would like to have is a pop up input box where I can give the starting and end time.
Is this possible?
The code:
Code: Select all
setpoint = tonumber(otherdevices_svalues['Room Setpoint'])
werkelijk= tonumber(otherdevices_svalues['Room Temperature'])
uur = tonumber(os.date("%H"));
minuten = tonumber(os.date("%M"));
seconden = tonumber(os.date("%S"));
dagtemp = uservariables["dagtemperatuur"]
commandArray = {}
for i=9,20,1 do
if (uur== i and minuten==5 and seconden==0 and setpoint<=dagtemp) then
print ("sec= "..seconden.." i= "..i)
setpoint=setpoint+0.5
set = "6|0|" .. setpoint
commandArray ['UpdateDevice']= '6|0|' .. setpoint
end
end
return commandArray
Jan