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


HC3 QuickApps coding - tips and tricks


jgab

Recommended Posts

  • Topic Author
  • It seems like these lights don't have a bri attribute?

    What are they?

    When you do a list what Hue type do they report?

    It seems like they are either

    "Color light" or "Color temperature light"

     

    "Color light" should have bri attributes.

    "Color temperature light" don't have a bri value and needs another approach to dimming...

    Link to comment
    Share on other sites

    13 minutes ago, jgab said:

    It seems like these lights don't have a bri attribute?

    What are they?

    When you do a list what Hue type do they report?

    It seems like they are either

    "Color light" or "Color temperature light"

     

    "Color light" should have bri attributes.

    "Color temperature light" don't have a bri value and needs another approach to dimming...

    Do you mean this info ?

    both bulb misbehave ;-)

    [10.11.2020] [17:23:01] [TRACE] [QUICKAPP812]: Dimmable_light inited, hueId:10, deviceId:814

    [10.11.2020] [17:23:02] [TRACE] [QUICKAPP812]: Extended_color_light inited, hueId:38, deviceId:839

     

    Link to comment
    Share on other sites

    2 minutes ago, ChristianSogaard said:

    Do you mean this info ?

    both bulb misbehave ;-)

    [10.11.2020] [17:23:01] [TRACE] [QUICKAPP812]: Dimmable_light inited, hueId:10, deviceId:814

    [10.11.2020] [17:23:02] [TRACE] [QUICKAPP812]: Extended_color_light inited, hueId:38, deviceId:839

     

     

    deviceId:814 = Hue Dimmable (model id LWB006/LWB007) – white, 2700K only

    Please login or register to see this link.

    deviceId:839 = lct001 - 3 gen Hue White Ambiance 

    Link to comment
    Share on other sites

    13 minutes ago, ChristianSogaard said:

     

    deviceId:814 = Hue Dimmable (model id LWB006/LWB007) – white, 2700K only

    Please login or register to see this link.

    deviceId:839 = lct001 - 3 gen Hue White Ambiance 

    List detects following four Bulb types in my system

    • Color temperature light
    • Extended color light
    • Color light
    • Dimmable light 

    Please login or register to see this attachment.

    Link to comment
    Share on other sites

  • Topic Author
  • Ok, I don't have that dimmable light model.

     

    Can you get the Hue definition from the bridge?

     

    If you follow this guide to get into the clip debuger

    Please login or register to see this link.

     

    and then you GET the command

     

    /api/<your Hue key>/lights/<Hue id of device 814>

     

    The Hue id is listed when with the "List" button in the QA UI.

     

    It's a json table. I have a dimmable light (LWA001) that looks like this and works well with the QA (dim/turn on /off etc)

    Please login or register to see this code.

     

    Link to comment
    Share on other sites

  • Topic Author
  • The "Color temperature light" light does not have a brightness (bri) attribute and can't be dimmed the normal way. I guess one could lower the temperature ct value... 

    Link to comment
    Share on other sites

    39 minutes ago, jgab said:

    Ok, I don't have that dimmable light model.

     

    Can you get the Hue definition from the bridge?

     

    If you follow this guide to get into the clip debuger

    Please login or register to see this link.

     

    and then you GET the command

     

    /api/<your Hue key>/lights/<Hue id of device 814>

     

    The Hue id is listed when with the "List" button in the QA UI.

     

    It's a json table. I have a dimmable light (LWA001) that looks like this and works well with the QA (dim/turn on /off etc)

    Please login or register to see this code.

     

    {
        "state": {
            "on": true,
            "bri": 254,
            "alert": "select",
            "mode": "homeautomation",
            "reachable": true
        },
        "swupdate": {
            "state": "noupdates",
            "lastinstall": "2020-03-09T13:21:23"
        },
        "type": "Dimmable light",
        "name": "Skrivebord",
        "modelid": "LWB006",
        "manufacturername": "Signify Netherlands B.V.",
        "productname": "Hue white lamp",
        "capabilities": {
            "certified": true,
            "control": {
                "mindimlevel": 2000,
                "maxlumen": 800
            },
            "streaming": {
                "renderer": false,
                "proxy": false
            }
        },
        "config": {
            "archetype": "classicbulb",
            "function": "functional",
            "direction": "omnidirectional",
            "startup": {
                "mode": "safety",
                "configured": true
            }
        },
        "uniqueid": "00:17:88:01:10:4d:a5:c7-0b",
        "swversion": "5.130.1.30000"
    }

     

    And NExt One 

     

    {
        "state": {
            "on": true,
            "bri": 254,
            "hue": 14988,
            "sat": 141,
            "effect": "none",
            "xy": [
                0.4575,
                0.4101
            ],
            "ct": 366,
            "alert": "select",
            "colormode": "ct",
            "mode": "homeautomation",
            "reachable": true
        },
        "swupdate": {
            "state": "noupdates",
            "lastinstall": "2018-12-23T11:12:31"
        },
        "type": "Extended color light",
        "name": "Klint",
        "modelid": "LCT001",
        "manufacturername": "Signify Netherlands B.V.",
        "productname": "Hue color lamp",
        "capabilities": {
            "certified": true,
            "control": {
                "mindimlevel": 5000,
                "maxlumen": 600,
                "colorgamuttype": "B",
                "colorgamut": [
                    [
                        0.675,
                        0.322
                    ],
                    [
                        0.409,
                        0.518
                    ],
                    [
                        0.167,
                        0.04
                    ]
                ],
                "ct": {
                    "min": 153,
                    "max": 500
                }
            },
            "streaming": {
                "renderer": true,
                "proxy": false
            }
        },
        "config": {
            "archetype": "sultanbulb",
            "function": "mixed",
            "direction": "omnidirectional",
            "startup": {
                "mode": "safety",
                "configured": true
            }
        },
        "uniqueid": "00:17:88:01:00:d0:9a:9e-0b",
        "swversion": "5.127.1.26581"
    }

     

     

     

    Link to comment
    Share on other sites

    11 minutes ago, ChristianSogaard said:

    {
        "state": {
            "on": true,
            "bri": 254,
            "alert": "select",
            "mode": "homeautomation",
            "reachable": true
        },
        "swupdate": {
            "state": "noupdates",
            "lastinstall": "2020-03-09T13:21:23"
        },
        "type": "Dimmable light",
        "name": "Skrivebord",
        "modelid": "LWB006",
        "manufacturername": "Signify Netherlands B.V.",
        "productname": "Hue white lamp",
        "capabilities": {
            "certified": true,
            "control": {
                "mindimlevel": 2000,
                "maxlumen": 800
            },
            "streaming": {
                "renderer": false,
                "proxy": false
            }
        },
        "config": {
            "archetype": "classicbulb",
            "function": "functional",
            "direction": "omnidirectional",
            "startup": {
                "mode": "safety",
                "configured": true
            }
        },
        "uniqueid": "00:17:88:01:10:4d:a5:c7-0b",
        "swversion": "5.130.1.30000"
    }

     

    And NExt One 

     

    {
        "state": {
            "on": true,
            "bri": 254,
            "hue": 14988,
            "sat": 141,
            "effect": "none",
            "xy": [
                0.4575,
                0.4101
            ],
            "ct": 366,
            "alert": "select",
            "colormode": "ct",
            "mode": "homeautomation",
            "reachable": true
        },
        "swupdate": {
            "state": "noupdates",
            "lastinstall": "2018-12-23T11:12:31"
        },
        "type": "Extended color light",
        "name": "Klint",
        "modelid": "LCT001",
        "manufacturername": "Signify Netherlands B.V.",
        "productname": "Hue color lamp",
        "capabilities": {
            "certified": true,
            "control": {
                "mindimlevel": 5000,
                "maxlumen": 600,
                "colorgamuttype": "B",
                "colorgamut": [
                    [
                        0.675,
                        0.322
                    ],
                    [
                        0.409,
                        0.518
                    ],
                    [
                        0.167,
                        0.04
                    ]
                ],
                "ct": {
                    "min": 153,
                    "max": 500
                }
            },
            "streaming": {
                "renderer": true,
                "proxy": false
            }
        },
        "config": {
            "archetype": "sultanbulb",
            "function": "mixed",
            "direction": "omnidirectional",
            "startup": {
                "mode": "safety",
                "configured": true
            }
        },
        "uniqueid": "00:17:88:01:00:d0:9a:9e-0b",
        "swversion": "5.127.1.26581"
    }

     

     

     

    Also getting 

    Please login or register to see this code.

     

    Link to comment
    Share on other sites

  • Topic Author
  • 4 hours ago, ChristianSogaard said:

    List detects following four Bulb types in my system

    • Color temperature light
    • Extended color light
    • Color light
    • Dimmable light 

    Please login or register to see this attachment.

     

    Do the extended color light work?

    The color temperature light shouldn't work -- need to think about that one....

    Color light ? I have not seen one of these but they should behave close to the extended color light.

    Dimmable light - no? -- I have a dimmable light that do work. Strange that your's don't.

    Link to comment
    Share on other sites

  • Topic Author
  • 3 minutes ago, jgab said:

     

    Do the extended color light work?

    The color temperature light shouldn't work -- need to think about that one....

    Color light ? I have not seen one of these but they should behave close to the extended color light.

    Dimmable light - no? -- I have a dimmable light that do work. Strange that your's don't.

    Please login or register to see this link.

    g @Freddan67 had a similar issue with a white hue light and my first attempt of the Hue QA. I guess that issue was that it was a color temperature light.

    Link to comment
    Share on other sites

    8 hours ago, jgab said:

     

    Do the extended color light work?

    The color temperature light shouldn't work -- need to think about that one....

    Color light ? I have not seen one of these but they should behave close to the extended color light.

    Dimmable light - no? -- I have a dimmable light that do work. Strange that your's don't.

    •  
    • Color temperature light - Dont work
    • Extended color light - works
    • Color light - havent tryed yet
    • Dimmable light - works 

    Perhaps I was not precise - sorry for that

    I have two different errors

    On - the Color temperature light dont work

    two - all bulbs are not being initiated when QA start - and I manually need to press off/on a couple of times before QA device have connection

     

     

    Link to comment
    Share on other sites

  • Topic Author
  • 1 hour ago, ChristianSogaard said:
    •  
    • Color temperature light - Dont work
    • Extended color light - works
    • Color light - havent tryed yet
    • Dimmable light - works 

    Perhaps I was not precise - sorry for that

    I have two different errors

    On - the Color temperature light dont work

    two - all bulbs are not being initiated when QA start - and I manually need to press off/on a couple of times before QA device have connection

     

     

    Ok, the color temperature light don't work - I will loan one from a friend and test it.

    For the initialisation, it can take a few seconds after the QA starts up until all devices have read their data.

    The QA connects to the Hue bridge and read all the devices and their current data and then it updates the child devices accordingly.

    So it most certainly have connection to the lights, it's just that the UI is not updated.

    I have seen issue with QA/Child UI on HC3 not getting updated correctly when I set the new values from Lua. 

    What happens if you reload the web page?

    ...or is it in the mobile app it is problems?

    Edited by jgab
    Link to comment
    Share on other sites

    1 hour ago, jgab said:

    Ok, the color temperature light don't work - I will loan one from a friend and test it.

    For the initialisation, it can take a few seconds after the QA starts up until all devices have read their data.

    The QA connects to the Hue bridge and read all the devices and their current data and then it updates the child devices accordingly.

    So it most certainly have connection to the lights, it's just that the UI is not updated.

    I have seen issue with QA/Child UI on HC3 not getting updated correctly when I set the new values from Lua. 

    What happens if you reload the web page?

    ...or is it in the mobile app it is problems?

     

    1 hour ago, jgab said:

    Ok, the color temperature light don't work - I will loan one from a friend and test it.

    For the initialisation, it can take a few seconds after the QA starts up until all devices have read their data.

    The QA connects to the Hue bridge and read all the devices and their current data and then it updates the child devices accordingly.

    So it most certainly have connection to the lights, it's just that the UI is not updated.

    I have seen issue with QA/Child UI on HC3 not getting updated correctly when I set the new values from Lua. 

    What happens if you reload the web page?

    ...or is it in the mobile app it is problems?

    :-) Thank you for putting so much energy in this - its highly appreciated.

     I primary test from my Mac - i dont use the APP much - i use google assistant instead.

    if you cant loan one from a friend, PM me, and I will send you one to keep - i have two.

    For the UI not being updated, im not sure on this, but i will do some structured test on this, you are probably right.

    Link to comment
    Share on other sites

  • Topic Author
  • v1.8 of childrenOfHue - works with "Color temperature light". If you already have generated child devices for the lamps of this type you need to delete the children (trash-can in UI for each light) and generate the lights again. They are now of type multilevelSwitch.

     

     

    • Like 1
    Link to comment
    Share on other sites

    1 hour ago, jgab said:

    v1.8 of childrenOfHue - works with "Color temperature light". If you already have generated child devices for the lamps of this type you need to delete the children (trash-can in UI for each light) and generate the lights again. They are now of type multilevelSwitch.

     

     

    Lovely ;-) I will test later..

     

    I was wondering if you are going to support Zones? - I use it in situations where i have two bulbs over a Table? - but dont want to turn on all lights in a room / Group

     

    Please login or register to see this attachment.

    Link to comment
    Share on other sites

  • Topic Author
  • I think it is the same as Groups. "Install Groups" will install the ones you have defined in the Hue app.

    I have a couple of Groups myself - also 2 bulbs over the dinning table.

    The Hue type is "Room" I think. I will install them as multilevelSwitche group so they can be turned on/off and dimmed. With Lua you can send any attribute to the group....

    Edited by jgab
    Link to comment
    Share on other sites

    4 minutes ago, jgab said:

    I think it is the same as Groups. "Install Groups" will install the ones you have defined in the Hue app.

    I have a couple of Groups myself - also 2 bulbs over the dinning table.

    I see it - its a group with type:Zone ?

     

    [11.11.2020] [13:50:23] [DEBUG] [QUICKAPP812]: Group id:22, name:Arbejdsværelse, type:Room
    [11.11.2020] [13:50:23] [DEBUG] [QUICKAPP812]: Group id:25, name:Test, type:Room
    [11.11.2020] [13:50:23] [DEBUG] [QUICKAPP812]: Group id:24, name:Spisebord, type:Zone

    Link to comment
    Share on other sites

  • Topic Author
  • 5 minutes ago, ChristianSogaard said:

    I see it - its a group with type:Zone ?

     

    [11.11.2020] [13:50:23] [DEBUG] [QUICKAPP812]: Group id:22, name:Arbejdsværelse, type:Room
    [11.11.2020] [13:50:23] [DEBUG] [QUICKAPP812]: Group id:25, name:Test, type:Room
    [11.11.2020] [13:50:23] [DEBUG] [QUICKAPP812]: Group id:24, name:Spisebord, type:Zone

     

    It seems like zones and rooms use the same api.

    What happens if you in the QA (around line 33) add

    Please login or register to see this code.

    Does it add your zones then as groups if you click "Install Groups" ?
     

    Link to comment
    Share on other sites

  • Topic Author
  • Added v1.9 that supports Zones (they are treated as Groups and installed with "Install Groups" button)

     

    Edited by jgab
    Link to comment
    Share on other sites

    21 minutes ago, jgab said:

     

    It seems like zones and rooms use the same api.

    What happens if you in the QA (around line 33) add

    Please login or register to see this code.

    Does it add your zones then as groups if you click "Install Groups" ?
     

    No - getting this

    [11.11.2020] [14:21:01] [DEBUG] [QUICKAPP812]: Can't install groups:20-Skrivebord

    .

    .

    [11.11.2020] [14:21:02] [DEBUG] [QUICKAPP812]: Can't install groups:24-Spisebord

     

    From the List UI

    [11.11.2020] [14:22:53] [DEBUG] [QUICKAPP812]: Group id:20, name:Skrivebord, type:Zone
    [11.11.2020] [14:22:53] [DEBUG] [QUICKAPP812]: Group id:13, name:Viktualierum, type:Room
    [11.11.2020] [14:22:53] [DEBUG] [QUICKAPP812]: Group id:22, name:Arbejdsværelse, type:Room
    [11.11.2020] [14:22:53] [DEBUG] [QUICKAPP812]: Group id:25, name:Test, type:Room
    [11.11.2020] [14:22:53] [DEBUG] [QUICKAPP812]: Group id:24, name:Spisebord, type:Zone

    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
    Reply to this topic...

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