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


Question

Posted

Hi,

 

I've created a scene for Flood Sensor.

 

I want that the Hue Light turn on a bulbs with a Red Color.

 

How can I do that with LUA?

 

I use @Sankotronic VD AIO.
 

Thanks

3 answers to this question

Recommended Posts

  • 0
Posted (edited)

Hello,

 

 

you can use Sankotronics "UNIVERSAL ALARM SCENE -- FIRE/FLOOD/OTHER DETECTION"

 

 

 

then add in this section:

 

-- use this function to add code that will be executed after all other
-- code when sensor is breached
function extraUserCodeBreachLast()
  -- your code goes here
  fibaro:call(your AOI VD ID, "setSlider", "3", "100") <--- this is brightness 100%
  fibaro:sleep(1*200)
  fibaro:call(your AOI VD ID, "setSlider", "4", "0")   <--- this is RED
  fibaro:sleep(1*100)
  fibaro:call(your AOI VD ID, "setSlider", "5", "100")  <---  this is saturation 100%
  fibaro:sleep(1*100)

 

to switch them off you can also add this to the safe state section:

 

-- use this function to add code that will be executed when sensor is
-- back to safe state
function extraUserCodeSafe()
  -- your code goes here
fibaro:callyour AOI VD ID, "pressButton", "1") <--- this switch off(or On) the light

 

But if you wan't to use the the global variable table HueMain you have to read the manual and use the described commands.

fibaro:call(hueID, “setSlider”, hM[hueID].hueSli, value) for red you have to use value 0 or 100

 

 

? Manuel

Edited by FunkFib
  • 0
  • Inquirer
  • Posted

    Hi,

     

    I use @Sankotronic 's scene.

     

    But I don't know how to send the command to set the color of hue on red.

    • 0
    Posted

    Hi @MarcoTorino71 ,

     

    with HUE AIO VD you also downloaded User manual. In manual it is explained how to control VD from other code and even how to use ALERT button from other code. Just read chapter 4.2 and 4.3 :-)

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