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

[Feature Request] mDNS for discovered devices #47

Closed
cweiske opened this issue Dec 8, 2021 · 2 comments
Closed

[Feature Request] mDNS for discovered devices #47

cweiske opened this issue Dec 8, 2021 · 2 comments
Labels
enhancement New feature or request

Comments

@cweiske
Copy link
Collaborator

cweiske commented Dec 8, 2021

When automatically discovering devices via mDNS (since #27), HomeApp resolves the IP address and stores that in its configuration: url=https://192.168.3.71/.
This works fine for IoT devices with static IP addresses, but not for those that get a new one everytime from the DHCP server (dynamic IP).

The solution to this problem would be to not resolve the IP address during discovery, but to store the discovered name and then resolve it via mDNS when accessing the device.

This could be integrated into the current structure by saving "https://mdnsname.local/" as path (url=https://shellyplus1-a8032abd1bcc.local/). When trying to access that path, HomeApp would need to check if the domain ends with .local and resolve the domain via mDNS. Then the local domain would need to be replaced in that path, and then the actual HTTP request could be made.

I personally use static IPs for my IoT devices, so I don't have this problem. Others could, though.

@cweiske cweiske added the enhancement New feature or request label Dec 8, 2021
@Domi04151309
Copy link
Owner

Domi04151309 commented Dec 8, 2021

I would like to not implement this until it becomes an issue for someone because a lot of DHCP implementations try to use the same IP addresses for devices whenever possible. I do not use static IP addresses and have not had this issue yet.
As far as I know other apps like the "Philips Hue" app or "Hue Essentials" only use the IP as well.

@cweiske
Copy link
Collaborator Author

cweiske commented Dec 8, 2021

Fair point.

@cweiske cweiske closed this as completed Dec 8, 2021
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

No branches or pull requests

2 participants