Hue lamps with Homebridge and CBus

Discussion in 'Voice Control' started by DarylMc, Oct 1, 2017.

  1. DarylMc

    DarylMc

    Joined:
    Mar 24, 2006
    Messages:
    1,270
    Likes Received:
    44
    Location:
    Cleveland, QLD, Australia
    Edit I've found this all a little hard to explain and tried a lot of different things.
    My apologies if it is hard to follow.
    Will update and maybe delete a few things once I figure out a proper method.
    It all relies on you having Homebridge CBus running


    I had a play with Philips Hue lamps and Homekit app last night.
    You can add the Hue bridge as well as Homebridge bridge into the app.
    That gets all your Hue lamps on the phone interface alongside your Homebridge devices.

    In the app Automation section I created 2 new automations.
    One when Hue (group) turns on to turn on Hue all lamps to 100%
    Another when Hue turns off to turn all off.

    I selected a CBus group address and grouped it in the app, group name Hue to four Hue lamps.
    5 items.
    So the CBus group address is one of the 5 items in that group.
    They are all meant to respond as one accessory.

    I set a CBus key input to on/off (dimmer was no good) for that CBus group address and now I have on off control of the Hue lamps from the key switch.
    In config.json you still want to have the accessory set as a dimmer.

    At the moment I just have the Hue's plugged into power.
    That's probably pretty good for a bedside lamp and you can set a CBus key input to control it if you like.

    Ideally I think they should go on a relay channel if you are using them for the main lighting in a room.
    Definitely don't use a dimmer channel.
    Maybe I will try setting up a long press to toggle the relay channel as this could be a handy thing to reset the lamp colour or turn the lights on and off without relying on other gadgets.

    Hey don't go out and buy some Hues just on my say so.
    I haven't used it long enough to find any faults but if anyone who has some wants to give it a go and discuss would be great.
     
    Last edited by a moderator: Oct 8, 2017
    DarylMc, Oct 1, 2017
    #1
    1. Advertisements

  2. DarylMc

    DarylMc

    Joined:
    Mar 24, 2006
    Messages:
    1,270
    Likes Received:
    44
    Location:
    Cleveland, QLD, Australia
    I'm still very much testing the Hue lamps.
    I know it's a bit ugly but I was considering using 4 in some recessed fittings to replace some halogen downlights in a bedroom.
    Colour changing sounds nice right?

    Found a few bugs with names chosen regarding voice control.
    So for now I have changed CBus group address to name "HUE" in config.json
    Homebridge function "dimmer"
    Changed CBus tag to "HUE" in Toolkit.
    CBus key input on/off
    Created the on and off automations in Home app.
    Then grouped the 4 Hue lamps and HUE CBus group in the Home app.
    All 5 accessories are in Home app room "bedroom".

    Seems almost flawless so far.
    Only one problem.
    If the lights are off and I say "hey Siri set Hue to purple"
    It then seems to realise that the CBus group address can't do that and only turns on the Hue bulbs.
    Therefore the key input does not respond.
    If the lights are on eg "turn Hue on" then the colour change command doesn't seem to be a problem.
    Key input still works, voice still works, Home interface still works, the CBus group address and therefore key input LED has just become out of sync.
    I think I can live with that.
    Multiple rooms with Hue lamps might produce some more naming issues.

    So now to test a bit more and see if Homebridge and Hue Bridge can run reliably enough for me to be bothered after the novelty wears off.
    That does happen.
    I've had the Hue bulbs for several years now.
     
    Last edited by a moderator: Oct 1, 2017
    DarylMc, Oct 1, 2017
    #2
    1. Advertisements

  3. DarylMc

    Twistz

    Joined:
    Nov 7, 2010
    Messages:
    23
    Likes Received:
    0
    Location:
    Melbourne
    Hue lamps

    Will give this a go when apple finally deliver my apple tv
    Regards
    Twistz
     
    Last edited by a moderator: Oct 5, 2017
    Twistz, Oct 5, 2017
    #3
  4. DarylMc

    DarylMc

    Joined:
    Mar 24, 2006
    Messages:
    1,270
    Likes Received:
    44
    Location:
    Cleveland, QLD, Australia
    One benefit aside from CBus key input control over the Hue lamps is also being able to use CBus motion sensor.

    I had some undesirable results with voice control so I have changed the names of everything again.
    Homekit can assign accessories to rooms.
    For my Hue lamps I just named them Hue assigned to room Bedroom.
    I also named the CBus group address Hue and assigned to room Bedroom.
    Also assigned that name in config.json

    So if I said turn off bedroom lights it would turn off everything in the room bedroom which it thought were lights including the AC and motion sensor disable.

    Now I have changed the name Hue to Bedroom Lights across the board.
    Assigned them to room Bedroom.
    Added the on off Automations.
    Then grouped all 5 which consists of 4 Hues and 1 CBus group address.
    I think the critical difference is that I added bedroom to the name of the accessory as well as assign to a room.

    I'm almost certain this is going to be pretty solid now.

    I don't know how but now if I set a colour by voice while the bedroom lights are on.
    (Actually I think that can all be set in the Automation)
    Then when I turn the lights off.
    When I turn them on they come back on to warm white colour at the set dimming level.
    I think that's great.

    If the lights are off and I ask for a colour the CBus group address does not turn on but all the Hues go that colour 100% brightness.
    I think I can live with that.
    So I just need to make sure the lights are on before asking for a colour and if I turn them off and on they go back to warm white anyway.
    Called Topaz by Siri.

    I suppose the next thing to try would be assigning some colours to a CBus key input and see how that goes.
     
    Last edited by a moderator: Oct 7, 2017
    DarylMc, Oct 6, 2017
    #4
  5. DarylMc

    Twistz

    Joined:
    Nov 7, 2010
    Messages:
    23
    Likes Received:
    0
    Location:
    Melbourne
    Siri

    I also found changing name tags to something Siri likes helps voice commands work better will be able to try some automations tomorrow when my new apple tv gets delivered
    Twistz
     
    Twistz, Oct 7, 2017
    #5
  6. DarylMc

    DarylMc

    Joined:
    Mar 24, 2006
    Messages:
    1,270
    Likes Received:
    44
    Location:
    Cleveland, QLD, Australia
    I added a new CBus group address to a unused key input (on/off) to use with a colour.
    Put that into config.json as a dimmer accessory

    For anyone using Homebridge I think it is wise to stop Homebridge before making changes.
    In my case since Homebridge is running as a service
    sudo systemctl stop homebridge
    Make your changes.
    Then a reboot.

    Because I had already grouped the Hue lamps to another CBus address I could not group the Hues with another CBus address.

    For the colour CBus key input I was able to set colour and brightness for each lamp in the Automation section of Homekit.
    Maybe using the group accessories function is not needed for this project.
    I just tried it and I think the results are much better just using the settings in automation.
    Don't bother using the group accessory function.

    Still very much a work in progress.

    Tip
    To set a colour in automation.
    It picks up your current colour.
    So use voice control to set all lamps to the colour and brightness you want first.
     
    Last edited by a moderator: Oct 8, 2017
    DarylMc, Oct 8, 2017
    #6
  7. DarylMc

    DarylMc

    Joined:
    Mar 24, 2006
    Messages:
    1,270
    Likes Received:
    44
    Location:
    Cleveland, QLD, Australia
    That all seems to be working well now.
    Status indication is not working properly unless you turn off a colour before turning on another.
    You can still change the Hues by voice control or using a key input but CBus status won't be correct.
    I edited the original post to mention I've made a lot of changes.
    Will try to document it properly soon.
     
    Last edited by a moderator: Oct 8, 2017
    DarylMc, Oct 8, 2017
    #7
  8. DarylMc

    DarylMc

    Joined:
    Mar 24, 2006
    Messages:
    1,270
    Likes Received:
    44
    Location:
    Cleveland, QLD, Australia
    If you want to keep status indication working properly while changing colours the option is don't use multiple key inputs for colour selection, just use voice control.
     
    Last edited by a moderator: Oct 8, 2017
    DarylMc, Oct 8, 2017
    #8
  9. DarylMc

    Twistz

    Joined:
    Nov 7, 2010
    Messages:
    23
    Likes Received:
    0
    Location:
    Melbourne
    hue lamps

    all working ok darylMc control my bed side lamps with my bedside dlts after setup automation's in home-kit

    regards
    twistz
     
    Twistz, Oct 11, 2017
    #9
  10. DarylMc

    DarylMc

    Joined:
    Mar 24, 2006
    Messages:
    1,270
    Likes Received:
    44
    Location:
    Cleveland, QLD, Australia
    Nice work.
    I was pretty excited to get that going.
    I've had the bulbs sitting around for years hoping it would be possible.
     
    DarylMc, Oct 11, 2017
    #10
  11. DarylMc

    DarylMc

    Joined:
    Mar 24, 2006
    Messages:
    1,270
    Likes Received:
    44
    Location:
    Cleveland, QLD, Australia
    Last edited: Jan 25, 2018
    DarylMc, Jan 25, 2018
    #11
    Mr Mark and lcrowhurst like this.
  12. DarylMc

    cmlp

    Joined:
    Feb 5, 2008
    Messages:
    32
    Likes Received:
    2
    Location:
    Melbourne, Australia.
    I’ve just also been experimenting with a Hue bulb and matched GAs and AppleTV automation. I can setup automations such that one particular GA programmed to an input unit type will trigger a HomeKit scene setting the hue bulb a certain colour, say. All very nice.

    Any thoughts on how a key on an input unit set to the dimmer function might link to dimming a hue bulb? I can’t think how this could be achieved.

    Edit: That’s probably not clear enough. What I’m wondering is whether a long press on an input unit could ramp up/down the hue bulb.’

    Edit Edit: Looks like iOS 11.3 will have substantial updates regarding dimming of Hue bulbs. The homebridge-hue developer and otters are discussing this currently: https://github.com/ebaauw/homebridge-hue/issues/54

    This makes me think more about how homebridge plugins do/don’t/should/could interoperate. More research and tinkering required...
     
    Last edited: Feb 14, 2018
    cmlp, Feb 14, 2018
    #12
  13. DarylMc

    DarylMc

    Joined:
    Mar 24, 2006
    Messages:
    1,270
    Likes Received:
    44
    Location:
    Cleveland, QLD, Australia
    @cmlp
    I tried using dimmer function on the key input without much success.
    Now I just use on off for the key input.
    To dim the hues I use voice or the phone interface.

    I haven't found automation functions to be 100% reliable
    I don't think that is Homebridge but the Home app itself.

    Perhaps MQQT is worth a look at.
     
    DarylMc, Feb 14, 2018
    #13
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.