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
rajp 14
What is wrong with the code below? I have had this script and it has worked fine for over a year now. But since upgrading to 4.080, it has intermittently stopped switching on the second device (ID 43). The scene is triggered when my main light in the kitchen is switched on, it should switch on the 2 RGBW relays too. The first relay (ID 36) always abides by the statement in the LUA script but the second one is not always responding. As stated, this has worked for over a year and worked for a few weeks in 4.080 but has over the last week started behaving the way it has now.
I overcome this issue, I setup 2 block scenes, one to switch on and other to switch off when the light status changes and that works fine. However, I want to limit the number of scenes I have. I can't work out what is wrong with this.. Any ideas?
Thanks
%% autostart
%% properties
14 value
%% events
%% globals
--]]
fibaro:debug('Kill second scene!');
fibaro:abort();
end
if ( startSource["type"] == "property") then
if ( tonumber(fibaro:getValue(14, "value")) > 0 ) then
fibaro:call(36, "turnOn");
fibaro:call(43, "turnOn");
elseif ( tonumber(fibaro:getValue(14, "value")) == 0 ) then
fibaro:call(36, "turnOff");
fibaro:call(43, "turnOff");
end
end
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.