Jump to content

Welcome to Smart Home Forum by FIBARO

Dear Guest,

 

as you can notice parts of Smart Home Forum by FIBARO is not available for you. You have to register in order to view all content and post in our community. Don't worry! Registration is a simple free process that requires minimal information for you to sign up. Become a part of of Smart Home Forum by FIBARO by creating an account.

 

As a member you can:

  •     Start new topics and reply to others
  •     Follow topics and users to get email updates
  •     Get your own profile page and make new friends
  •     Send personal messages
  •     ... and learn a lot about our system!

 

Regards,

Smart Home Forum by FIBARO Team


  • 0

Why does this scene not work. Email alert multiple times.


Question

Posted

Hi.. I am using the following block scene to see if the weather outside is Rain or Storm and if so, it should set a delay of 24hours in the sprinkler panel. However, when it should run, it should only run at 12:00 mid day once. However, when it did run, it ended up sending out over a 1000 email alerts to me. So I turned off the scene.

 

What am I doing wrong???

 

Please login or register to see this attachment.

8 answers to this question

Recommended Posts

  • 0
Posted

Try to uncheck the triggers

Please login or register to see this image.

/emoticons/default_wink.png" alt=";)" srcset="https://forum.fibaro.com/uploads/emoticons/[email protected] 2x" width="20" height="20" />

  • 0
  • Inquirer
  • Posted

    Try to uncheck the triggers

    Please login or register to see this image.

    /emoticons/default_wink.png" alt=";)" srcset="https://forum.fibaro.com/uploads/emoticons/[email protected] 2x" width="20" height="20" />

    Ahh. Thanks. Totally missed that!!!!!

    • 0
    Posted

    No problem

    Please login or register to see this image.

    /emoticons/default_smile.png" alt=":)" srcset="https://forum.fibaro.com/uploads/emoticons/[email protected] 2x" width="20" height="20" />

    • 0
    Posted

    What is the use of the "triggers"?

    What can they control ?

    • 0
  • Inquirer
  • Posted

    What is the use of the "triggers"?

    What can they control ?

    I believe in my scene, the 3 triggers are the Global Variable, Weather and the time. So if either of the components had a change in condition, it will trigger the scene. So if I wanted to trigger the scene alone on time then to deselect the Weather and Global variable trigger should only trigger on time.

     

    Well, that is my understanding..

    • 0
  • Inquirer
  • Posted

    Try to uncheck the triggers

    Please login or register to see this image.

    /emoticons/default_wink.png" alt=";)" srcset="https://forum.fibaro.com/uploads/emoticons/[email protected] 2x" width="20" height="20" />

    OK.. Unchecked those 2 triggers and then set it running. Yesterday, we had rain forecast and the scene again sent me around 40 or so messages around 2PM before I termnated the scene.. so that didn't fix it.. pretty confused as to why it keeps running past the 12:00 as I want it to run only at 12:00.

    • 0
    Posted

    I presume it is your use of "or" and how that plays into the rest of and statements, specifically rain versus the sprinkler delay. It is a different topic here on the forum addressing nesting like you have done, sometimes it plays out different than you expected. 

     

    Try to convert it to lua and check if the logics int the statements then become more obvious. 

    • 0
  • Inquirer
  • Posted

    I presume it is your use of "or" and how that plays into the rest of and statements, specifically rain versus the sprinkler delay. It is a different topic here on the forum addressing nesting like you have done, sometimes it plays out different than you expected. 

     

    Try to convert it to lua and check if the logics int the statements then become more obvious. 

     

    This is the code converted to LUA.

     

    --[[

    %% properties

    %% globals

    --]]

    local sourceTrigger = fibaro:getSourceTrigger();

    function tempFunc()

    local currentDate = os.date("*t");

    local startSource = fibaro:getSourceTrigger();

    if (

     ( fibaro:getValue(3, "WeatherConditionConverted") == "rain" )

    or

     ( fibaro:getValue(3, "WeatherConditionConverted") == "storm" )

    and

     ( tonumber(fibaro:getGlobalValue("sprinklerdelay")) ~= tonumber("0")  and  ((currentDate.day == 1 or currentDate.day == 2 or currentDate.day == 3 or currentDate.day == 4 or currentDate.day == 5 or currentDate.day == 6 or currentDate.day == 7) and string.format("%02d", currentDate.hour) .. ":" .. string.format("%02d", currentDate.min) == "12:00") )

    )

    then

        fibaro:call(319, "pressButton", "2");

        fibaro:setGlobal("sprinklerdelay", "0");

        fibaro:call(13, "sendDefinedEmailNotification", "325");

    end

    setTimeout(tempFunc, 60*1000)

    end

    if (sourceTrigger["type"] == "autostart") then

    tempFunc()

    else

    local currentDate = os.date("*t");

    local startSource = fibaro:getSourceTrigger();

    if (

     ( fibaro:getValue(3, "WeatherConditionConverted") == "rain" )

    or

     ( fibaro:getValue(3, "WeatherConditionConverted") == "storm" )

    and

     ( tonumber(fibaro:getGlobalValue("sprinklerdelay")) ~= tonumber("0")  and  (currentDate.day == 1 or currentDate.day == 2 or currentDate.day == 3 or currentDate.day == 4 or currentDate.day == 5 or currentDate.day == 6 or currentDate.day == 7) )

    or

    startSource["type"] == "other"

    )

    then

        fibaro:call(319, "pressButton", "2");

        fibaro:setGlobal("sprinklerdelay", "0");

        fibaro:call(13, "sendDefinedEmailNotification", "325");

    end

    end

     

    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.

    Guest
    Answer this question...

    ×   Pasted as rich text.   Paste as plain text instead

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.

    ×
    ×
    • Create New...