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

Comment: Determining Bulb Kind #77

Closed
nmoschkin opened this issue May 5, 2021 · 7 comments · Fixed by #111
Closed

Comment: Determining Bulb Kind #77

nmoschkin opened this issue May 5, 2021 · 7 comments · Fixed by #111
Labels
enhancement New feature or request

Comments

@nmoschkin
Copy link

nmoschkin commented May 5, 2021

In the previous versions of the firmware, there used to be an integer array returned with getSystemConfig called 'drvConf'.

Using those two numbers I figured out that it was possible to get the 'type' of the bulb pretty consistently with some experimentation.

In the latest version they took drvConf away, bot those two numbers are instead now found in getModelConfig, the values 'wcr' and 'nowc' are actually the two numbers from drvConf.

So, I've come up with a list so far, and I'd appreciate any feedback you have on this matter.

{ (wcr, nowc) or drvConf: [1,2], "Bulb Kind" }

{ (37, 1), "Philips Color & Tunable-White BR30" },
{ (50, 1), "Philips Color & Tunable-White BR30" },
{ (33, 1), "Philips Color & Tunable-White A19" },
{ (60, 1), "Philips Color & Tunable-White A19" },
{ (20, 2), "Philips Color & Tunable-White A21" },
{ (40, 1), "Philips Color & Tunable-White E14 Candelabra" }

I have about 20 different bulbs in my house. But I would love to know if these match up with what you have?

@sbidy
Copy link
Owner

sbidy commented Jun 15, 2021

I'm not aware of detection of the bulb type by this property.
This seems to be new and it can be a possible detection value.

Overall the bulb type (feature set) can be detected by the bulb name (TW = Tuneable White, DW = Dimmable etc.).
The detection via this two parameters are static and a lookup table must be maintained for that.
I try to avoid such a static part in the lib.

@sbidy sbidy added the enhancement New feature or request label Jun 15, 2021
@nmoschkin
Copy link
Author

Yes. Basically the only bit of new information that is provided is the size/shape of the bulb. A21/A19 or BR30, E14, etc...

@nmoschkin
Copy link
Author

... should be noted I have a .NET version of this library. Originally, in the beginning, I translated some of your code, but I have since organized it all in a very .NET way.

https://github.com/nmoschkin/WizLib

@bdraco
Copy link
Contributor

bdraco commented Feb 8, 2022

2022-02-08 16:47:13 DEBUG (MainThread) [pywizlight.bulb] 192.168.209.158: << b'{"method":"getModelConfig","env":"pro","result":{"ps":1,"pwmFreq":1000,"pwmRange":[5,100],"wcr":20,"nowc":1,"cctRange":[2700,2700,2700,2700],"renderFactor":[255,0,255,255,0,0,0,0,0,0]}}'
2022-02-08 16:47:13 DEBUG (MainThread) [pywizlight.bulb] 192.168.212.173: << b'{"method":"getModelConfig","env":"pro","result":{"ps":1,"pwmFreq":200,"pwmRange":[1,100],"wcr":20,"nowc":2,"cctRange":[2700,2700,2700,2700],"renderFactor":[255,0,255,255,0,0,0,0,0,0]}}'
2022-02-08 16:47:13 DEBUG (MainThread) [pywizlight.bulb] 192.168.214.72: << b'{"method":"getModelConfig","env":"pro","result":{"ps":1,"pwmFreq":1000,"pwmRange":[3,100],"wcr":30,"nowc":1,"cctRange":[2200,2700,4800,6500],"renderFactor":[171,255,75,255,43,85,0,0,0,0]}}'
2022-02-08 16:47:13 DEBUG (MainThread) [pywizlight.bulb] 192.168.211.79: << b'{"method":"getModelConfig","env":"pro","result":{"ps":1,"pwmFreq":1000,"pwmRange":[3,100],"wcr":30,"nowc":1,"cctRange":[2200,2700,4800,6500],"renderFactor":[171,255,75,255,43,85,0,0,0,0]}}'
2022-02-08 16:47:13 DEBUG (MainThread) [pywizlight.bulb] 192.168.210.189: << b'{"method":"getModelConfig","env":"pro","result":{"ps":1,"pwmFreq":200,"pwmRange":[1,100],"wcr":20,"nowc":2,"cctRange":[2700,2700,2700,2700],"renderFactor":[255,0,255,255,0,0,0,0,0,0]}}'
2022-02-08 16:47:13 DEBUG (MainThread) [pywizlight.bulb] 192.168.211.11: << b'{"method":"getModelConfig","env":"pro","result":{"ps":1,"pwmFreq":1000,"pwmRange":[3,100],"wcr":30,"nowc":1,"cctRange":[2200,2700,4800,6500],"renderFactor":[171,255,75,255,43,85,0,0,0,0]}}'
2022-02-08 16:47:13 DEBUG (MainThread) [pywizlight.bulb] 192.168.211.110: << b'{"method":"getModelConfig","env":"pro","result":{"ps":1,"pwmFreq":1000,"pwmRange":[3,100],"wcr":30,"nowc":1,"cctRange":[2200,2700,4800,6500],"renderFactor":[171,255,75,255,43,85,0,0,0,0]}}'
2022-02-08 16:47:13 DEBUG (MainThread) [pywizlight.bulb] 192.168.211.70: << b'{"method":"getModelConfig","env":"pro","result":{"ps":1,"pwmFreq":1000,"pwmRange":[5,100],"wcr":20,"nowc":1,"cctRange":[2700,2700,2700,2700],"renderFactor":[255,0,255,255,0,0,0,0,0,0]}}'
2022-02-08 16:47:13 DEBUG (MainThread) [pywizlight.bulb] 192.168.209.13: << b'{"method":"getModelConfig","env":"pro","result":{"ps":1,"pwmFreq":1000,"pwmRange":[5,100],"wcr":20,"nowc":1,"cctRange":[2700,2700,2700,2700],"renderFactor":[255,0,255,255,0,0,0,0,0,0]}}'
2022-02-08 16:47:13 DEBUG (MainThread) [pywizlight.bulb] 192.168.212.68: << b'{"method":"getModelConfig","env":"pro","result":{"ps":0,"pwmFreq":2000,"pwmRange":[5,100],"wcr":80,"nowc":2,"cctRange":[2700,2700,6500,6500],"renderFactor":[255,0,255,255,0,0,0,81,245,178],"drvIface":0}}'
2022-02-08 16:47:13 DEBUG (MainThread) [pywizlight.bulb] 192.168.209.213: << b'{"method":"getModelConfig","env":"pro","result":{"ps":0,"pwmFreq":2000,"pwmRange":[5,100],"wcr":80,"nowc":2,"cctRange":[2700,2700,6500,6500],"renderFactor":[255,0,255,255,0,0,0,81,245,178],"drvIface":0}}'
2022-02-08 16:47:13 DEBUG (MainThread) [pywizlight.bulb] 192.168.211.24: << b'{"method":"getModelConfig","env":"pro","result":{"ps":2,"pwmFreq":1000,"pwmRange":[0,100],"wcr":20,"nowc":1,"cctRange":[2700,2700,2700,2700],"renderFactor":[255,0,255,255,0,0,0,0,0,0],"wizc1":{"mode":[0,0,0,0,0,0,0]},"wizc2":{"mode":[0,0,0,0,0,0,0]}}}'

@bdraco
Copy link
Contributor

bdraco commented Feb 8, 2022

This would be good to implement into the bulb type so we can improve how discovery is displayed in Home Assistant

@bdraco
Copy link
Contributor

bdraco commented Feb 9, 2022

2022-02-08 20:07:10 DEBUG (MainThread) [pywizlight.bulb] 192.168.213.171: << b'{"method":"getModelConfig","env":"pro","result":{"ps":1,"pwmFreq":2000,"pwmRange":[0,100],"wcr":20,"nowc":1,"cctRange":[2700,2700,6500,6500],"renderFactor":[255,0,255,255,0,0,0,0,0,0],"hasAdjMinDim":0,"hasTapSensor":0,"pm":0,"fanSpeed":0}}'

https://www.costco.com/wiz-lutec-connected-smart-led-updown-outdoor-wall-light.product.100760871.html

WiZ Lutec Connected Smart LED Up/Down Outdoor Wall Light

This also identifies as a 20,1

@bdraco
Copy link
Contributor

bdraco commented Feb 9, 2022

So wcr is White to Color Ratio, and nowc is number of white channels.

@sbidy sbidy closed this as completed in #111 Feb 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants