-
Notifications
You must be signed in to change notification settings - Fork 15
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
Add support for xy control #25
Conversation
Sorry that this took so long. I'm having a look now. To get the missing information you either have to look at the debug messages generated by the library (which dumps all decrypted packages) or use frida to get logs from the app. But I'll see what I can do regarding your questions. |
Where did you get the 11 bits from that you use for the XY resolution? I've changed your code to get the length from the unit control but I used the 11 bits for the SetColorXY operation. The resolution in |
Thanks for the contribution. Looks good to me now (pending a decision on the 11 bit default). Can you easily test my changes? I don't have a fixture available that supports xy or colorsource. |
Hi, thank you for putting your time in!
From my side this can be merged 👍 |
Sorry for the mess (and the wait). The color conversion should be fixed now. Could you test it again? |
I just was able to test it again. Seems to be working just fine now. Thank you for your help! |
* Replace use of deprecated BLEDevice.metadata * Add unitstate fields for colorsource and xy color * Switch to float representation of xy_color * Readd missing colorsource setter * Typing fix * Implement SetColorXY operation * Fix linter * Switch to using control length for xy parsing * Use an enum for colorsource * Export ColorSource * Attempt to fix bug in conversion from bytes to state for XY * Sort imports --------- Co-authored-by: Lukas Kempf <[email protected]>
This PR adds
BLEDevice.metadata
is deprecated and therefore replaced the call as suggested hereKnown Limitations
colorsource
is an additional control, the consumer (casambi-bt-hass) needs to set this property correctly. (Add support for xy color control casambi-bt-hass#84)Casambi
are used as helpers, e.g. for setting temperature to directly change the attribute of a Unit or Group. How would the exactOpCode
and binary format be found? Wireshark?