How do I refresh state of Hue lights?

If I change the state of a Hue light through the Hue app, then HE is unaware of this state change. I’ve tried finding a way to get HE to poll the current state from Hue but I’ve been unable to get this to work as the only command I’ve found to be available is “refresh”, and that doesn’t seem to do it.
Is there anyone out there who knows how to achieve this?

I am not sure if the HE will recognize what is done by the HUE app. I had to change the color in the HE dashboard using color bulb. HE will capture the change made in the dashboard.

Correct. Refresh does nothing. You have to turn on the polling feature in the Hue Integration and then it should update after 1 min. Don't use the 10 sec poll rate, it's just for testing and in my experience, it doesn't work anyway.

However, the best thing you can do it just not use the Hue app for manipulation. If you setup Hubitat Dashboard, you can control lights and HE will reflect the change instantly.

2 Likes

To add to what SmartHomePrimer said, if for some reason you do need to manually do a refresh, you need to do it on the Hue Bridge device in Hubitat, not the bulb.

1 Like

Thanks @AndyM and @SmartHomePrimer for enlightening me on how to poll the Hue bridge. I had a look in my bridge settings and found that it was already set for polling every minute. However, when I checked the schedule for the bridge, there was no poll scheduled. Changing the polling interval to something else and then back again creates the polling schedule and it appears to be running.

I still cannot get it to update the light state though (even after a manual refresh on the bridge itself, in devices), which is strange. I might give it another go later to see if I can get it to work.

1 Like

Yes, good point that I forgot to mention. Several other users have commented that they have to do that with the setting to get it to start working after installation.

I'm not sure why you are not getting a refresh after a minute, but in general it's not all that reliable for keeping in sync between the Hue app and HE. Refresh isn't going to work either way, so don't bother clicking that or trying to refresh the Hue Integration with a rule machine rule. I just won't do anything.

Sorry. I don't know why it wouldn't refresh, especially if scheduled to do so. I'd probably try readding the bulbs from the Hubitat Hue app, or maybe even reinstall the whole thing which is a pain if you use the lights in a lot of rules. Maybe start with with just power cycling both hubs to rule out the simple?

My setup has multiple groups of bulbs on the hue hub. I control both the individual lights and the groups from HE. HE almost immediately shows the correct status of the lights in the group if you change the group switch. But if you turn on the individual lights in the group, it won't update the group switch until the next poll. I have rules set up to refresh the hub if I make changes to the individual lights, so that my dashboard switches linked to the hue groups are accurate. The ability to refresh the individual light bulbs was removed and moved to the hub somewhere around version 2.0.1.

Please can you help me to understand the steps to see the state of HUE Bulbs in Hubitat Elevation? I cannot see any reflection of HUE states.

Or to be more precise - I can see a fake reflection when HE turns on a Light, but if I use HUE app to turn it off, the HE Dashboard continues to show that the light is on.

You will not see a change for at least a minute if you're changing the light state via the Hue app. But if you only use HE Dashboard and watch the driver details page in HE, you'll see that it will reflect the state immediately. This will allow RM rules to act on changes and things won't get out of sync.

Thank you @SmartHomePrimer.

Please can you add more detail?

Where do you mean?

I am watching the He Dashboard, it is not reflecting the state.

Earlier this evening it was syncing within about 30-120 seconds but not immediate and no reliable schedule.

Don't use the Hue app for control.

Dashboad reflects the change of HE device details. instantly. Changes made to HE device details will be reflected in HE Dashboard instantly. Here's an example.

HE device details

HE Dashboard
17%20PM

This is good practical advice for getting this beta product to work, thank you. I have read this on the forum as well. Much appreciated.

@mike.maxwell would you be willing to reassure us that "don't use HUE to control your lights" is not the long term vision for the company?

You’re looking at this the wrong way. The Hue API is the limit. You’re also misquoting me.

The problem you're running in to, and I have as well, is that you are trying to use both the native Hue controls (be it the Hue app or light switches paired directly to the Hue bridge) as well as a third party to control and monitor the lights.

If you control the Hue lights directly from the Hue app, you cannot expect that HE will be able to display the correct state of the lights immediately. You have just made a state change to lights completely outside of HE - how is HE supposed to know that you have requested a state change to the lights? The Hue bridge does not report any state changes back to any third party.

The closest you'll get with any third party application is to poll the Hue bridge periodically for changes. That's why @SmartHomePrimer says that you will not see a change for at least a minute if you are using the Hue app to make light changes, since the default poll rate is every 60 seconds. If you make any light changes from HE, then HE obviously knows about the change requested and will update the status immediately.

Once you understand these limitations that any third party will have interacting with the Hue bridge, then you know what behaviour you can expect from any interactions you have with the lights. I know this is not necessarily the answer you were looking for but hopefully I've been able to explain why you are seeing this behaviour.

2 Likes

@SmartHomePrimer and @mattias have answered this correctly, the issue in with Hues api, not Hubitat.

2 Likes

This thread has been very helpful, thank you, makes sense to me how the polling works for HE to become aware of status changes that occur outside of HE with the bulbs.

My question: How do I check/verify that the polling is working correctly? I have installed the Hue integration app, I have seen the options -> polling set to 1 minute. I toggled that to 10s, saved, toggled back to 1 minute as indicated in this forum thread above to trigger the polling schedule. I'm unsure it is working though - is there a place where I can check and see that polling is scheduled and that it has run?

Cheers and thank you, pardon if the question is basic (I am new to HE but really enjoying and appreciating it).
-Nico

Easiest way is to turn on a light via the Hue app and make sure that it's state changes in HE after 1 minute

1 Like

Thank you - simple but good test, and it passed. :grinning: I was curious to see this in HE just for my own knowledge, understanding what to review for future troubleshooting or tinkering.

I did have to set my configuration to disable polling and then to the value I wanted (1 minute) before I saw scheduled polls.

In case others are curious: I did click around a bit more, and found that if I go to the settings for the Hue Bridge Integration app, there is a top table that reflects the value of the Poling setting, and then if I scroll to the very bottom, there is a section for scheduled jobs where I can see the next scheduled poll and the previously run poll. They are in 1 minute increments, GREAT! Curious to me, there is another "bridgePoll" row item that is scheduled once for this afternoon, not sure what that is.

This is a deal breaker for me then you says it is the hue API that is the limit that how come my hue to Smartthings integration is instant I can turn the hue.lights on via a hue dimmer on the hue bridge and inside of 1 second Smartthings also says the light is on or off.

Why is Hubitat different I use hue dimmers for my light switches that now mean if I changed to Hubitat and I turned the light on via the dimmer, Hubitat won't see the change for a minute. Seems like a hubitat issue of Smartthings can see it straight away.

Looks like Smartthings is superior in at least 1 way then they don't have this issue with the same hue bridge.

On my hue to Smartthings integration changes made outside of Smartthings update instantly in the Smartthings app.

Read the info in this short thread.