Ich habe dafür 2 Szenen:
HC2 Reboot
--[[
%% properties
%% events
%% globals
--]]
-- Reboot system
fibaro:sleep(10*1000);
HomeCenter.SystemService.reboot();
Und die 2. dafür die eigentliche Zeitsteuerung:
--[[
%% autostart
%% properties
%% weather
%% events
%% globals
--]]
local sourceTrigger = fibaro:getSourceTrigger();
function tempFunc()
local currentDate = os.date("*t");
local startSource = fibaro:getSourceTrigger();
if (
( ((currentDate.wday == 1) and string.format("%02d", currentDate.hour) .. ":" .. string.format("%02d", currentDate.min) == "04:15") )
)
then
fibaro:startScene(49);
end
setTimeout(tempFunc, 60*1000)
end
if (sourceTrigger["type"] == "autostart") then
tempFunc()
else
local currentDate = os.date("*t");
local startSource = fibaro:getSourceTrigger();
if (
startSource["type"] == "other"
)
then
fibaro:startScene(49);
end
end
Wobei die 49 in meinem Beispiel, die ID meiner vorher genannten Reboot Szene ist und diese jeden Sonntag um 4.15 Uhr laufen soll.