Jump to content

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


  • 0

What is wrong with this scene?? One device operates, the second one doesn't


Question

Posted

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
--]]
 
if (fibaro:countScenes()>1) then
  fibaro:debug('Kill second scene!');
  fibaro:abort();
end
 
local startSource = fibaro:getSourceTrigger();
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

  • 0
Posted

try adding a small pause in between the on commands

 

Please login or register to see this code.

 

i use this and it seems to respond better

  • 0
  • Inquirer
  • Posted

    try adding a small pause in between the on commands

    Please login or register to see this code.

    i use this and it seems to respond better

    Ahh ok.. will try.. thanks

    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.

    Guest
    Answer this question...

    ×   Pasted as rich text.   Paste as plain text instead

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.

    ×
    ×
    • Create New...