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

Allow device discovery via hostname + speed up discovery #12

Merged
merged 4 commits into from
Jan 26, 2021

Conversation

alexh-name
Copy link
Contributor

Hi!
I managed to add discovery via hostname + optionally speeding up discovery by defining the address range completely within the the already used local-devices dependency. Hope this PR finds you well.

@alexh-name
Copy link
Contributor Author

I found that iOS devices started changing their MAC address as a privacy feature, so I needed to discover them via their advertised hostname.

Also possibly a fix for issues #4, #10 and #11, because on networks with large arp tables the find() function might time out before all reverse lookups are done. I think on those networks you need to specify an address range or somehow drop the reverse lookup entirely. Last solution would be the most performant if discovery by hostname is to be discarded, because then the reverse lookups are not used anyway.

However, I think this PR might be a good compromise between both. I'm not sure if local-devices has an option to disable reverse lookups.

@nitaybz
Copy link
Owner

nitaybz commented Jan 26, 2021

I'm planning to add a feature "onlyPing" which will allow to set up devices by IP only, and save the entire lookup process.... that would at least compare the plugin to other outdated plugins.

anyway, your PR is greatly appreciated and seems solid. I'll merge it now

@nitaybz nitaybz merged commit 3286d1a into nitaybz:master Jan 26, 2021
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.

None yet

2 participants