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

Feature/#25 color wrapper fixes and additions #38

Conversation

domjancik
Copy link
Contributor

@domjancik domjancik commented Mar 12, 2020

Fixed some issues resulting in the X and Y based color functions not working.

Added a simple intensity calculation from RGB values to control dimming - maximum of the individual components. The components are expected to fall between 0 and 255.
This should result in colors as bright as possible and works well enough - tested with Tradfri color bulbs.

There are however other ways to approach this. For instance the eclipse/smarthome XY conversion includes the capital Y value in the brightness calculation. Maybe this results in more natural dimming curves but I'm not sure. It looks like the dimmer never goes full this way though. In any case it might be worth investigating.

@domjancik domjancik changed the title Feature/#25 color wrapper Feature/#25 color wrapper fixes and additions Mar 12, 2020
@dominicusmento dominicusmento merged commit b755d5b into dominicusmento:feature/#25-color-wrapper Mar 14, 2020
@dominicusmento
Copy link
Owner

thanks for contribution!

dominicusmento added a commit that referenced this pull request Mar 14, 2020
* RGB color wrapper implemented, testing needed

* Feature/#25 color wrapper fixes and additions (#38)

* Changed X and Y incorrect string datatype to int

* Implicit dimming for SetColor(device, r, g, b)

* Updated docu for SetColor(id, x, y, intensity)

* Separated Intensity calculation from RGB>XY conversion function

* - changelog, readme and version updated
- timeout lowerd for GenerateAppSecret, handling example added (TradfriUI, not the library itself)

Co-authored-by: Tomidix <tomidix@gmail.com>
Co-authored-by: Dominik Jančík <magnet.cz@gmail.com>
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

Successfully merging this pull request may close these issues.

None yet

2 participants