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


Recommended Posts

Posted (edited)

Hi Jan

 

Running YahueV2 v0.58

 

Two observations .

 

if just one bulb is not powered in a zone, the rest of the zone fails to become "active". We had the same in COH where you made a workaround / fix for that.

Would you be able to create a setting - to ignore not powered bulbs ?

 

Please login or register to see this attachment.

 

 

Second

 

If you rename the ZONE in HUE APP - and restart QA

Its being detected in the MAP - Example below showing new name correct identified

-- 'Hue Skrivebord', Zone
 {id='cd05cb22-4479-4b9c-863e-c8724809c856', class='RoomZoneQA', enabled=true, args={}},

 

But the Child name is no being updated. - below showing old name,

Please login or register to see this attachment.

 

Edited by ChristianSogaard
Typo
  • Thanks 1
  • Topic Author
  • Posted

    Ok, the name is by design. It takes the Hue name at creation but you can then change the name of the QA to anything to suite your Fibaro QA naming scheme...

    The on status for zones may have been a bug - I pushed a new version. try it. Now it will return true if the zone is on and some bulbs are dead/disconnected. I'm using Hue's own logic to report the on/off status of a zone.

    • Thanks 1
    • 1 year later...
    Posted (edited)

    Excuse my ignorance but Im stuck on this bit...  Where's the 'map'?

     

    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.

    Excuse my ignorance but Im stuck on this bit...  Where's the 'map'?

     

     

    Edited by AndyRRR
    • 3 weeks later...
    Posted

    Jan, I started (again) with this app.

    Please login or register to see this code.

    Where to set for activating scenes main, map or HUE_V2?

    setVariable(Bladverlichting_Vol)

    setVariable(Bladverlichting_Normaal)

  • Topic Author
  • Posted

    It is using v2.

    Have you got a Map file in the QA?
    From documentation:

    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.

    Posted

    Hi :-)

    would you know why this error is popping up ?

    Please login or register to see this attachment.


     
    Im also seeing a 

    Please login or register to see this attachment.

     

  • Topic Author
  • Posted

    It seems like it can't connect to the Hue hub, or rather that getting the ."/eventstream/clip/v2" url fails.
    It will continue to retry... does it stop eventually (request succeeds) or it just constantly logs the error?
    If it's temporary I could silence the error I guess...

    But in any case there should be a proper error message.

    Posted

    Hi @jgab,

     

    Yet another very nice integration from you and thank you. You are definitely an excellent coder and teacher (even sometimes it is difficult to understand your explanations for us less technically educated in coding and usually better learn from examples than from how it works explanations :-) ). 

     

    Few questions:

    1. How to send activation of dynamic scene and specify speed to the QV? You know one that is rotating colors on all bulbs included in the room/zone.
    2. How to send effect to the specific room/zone or individual light that support this feature? 
    3. Is there a way to get current room/zone state and store it for later use with some other code? If I understand correctly, adding variable "scene" to QV can be used for that purpose, but originally when QV children are added they do not have this variable available.
    4. Why you didn't add to the map also all individual lights but only plugs? For example, I have HUE Festavia that is used individually it seems I can't use it with this QV. For example, I have room named "Other" where I put all lights that I want to control individually and not with normal room/zone. 
    5. Why there is no option to connect Yahue with HUE bridge regular way by pressing button on the bridge and then requesting new user by QV? There are users that do not know how to get user codes from the HUE bridge and definitely don't have one written down.
    6. On main QV there is no label stating at least current version which would be nice instead of needing to open console and wait there for QV to print it.

    BTW - I do not remember from where I downloaded my copy of YahueV2, but mine has only one button [Dump resources], while I can see that Christian's has two buttons and label with version. Hmmm.. I think you should keep more tidy where and how you publish your work and keep track and remove obsolete versions or have only one place for publishing. It will make your life easier when asked for support. Anyway, my YahueV2 says in console that is of v0.59 and HUEv2Engine v0.47.

     

  • Topic Author
  • Posted (edited)

    1. It can only do stuff associated with the scene - like effects. I guess dynamic scenes (rotating colors) need to be "played"? Could be an improvement. Transition time is something I have thought of but haven't had a need for myself at the moment. It do support dimming with setLevelDecrease etc... ;-)  I guess I could expose a QuickApp function to send a raw Hue command to the device...

    2. This QA differs in the way that it deals with light from traditional Hue QAs.
    The principle is that you have rooms and zones that you set up in your Hue App.

    Rooms and Zones are what you control. You turn them on or off or set din level or apply a Hue scene setting to it.

    Rooms and Zones in Yahue are realized as com.fibaro.multilevelSwitch devices.
    A device you can turn on/off/toggle and set dim level on. No color control.

    Instead you can "associate" a scene with the device with the QV setting, and it will use it when turning on.
    If you set the QV scene and then turn on the light it will recall the scene even if it was already on.

     

    Working with rooms and zones and Hue scenes instead of individual lights works well together with the Hue ap that the rest of the family uses for turning on/off and setting scenes.

     

    3. Rooms/Zones are com.fibaro.multilevelSwitch so you can query their properties (+ QV scene)

    4. See 2.

    5. Used to have that in another QA but there were complications... Maybe a separate QA to get the key?
    6. Don't you get the UI like @ChristianSogaard shows in the previous post, with the version number? Maybe you have an older version?
     

    I have my home organized in rooms (can't share devices) and zones (can share devices) that are groups of lights I want to control in a special way.
    There could be just one individual light in a zone if I wanted to control a specific light.
    So, I have zones for xmas, alarm, xmas outside, TV lights, etc. and I have rule that control those.

    Others may have another way to organize things and this QA may not fit that.


    The nice things with working on rooms and zones is that it lets the Hue hub talk to all the devices and the HC3 don't have to send commands to control each individual light. So multi light operations syncs a bit better...

    Edited by jgab
    • Like 1
    • Thanks 1
    Posted

    I am a bit lost in HUE

    At this moment Children of HUE with still to implement HUE_Connector to import on/off setting in HC3

    Thee are 12 grouped lights, some of the groups are having individual settings with 7 different values for brightness

    Color schema is at the moment basically for all groups (7) set on fixed times and some are floating >> HC3 COH.

    In COH I can change color schema without switch the light on. >>> HUE switch on/off<<<<< when I tried.

    So I need to create 7*12*7=588 scenes in HUE, seems a bit overwhelming for me

    Can I accomplish this in YahueV2??

     

    Is there another solution?

    Is the new HUE-bridge pro a solution??

    Or to stay with COH and HUE_Connector

    Please your valuable advice.

     

  • Topic Author
  • Posted (edited)

    You have your 12 groups of lights. If they are separate rooms they can be Hue rooms (rooms can't share lights)
    Otherwise if you can also make zones (that can share lights).
    So, 12 groups.

    Groups in Yahue are represented as multilevelSwitches so you can adjust the brightness for the whole group.

    Then if you have 7 different color schemas defined (Scenes in Hue terminology), you can apply the scene to the group(s)
    So, 12 groups (rooms or zones) and 7 color scenes. 12+7 = 19.

    Edited by jgab
    Posted

    Jan, perhaps to move quick appVariable "update>>yes" as QA variable, easier to find.

     

    Long story short, any idea?

    I re-aranged some lights, I had in some rooms a mix Ikea and HUE. Rooms are now HUE or Ikea. Sof ar so good.

    In HUE app no problem to operate all lights.

    Two HUE lights are to operate in swell COH and YahueV3 with a delay of around 7 seconds

    One HUE full color bulb not able to do anything with.

    Okay hard way reset HUE hub.

    Surprised Hue Hub find all lights, HUE and other brands.

    Still 7 second delay and the color bulb unable to factory reset.

    I am out of ideas.

     

     

    Posted
    On 9/3/2025 at 12:30 PM, jgab said:

    2. This QA differs in the way that it deals with light from traditional Hue QAs.
    The principle is that you have rooms and zones that you set up in your Hue App.

    Rooms and Zones are what you control. You turn them on or off or set din level or apply a Hue scene setting to it.

    Rooms and Zones in Yahue are realized as com.fibaro.multilevelSwitch devices.
    A device you can turn on/off/toggle and set dim level on. No color control.

    Instead you can "associate" a scene with the device with the QV setting, and it will use it when turning on.
    If you set the QV scene and then turn on the light it will recall the scene even if it was already on.

     

    Working with rooms and zones and Hue scenes instead of individual lights works well together with the Hue ap that the rest of the family uses for turning on/off and setting scenes.

     

    Jan,

     

    how did you handle half-working rooms? I mean one can have in hue app rooms, with broken - not communicating - lamps, and turn the room on/off. Afaik V1 API does not care about, it can be only on or off, and when one or more are offline grp was off (while app shows on etc.). How is that working on v2, half-on is on or off?

  • Topic Author
  • Posted
    14 hours ago, tinman said:

     

    Jan,

     

    how did you handle half-working rooms? I mean one can have in hue app rooms, with broken - not communicating - lamps, and turn the room on/off. Afaik V1 API does not care about, it can be only on or off, and when one or more are offline grp was off (while app shows on etc.). How is that working on v2, half-on is on or off?

    So, a group is on if any light is on and off if all lights are off. That is the standard Hue behaviour (at least in v2).
    If a light in a group is dead I would assume it's not counted into this. I have no good way to test it right now.

    The only special coding I have is for determining if a group is dead/off.
    I have a chandelier with 5 hue bulbs that I grouped into a zone. I turn them off with a mechanical switch.

    They go dead but the group itself don't go dead (don't receive a group dead status).

    So I make the group listens to its individual lights dead status and if all dead, sets the group to dead/off.

    The hue bridge can take ~2min to determine that a light is dead and send out an event.

    It's notable faster to determine when the group goes online again 5-10s.

    Posted

    Jan, perhaps handy to show last restart date and time besides the version number

    • 1 month later...
    Posted

    @jgab

    Just bought a Philips Hue bridge Pro and some ledstrips :D

    Testing this QA and filled the IP and ID of the hub (on the hub page ID , 2 lines above the IP in the app)
    only got 1 light, but it is in a Room and a zone 🤔
    and gets this:

    image.png.cf3954786615a2cbe7c96627225a053a.png
     

    • Like 1
  • Topic Author
  • Posted
    15 hours ago, Brors94 said:

    @jgab

    Just bought a Philips Hue bridge Pro and some ledstrips :D

    Testing this QA and filled the IP and ID of the hub (on the hub page ID , 2 lines above the IP in the app)
    only got 1 light, but it is in a Room and a zone 🤔
    and gets this:

    Please login or register to see this link.


     

    Looks like the Hue_User key is wrong?

    • Like 1
    • 2 weeks later...
    Posted

    @jgab I was facing the problem:

    Cytat

    timer handler failed with error: ./include/Engine.lua:608: attempt to index a nil value (field 'temperature_report')

     

    and I tried to to find a solution with AI and it told me that app crashes when temperature level is nil. But it found immediately fix for this and I tried this and it worked. So the solution was to replace this code:

    Please login or register to see this code.

    with this one:

    Please login or register to see this code.

    and this one:

    Please login or register to see this code.

     

     

    with this one:

    Please login or register to see this code.

     

     

     

    The same issue may happen with not also temperature but motion , camera_motion and light_level.

     

     

    Im not the programmer just enthusiast, but those changes in engine helped maybe you could review those? 

     

    Your QA for me is the best to handle my Hue devices so thank you very much for this!

    • Thanks 1
  • Topic Author
  • Posted
    6 hours ago, vbart said:

    @jgab I was facing the problem:

     

    and I tried to to find a solution with AI and it told me that app crashes when temperature level is nil. But it found immediately fix for this and I tried this and it worked. So the solution was to replace this code:

    Please login or register to see this code.

    with this one:

    Please login or register to see this code.

    and this one:

    Please login or register to see this code.

     

     

    with this one:

    Please login or register to see this code.

     

     

     

    The same issue may happen with not also temperature but motion , camera_motion and light_level.

     

     

    Im not the programmer just enthusiast, but those changes in engine helped maybe you could review those? 

     

    Your QA for me is the best to handle my Hue devices so thank you very much for this!

    Thanks, will have a look into this and release a new version.

    • 2 weeks later...
  • Topic Author
  • Posted

    I have pushed v 0.48 with a more defensive way of accessing hue properties...

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