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
Guest puma
I am still trying to get the hang of LUA it's not going so great but I am trying to write a basic scene to turn on my garage lights on when either one of my garage doors are opened. However I can't get it to work correctly at this stage it will only work if I manually run the scene once the door is open it doesn't seem to realise that the door has opened.
It would also be nice to some how put a timer on it to say turn off after 5 mins.
This is what I have come up with.
Thanks
--[[
%% properties
237 Value
%% events
%% globals
--]]
local myVariable
myVariable = fibaro:getValue(237, "state")
if (myVariable == 'Open') then
fibaro:call(542, "turnOn")
end
3 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.