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

Changing hue values works strangely #5

Open
Sawtaytoes opened this issue Jun 24, 2019 · 5 comments
Open

Changing hue values works strangely #5

Sawtaytoes opened this issue Jun 24, 2019 · 5 comments

Comments

@Sawtaytoes
Copy link
Collaborator

Reference: https://twitter.com/Sawtaytoes/status/1135765147425918978

The issue I'm having is that sending 12743 sets it to 12544. Sending anything up to, but not including 12800 sets it to 12544. The only way I got it to change the hue was by passing 12800.

Word from the LIFX Devs:

Our team is unable to debug your node code, but to convert hue=70 to a uint we get uint16(70 * 0xFFFF / 360) = 12742 and converting back we get float64(12742)*360/0xFFFF = 69.994965 - sorry we couldn't be more helpful, but try our forum
Source: https://twitter.com/LIFX/status/1136802118096998400

@ristomatti
Copy link
Collaborator

Which LIFX lights are in question BTW? There's for example differences between the supported Kelvin ranges between Original and Mini Color bulbs.

@Sawtaytoes
Copy link
Collaborator Author

Actually, 3rd gen A19s and BR30s support 1500K now. I tested via the LIFX app recently.

The issues I was having were tested on 3rd gen A19 and BR30 bulbs.

@Sawtaytoes
Copy link
Collaborator Author

Sawtaytoes commented Jun 25, 2019

This image best describes the issue:
image

Looks at the receiving and sending values.

I added logging in lifx-lan-client where the send and receives were occurring.

@ristomatti
Copy link
Collaborator

@Sawtaytoes I read this again and remembered I've noticed similar issues with brightness values. It didn't bother me that much as the difference was too small to notice on the actual lights. But it definitely seems either the light firmware has an issue or there's a bug in the packet creation or interpretation. Have you checked if you can reproduce the issue with other libraries?

@Sawtaytoes
Copy link
Collaborator Author

Sawtaytoes commented Jul 22, 2019

I have not tried other libraries.

I was working on sending the command myself with a UDP packet to see if that would also show the issue. Then I could send this to the LIFX devs since there's a potential firmware flaw.

This affects me because I toggle scenes. I can't toggle scenes if the values of the lights are different from the saved values in the HTTP API.

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

No branches or pull requests

2 participants