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

Stop running scene with push of S1 on Dimmer2


Question

Posted (edited)

I have below code that works just fine. It turns on a light at motion and turns the light off after set time with no motion detected. However, if I during the timer time for instance turn on the light manually on switch S1 to lets say 100% (double click) the scene still runs and turns the light of. How can I stop the scene from running whenever manual operations of the light has been triggered?

I tried a bit with hub.scene("kill", scene-id) but not succeeding as can't figure out where in the code to put it... I am a beginner.

Perhaps I need as separate scene? And activate Scene activation functionality on the device? Ie. create a scene that is always run whenever S1 is activated and stop the other running scene if it is running. Perhaps by setting a global variable to a value and if than look at that value in every loop?

Would be good though that the scene also is stopped if I choose to control the light manually in any way, both by pushing S1 and using the app.

 

Conditions

Please login or register to see this code.

 

Actions

Please login or register to see this code.

 

Edited by Whswede

2 answers to this question

Recommended Posts

  • 0
  • Inquirer
  • Posted

     

    I tried this solution:

    Conditions

    Please login or register to see this code.

     

    Action

    Please login or register to see this code.

     

    The solution does the job but how could I integrate this scene into the original scene? Seems like a long way to go to have separate scenes. I am not a coder so I could use some pointers on how to think

    • 0
  • Inquirer
  • Posted

    This is still bugging me even though I get the work done this way. Is there not a more good looking way of accomplishing my need?

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