Hi Folks,
I have one email scene that seems to be intermittent. I don't think its the email service as I do periodically receive other emails
I log events to a user defined global variable and then once per day email it out triggered when I set morning mode.
This is the email scene that I call fro morning mode scene
I have some extra debug code to see what may be happening and this morning the debug on line was #37
fibaro:debug(LogStr)
This executed correctly as I can see the output but the email didn't send after that.
BTW - The UpdateEventLog function is a generic function I use in many scenes to log something to the global variable
any ideas welcome as to why the email is not executing the send - I am using FW 4.100
Thanks
-f
--[[
%% properties
%% events
%% globals
--]]
-- Configuration - Scene Info
sceneName = "Dump and reset Event Log"
sceneVersion = "1.0.1"
-- Scene Description
-- Configuration - Device IDs
-- Validate Number of Scene Instance
if (fibaro:countScenes()>1) then
--fibaro:debug("stop scene")
fibaro:abort()
end
function UpdateEventLog(eventStr)
local currDate = (os.date("%b %d - %H:%M"))
local updStr = (fibaro:getGlobal("Log_Event") .."".. currDate .." ".. eventStr .." \n")
fibaro:setGlobal("Log_Event", updStr)
end
function SendClearEventLog()
UpdateEventLog("\n \n .....closing Event Log.")
fibaro:sleep(1000)
local currDate = (os.date("%b %d - %H:%M"))
local LogStr = fibaro:getGlobal("Log_Event")
fibaro:sleep(1000)
fibaro:debug(LogStr)
fibaro:call(2, "sendEmail","Event Log",LogStr)
fibaro:sleep(5000)
fibaro:setGlobal("Log_Event", "")
UpdateEventLog("\n Event Log started")
end
SendClearEventLog()
-- End of Scene Execution
fibaro:debug("Scene, " .. sceneName .. " v" .. sceneVersion .. " completed.")