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

Feat: New constructor with raw JSON as input (PR is WIP) #55

Draft
wants to merge 15 commits into
base: master
Choose a base branch
from

Conversation

yunginnanet
Copy link
Contributor

- What I did

- How I did it

- How to verify it

- Description for the CHANGELOG

@yunginnanet yunginnanet changed the title Begin implementation of proxy(+) support Feat: New constructor with raw JSON as input (PR is WIP) Jul 8, 2022
@codecov-commenter
Copy link

codecov-commenter commented Jul 8, 2022

Codecov Report

Merging #55 (8403d46) into master (5668ae6) will decrease coverage by 0.02%.
The diff coverage is 71.42%.

❗ Current head 8403d46 differs from pull request most recent head aae82f0. Consider uploading reports for the commit aae82f0 to get more accurate results

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

@@            Coverage Diff             @@
##           master      #55      +/-   ##
==========================================
- Coverage   73.53%   73.52%   -0.02%     
==========================================
  Files           5        5              
  Lines        1436     1443       +7     
==========================================
+ Hits         1056     1061       +5     
- Misses        210      211       +1     
- Partials      170      171       +1     
Impacted Files Coverage Δ
huego.go 78.26% <71.42%> (-0.37%) ⬇️

@yunginnanet
Copy link
Contributor Author

Haven't had time to write this out yet, but here's why I added it: https://github.com/yunginnanet/ziggs/blob/2705ff6140f9f18f805eaba297339a6f5d62a97c/ziggy/lights.go#L371-L401

Essentially my bridge is firewalled off from the internet - this means it can't call home to phillips to do its little discovery function. As an alternative (and very barbaric) discovery method my app offers to port scan the chosen LAN interface and then enumerate the addresses that respond for status callbacks.

When it gets a hit, it uses that JSON to construct a bridge type using the NewCustom function.

@amimof
Copy link
Owner

amimof commented Jun 20, 2023

Hey @yunginnanet Thanks for contributing. Let me know once you are ready for review (no longer draft)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants