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
MSB 0
GlobalVars [scene] and [Device]
I created a script that runs every minute and does check for certain events in the home like tv running to avoid turn off lights even if its after midnight which normaly means lights off. This to avoid sitting in the dark just because you are up a little later than normal. It can also be used to arm/disarm when everyone left house andso on. It consists of two things 1 device and 1 scene. It will always return 0 or 1 for events and it keeps all dates to unix timestamp for easines when programming. Events are also automaticaly delayed like for instance if you turn off the projector and then decide to to turn on the tv like 5 minutes later it will not turn off the lights since it will tell projector is still running for XX minutes after turn off, after that it will see the tv is on and fend of light off until you turn the tv off to. Anyways I made it so as to keep it simple with 0 or 1 so it is easy to create scenes based on the variables. It has a few more vars like sunriseafter and before sunset. Maybe it should have before beforesunrise to?
To check iphones on/off?
Device button 1:
Please login or register to see this code.
Device button 2:
Please login or register to see this code.
Scene to make global variables:
Please login or register to see this code.
[/code]
Link to comment
Share on other sites
4 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.