jstrausd / homebridge-simple-wled

Homebridge Plugin to control WLED LED-Strips
ISC License
64 stars 18 forks source link

No light with brightness below 24% #36

Open Sjaakafhaak opened 2 years ago

Sjaakafhaak commented 2 years ago

Hi,

I like your project. But I'm having some issue with the brightness controls. When I set the brightness below 24% in the Home App the light goes off. So I did some digging around and it seams like that the brightness control in the app triggers both the master and color brightness in WLED. This results in an accumulation of both and turns off the leds. A side effect of this is that when I toggle the light with a physical button ( to a macro T=2) the light won't go on because the color brightness is low that the color is black.

So I was wondering if it is possible to fix this behaviour. I noticed that you are converting between HSV and RGB value I guess because of what homekit is sending out? Maybe the issue comes from that part. I'm no expert at all in coding.

Thanks

--edit I'm running homebridge-simple-wled v1.3.3 WLED v0.13.0-b6

jstrausd commented 2 years ago

Hello, I also encountered this problem, i hope i will find time to fix this issue. It is standing at the first place on my list, but I'm currently very very busy. Thanks for the problem reporting!!

taylorsatula commented 2 years ago

Thank you!

bvalasek commented 1 year ago

Is there any update on this? I have just found I created duplicate of same issue #48 a week ago. Will close that issue and wait for updates here.

https://user-images.githubusercontent.com/7964597/199062305-3e887e48-01d6-4d6e-9591-b9f017ad5589.mov

TonnyCS commented 1 year ago

Hey all, any updates on this one?

TonnyCS commented 1 year ago

Btw, I dont wanna be "that guy", but from what I can see through the WLED UI, when I change the brightness the only parameters in the json are bri, time and v

From what I can see in the httpSetBrightness method in the wled-accessory.ts the json that is sent is using parameters bri and seg.

I think the seg parameter sets the top slider in WLED.

When I try to simulate the issue, so I use both of the sliders (the top one and the brightness one) in the WLED UI, right around 20% value I get the same issue as described here.

When I set the top slider in the WLED UI, the json has parameters seg, v and time.

I think that the seg parameter is being set incorrectly.

I have no idea how to test Homebrige plugins, so I think I'll leave it up to you @jstrausd. I hope this will help.

TonnyCS commented 1 year ago

For anyone with the same issue and before the pull request above is completed I created and published a fork of this project with the fix.

You can find it here: https://github.com/TonnyCS/homebridge-simple-wled-brightness-fix.

To use it in HomeBridge just add homebridge-simple-wled-brightness-fix as you normally would with any other plugin and copy and paste your config.json from this plugin.

drewcovi commented 1 year ago

I have no idea how to test Homebrige plugins, so I think I'll leave it up to you @jstrausd. I hope this will help.

It's a matter of firing up a new instance of homebridge, ideally on your development machine, creating a new "test" home and linking to that instance of homebridge with your fixed plug-in. Thanks for this fix!