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

Making a Scene automaticly activate (solved)


Question

Posted (edited)

Hi, I'm having trouble getting my scene to activate automaticly when a action is done. I have to manually click "start" for the scene to begin.

 

Please login or register to see this code.

21 = my Hue lamp

27 = Fibaro switch

 

I want the switch to turn on automaticly when the Hue light is turned off, and vice versa.

Edited by imLiquid

8 answers to this question

Recommended Posts

  • 0
Posted

Please login or register to see this code.

 

  • 0
  • Inquirer
  • Posted

    @10der Sorry I also had the top bit, just forgot to post it. 

    thought when it was grayed out it was not active.

     

    so basicly you posted the same code as mine.

    • 0
    Posted (edited)

    I see you're checking not "value", but "on" state... is it correct?

    I think in this case you need to set as follow

    Please login or register to see this code.

    Please verify the device (21) properties...

    In browser type follow link

    http://hc2IP/api/devices/21

     

     

     

     

    Edited by cag014
    • 0
  • Inquirer
  • Posted

    @cag014 This is correct. because it's a Hue light. 

     

    value of "on" is true or false

     

    and the change to 

    Please login or register to see this code.

    Please login or register to see this code.

    worked perfectly :D. thank you so much.

    • 0
    Posted
    On 4/15/2019 at 8:07 AM, 10der said:

    Please login or register to see this code.

     

     

    Since im still practicing with LUA, i wanted to ask..

     

    is the " local startSource = fibaro:getSourceTrigger(); " needed in this case even if it is not used as part of the scene?

    • 0
    Posted
    2 minutes ago, TN92 said:

    s the " local startSource = fibaro:getSourceTrigger(); " needed in this case even if it is not used as part of the scene?

    example for using :getSourceTrigger

     

    [two switches - one lighting]

     

    Please login or register to see this code.

     

    • 0
    Posted

    So in a case where i am using a global variable and one device value to trigger a scene, the startSource would not be very important?

     

    8 minutes ago, 10der said:

    Please login or register to see this code.

     

     

    For the countScenes, is there a difference if we set it inside the code or through the scene main page using the max instance drop down?

     

    I am actually having a problem with a scene that runs sometimes and sometimes does not

     

    Please login or register to see this code.

     

    Any idea what might be the problem?

     

    • 0
    Posted

    After a reboot to the HC2, all is working fine now! 

     

    Thanks for the help!

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