kpsuperplane / homebridge-wiz-lan

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

NaN Error Isolated to "sceneId":14 #101

Open MoTechnicalities opened 2 years ago

MoTechnicalities commented 2 years ago

@kpsuperplane Hello Keven,

Man! I did a lot of experimentation with the RGBCW and scene settings.

ISSUE ISOLATED: The plugin causes Homebridge to issue a NaN error, when the bulb is in "sceneId":14, (The Nitghtlight scene).

REASON: The bulb does not return "dimming": information to the plugin when the bulb is in this mode. Also, neither the bulbs nor the WIZ App use the dimming feature in this mode!

RECOMMENDED SOLUTION: Change the plugin to look for "sceneId":14 in the getPilot string. If "sceneId":14 is found then make the plugin ignore, or provide previously used "dimming": values to Homebridge for HomeKit, but still making allowance for HomeKit's brightness 0 value to set a "state":faulse to turn the bulb OFF. Note: I have not yet isolated if any other scenes turn off dimming.

ALSO: Bye experimentation, I found that if I manually turn on the "c": and "w": LEDs with a 1 to 255 value, if I then ask Siri or if I use the Home App to set the bulb to any color such as purple, the plugin does not set those specific LED's back to a zero value until after changing color using the Temperature feature. This is only an experimental and not a normal scenario. So, no fix is required. However, if you want, you could consider ways to make the plugin force zero values on those LEDs if using RGB color settings only.

Other than that, the plugin is working very good. Thanks for making this great resource for our WIZ Bulbs! Still, I hope a way can be devised to allow us to use scenes yet retain Tile Quick Press for ON/OFF.