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

Can I do bonjour service discovery with this ? #2

Open
sander76 opened this issue Mar 18, 2018 · 3 comments
Open

Can I do bonjour service discovery with this ? #2

sander76 opened this issue Mar 18, 2018 · 3 comments

Comments

@sander76
Copy link
Contributor

I am using python zeroconf for getting the ip address of a local device with a specific mdns/bonjour name.

Something comparable to:
https://github.com/jstasiak/python-zeroconf#how-do-i-use-it

Is this library suited for doing this too ?

@al45tair
Copy link
Owner

Yes, you can use asyncdns to look up services using the MulticastResolver. Try using the pymdns script in the "scripts" folder as an example, e.g.:

./scripts/pymdns _http._tcp.local

@sander76
Copy link
Contributor Author

@al45tair That's great. Going to try it ! Thanks.

@sander76
Copy link
Contributor Author

sander76 commented May 2, 2018

@al45tair Sorry to bother you again. I have little experience doing this.
Your suggestion above works. However, I have multiple devices carrying the same bonjour name. If I run the script I receive only one result. If I re-run I get the next result, and so on. Is it possible to gather all results in one go ? I should I just put the script in a loop or something ?

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

No branches or pull requests

2 participants