Philips Hue integration unreliable?

I have close to 40 Hues in my house, they work very good with the iOS aps out there but controlling them through hass turns out to be a struggle.

It’s more often than not a lamp isn’t reaction on a command until it’s resent. This happens when toggling on/off through the gui and from the script.

I have setup a group of six Hue in my bathroom and after issuing a light.turn_off command it’s often one lamp still on and it’s random lights. I’ve rebooted both hass and the Hue (2.0) bridge without any change in behavior.

Have anyone else experienced this? Maybe even found a solution?
(I read that someone used curl to trigger internal scenes in the bridge, that could be a solution and a route I’ll be taking anyway but I still want to know if this is the expected behavior or not.)

The closest I can come to this is when running group shutdowns from Wink shortcuts (not through HA, through the app or triggered from the Wink Relay switch); there’s a little lag and some lights shut off quicker than others. But I also have a mix of lightstrips and floods so that may also play into it.

And here I thought I was bad because I have a 3 pack lightstrips I bought on sale that I still haven’t figured out what to do with yet!

I have never had any problems like you describe, but I only have 3 bulbs.

I do sometimes have some hues randomly switching on or off or changing brightness. However I have no idea whether this is hass related or not

From the Hue FAQ.

How many commands you can send per second?
You can send commands to the lights too fast. If you stay roughly around 10 commands per second to the /lights resource as maximum you should be fine. For /groups commands you should keep to a maximum of 1 per second.

http://www.developers.meethue.com/faq-page

So maybe the HA Hue implementation sends color, brightness and on commands as separate calls? That would be 6+6+6 = 18 commands in a few msec… But it don’t explain why it won’t shut off all lamps though…

1 Like

No, it sends all commands as one call.

But it sends a separate command for each bulb, even if they are in one group.
So it might be that it sends the commands to the six bulbs too fast, and the last command is ignored by the Hue hub?

Could be easily tested by writing a script with a sleep statement in between each on/off. :slight_smile:

The sleep statement was exactly what I was looking for last night, but as I’m a total hass noob I didn’t figure out how.

Could you give me an example?

I gave the integrated hue feature a go, but in the end, it just wasn’t stable enough and lacked some of the features I was getting using HA Bridge, so I’ve gone back… guess I need to stick with the old saying… don’t fix what ain’t broken :slight_smile:

Just in case none of you have heard of it, HA Bridge is absolutely fantastic at integrating your hue with home-assistant and Amazon Echo. Nice, clean web interface to manage your devices, works with ANY api out there, so you can integrate not only hue devices with home-assitant and Alexa, but you can integrate any API calls to any service anywhere and utilize them with Alexa!

In fact, one of my houses doesn’t even have any hue bridges or bulbs, but I use HA Bridge exclusively to control the entire house with Alexa!

1 Like

I’ll try to write something tonight when I get home in ~10 hours. =)

If you would like to give it a try yourself you got just about all you need in the getting started guide for scripts.

I’d heard of it, but largely in passing. Your description of it sounds more like something I could make use of so I intend to look into it when I get back from the client site.

Thanks!

I did this script and tested a few times with just switching on lamps, no problems…
The added the color and brightness and at the first attempt one lamp failed to turn on.

script:
  bathroom_timer_on:
    alias: "Turn on lamp and set timer"
    sequence:
      # Cancel ev. old timers
      - service: script.turn_off
        data:
           entity_id: script.bathroom_timer_off
      - service: light.turn_on
        data:
          entity_id: group.bathroom
          brightness: 60
          rgb_color: [ 209, 104, 30 ]
      # Set new timer
      - service: script.turn_on
        data:
          entity_id: script.bathroom_timer_off

  bathroom_timer_off:
    alias: "Turn off lamps after 1 minute"
    sequence:
      - delay:
          minutes: 1
      - service: light.turn_off
        data:
          entity_id: group.bathroom
2 Likes

FYI: I’ve been having that same kind of issue lately. In my case it was because the Hue Hub wasn’t getting status back from the lights, but the lights themselves were still responding to commands.

Unless you set allow_unreachable (https://home-assistant.io/components/light.hue/) HA seems to take the the unreachable status as a hard error and you can’t toggle them on or off.

If you’re having this issue, give that setting a try and see if it helps!

1 Like

God info, I will try that out.
But or now I switched over to curl and calling scenes in the bridge directly instead.

This is great to hear as I am an absolute noob to this. My Raspberry Pi 3 is coming today and I bought 2 Philip Hues last night. Can you point me in a direction to help my learning curve? Thanks!!!