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


YahueV2 (Yet another Hue app, using Hue API v2)


Recommended Posts

I have started to use this QA instead of my old ChildrenOfHue QA.

My Hue integration philosophy is I use the Hue hub as the main controller as I prefer the Hue app to set&control lights + that I have other Hue integrations, like nodered.

Letting the HC3 be the zigbee controller and taking over the devices is not an option for me.

 

Please login or register to see this attachment.

v0.54 (upgradable to v0.55)

 

So, this QA imports some of the Hue resources from the Hue hub and creates QA child devices to represent them.

Please login or register to see this attachment.

 

 

It supports Hue devices/resources such as

  • door/window contact sensor
    • Implemented as a com.fibaro.doorSensor
  • motion sensor
    • Implemented as a com.fibaro.motionSensor
  • temperature sensor
    • Implemented as a com.fibaro.temperatureSensor
  • lux sensor
    • Implemented as a com.fibaro.lightSensor
  • rotary sensor
    • Implemented as a com.fibaro.multilevelSensor.
      Sets the value of the sensor 0-100 when rotary is turned.
      args={div=4} will divide reported steps with 4 - gives a smoother turning.
  • button dimmer/switch remote
    • Implemented as a com.fibaro.remoteControll
      Sends centralSceneEvents, "Pressed","HeldDown","Released". Experimental support for double-clicks...
  • plug
    • Implemented as com.fibaro.binarySwitch
  • room & zone
    • Implemented as com.fibaro.multilevelSwitch
    • turnOff turns on light group associated to room/zone
    • turnOn recalls scene for light group if quickVar 'scene' is set to scene name. Otherwise, the light group is just turned on
    • setValue sets the dimming level of the associated light group
    • At the moment, if any light is off-line the QA will set the dead property. This way scripts can react if lights are powered off/on. It may become a configurable option...
    • Support for leveChange commands. startLevelIncrease,startLevelDecrease,and stopLevelChange. args={dimdelay=10000} sets dim cycle (0-100%) to 10s.

 

Please login or register to see this attachment.

 

Some of the Hue controllers will be realised as several QAs.

Ex. the 'Hue tap dial switch' is realised both as a button/remote control and a rotary sensor QA.

The 'Hue motion sensor' is a temperature, motion, and lux sensor and can create 3 QAs.

 

It even works with the Hue secure camera providing motion and lux sensor.

 

It does not support lights directly, but it supports rooms and zones.

(to represent lights using the HC3 UI and rgb/xy issues, makes it too cumbersome, and scenes/zones gives the control I need)

 

Rooms and zones are represented as a multilevelSwitch, providing turnOn,turnOff, and set brightness/dimming

turnOn/turnOff operates on the light group associated with the room/zone.

If the room/zone's QA has the quickAppVariable 'scene' set to a scene associated with the room/zone the scene will be recalled when doing a turnOn.

If you need the to apply different scenes, update the scene variable for the room/zone QA, before turning on.

 

To  configure what child devices to create, go into the QA file "Map" and set enabled=true for the QAs/devices to create.

If you do any changes in the Hue hub, just restart the QA, the 'Map' will be updated.

 

...and it uses the Hue v2 api that should be more efficient as it streams the events and no need to periodically poll the hub.

If you have more than one hub, install additional Yahue QAs...

 

Setting the quickAppVariable 'update' to 'yes' will download the latest version from my GitHub while preserving configuration.

 

 

Examples:

Turn on a room/zone at 30min past sunset, and turn it off 60min before sunrise. (zoon/room has deviceID 1128). Set 'scene' quickVar if you want the zone/room to turnOn with a specific scene.

Conditions triggers:

Please login or register to see this code.

Actions:

Please login or register to see this code.

 

Another example.

A Hue tap switch (deviceID 1596) with 4 buttons controlling 3 scenes for a zone (deviceId 1587) (+ turnOff)

Conditions/triggers:

Please login or register to see this code.

Actions:

Please login or register to see this code.

 

There was a bug for remotes/buttons so update to v0.53 and recreate the remote/button devices (delete them)

 

Edited by jgab
  • Like 3
Link to comment
Share on other sites

Jan,

Please login or register to see this code.

 

Link to comment
Share on other sites

  • Topic Author
  • 36 minutes ago, Sjakie said:

    Jan,

    Please login or register to see this code.

     

    The line number doesn't make sense... don't know what it is. Try to do an update (set QV 'update' to 'yes')

    Link to comment
    Share on other sites

    Hi @jgab ,

     

    Nice but very basic setup. When I wrote "very basic" I refer to missing HUE scenes. Setting color not so important, but having possibility to activate HUE scenes from HC3 is a must have. Also newer HUE lights support effects, e.g. Festavia is all about effects. Currently only few effects are available like "candle", "fire", "prism", "opal", "glisten", "sparkle" and "sunrise". Have you try these?

     

     

     

     

    Link to comment
    Share on other sites

  • Topic Author
  • Posted (edited)
    20 hours ago, Sankotronic said:

    Hi @jgab ,

     

    Nice but very basic setup. When I wrote "very basic" I refer to missing HUE scenes. Setting color not so important, but having possibility to activate HUE scenes from HC3 is a must have. Also newer HUE lights support effects, e.g. Festavia is all about effects. Currently only few effects are available like "candle", "fire", "prism", "opal", "glisten", "sparkle" and "sunrise". Have you try these?

    Yes, that's is what scenes and rooms are for - you can recall a scene for room/zone when you turn it on.

    Because zone/rooms are represented as multilevelSwitches QAs, we need to set the scene in a quickvar for the QA.

    I very seldom need to set different scenes for room/zones but when needed there is a function setScene(name) for the room/QA that sets the quickvar...

    Speed/transition and some other possible parameters could be added as other "quickvar parameters"...

    It's a real mess creating custom UIs now for QA children, so I stayed away from that.

    If you want to sparkle it can be assigned to a scene assigned to the room/zone.

    Edited by jgab
    Link to comment
    Share on other sites

  • Topic Author
  • 11 minutes ago, lux said:

    @jgab

    Please login or register to see this link.

    Yes, it's supported. It's realised as 2 different child QAs. One remote (buttons) and one multilevelSensor (the dial 0-100)

    • Like 1
    Link to comment
    Share on other sites

  • Topic Author
  • 33 minutes ago, lux said:

    @jgab Ok ,Thank you, I will purchase one!

    Yes, I have one myself, so I will make my best to have it working :-) 

    • Like 1
    Link to comment
    Share on other sites

    Jan,

    What's the format for setValue?

    Possible to set color too?
     

    Link to comment
    Share on other sites

  • Topic Author
  • Posted (edited)
    On 4/3/2024 at 10:02 AM, Sjakie said:

    Jan,

    What's the format for setValue?

    Possible to set color too?

    No, assign scenes to rooms or zones in the Hue app. The scene can define color and effects.

    You can swap scenes for a room/zone to play with different colors -see example in first post.

    Then when you turn on the room or zone QA the scene assigned to the QA  is recalled.

     

    setValue is the dimming value (e.g. brightness value 0-100%)

    Edited by jgab
    Link to comment
    Share on other sites

    @jgabIs there any example of the use of a rotary sensor for lighting or curtains? If the value of the rotary sensor is reset to 0 after a certain period of time, there may be more ways to use it. The current situation is that if the value is equal to 0, continue to rotate left without any change, and if possible, there may be negative values

    Edited by lux
    Link to comment
    Share on other sites

  • Topic Author
  • 2 hours ago, lux said:

    @jgabIs there any example of the use of a rotary sensor for lighting or curtains? If the value of the rotary sensor is reset to 0 after a certain period of time, there may be more ways to use it. The current situation is that if the value is equal to 0, continue to rotate left without any change, and if possible, there may be negative values

    How do you want it to behave? I can make it a configurable behaviour.

    min and max value, steps, and if should wrap around etc.

    Actually, min and max should be 0-100 to map to a com.fibaro.multilevelSensor

    but it could wrap around so 100->0 and 0 <- 100

    • Like 1
    Link to comment
    Share on other sites

  • Topic Author
  • Maybe also an option to map to other fibaro types. Which do you need?

    Link to comment
    Share on other sites

    • 3 weeks later...
    Posted (edited)

    @jgab I update here , But the knob effect is not ideal!
                    in eventrun4/5  i used like thiks : 2064 is hue knob ,2054 is my device

    rule("2064:value => log('name:%s',env.event.value-env.event.old);2054:value=(2054:value)+(env.event.value-env.event.old)")

    Please login or register to see this code.

     

    Edited by lux
    Link to comment
    Share on other sites

    • 2 weeks later...
    On 3/31/2024 at 12:32 PM, jgab said:

    I have started to use this QA instead of my old ChildrenOfHue QA.

    My Hue integration philosophy is I use the Hue hub as the main controller as I prefer the Hue app to set&control lights + that I have other Hue integrations, like nodered.

    Letting the HC3 be the zigbee controller and taking over the devices is not an option for me.

     

    Please login or register to see this attachment.

    v0.54 (upgradable to v0.55)

     

    So, this QA imports some of the Hue resources from the Hue hub and creates QA child devices to represent them.

    Please login or register to see this attachment.

     

     

    It supports Hue devices/resources such as

    • door/window contact sensor
      • Implemented as a com.fibaro.doorSensor
    • motion sensor
      • Implemented as a com.fibaro.motionSensor
    • temperature sensor
      • Implemented as a com.fibaro.temperatureSensor
    • lux sensor
      • Implemented as a com.fibaro.lightSensor
    • rotary sensor
      • Implemented as a com.fibaro.multilevelSensor.
        Sets the value of the sensor 0-100 when rotary is turned.
        args={div=4} will divide reported steps with 4 - gives a smoother turning.
    • button dimmer/switch remote
      • Implemented as a com.fibaro.remoteControll
        Sends centralSceneEvents, "Pressed","HeldDown","Released". Experimental support for double-clicks...
    • plug
      • Implemented as com.fibaro.binarySwitch
    • room & zone
      • Implemented as com.fibaro.multilevelSwitch
      • turnOff turns on light group associated to room/zone
      • turnOn recalls scene for light group if quickVar 'scene' is set to scene name. Otherwise, the light group is just turned on
      • setValue sets the dimming level of the associated light group
      • At the moment, if any light is off-line the QA will set the dead property. This way scripts can react if lights are powered off/on. It may become a configurable option...
      • Support for leveChange commands. startLevelIncrease,startLevelDecrease,and stopLevelChange. args={dimdelay=10000} sets dim cycle (0-100%) to 10s.

     

    Please login or register to see this attachment.

     

    Some of the Hue controllers will be realised as several QAs.

    Ex. the 'Hue tap dial switch' is realised both as a button/remote control and a rotary sensor QA.

    The 'Hue motion sensor' is a temperature, motion, and lux sensor and can create 3 QAs.

     

    It even works with the Hue secure camera providing motion and lux sensor.

     

    It does not support lights directly, but it supports rooms and zones.

    (to represent lights using the HC3 UI and rgb/xy issues, makes it too cumbersome, and scenes/zones gives the control I need)

     

    Rooms and zones are represented as a multilevelSwitch, providing turnOn,turnOff, and set brightness/dimming

    turnOn/turnOff operates on the light group associated with the room/zone.

    If the room/zone's QA has the quickAppVariable 'scene' set to a scene associated with the room/zone the scene will be recalled when doing a turnOn.

    If you need the to apply different scenes, update the scene variable for the room/zone QA, before turning on.

     

    To  configure what child devices to create, go into the QA file "Map" and set enabled=true for the QAs/devices to create.

    If you do any changes in the Hue hub, just restart the QA, the 'Map' will be updated.

     

    ...and it uses the Hue v2 api that should be more efficient as it streams the events and no need to periodically poll the hub.

    If you have more than one hub, install additional Yahue QAs...

     

    Setting the quickAppVariable 'update' to 'yes' will download the latest version from my GitHub while preserving configuration.

     

     

    Examples:

    Turn on a room/zone at 30min past sunset, and turn it off 60min before sunrise. (zoon/room has deviceID 1128). Set 'scene' quickVar if you want the zone/room to turnOn with a specific scene.

    Conditions triggers:

    Please login or register to see this code.

    Actions:

    Please login or register to see this code.

     

    Another example.

    A Hue tap switch (deviceID 1596) with 4 buttons controlling 3 scenes for a zone (deviceId 1587) (+ turnOff)

    Conditions/triggers:

    Please login or register to see this code.

    Actions:

    Please login or register to see this code.

     

    There was a bug for remotes/buttons so update to v0.53 and recreate the remote/button devices (delete them)

     

    Hi Jan, Thank you for sharing "yet another" great QA

    I share your Hue philosophy as I also prefer the Hue app to set&control lights.

    I am using the old ChildrenOfHue QA with ER5 so I am wondering if you managed to get rid of COH and how?

    I see i can dump all devices and start filtering like "light:ea3c7602-66e3-412b-b688-e83df5b16129,Bryggers 4,spot_bulb" add to the MAP ?

    im using EV5 rules like below, how do you recommend a migration path for single lights or in general ?

    Please login or register to see this code.

     

    Link to comment
    Share on other sites

  • Topic Author
  • 2 hours ago, ChristianSogaard said:

    Hi Jan, Thank you for sharing "yet another" great QA

    I share your Hue philosophy as I also prefer the Hue app to set&control lights.

    I am using the old ChildrenOfHue QA with ER5 so I am wondering if you managed to get rid of COH and how?

    I see i can dump all devices and start filtering like "light:ea3c7602-66e3-412b-b688-e83df5b16129,Bryggers 4,spot_bulb" add to the MAP ?

    im using EV5 rules like below, how do you recommend a migration path for single lights or in general ?

    Please login or register to see this code.

     

    I would suggest creating zones for the lights. 1026 one zone, {1026,1276,1275} another zone.

    Then create scenes for the zones with the colors and effects you want.

    Then you can turn on/off zones and assign them scenes to change colors.

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