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

Trigger


Question

Posted

Meaby it is already past this forum but......

If i have a scène that triggers something and its in a "while true do". Why if the there is another trigger it kills the scène and start all over again. Even if the while true is still true. Also wiht setTime.....

 

Thx

9 answers to this question

Recommended Posts

  • 0
Posted
1 hour ago, Kage said:

Meaby it is already past this forum but......

If i have a scène that triggers something and its in a "while true do". Why if the there is another trigger it kills the scène and start all over again. Even if the while true is still true. Also wiht setTime.....

 

Thx

In the panel for the scene set "Allow to restart a running scene:" to No

  • 0
  • Inquirer
  • Posted

    O... thx i see it. 

    What good be the reason to set this to yes. 

    • 0
    Posted
    On 12/12/2022 at 2:27 PM, Kage said:

    O... thx i see it. 

    What good be the reason to set this to yes. 

    I have same question, when in scenes should i use/not use "Allow to restart a running scene:" YES or NO.

     

    • 0
    Posted
    On 12/12/2022 at 2:27 PM, Kage said:

    What good be the reason to set this to yes. 

     

    If you don't want a scene to run in twice (in parallel).

     

     

    • 0
  • Inquirer
  • Posted

    @Joep isn't it that when you put it to yes it stops the scene when triggered and start over the scene. HC2 does parallel

    • 0
    Posted

    @Kage; yes you are right, got it wrong. No keeps the scene running and starts a new instance. Yes, kills the running scene and starts the scene again.

    • 0
    Posted

    Thanks for help!
    If you guys got some time to spend, what is the error?
    This test-scen was helping me to understand what Yes or No actually do when using sleep.
    When test-scen = yes to restart running scen it will register on/off when sleep and restart,

    but show an error between every On/Off?
    When scenes = No to restart running scen i got the behavior i want for my scenes where i want 

    a delay before next action.
    When scenes = Yes i lost control to most parts of webui in a couple of scenes. They got

    many input in short time from sensors and sleep built a lot action in buffert to run.
    Is that a endless loop?
     

    {
      conditions = { {
          id = 684, --FIBARO WALLPLUG
          isTrigger = true,
          operator = "==",
          property = "value",
          type = "device",
          value = true
        } },
      operator = "all"

    }

     

    -- Test-scen: Sleep with YES or NO in allowed restart --
    print("1.wallplug before sleep")
    hub.alert('simplePush', {[1] = 47,}, '1.wallplug before sleep', false, '')
    hub.sleep(20000)
    print("2.wallplug after sleep")
    hub.alert('simplePush', {[1] = 47,}, '2.wallplug after sleep, false, '')
     
    ----Tested "allowed to restart" & pushed on/off wallplug when sleeping
    --[2023-04-14] [18:02:28] [DEBUG] [SCENE726]: 1.wallplug before sleep
    --[2023-04-14] [18:02:48] [ERROR] [SCENE726]:
    --[2023-04-14] [18:02:48] [DEBUG] [SCENE726]: 1.wallplug before sleep
    --[2023-04-14] [18:03:08] [ERROR] [SCENE726]:
    --[2023-04-14] [18:03:08] [DEBUG] [SCENE726]: 1.wallplug before sleep
    --[2023-04-14] [18:03:28] [DEBUG] [SCENE726]: 2.wallplug after sleep
    --   comment: More than two on/off but show only two above
     
    ----Tested "not allowed to restart" & pushed on/off wallplug when sleeping
    --[2023-04-14] [18:08:26] [DEBUG] [SCENE726]: 1.wallplug before sleep
    --[2023-04-14] [18:08:46] [DEBUG] [SCENE726]: 2.wallplug after sleep
    --   comment: More than two on/off above skipped when sleep
    • 0
  • Inquirer
  • Posted

    i think you mis a ' in 2 after sleep

    must be

    hub.alert('simplePush',{[1]=47,},'2.wallplug after sleep',false,'')

    • 0
    Posted

    Thanks! I did a bad copy and for some reason i forget to control the result of my paste.

    I have also succeded in building loops that locked webui 1 hour, but wait and reboot 

    solved problem.

    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...