kpsuperplane / homebridge-wiz-lan

Control Wiz lights over LAN
Apache License 2.0
115 stars 37 forks source link

Brightness Discrepancies Between Home App and Wiz App (Downlights) #51

Closed perfecblue closed 3 years ago

perfecblue commented 3 years ago

Hi,

Thank you so much for creating this plug-in!

I know it hasn't been tested on anything other than the bulbs stated on the page but I've tried the plug-in with the Non-RGB Downlight (Model ID: 23041, Ver. 1.20.0) with success! I'm very excited to be able to control these downlights!

However, there's just one quirk, it seems that there's a discrepancy in brightness between what you set in Home app and what is being set when you open the Wiz app and go right back into Home app. Interestingly, the discrepancies seem to diminish as the brightness percentage set in Home app goes up. In other words, the higher you set the brightness in Home app, the lower the brightness discrepancies are when you go into the Wiz app and back.

I'm on Homebridge v1.3.4 and iOS 14.4.1 and I've turned on the "Last Status" option in the Power-on Behavior setting and it makes no difference at all.

Below are testing done by setting a brightness value in Home app then switch into the Wiz app and back to Home app. Here are my findings:

01% > 10% 10% > 18% 20% > 27% 30% > 36% 40% > 45% 50% > 55% 60% > 64% 70% > 73% 80% > 82% 90% > 91%

Is there anything that can be done about this?

Thank you again for this awesome plug-in!

Matt

xmanu commented 3 years ago

I am seeing the same behavior. If I have more time I will look into it in more detail...

xmanu commented 3 years ago

I have created a merge request (#57) that should hopefully fix this issue... @kpsuperplane

MoTechnicalities commented 2 years ago

@xmanu

Hi, please see the details I've presented in issue #92 and see if you can adjust your dimming code to use the Math.floor() function. The current code doesn't allow for a 0% brightness (OFF) setting. This affects the ability to create automations that will turn the bulb off. Thanks.