sbidy / pywizlight

A python connector for WiZ devices
MIT License
463 stars 79 forks source link

Add support for discovering new devices via broadcast of their first heartbeat #111

Closed bdraco closed 2 years ago

bdraco commented 2 years ago
bdraco commented 2 years ago

The descriptions may be too specific as I think the models are a bit more generic

codecov-commenter commented 2 years ago

Codecov Report

Merging #111 (b788440) into master (772566f) will increase coverage by 44.49%. The diff coverage is 82.45%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master     #111       +/-   ##
===========================================
+ Coverage   29.59%   74.08%   +44.49%     
===========================================
  Files          13       12        -1     
  Lines         821      741       -80     
===========================================
+ Hits          243      549      +306     
+ Misses        578      192      -386     
Impacted Files Coverage Δ
pywizlight/push_manager.py 26.31% <37.50%> (-0.20%) :arrow_down:
pywizlight/bulb.py 75.88% <81.81%> (+50.88%) :arrow_up:
pywizlight/utils.py 89.18% <82.60%> (+54.18%) :arrow_up:
pywizlight/models.py 92.30% <92.30%> (ø)
pywizlight/bulblibrary.py 91.66% <100.00%> (+26.44%) :arrow_up:
pywizlight/discovery.py 77.96% <100.00%> (+36.53%) :arrow_up:
pywizlight/rgbcw.py 72.91% <100.00%> (+55.20%) :arrow_up:
pywizlight/scenes.py 100.00% <100.00%> (+57.14%) :arrow_up:
pywizlight/vec.py 89.28% <100.00%> (+28.57%) :arrow_up:
pywizlight/cli.py
... and 9 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 772566f...b788440. Read the comment docs.

bdraco commented 2 years ago

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

I don't think this actually gives enough info to identify the device

sbidy commented 2 years ago

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

I don't think this actually gives enough info to identify the device

Yes, thats true. I don't see a chance to have such a generic approach with the info we got from the UDP interface. Maybe we got a new property for a possible detection of the physical shape of the bulb/stripe/etc..

Thank you for jumping in and having a second look into that.