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


Recommended Posts

Posted

Hello guys, 

 

Ok so this is the LUA scene . Why I still get the notification? -> "Too many instances" . 

 

Can anyone help ?    Ooo , and you can use this scene for RGB . Ex : When RGB 1 is green  -> 2,3,4,etc will become green .

 

Thank you :D . 

 

--[[
%% properties
266 currentProgramID     
266 color
%% globals
--]]


if (fibaro:countScenes() > 1) then 

fibaro:abort()
end

 
local fromID = 266  --id RGBW principal
local toID = 251    --id-uri RGBW secundare separate prin virgula ","
 

function setTheColour (deviceID, colourString)
  local RGBWTable= {}
  local i = 1
 
  for value in string.gmatch(colourString,"(%d+)") do
    RGBWTable = value
    i = i + 1
  end
 
  fibaro:call(deviceID, "setColor", RGBWTable[1], RGBWTable[2], RGBWTable[3], RGBWTable[4])
end
 
local trigger = fibaro:getSourceTrigger()
if (trigger['type'] == 'property') then
  if (trigger['propertyName'] == 'currentProgramID') then
    fibaro:call(toID, 'startProgram', fibaro:getValue(fromID, 'currentProgramID'))
    if (fibaro:getValue(fromID, 'currentProgramID') == '0') then
      setTheColour(toID, fibaro:getValue(fromID, 'color'))
    end
  elseif (trigger['propertyName'] == 'color') then
    if (fibaro:getValue(fromID, 'currentProgramID') == '0') then
      setTheColour(toID, fibaro:getValue(fromID, 'color'))
    end
  end
end

Posted

I raised MAX running instances from 2 to 4 and have bold-ed code in my scenes and no more warnings. On 4.100 there is info for each scene when is triggered and how many instances is running and it is always 1.

  • Topic Author
  • Posted

    Thanks , I will try it !

     

    • 3 weeks later...
    Posted

    And Daneasa is it working for you?

    • 2 weeks later...
  • Topic Author
  • Posted

    Yes , is working .

     

    Thank you.

    Join the conversation

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

    Guest
    Reply to this topic...

    ×   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...