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

Can't say for sure, but I'm guessing that they might be like the Ikea color bulbs I've used that support only xy color and not hue/saturation. Similar to the issue with the device asked about in this post and the few posts after:

2 Likes

I am throwing out one of my connected lightbulbs. I've disconnected the device from all apps, how do I get rid of the connection listed in CoCoHue? Just delete the bulb from the hubitat device list?

Yep!

2 Likes

Hmm, ok. I'll keep an eye on this thread and poke at the ESS stuff from time to time.

Any thoughts on the JSON parse failures? A cursory look suggested that some JSON responses were getting split in to two, and since that split happened in the middle of the JSON data neither one would parse properly.

Hmm, did it all come in at the same time? I'm using rawStream: true on my eventstream connection in the Bridge driver, but the 2.3.0 docs also mention rawData, and I'm not sure if one is wrong or what the difference may be. (If you feel like modifying it to see if there's a difference for you, feel free!) If you aren't using the latest beta (if you just grabbed it a few days ago when you mentioned it, then you're good), I'd also make sure you're doing that. I haven't been able to make the problem re-appear for me, but maybe I'm just not changing enough at the same time...

That’s probably it. I’m only getting this error from one of my bridges, the one that has more bulbs using Adaptive Lighting. It seems to happen at sunrise and sunset, when there are rapid changes to color temperature.

Installing a second instance of this atm and I seem to get stuck on the "Bridge authorized. Requesting information from Bridge and creating Hue Bridge device on Hubitat... "

How long can this process take - the hub in question has quite a lot of devices circa 56, is that what could be happening here? How long should I wait? The hub device is showing in devices but nothing else atm as I cannot select anything yet. Any ideas?

Should be pretty fast, so not sure what's going on. Any errors in Logs?

Ok, just found this? Not sure what to do - I removed the native integration, so maybe there's some remenant there somewhere? Could it be an old 'simple automation' rule? I'll delete that and try again for a start:

Unable to create Bridge device. Make sure driver installed and no Bridge device for this MAC already exists.

Error creating Bridge device. Ensure another device does not already exist for this Bridge. Error: java.lang.IllegalArgumentException: A device with the same device network ID exists, Please use a different DNI

Ok, fixed!

I'm learning things as I go - turns out when I first tried to install the app it created a hue hub device, I didn't remove this when I tried again - removed the device, now it's working again

I have a Friends of Hue wall switch that the Hue hub recognizes. However, I don't see a way with CoCo to pull in switches? I'd really like to have the 4 button wall switch exposed in Hubitat.

I don't think triggers work across the hub divide, because the state of Hue devices is polled, it doesn't get pushed. So Hubitat misses events from motion sensors and probably buttons too. Not sure if Hue even exposes them.

Buttons are possible with the v2 API, and I plan to look at this at some point.

5 Likes

Today? :smiley:

I've released CoCoHue 4.0 (non-beta) today, with the biggest change being the "instant update" (eventstream or server-sent events/SSE) option, which you can now use in addition to or instead of polling. By default, it is off--so I'm hoping everything should work similar to v3 and earlier for existing users--but you can enable it in the CoCoHue app. This is the same place you'd configure polling interval or other options. (I'd recommend using both for the moment, but if you weren't using polling before, I suppose either way is fine, and if you were, perhaps you'd be comfortable with a lower interval...but the choice is yours.)

NOTE: After upgrading, open the CoCoHue app and press "Done" to finish the upgrade. Also, back up your hub before updating the code (this is always a good idea, but v4 makes some changes that are not compatible with v3 should you want to downgrade CoCoHue after upgrading).

I've had v4 in beta for a while and have only heard of a few known issues, which so far I have been unable to fix and I think are oddities on either the Hue API or Hubitat eventstream interface side of things that I can't control:

  • the Hue Bridge will occasionally report a disconnection of the eventstream interface, even though it was not (necessarily) disconnected; the Bridge driver attempts to find when it is really still connected, but you may still see these events
  • every once in a while--I think when lots of events come in at the same time (e.g., if turning off the "all Hue Lights" group)--the data coming into the Bridge driver appears to get cut off, resulting in an error due malformed/un-parseable data; any missed changes should be found on the next refresh, one reason I don't recommend completely relying on the eventstream

The Hue v2 API that CoCoHue v4 is using is, again, not yet final, so things may change. Let me know if you see any issues, and thanks to the people who have tested things so far!

As usual, code can be installed manually (see README in first post) or via Hubitat Package Manager. New for v4, I've also added a "Bundles" ZIP you can find in the first post for easy manual installation.

6 Likes

Hi, hope you can help. Ran the update via Hubitat package manager. All seemed to go well. Went into app and pressed done.

CoCo now errors when selecting any list to refresh e.g. Error: Cannot invoke method getAllBulbs() on null object. When selecting ‘Select all lights’.

This is the same for all selections. The attached log seems to indicate that it can’t find the hub. But in other parts it shows it has found the hub and shows the correct IP.

I can reauthorised the app ok. This finds the hue hub without issue.

Is there another bit to update that I missed?

Thanks for any advise.

Update: Working now. See below comment.

Following on from my above comment.

It’s all working now. Had to change the polling interval, then press done. This seemed to force the update. After this, I changed the polling interval back to default.

Everything worked as it should.

Left my question in case it helps someone else.

It sounds like it needed to run a poll prior to selection, but I'm sure @bertabcd1234 will chime in as to what happened.

If you have enabled "push", then the 1-minute polling interval shouldn't be necessary as the devices (individual bulbs) will update all states immediately (although groups only update on/off state last I checked).

Brand new install using HPM. Initial run wouldn't allow any progress without hub info on initial screen and no hubs discovered. Added manual detail and it seems to have now got a username but still stuck on the screen below. No devices have been created but all drivers exist.

image

Hub is working fine with other apps. Rebooted both hubs.

Any ideas ?

Did you push the button on the Hue bridge?