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

Question

Posted

Hi,

 

i have a scene to control my blinds, it basically does what it should do, the only problem i face is, that it starts more than just once.

I would like to abort the scene if it was started before and its not finished, means the blades of blinds are back to 100.

 

--[[

%% properties
12 value
10 value
26 value
30 value
34 value
24 value
32 value
28 value
38 value
12 sceneActivation
10 sceneActivation
26 sceneActivation
30 sceneActivation
34 sceneActivation
24 sceneActivation
32 sceneActivation
28 sceneActivation
38 sceneActivation
3 WeatherConditionConverted
%% globals
Tageszeit
--]]
 
local startSource = fibaro:getSourceTrigger();
if fibaro:countScenes() > 1 then fibaro:abort() end
if (
 ( fibaro:getGlobalValue("Tageszeit") == "Sunrise"  and  fibaro:getValue(3, "WeatherConditionConverted") == "clear"  and  tonumber(fibaro:getValue(12, "value")) <= 10  and  tonumber(fibaro:getValue(10, "value")) <= 10  and  tonumber(fibaro:getValue(26, "value")) <= 10  and  tonumber(fibaro:getValue(30, "value")) <= 10  and  tonumber(fibaro:getValue(34, "value")) <= 10  and  tonumber(fibaro:getValue(24, "value")) <= 10  and  tonumber(fibaro:getValue(32, "value")) <= 10  and  tonumber(fibaro:getValue(28, "value")) <= 10  and  tonumber(fibaro:getValue(38, "value")) <= 10)
or
startSource["type"] == "other"
)   
then
fibaro:call(12, "setValue2", "0");
fibaro:call(10, "setValue2", "0");
fibaro:call(26, "setValue2", "0");
fibaro:call(30, "setValue2", "0");
fibaro:call(34, "setValue2", "0");
fibaro:call(24, "setValue2", "0");
fibaro:call(32, "setValue2", "0");
fibaro:call(28, "setValue2", "0");
fibaro:call(38, "setValue2", "0");
fibaro:call(12, "setValue2", "50");
fibaro:call(10, "setValue2", "50");
fibaro:call(26, "setValue2", "50");
fibaro:call(30, "setValue2", "50");
fibaro:call(34, "setValue2", "50");
fibaro:call(24, "setValue2", "50");
fibaro:call(32, "setValue2", "50");
fibaro:call(28, "setValue2", "50");
fibaro:call(38, "setValue2", "50");
  elseif ( fibaro:getGlobalValue("Tageszeit") == "Sunrise" and (fibaro:getValue(3, "WeatherConditionConverted")) ~= "clear")
then 
    fibaro:call(12, "setValue2", "100");
fibaro:call(10, "setValue2", "100");
fibaro:call(26, "setValue2", "100");
fibaro:call(30, "setValue2", "100");
fibaro:call(34, "setValue2", "100");
fibaro:call(24, "setValue2", "100");
fibaro:call(32, "setValue2", "100");
fibaro:call(28, "setValue2", "100");
fibaro:call(38, "setValue2", "100");
end
 
any idea

3 answers to this question

Recommended Posts

  • 0
Posted

Not too good on Lua but if the scene is starting again and again, I would try and check if the Scene is enabled just when you check the scene count using

 

fibaro:isSceneEnabled.

 

May be set it to disabled using

 

fibaro:setSceneEnabled(x, false)

 

and then at the end set it to true. That may get around this issue.

  • 0
Posted

What do you mean it is starting more than once? Do you mean that when a single trigger happens that more than one scene starts?

 

If you are on version 4.040 then there is a bug where scene activation on dimmers results in two scenes starting instead of one.

 

If  this is the case then change "if fibaro:countScenes() > 1 then fibaro:abort() end" to "if fibaro:countScenes() > 2 then fibaro:abort() end"

  • 0
  • Inquirer
  • Posted

    it starts automatically as soon as all values are fulfilled, the problem i have it starts over and over again. i want it to start as soon as its sunny to lower the blinds and than stop until its cloudy again.

    so far it starts every 2 - 3 minutes lowering the blinds again even though i put the scene count

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