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

Hue values from QA


Lode

Question

I installed the Hue QA from Fibaro marketplace.

There are just a few things i want to do in LUA.

Retrieving the colorvalues from a bulb and the state of the bulb (on or off)

 

Is it possible to call the QA in lua and retrieve those values ?

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 0

I might have something for you. This is some LUA that checks one lamp, and the sets another to that exact state.

In the action code you can see what is needed to retrieve the color state.

This works, dont ask me to much about  it. It is al borrowed code :)

 

trigger - check if lamp 416 is on

 

Please login or register to see this code.

 

Action - check the properties of lamp 416, and set 421 to the same state.

 

Please login or register to see this code.

 

Edited by ppeterr
  • Thanks 1
Link to comment
Share on other sites

  • 0
  • Inquirer
  • Thank you so much !!!!!

    I can retrieve the state, colors, brightness......

    Except the last line in your code that doesn't seem to work.

    I was thinking the value 139 was the id of the Hue QA (in my case 734) but that doesn't work.

     

    Any idea ? @ppeterr

     

    Thanks again 😀

     

    Edited by Lode
    Link to comment
    Share on other sites

    • 0
    7 hours ago, Lode said:

    Thank you so much !!!!!

    I can retrieve the state, colors, brightness......

    Except the last line in your code that doesn't seem to work.

    I was thinking the value 139 was the id of the Hue QA (in my case 734) but that doesn't work.

     

    Any idea ? @ppeterr

     

    Thanks again 😀

     

     

    139 is indeed the Hue qa.. 

     

    I use this one for that 

     

     

    Edited by ppeterr
    • Thanks 1
    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • Thanks...

    I tried that QA but it doesn't gives me the results i want.

    Actually what i want to do is when a sensor is breached, one light has to turn green.

    First i want to look at the state of the lamp (on/off, color, brightness.....)

     

    After one minute the lamp has to turn in the previous state. (on/off, color,brightness........)

    Any suggestions ?

    Link to comment
    Share on other sites

    • 0
    4 minutes ago, Lode said:

    Thanks...

    I tried that QA but it doesn't gives me the results i want.

    Actually what i want to do is when a sensor is breached, one light has to turn green.

    First i want to look at the state of the lamp (on/off, color, brightness.....)

     

    After one minute the lamp has to turn in the previous state. (on/off, color,brightness........)

    Any suggestions ?

     

    What i would do, is make a new block scene. 

     

    sensor breached --> check state from a certain device(if color is what you want) then set a action.

     

    You can do this for sure in a block scene, also check and set the color. 

     

    Then convert it to lua, and inspect the code. And see if it is usefull for you.

    Please login or register to see this image.

    /monthly_2022_11/image.png.31acae823e57627f6795d28a7fed2fed.png" />

     

     

    Please login or register to see this attachment.

    • Thanks 1
    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • Thanks...

    Did a lot of trial and error with scenes.

    Finally i got it all working just the way i want in LUA. 😀

     

    Many thanks again.......

    Edited by Lode
    • Like 1
    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...