Same problem here: New script 4:160
[DEBUG] 14:05:02: klaar
[ERROR] 07:37:00: Cannot query interpreter state
A scene checking which zone required heat during the night
--[[
%% autostart
%% properties
%% weather
%% events
%% globals
G_KetelWarmte
--]]
if (fibaro:countScenes() > 1) then
fibaro:abort();
end
local sourceTrigger = fibaro:getSourceTrigger();
function tempFunc()
local currentDate = os.date("*t");
local startSource = fibaro:getSourceTrigger();
if (
( ((currentDate.wday == 1 or currentDate.wday == 2 or currentDate.wday == 3 or currentDate.wday == 4 or currentDate.wday == 5 or currentDate.wday == 6) and string.format("%02d", currentDate.hour) .. ":" .. string.format("%02d", currentDate.min) >= "01:00") and ((currentDate.wday == 1 or currentDate.wday == 2 or currentDate.wday == 3 or currentDate.wday == 4 or currentDate.wday == 5 or currentDate.wday == 6) and string.format("%02d", currentDate.hour) .. ":" .. string.format("%02d", currentDate.min) <= "05:45") and tonumber(fibaro:getGlobalValue("G_KetelWarmte")) == tonumber("1") )
)
then
fibaro:debug(fibaro:getGlobal("G_KetelWarmte_Scen"));
fibaro:call(2, "sendDefinedEmailNotification", "636");
fibaro:debug("bericht")
end
setTimeout(tempFunc, 60*1000)
end
if (sourceTrigger["type"] == "autostart") then
tempFunc()
else
local currentDate = os.date("*t");
local startSource = fibaro:getSourceTrigger();
if (
( (currentDate.wday == -1) and (currentDate.wday == -1) and tonumber(fibaro:getGlobalValue("G_KetelWarmte")) == tonumber("1") )
or
startSource["type"] == "other"
)
then
fibaro:debug(fibaro:getGlobal("G_KetelWarmte_Scen"));
fibaro:call(2, "sendDefinedEmailNotification", "636");
fibaro:debug("bericht handmatig")
end
fibaro:debug("trigger 1")
end
fibaro:debug("klaar")