-
Notifications
You must be signed in to change notification settings - Fork 142
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 white pixels #810
Comments
.. I spoke too soon, |
Can you send me a link to the specific strip you have -- I'm curious as to how they present the underlying specs. Since it seems like every possible combination is possible, rather than add a new Pixel type to HomeSpan, it may make sense to simply add some documentation so that these new use-cases can be extended directly from the users sketch. |
Sorry, I saw your comment before I pushed a draft PR. You will notice the new method to set white colors, which makes the final code cleaner. Also, the new Pixel type will (I think) ensure that the Green is never set. Without this, I seemed to have strange lighting. I can push a PR to Holiday Lights, or add an example if you'd like to see how it all worked out for me. |
+1 I'm using a strip that uses red for the 3000K and green for the 6000K |
@JordanMalan, are you currently using HomeSpan 1.9.0, or the "dev" branch? Are you able to pull from my fork to cherry-pick my commit? I can try adding more white-only |
@frankonski I'm using 1.8.0 since 1.9.0 seems to have some issue when adding to HomeKit. I'm using the example Pixel sketch. The only real reason I wish this was better supported in homespan is so the color picker in the home app is correct. I'll try to pull your code and test, I actually don't mind having many pixel types for different pin arrangements You're using WHITE_WxC where I might use WHITE_WCx. But I wonder if there's a better way to do this in general, like if someone made a hypothetical red / white / blue strip for example it would be nice to have morph led which takes any user defined colors 🤷 Edit: I fixed my implementation to use the ColorTemperature characteristic instead of HSV, works good... At this point I have no more wants really |
If you have pulled my fork for testing, try adding this pixel type (and using it) to
Let me know if it works. |
@JordanMalan, did you get a chance to try my fork fork testing? I solved a last issue in my use of a cold/warm white LED strip, and it is now working like a charm using either the Home app or Eve app, which show a “temperature” light selector (no rainbow color selector). I use a modified version of the Holiday Lights project, so I don’t know if @HomeSpan would prefer a PR in an new example in HomeSpan, or in Holiday Lights itself so it supports the new Pixel constructor… |
Got myself a warm white & cold white led strip with WS2811 controller, which, after playing with the demo samples you added recently, was able to figure out that 1 pixel (1 IC) was lighting on warm white on Red, cold white on Blue, and Green was well... ignored.
So I went on to modify the
pixelType
type and added a new one:and added a new
Color
constructor as such:with its respective static public method in the
Pixel
class:then modified your
flashColor()
method sample with aflashWhite()
...and initialized the
PixelStrand
sample withpixel=new Pixel(pin,PixelType::WHITE_WxC);
.So far so good, all is working fine for now.
Now, where I am having issues is with a change to the Holiday Lights project which, using Eve, allows you to set the color of the RGB leg strip using the
px->H.getValue()
,S
andV
received from the app. The app has two tabs to define the color. One tab is called "Color", the second tab is called "White". From there, it looks like you can define start and end value for a gradian, from Warm White toCold White
. DefiningCharacteristic::ColorTemperature colorTemp;
within thePixelStrand
class, I was hoping to see a change topx->colorTemp.getNewVal<uint32_t>()
within theManualControl : SpecialEffect
class, to no avail.Setting LogLevel to 2, we can also see that even though the White tab is selected, Eve seems to send back HSV values, not any type of color temperature, or gradiant-style values..
Any suggestion to turn HSV values to this WarmWhite / ColdWhite pair of values?
The text was updated successfully, but these errors were encountered: