This question is vaguely Internet of Things (IoT) related - but it's about the intra-net (no external internet connection in this scenario - we are air-gapped). Let's say I have a new smart household appliance. This smart appliance can connect to my wi-fi and has a built-in HTTP server that you can contact with your browser to make use of the appliance. Full disclosure: I'm the designer of the software for this appliance, and I'm trying to work out the user experience for interacting with it via a web browser.
How can the browser on my phone or laptop discover and connect to this appliance? The question is, what mechanism exists in the browser or operating system to let me discover the address of this device? What URL can I type into the address bar or what feature of the browser or operating system can I use to get started to discover and contact the appliance?
- The best-so-far solution I have is to install a native application on the phone or laptop that does a UDP multicast to discover the appliance (there would be a UDP multicast listener on the appliance that would answer back with the IP address and port of its local HTTP server. Then the native app would launch the system web browser and navigate to that URL. But I don't like this solution because it requires installing a native app, and the whole point was to just use a browser for the UI or make use of existing operating systems.
- The other thing I was contemplating is making the appliance somehow publish a hostname (I don't know much about DNS or whatever it would be) that would be recognized in the browser (e.g.: http://myappliance-31337.local/ or something like that?) This name would be unique (like a serial number), factory-set, and printed on the case of the appliance (and changeable by the user). I'm not sure if that's possible.
- The last thing I could think of is that the appliance hosts its own special-purpose wi-fi network (I don't know much about wi-fi direct, or whatever technology that would be). I think that any request that the browser makes on this network could be directed to the web-server on the appliance. The appliance could then tell the browser its address on the existing wi-fi network. I think I like this idea the best because I believe this technology exists already (like I said, I think this might be what wi-fi direct does...but I'm not sure.) The answer for my question may very well just be "use wi-fi direct", confirming that this is indeed what that technology is for.