[RELEASE] CoCoHue: Hue Bridge Integration (including scenes!)


I can't work out why the stats are so different in fact the upstairs hub has far fewer bulbs than the downstairs and of course, we move around more downstairs. I'm getting Severe hub CPU load detected messages so trying to reduce load

Polling probably uses more resources than eventstream, so reducing that is interval if you have eventstream enabled is probably the best thing you can do to reduce resource usage (though I still don't recommend totally disabling it). That being said, I wasn't able to notice much of a difference on my hub even when I turned the frequency way up just to test. A C-5 or later is also likely to fare better than a C-4 or earlier due to a more efficient OS/platform layer on top of otherwise similar (though not identical) hardware. Otherwise, I'm not sure, especially without the column headings to see what's what. :smiley:

How long have you waited? There is an automatic reconnection process, though it could probably be improved upon. Also, sending commands to devices should always work in the current version (this would be more about getting eventstream data in in real time); if that fails, I'd be curious what the actual error is, but it probably means your Hue Bridge itself isn't yet accessible or perhaps its IP address changed during the outage (also should be recovered from but will take a discovery cycle).

There was snow storm and with that.. there was a lot of power cuts during these two days. Longest time I waited was 1h, and after that couple of 15min waiting but it never did fixed automatically. After that I started to go Cocohue application and save settings which seems to be the way to get groups working again.

My logs are not available anymore but I believe that when next power cut comes I can take those log lines and copy them here. If I remember right it just said something like " bridge xxxxx can' reconnect".. or "cant connect". At the same time Hue was working normally and I could operate bulbs and groups normally from hue application.

hi @bertabcd1234 . Is there, by any change possibility or way to add toggle switch function to CoCohue group devices? I'm trying to build myself dashboard stuff and I would need a toggle switch function..

Hubitat Dashboard should already toggle switches: if it's on, tapping the tile will turn it off, and if it's off, tapping the tile will turn it on. "Toggle" also isn't a standard Hubitat capability, so any app that does this (Dashboard, Rule Machine, etc.) implements this on its own with some sort of logic like this. Is this not working for some reason?

1 Like

Well this is a bit different dashboard that I'm using and toggle does not work same way on My case like it normally works. Thats why I would need a toggle attribute (?) for The group.

I'm not sure I can help more without knowing specifics, then, but I'd recommend that whatever dashboard solution you're doing read the switch attribute of the group device, then send an on() if it's currently off or an off() if it's currently on. Hubitat does not have a "toggle() command" or similar as standard, and I don't think it's a good idea to clutter group (or bulb) devices with an "extra" command like this, so my suggestion is to follow the convention and implement something like this at the app level if needed.

3 Likes

I tried scanning this thread but havent found an answer. Does CoCoHue expose Hue Taps as Buttons in hubitat?

No, the v1 API doesn't expose these events in any usable fashion, and the v2 API...exposes them, but I still haven't figured out exactly how to make them usable or at least recognized with each button as part of the same device. :smiley: Philips considers the v2 API experimental still, so I'm hesitant to do much work with buttons at the moment, given how much work that would be, lest they change their mind about how this works in the future (which I find possible, given that a post on their forums a couple months ago suggested that their own developers weren't even using v2 for buttons yet).

1 Like

Bummer, if that changes keep us updated.

What Hue dev forum do you lurk on? I signed up for Login - Philips Hue Developer Program a few months back, but was wildly unimpressed with how non-active it is. The API sub-forum has only had 5 threads with activity in 2022.

That's the one. It's not super-active, but it's been more so since the v2 API was released than I remember at any point in the past. (And this level of activity is probably normal for something as niche as this, ha.) I've found some stuff on Reddit too, buti don't think there is any official support there, while they do participate a bit in the above. That's where I read the button news, four example.

Hmm, ok, thanks. I've been trying to keep a closer eye on the v2 API which (IMO) is still a mess for groups.

I saw some github chatter from the Homeassistant Hue maintainer that the v2 API is going to start doing multicast to the bulbs (so they all behave in sync with one another like on v1) in an upcoming firmware .. and I have been trying to find where chatter like this occurs in the real world.

Ha, all I had to do was complain about it here. Looks like 2 days ago Philips/Signify/whatever released the update, or so says this forum post.

Neat! I'm still using v1 for commands to the Bridge (again, waiting for v2 to stabilize a bit more before doing much else), but glad to see that what looks like a notable omission was addressed!

1 Like

Amazingly my hub has updated. It seems like it usually takes a month or more from the release of a Hue firmware before my hubs update.

Yeah, I've been experimenting with Homeassistant and so I've been kicking the tires on their Hue integration using aiohue, which uses the v2 API. It's hilarious to watch it try to turn on a room with a ton of lights one-by-one, but not usable in the real world as-is.

1 Like

@bertabcd1234 I've meant to ask this for some time. Is there a method to have a light/group flash a specific number of times using a custom command with a parameter?

No, as are as I see, they only have a way to do it once or for 15 cycles (really meant as a way to identify the bulb, like if you're adding a bunxh to the Hue Bridge network at the same time, but it happens to be usable as a sort of effect, too :slight_smile: ).

Perhaps there is a way to simulate this in the driver, a customer command "flash x times" where the driver just sends a series of x flash once commands? I've tried doing it with RM but it doesn't work reliably likely because of occasional delays in processing?