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
Question
GlennNZ 0
Hi
Have been struggling to find the best way to break out of a loop with another button press in timely fashion.
eg.
Trigger - device - door sensor toggle
Sets global variable timer
Turns Devices On
While do loop until timer equals current time (sleep 5 or 10 secs)
When time up
Turns Devices Off
End of Scene
Example from Richo - whichs works great on a few other scenes.
Please login or register to see this code.
Works well, count downs and turns off.
However I wish to turn these devices off if there is another button press on the same deviceId.
Options
- Within the loop Can check the deviceID status every 5 seconds and then turn off if triggered again - Quite a delay to turning off.
- Can check if scene running (fibaro:Countscenes) and if triggered again killscenes ? (would seem a bit 'aggressive') and countscene based triggers seem to run without clear trigger to me occasionally
- Is there an easier better way?
Thanks
Glenn
[/code]
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.