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: include bridge port 10002, used in new devices in broadcast discovery #642

Merged
merged 3 commits into from
Apr 10, 2023

Conversation

liadav
Copy link
Contributor

@liadav liadav commented Apr 6, 2023

Description

In newer firmware version of Switcher V2, the broadcast port changed from 20002 to 10002. I added this port to the bridge discovery code.

Related issue (if any): fixes #592

Checklist

  • [V] I have followed this repository's contributing guidelines.
  • [V] I will adhere to the project's code of conduct.

@welcome
Copy link

welcome bot commented Apr 6, 2023

Thanks for opening this pull request! Please check out our contributing guidelines.

@pull-request-size pull-request-size bot added the size: s Pull request has 10 to 30 lines label Apr 6, 2023
@auto-me-bot auto-me-bot bot added the status: needs review Pull request needs a review label Apr 6, 2023
@TomerFi
Copy link
Owner

TomerFi commented Apr 6, 2023

Thank you @liadav.
This is a "hot topic", more people should be involved.

@dmatik Do you mind being involved in this too?
Do you know if we have a way to differentiate the new type1 from the old ones, so we can perhaps set the port in code?

@dmatik
Copy link

dmatik commented Apr 6, 2023

Sure. I can help.
Not sure about any way to differentiate.
I have installed recently new Switcher Touch V3.
Did not have issue to retrieve the ID using the old script.
I am still using the WebAPI approach, not integration.

@liadav
Copy link
Contributor Author

liadav commented Apr 9, 2023

Based on my initial research, it looks like the only thing that's different is the broadcast port. So, I think we just need to add that for the discovery phase. It shouldn't matter whether it's a new type1 or an old one.
By the way, if you want, we can run some tests on my device to make sure everything is working properly.

@TomerFi TomerFi changed the title add new port for broadcast discovery feat: include bridge port 10002, used in new devices in broadcast discovery Apr 10, 2023
@codecov
Copy link

codecov bot commented Apr 10, 2023

Codecov Report

Merging #642 (ea8245e) into dev (fa40529) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##              dev     #642   +/-   ##
=======================================
  Coverage   98.35%   98.35%           
=======================================
  Files          11       11           
  Lines        1092     1093    +1     
=======================================
+ Hits         1074     1075    +1     
  Misses         18       18           

@TomerFi
Copy link
Owner

TomerFi commented Apr 10, 2023

Sure. I can help.
Not sure about any way to differentiate.
I have installed recently new Switcher Touch V3.
Did not have issue to retrieve the ID using the old script.
I am still using the WebAPI approach, not integration.

@dmatik Oh yeah, you're right.
I was away from this project for so long, I forgot some of the implementation specifications.
After reviewing this, I now remember that the this port is used only by the Bridge, and not the API.
So we probably, don't need to do anything for the WebAPI as it doesn't use the Bridge.
:-)

@TomerFi
Copy link
Owner

TomerFi commented Apr 10, 2023

Based on my initial research, it looks like the only thing that's different is the broadcast port. So, I think we just need to add that for the discovery phase. It shouldn't matter whether it's a new type1 or an old one. By the way, if you want, we can run some tests on my device to make sure everything is working properly.

@liadav Thank you very much for you contribution.
Do you mind having a look at the discover_devices script? It also uses the same port variables.

We also need to include it in the script's help sections, which mentions the original ports only.

@liadav liadav force-pushed the support_v5_firmware_switcher_v2 branch from d6b9b9a to 4d11a6e Compare April 10, 2023 16:27
@liadav
Copy link
Contributor Author

liadav commented Apr 10, 2023

Sure, I added both to discover_devices script and the script's help section.

@TomerFi
Copy link
Owner

TomerFi commented Apr 10, 2023

LGTM
Thank you @liadav .

@dmatik I think we can merge this now, WDYT?

@auto-me-bot auto-me-bot bot added status: approved Pull request is approved and removed status: needs review Pull request needs a review labels Apr 10, 2023
@dmatik
Copy link

dmatik commented Apr 10, 2023

LGTM

Thank you @liadav .

@dmatik I think we can merge this now, WDYT?

Yes, sure.

@TomerFi TomerFi merged commit aa07716 into TomerFi:dev Apr 10, 2023
@welcome
Copy link

welcome bot commented Apr 10, 2023

Congrats on merging your first pull request! Your contribution is highly appriciated!

@auto-me-bot auto-me-bot bot added status: merged Pull request merged and removed status: approved Pull request is approved labels Apr 10, 2023
@TomerFi
Copy link
Owner

TomerFi commented Apr 10, 2023

@all-contributors add @liadav for code

@allcontributors
Copy link
Contributor

@TomerFi

I've put up a pull request to add @liadav! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size: s Pull request has 10 to 30 lines status: merged Pull request merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

switcher version 5.3 is not working
3 participants