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

Scene activation with 3x click and doorsensor as trigger


Question

Posted

Hi,

 

In the hall way I have a scene activation active on my dimmer 2. The scene called bedtime, so when I go to bed I tripple click on the light switch and all the roller shutters will close and all the light will be turned off. But when the back door is still open the scene will not run until I close the back door. This works, but I want is slightly different and can't get it working.

 

What now happens is that when I triple click the light switch de scene will not run because the back door is open, so I walk to the back door and close it and immediately the bedtime scene starts because I already did the triple click and now the door is closed.

 

What I want is that when I triple click the light switch and the back door is open, I can close the back door and the scene does NOT start immediately. I want to do the triple click again. Because when the scene starts when I closed the back door I'm in the dark because all the lights are turned off.

 

Who knows the solution?

 

Kevin

8 answers to this question

Recommended Posts

  • 0
Posted

Can You show us the code? Is it a block or lua scene?

  • 0
Posted (edited)

Set a Global Variable with the door sensor. Door open -> Globar Var = 1, Door closed -> Global Var = 0

When you tripple click check the Global Variable. If it is 0 launch the bedtime routine.

 

I would also flash a light when you tripple click and the door is open (var=1), then you know the door is open and you clicked right. This is also handy for other house members, else they think the system is malfunctioning.

Edited by Joep
  • 0
Posted (edited)
4 hours ago, kevin said:

What now happens is that when I triple click the light switch de scene will not run because the back door is open, so I walk to the back door and close it and immediately the bedtime scene starts because I already did the triple click and now the door is closed. 

It probably part of your code that waits to back door to be closed.

Just change in code that if back door is open abort the scene without any actions, that's all

Edited by cag014
  • 0
  • Inquirer
  • Posted

    Thanks for the responses.

     

    @pogo See my block scene below.

     

    @Joep, I tried this also. But when I close the door the variable changes to 0 and then still the scene will run.

     

    @cag014, sound great. But how do I do that in my scene that it need to abort the scene without any actions? If I have to do it in LUA that is also no problem, but I'm just learning LUA.

    Please login or register to see this attachment.

    • 0
    Posted (edited)

    I can't read and create block scenes, but maybe i can somehow help...

    Turn off the trigger on door closing.
    Copy the scene and in copy add "sleep" before turning off the lights. Change triggers in copy to run only on door.

     

    OR

    Just ignore copying the scene and all next changes and click switch once again after closing the door.

     

    Should help, but I'm still lame in block scenes... 

    Edited by pogo
    • 0
    Posted

    The block scene runs because when the door is closed the scene activation value is still true. And the “and” block returns true.

     

    I think you have to write it in Lua. You can start by converting the block scene.

     

    With Lua you can do mine or @cag014 approach. Cag014 is the fastest.

     

    I can help you writing the scene but I don’t have time tomorrow. Then I have to write it this weekend.

    • 0
    Posted (edited)

    By looking on your block scene, I don't understand what you mean by the scene is still runs and when you close the back door it continues???

    When the scene is triggered it doesn't wait in some delay loop for back door ... it runs and stops.

    I think you might defined the back door sensor as trigger of the scene also. Please remove back door from triggers.

    Hope you understand what I mean, if not, could you please post the entire picture of the block scene? including the triggers header.

    Edited by cag014
    • 0
  • Inquirer
  • Posted
    9 hours ago, cag014 said:

    By looking on your block scene, I don't understand what you mean by the scene is still runs and when you close the back door it continues???

    When the scene is triggered it doesn't wait in some delay loop for back door ... it runs and stops.

    I think you might defined the back door sensor as trigger of the scene also. Please remove back door from triggers.

    Hope you understand what I mean, if not, could you please post the entire picture of the block scene? including the triggers header.

     

     

    That was a stupid mistake from me, I'm ashamed that I didn't see that myself:oops:

    I unchecked the back door and try it this evening. Already thanks for all the responses.

     

    Kevin

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