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
U5tabil 2
With help from Dale1985 iv got this LUA scene working. Iv added some small things to it.
This scene is simple, and for those that know LUA it's nothing new. But it might be good for some beginners like myself.
This scene will now turn on/dim/off lights when movement, but with different settings during different time of day, and also like in my case where i dont want it to go on/off if there is sunny and no need of light. Also added small time delay before it goes off.
I use this scene in my kitchen area by example.
It will need some global variables, feel free to set them as you like:
Time_of_Day
-Morning (iv set this to sunrise)
-Afternoon (after 12:00)
-Evening
-Night
Sunny_Cloudy
-Sunny (set if over 150lux then its sunny)
-Cloudy (set if under 150lux then cloudy)
You will have to add and change device id. iv written in start which one you need changing, but you need to keep looking for same number and change further down in code
Please login or register to see this code.
And here you have 1 scene for the "Sunny_Cloudy" global variable.
All you need is to make a global variable. Iv called this:
Sunny_Cloudy
-Sunny (in this one over 100lux is sunny, feel free to change)
-Cloudy (under 100lux is cloudy, feel free to change)
Please login or register to see this code.
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.