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
MaTi 29
Hi all,
I am new to LUA (and pretty much to programming actually).
I have tried building something, but unfortunately it does not do what I'd like
I have tried breaking it down to troubleshoot, but then everything seems to be working fine (if then --> debugmessage). The end product however does not work..
Can someone please have a look with me and advise what to try/do? if someone has a working script he/she is willing to share that's fine too.. But also I am keen on learning what I do wrong here..
Thanks! I simplified the script a little.. The functions delay and debug are working and left out for your convenience.
The ID's for lamp and motion are correct and the global var DayOrNight is set to Night.
What it should do:
If my FIbaro eye (motion) is triggered and the golbar VAR is set to Night it should turn on the lamp for one minute to 40% and then off again (between 16:00 and 1:00), to 20% for one minute, should it be between 1:00 and 8:00.
What it actually does:
Nothing. (lol)
Please login or register to see this code.
Thanks in advance for your great help!
PS: Also any general/other programming advise is more than welcome, should there be room for improvement..
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.