Constant errors in logs for CocoHue

I am seeing this in my logs constantly, every minute.

dev:177 2025-06-09 04:06:18.136 PM

java.lang.ClassCastException: null (method parseStates)

My devices and rules etc all seem to be working correctly. The earliest I see this in the logs is 6/3 but I don't know if that's when it started or just the limit of how far back the logs go.

I haven't manually made any changes to anything in at least a couple months.

How can I find out what's causing this error?

I just tried looking at the Hue groups I have selected with CocoHue and it repeatedly tried to refresh the groups list. Each time it tried, this error showed in the logs...

2025-06-09 04:13:35.206 PM

error

java.lang.ClassCastException: null (method parseGetAllGroupsResponse)

From the app page where it's trying to load the groups, there are three icons - a gear, a question mark, and a sheet of paper. When I click the paper it takes me to the logs but the filter is filled in as "null"

How did you install CoCoHue? If manual, make sure that all app and driver code files are matched with the right code. This will be difficult to tell without a backup from before the problem started, but for devices/drivers, you can probably tell from any that are in use by devices, particularly the Bridge.

If HPM, try a re-pair -- but if you ever did anything manual, i.e., adding or updating related code without using HPM, the above may still be applicable.

Also, what hub platform version are you running? Check Settings > Hub Details. Enabling all debug logging (app, bridge, and at least one device where you're seeing an error) and seeing what gets generated right before the errors, which itself should hopefully be a debug log entry and not an error entry, may also be helpful. Line numbers in your errors would also be particularly helpful to include if available.

1 Like

I don't remember how in installed it, it has been a long time. If I had to guess, I'd say I probably did it through "Apps... Install user app"

It has all been working for a long time, so I haven't touched anything.

I turned on debug logging for the CocoHue Bridge device and this is what I see...

devv:1772025-06-09 04:27:18.130 PM

error

java.lang.ClassCastException: null (method parseStates)

dev:1772025-06-09 04:27:18.124 PM

debug

Checking if valid HTTP response/data from Bridge...

dev:1772025-06-09 04:27:18.123 PM

debug

parseStates: States from Bridge received. Now parsing...

dev:1772025-06-09 04:27:18.030 PM

debug

refresh()

dev:1772025-06-09 04:27:11.802 PM

debug

Debug logging will be automatically disabled in 30 minutes

dev:1772025-06-09 04:27:11.801 PM

debug

initialize()

dev:1772025-06-09 04:27:11.799 PM

debug

updated()

I went to HPM and updated CocoHue. Now it sees the bulbs, groups, etc from the Hue hub. I'll keep an eye on the logs to see if the errors have gone away.

You definitely did that at some point, but my question was really about how you got the code installed on your hub. Based on your second response, it sounds like that was HPM (Hubitat Package Manager), a third-party app popular for making other third-party code easier to install. While I did suggest a repair rather than just an update, that can't hurt, either; and since there apparently was one, hopefully updating the code fixes your problems!