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 scene manually with IF


Question

Posted

I have a scene to close my roller shutters, but only if the window is not open. But somehow the IF-statement is never checked when manually triggering a scene.

See the example below, the scene is still executed, even though ZeroConstant is 0.

Please login or register to see this image.

All I can think off is to create duplicate scenes. One to set a variable, and the other that is triggered with that variable, but also checks if the window is closed. But I hope there is a simpler way...

It must have been asked before, but I'm not able to find the question...

8 answers to this question

Recommended Posts

  • 0
Posted

Did you tick the zeroconstant box at the top of the block logic you shown us?

  • 0
  • Inquirer
  • Posted

    Do you mean in the triggering variables just above the blocks? That one is indeed checked.

    Btw. I have a HCL, so LUA is not possible...

    • 0
    Posted

    This scene has two triggering condition.

    One is when you zeroconstant becomes 1000,

    Another condition is when you manually click run.

    This is what I see from lua code itself after converting from the block scene logic.

    Please login or register to see this code.

    • 0
    Posted

    MalvinYNJ is right when you hit Run button manually, block scene is always triggered, despite conditions.

    • 0
  • Inquirer
  • Posted

    That is indeed too bad for the startSource["type"] == "other"

    I now tried to create 2 scenes, in pseudo code:

    ** SCENE 1 ** (to start manually)

    Please login or register to see this code.

    ** SCENE 2 **

    Please login or register to see this code.

    But now every time I close the window the roller shutter is closed (also if I check the Window = safe). But I only want this to happen if the window is closed AND I manually start the scene.

    Is this possible in another way on the HCL?

    • 0
    Posted

    But now every time I close the window the roller shutter is closed (also if I check the Window = safe). But I only want this to happen if the window is closed AND I manually start the scene

    .

    You need to have LUA to put an IF into manually started part of code (by clicking "Run") .

    • 0
  • Inquirer
  • Posted

    That's too bad, I didn't expect this was one of the complex logic that I would be missing in the HCL.

    There is no way to check on the state in the block design instead of the even (close window)? If that's possible it should still work with a variable

    • 0
    Posted

    You can do this with the HCL, but as you stated it will require 2 scenes.

    One will force the variable to the desired value and this will be your command to the system to close the blinds.

    The execution will depend on the 2nd scene (which can be "not shown in interfaces") that checks the window status and runs the commands based on the variable from the first scene being the trigger and the window status conditions being met.

    Depending on how your setup works, you will need to reset the variable for the first scene as part of one of the scenes above, or based around another trigger (I.e blind is opened OR window is closed etc)

    [ Added: 2014-07-14, 00:55 ]

    Your pseudo code scene above is essentially correct, but it would only be operating the way you have said if the Window sensor was selected as the trigger and your variable was currently on the value you force by running Scene 1

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