home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
71.14k stars 29.82k forks source link

No bridge was able to activate scene #62506

Closed ZyberSE closed 2 years ago

ZyberSE commented 2 years ago

The problem

Since todays update I can't activate Hue scenes anymore, it reports an error about "No bridge was able to activate scene", I can control individual lights though and I can also control the bridge through the Hue app.

What version of Home Assistant Core has the issue?

2021.12.4

What was the last working version of Home Assistant Core?

2021.11.x

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Philips Hue

Link to integration documentation on our website

https://www.home-assistant.io/integrations/hue

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Logger: homeassistant.components.hue.services
Source: components/hue/services.py:53 
Integration: Philips Hue (documentation, issues) 
First occurred: 5:02:53 PM (7 occurrences) 
Last logged: 5:03:02 PM

No bridge was able to activate scene Hallway - Evening in group Hallway
No bridge was able to activate scene Lounge - Evening in group Lounge
No bridge was able to activate scene Office - Evening in group Office
No bridge was able to activate scene Bedroom - Evening in group Bedroom
No bridge was able to activate scene Guest Room - Evening in group Guest Room

Additional information

No response

probot-home-assistant[bot] commented 2 years ago

hue documentation hue source (message by IssueLinks)

probot-home-assistant[bot] commented 2 years ago

Hey there @balloob, @marcelveldt, mind taking a look at this issue as it has been labeled with an integration (hue) you are listed as a code owner for? Thanks! (message by CodeOwnersMention)

RC-Thoughts commented 2 years ago

Same issue here, only difference is I updated from 2021.12.3 to 2021.12.4

None of the scenes work, individual lights work from HA, all scenes are available in hue, tested from iConnecthue and checked they exist with hue api frontend.

marcelveldt commented 2 years ago

Does calling the scene directly (instead of using the activate hue service) work ?

RC-Thoughts commented 2 years ago

Yes, that works as does the control of individual lights. It should not be the primary option since all scenes would need to be built into HA first. All my scenes are made into hue, they are not in HA.

majkers commented 2 years ago

I also had this problems. HA tells to use scenes but I have a group of light done by a third party app Hue Essentials. Is is not an oridinary group like area or room. I could activate scene for this group in 2021.11 but I cant in 2021.12

ZyberSE commented 2 years ago

As a matter of a fact so do I. My groups/scenes are created in iConnectHue and have always been working before.

marcelveldt commented 2 years ago

Yes, that works as does the control of individual lights. It should not be the primary option since all scenes would need to be built into HA first. All my scenes are made into hue, they are not in HA.

That's not true. Hue scenes are imported into Home Assistant as scene entities, at least they are for V2 bridges.

marcelveldt commented 2 years ago

@majkers and @ZyberSE please use official Hue Rooms or zones and not the unofficial "hacked" groups created by iConnectHue or Hue Essentials. Hue supports zones since some time now so time to switch. Only "real" zones and rooms as created by (or seen by) the official Hue app are supported in Home Assistant.

The groups you guys are talking about in those 3rd party apps come from a time where Hue did not yet support Zones but they do now. So maybe bite the bullet and create them the official way ?

RC-Thoughts commented 2 years ago

Yes, that works as does the control of individual lights. It should not be the primary option since all scenes would need to be built into HA first. All my scenes are made into hue, they are not in HA.

That's not true. Hue scenes are imported into Home Assistant as scene entities, at least they are for V2 bridges.

My HA have never done this. Not once, and I'm on V2 bridge.

majkers commented 2 years ago

@marcelveldt Actually I migrated to HA groups because switching off a light by a wall switch that is in HUE group made a light bulb's sate Unavailable but group remained in On state.

marcelveldt commented 2 years ago

Why do you want that ? Using HA groups for controlling only Hue lights is a very, very bad idea. You will not profit from any optimizations. Light commands will be sent one by one on the Zigbee mesh instead of an optimized group command. If a light is marked unavailable there's a reason. For example if you unplug it or when the light has connection problems.

Also, Hue scenes are only available for Hue groups

majkers commented 2 years ago

Yes I know but tell my please how can I make hue group with for example two hue bulbs to turn its status to Off when both bulbs become Unavailable due to switching off by a wall switch? I can't. It will stay in On state and a HA group will turn to Off And in my lovelace I have a picture elements card that displays state of a group and not bulbs in it one by one.

marcelveldt commented 2 years ago

Ah okay, is that the usecase. I think we can fix this and show the group as unavailable if all of the lights are unavailable.

majkers commented 2 years ago

That would be nice. Hue is really buggy. For example I don't really get it why using official hue app I can "turn on" bulb that is unavailable...

marcelveldt commented 2 years ago

I do know that. It's because of misbehaving third party bulbs that do not route properly. They will show as disconnected while they actually can be controlled. Signify removed support for 3rd party bulbs some years ago but that got a lot of impact from the community so they reinstated the support. This is the compromise they've made: being able to control lights that are unavailable.

So if you for example connect Osram lights to the Hue bridge they will always show as unavailable but you can control them. It actually messes up your entire mesh but that's a whole different story ;-)

So Hue is not buggy, exact the opposite. It's probably the most stable system in this Home automation world.

majkers commented 2 years ago

The case I am talking about is for the philips hue e27 bulb not third party ones...

marcelveldt commented 2 years ago

I know, I mean that's why Hue now allows to control lights that are unavailable, because of OTHER lights...

majkers commented 2 years ago

Aaaahh Ok I get it. BTW thanks for your work even though it messed up a bit in my automations :)

marcelveldt commented 2 years ago

As a matter of a fact so do I. My groups/scenes are created in iConnectHue and have always been working before.

Can you confirm that the groups are visible in the Official Hue app ?

ZyberSE commented 2 years ago

I'm not at home over xmas so I can't for sure confirm that, but unless I'm mistaking I do think it has. What was the change that caused some groups to stop working? It seams like it came in the 2021.12.4.

If this can't/won't be fixed going forward I will have to rollback to working version until I have time to redo all my groups (60+ lights). Which would be the best way of doing that? (I'm remote so I can't access the RPi). Do a shell "upgrade" to an older version or load a backup from the Gui?

marcelveldt commented 2 years ago

@ZyberSE if it did work with 2021.12.x it should still work. The only groups that do not work are legacy "lightgroups". Those have been removed from the official Hue app too, that's why I asked if you can seem them there

ZyberSE commented 2 years ago

@marcelveldt I understand, until I get back to that house I can't know for sure. Unless I can verify what typ of groups they are through ssh or some other way?

Someone a few posts above wrote it did work in 2021.12.3, I upgraded from 2021.11.x I think. What would be the best way to downgrade?

marcelveldt commented 2 years ago

restore a backup

ZyberSE commented 2 years ago

@marcelveldt I rolled back to 2012.11.5 and got this now. I've restarted several times but the issue persists.

Logger: homeassistant.config_entries Source: components/hue/bridge.py:83 First occurred: 1:06:55 PM (2 occurrences) Last logged: 2:33:53 PM

Error setting up entry Philips hue-home for hue Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 304, in async_setup result = await component.async_setup_entry(hass, self) # type: ignore File "/usr/src/homeassistant/homeassistant/components/hue/init.py", line 64, in async_setup_entry if not await bridge.async_setup(): File "/usr/src/homeassistant/homeassistant/components/hue/bridge.py", line 83, in async_setup username=self.config_entry.data["username"], KeyError: 'username'

marcelveldt commented 2 years ago

That means you didn't restore a backup. You forgot to restore the HA config...

ZyberSE commented 2 years ago

@marcelveldt everything is backup working now, though I noticed one thing that might be of interest. I had disabled Hue groups in the integration, could that have caused my issues?

marcelveldt commented 2 years ago

No that shouldn't matter.