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

[Bug] - Hue lamps jumps the value of the color temperature always back. #208

Closed
Blackymas opened this issue Jun 10, 2021 · 8 comments
Closed
Labels
bug Something isn't working stale

Comments

@Blackymas
Copy link

Please use the template and fill in all the data requested below!

Describe the bug
If you have a colored lamp, the color setting works, but the color temperature value always jumps back.
The color changes as desired but in the HOME APP it is displayed incorrectly with the color of the last state.

I have also tried the devices via Home Assistant Homekit here everything is ok.

Related devices
all Hue Color Lamps

To Reproduce
Steps to reproduce the behavior, for example:
Change 'COLOR Temperature' via the Home app.
Reproduce with all Hue Lamps

short video of the problem attached!

Versions used
Please provide the version of the following pieces of software:
homebridge-z2m v1.2.0
Homebridge v1.3.4
Zigbee2MQTT 1.18.1-1

Homekit.Lampe.mov
@Blackymas Blackymas added the bug Something isn't working label Jun 10, 2021
@itavero
Copy link
Owner

itavero commented Jun 14, 2021

As mentioned on Discord, I need some "magic" (a.k.a. logic) to determine wether to use the color or color_temp from the status update I've received.
Can you perhaps also log some of the MQTT messages send by Zigbee2MQTT with the status updates?

I guess I'd have to check if the color_temp is valid and (if so), ignore the color, but I'm not 100% sure about that just yet.

Not sure how other plugins handle this.

@itavero
Copy link
Owner

itavero commented Jul 18, 2021

Just tried to reproduce this locally. A few things I've noticed:

  • On my iPhone, after setting the color temperature, I see it going to the last "hue/saturation" color I've set and then going to the color temperature. So there's a short period in between in which the value is incorrect.
  • Changes after that, seem to behave correctly.
  • The message from Zigbee2MQTT seems to include a color_mode property now which indicates if hs or color_temp is used. I can't remember seeing this property before, but it sounds like this will make solving this issue a lot easier. I'll investigate the specifics of this property.

@itavero
Copy link
Owner

itavero commented Jul 18, 2021

Working on a filter for state updates, based on the color_mode property if it is present.
This did change the behavior for me, but not really in the way I expected it too.

After a bit of searching I found an issue for another Homebridge plugin, ebaauw/homebridge-hue#814, and it seems it's actually a "bug" (or poor UX?) in the Home.app.
Luckily, that issue also describes an acceptable solution: transforming the color temperature back to the Hue/Saturation value.
It won't be perfect but it should result in a better UX.

@itavero
Copy link
Owner

itavero commented Jul 18, 2021

Apparently, "officially" it is not allowed to have both Hue / Saturation and Color Temperature, if I read this source code.
This does explain why such a "workaround" is necessary.

@itavero
Copy link
Owner

itavero commented Dec 5, 2021

After #335 is merged and released, the changes I've made to make the user experience a bit better can be tried out be adding the COLOR_MODE experimental feature flag to your Homebridge configuration:

{
  "platforms": [
    {
      "platform": "zigbee2mqtt",
      "experimental": [
        "COLOR_MODE"
      ]
    }
  ]
}

itavero added a commit that referenced this issue Dec 5, 2021
* Slightly improve UX for lights with temperature and hue/saturation. (see #208)

* Convert temperature to hue/saturation

* Make earlier changes an expeirmental feature

* Add experimental flags to config.schema.json and log them when an accessory is created.
@itavero
Copy link
Owner

itavero commented Dec 20, 2021

The mentioned "improvement" is now available as an experimental feature (enabled with flag COLOR_MODE, see docs on configuration) in v1.7.0-rc.1 (also tagged as homebridge-z2m@next on NPM).

If you've tried it out and have any suggestions/issues, please reply on this issue.

@itavero
Copy link
Owner

itavero commented Feb 20, 2022

@Blackymas Have you been able to try out the changes I mentioned earlier?

@itavero itavero removed their assignment May 9, 2022
@stale
Copy link

stale bot commented Jun 18, 2022

It appears that this issue did not have an update in quite some time. Please check if you can provide any additional information to help resolve this issue. If there isn't any activity in the next two weeks, this issue will be closed automatically. Thank you for your contributions!

@stale stale bot added the stale label Jun 18, 2022
@stale stale bot closed this as completed Jul 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working stale
Projects
None yet
Development

No branches or pull requests

2 participants