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!



Smart Home Forum by FIBARO Team

  • 0

Stop running scene with push of S1 on Dimmer2



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.



Please login or register to see this code.



Please login or register to see this code.


Edited by Whswede
Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0
  • Inquirer

    I tried this solution:


    Please login or register to see this code.



    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

    Link to comment
    Share on other sites

    Join the conversation

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

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