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

Add zeroconf/mdns discovery #6

Closed
balloob opened this issue Nov 2, 2019 · 6 comments · Fixed by #255
Closed

Add zeroconf/mdns discovery #6

balloob opened this issue Nov 2, 2019 · 6 comments · Fixed by #255
Labels
enhancement New feature or request

Comments

@balloob
Copy link
Member

balloob commented Nov 2, 2019

Discovery is currently stubbed out. Home Assistant is discoverable on _home-assistant._tcp.local.

@RussNelson
Copy link

If it's stubbed out, then why does it say that it's attempting to scan? This is confusing as heck.

@marciogranzotto
Copy link
Contributor

I made a preliminary implementation of mdns search. But I still need to structure it a little better before opening a PR

@marciogranzotto
Copy link
Contributor

Question about mdns.
When I find a mDNS record on my network, this is what android returns me:

BonjourService{flags=2, domain='local.', regType='_home-assistant._tcp.', serviceName='Home', dnsRecords={base_url=https://RETRACTED.duckdns.org, version=0.102.3, requires_api_password=true}, ifIndex=9, hostname='Home._home-assistant._tcp.local.', port=8123}
192.168.1.133

The thing is, using my duckdns external URL, I'm remapping the port to 1220, so if I would use that URL with the port that mDNS returns, it wouldn't work.
If I use the discovered IP address, and the port, it will work. But I have no way to know if ssl is required or not...

Should I just assume that http://IPADDRESS:PORT works?

@balloob
Copy link
Member Author

balloob commented Dec 1, 2019

You should update your config to make sure that your base url includes the port that you use.

We should initially try to connect to the base url.

If that won't work, we can do the http://IPADDRESS:PORT but it means we need to disable SSL verification in case the user uses Let's Encrypt (hence why we should use the base url)

@marciogranzotto
Copy link
Contributor

If the base URL fails, I can also check if starts with https and use that with the IP address

@balloob
Copy link
Member Author

balloob commented Dec 22, 2019

@marciogranzotto have you made progress on your implementation ?

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

Successfully merging a pull request may close this issue.

3 participants