Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hue integration: Periodic brightness procent adjustment does not work on the light #120754

Open
MaJerle opened this issue Jun 28, 2024 · 5 comments
Assignees

Comments

@MaJerle
Copy link

MaJerle commented Jun 28, 2024

The problem

If you periodically (let's say every 1s) send a brightness adjustment (to decrease brightness by 10% or any other value), lights will not react properly and Hue app will be desynced from the reality of the lights displayed.

This is preventing the use of the Hue Tap Switch rotation feature, where rotating the scroll would adjust the brightness of the light from the HA.

What version of Home Assistant Core has the issue?

latest

What was the last working version of Home Assistant Core?

none

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/

Diagnostics information

I have none.

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No

Additional information

I want to use the Z2M with Hue Tap Switch, allowing me to use 4 buttons and rotation feature for various tasks, not only lights control. But I've noticed that if I use the rotation events, then HA sends many commands to the Hue integration for light control, and those lights do not properly react.

It is unclear if the issue is in the HA or in the Hue itself, but it seems that too many commands in a row break the light behavior.

The target is to control the light brightness with rotation of the tap switch. It works after one step rotation, but if you rotate further, sending many commands to the Hue, light becomes irresponsible and for few seconds does not react to any other command.

@home-assistant
Copy link

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!

Code owner commands

Code owners of hue can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign hue Removes the current integration label and assignees on the issue, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


hue documentation
hue source
(message by IssueLinks)

@marcelveldt
Copy link
Member

It is never a good idea to send so many requests to a light or any other device on a low speed network like zigbee, you very quickly overload it.

Better use the Hue app to natively bind the switch/dial to a light

@MaJerle
Copy link
Author

MaJerle commented Jun 29, 2024

Good point, however not sure how Hue does it. I dont think there are many commands in fact. Maybe 5 per second at peak.

Network shouldnt be an issue, because when I use Hue sync with the Spotify, 10 lights nicely follow the music realtime.

I use your proposal for Dimmer, but for Tap, if you want to just set rotation wheel actions, you also have to set button actions, or it wont allow you to save settings. Ideally it would be best to use Hue app to set scroll, while the rest of buttons are propagates to HA. Not possible in Hue app

@marcelveldt
Copy link
Member

Network shouldnt be an issue, because when I use Hue sync with the Spotify, 10 lights nicely follow the music realtime.

That is using entertainment mode - an UDP protocol optimized for streaming quick /many changes without overloading the zigbee network.

Maybe 5 per second at peak.
That is a lot, especially on larger networks.

I think the API is limited to one command per second and at least the state updates are limited to 1 second.
What you can do is check the logs - so when it breaks, do you see some errors pop up in the logs or is the Hue hub simply ignoring your commands ?

@MaJerle
Copy link
Author

MaJerle commented Jul 3, 2024

I think the API is limited to one command per second and at least the state updates are limited to 1 second.

When you send 5 commands in a row quickly, I confirm that light will be unresponsive for next command(s) for some time. An example, sending 5x "increase brightness by 10%" and then "turn off", light may (or may not, in fact) turn off after 5 or more seconds.

That would explain what you mentioned here.

I'll work on the logs once I have access to HA again (in the coming days). In //, I will try to pair one lamp over Z2M and see the behavior there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants