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

How to get the IP of the resolved service? #96

Closed
jonnybrooks opened this issue Jun 5, 2024 · 4 comments
Closed

How to get the IP of the resolved service? #96

jonnybrooks opened this issue Jun 5, 2024 · 4 comments

Comments

@jonnybrooks
Copy link

Hi there! First of all thanks for making this package, it works super great OOTB.

The only trouble I'm having is how to get the IP of the published service after resolving it... doing a code search, I see that service.ip was updated to service.host, but when I print out service.host it isn't an IP address but the host name like "Android.local."

Any help would be much appreciated!

@Skyost
Copy link
Owner

Skyost commented Jun 8, 2024

Hey,

Why do you want to resolve a service host ? Most of the time you only need an host 🙂

@jonnybrooks
Copy link
Author

Hey @Skyost, thanks for the reply! How is it possible to query the service without an IP? Sorry for the n00b question, but I thought the host name was just "superficial" - so it's possible to make an http request like: http://Android.local:3000/ or something?

@Skyost
Copy link
Owner

Skyost commented Jul 2, 2024

Sorry for the delay, I was super busy until last week. Yep, you can totally make your requests to homeassistant.local instead of 192.168.1.100 🙂

@jonnybrooks
Copy link
Author

That's so cool! Thank you very much. Can't wait to try this out :D

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