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

How to disable a trigger from another scene


Figlio

Question

HI all,

 

Is there a way to disable a scene (which is triggered by a change in value) from another scene.

 

Situation:

I have a simple scene that sets the light at 75% when i change the value of another device (mco home touch pad).

 

Now I want to create another scene that sets the light at say 25%. However, i do need to change de value of the mco home because otherwise the light has no power (the mco home is also a non z-wave device).

 

How could I prefend the first scene from putting the light at 75% and running only the second scene?

 

Hope you could help.

 

Ciao

Figlio

Link to comment
Share on other sites

8 answers to this question

Recommended Posts

  • 0
  • Inquirer
  • I guess I could but than i might have to change the 75% in two scenes when i wish to change that value.

     

    I think I solved it though by creating a global variable being set in the second scene to 1 in the beginning and back to 2 at the end.

     

    I experience something strange though which I am not sure i caused by this or something else. It seems that I have to run the scene twice to have the correct dim values set. The first time the scene runs it restores the dim value of the last setting of the light. Any idea what can cause this?

    Link to comment
    Share on other sites

    • 0

    Sir, can you not used two scenes and write a single scene for both cases? 

    for example, create a scene with %% autostart and while true do  fibaro:sleep(1*1000) end

    or

    pass arguments to scene call 

     

    Please login or register to see this code.

    pass POST body like

    {"args":["blabla", 777]}

     

    Please login or register to see this image.

     

     

    PZjY4p6whA.png

     

     

     

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • Thanks 10der for your reply. I am not sure i understand what you mean with your post, though...

     

    The problem is not in the two scene's anymore. It is just the first one, which as it seems not all actions are performed when I run it.

     

    When I ran my scene 3 times after I manually set the lights at 100% and then turned them all off.

    Please find the debug in the screenshot. As you can see it actually took three times to actually set the right values.

     

    How can i solve this?

     

    Please find my scene here:

    Please login or register to see this code.

     

     

    Please login or register to see this attachment.

    [coe

    Link to comment
    Share on other sites

    • 0

    what happened  if you add fibaro:sleep(200) after all ?

    Please login or register to see this code.

    Link to comment
    Share on other sites

    • 0

    btw! please comment -- all lines with 

    Please login or register to see this code.

     

    command!

     

    AFAIR turnon command restored prev value what device saved after off.

     

     

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • Issue is solved... Thanks for your help @10der.

    This worked for me

    <code>

    --[[
    %% properties
    %% events
    %% globals
    --]]

    local DimSchuifpui
    local DimKeuken
    local DimBank1
    local DimBank2
    local DimBank3
    local DimEntree

    fibaro:setGlobal('SceneStart', 1);

    fibaro:call(22, "turnOff"); --Schakelaar Schuifpui
    --fibaro:call(26, "setValue", "0") --Zet Schuifpui op 0%

    fibaro:call(21, "turnOn"); --Schakelaar Keuken
    fibaro:call(28, "setValue", "25") --Zet Keuken op 25%

    fibaro:call(24, "turnOn"); --Schakelaar Bank
    fibaro:call(100, "setValue", "0") --Zet Bank1 uit
    fibaro:call(102, "setValue", "0") --Zet Bank2 uit
    fibaro:call(106, "setValue", "10") --Zet Bank3 op 10%

    fibaro:call(94, "turnOff"); --Schakelaar Entree
    --fibaro:call(64, "setValue", "0") --Zet Entree op %

    fibaro:sleep(500)

    DimSchuifpui = fibaro:getValue (26, "value")
    DimKeuken = fibaro:getValue (28, "value")
    DimBank1 = fibaro:getValue (100, "value")
    DimBank2 = fibaro:getValue (102, "value")
    DimBank3 = fibaro:getValue (106, "value")
    DimEntree = fibaro:getValue (64, "value")

    fibaro:debug( 'Schuifpui staat nu op = ' .. DimSchuifpui)
    fibaro:debug( 'Keuken staat nu op = ' .. DimKeuken)
    fibaro:debug( 'Bank1 staat nu op = ' .. DimBank1)
    fibaro:debug( 'Bank2 staat nu op = ' .. DimBank2)
    fibaro:debug( 'Bank3 staat nu op = ' .. DimBank3)
    fibaro:debug( 'Entree staat nu op = ' .. DimEntree)

    fibaro:setGlobal('SceneStart', 2)

    </code>

     

    Link to comment
    Share on other sites

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