Need help with mDNS - resolved

mDNS stands for Multicast Domain Name Service. It’s a protocol promoted by Apple some years ago to facilitate identifying printers on a local lan without explicit configuration (zeroconf). Their implementation is a product called Bonjour Print Services and it runs on a variety of platforms including Windows, which is my primary platform.

This is the mechanism that makes iotawatt.local work in your browser. It works great on apple products, especially iPhones and iPads. Not so much other devices these days.

With Bonjour installed on my Windows machines, Chrome works fine. Firefox used to work but not as of late. Edge and Explorer haven’t worked for a long time.

You can always directly address the IoTaWatt by IP address, but that’s not always easy to determine. I can’t think of a way to provide it from IoTaWatt without compromising security with an access point.

I’m not particularly fluent in this technology, especially as it seems to vary greatly from platform to platform. The Windows variant, LLMNR (Link Local Multicast Name Resolution) is supposed to be somewhat compatible with mDNS, but doesn’t seem to help.

I’m interested in getting community input to try to improve this area of IoTaWatt. Specifically i’m interested in experiences where you got mDNS to work in various environments, and also insight from anyone who might have ideas or references for any alternative implementations of a zeroconf technology or mDNS.

UPDATE: I think I may have stumbled on the answer to this problem. I found that the ESP8266 libraries have an LLMNR responder. I tried it out and it works! Leaving the mDNS responder in place for Apple devices, the LLMNR responder seems to work with Edge, IE, Firefox and Chrome on Windows. Apparently it does not work with safari on iDevices (and probably not Mac) but I have left the mDNS responder in place and it appears to be compatible with the LLMNR responder.

I’ll probably start to put this out in ALPHA in the coming weeks. This is a major improvement. There is also a new Core (1.8.0) that I’m trying out. I need to research a bit but hopefully it further stabilizes lwip2.

2 Likes

Does mDNS (and LLMNR) use the Device Name that is configured in Setup? Alas, I’m not able to use Bonjour/mDNS to access my IotaWatts by name because my laptop is on a separate routed WLAN from the IotaWatts, but my OpenWrt router creates automatic local DNS entries for all DHCP clients using the hostname provided by the DNS client. The hostname shows up to the DHCP server as ESP_last-3-octets-of-MAC, so my first IotaWatt is accessible via http://ESP_697211.lan/. It would be nice if the hostname provided to the DHCP server was the configured Device Name, along with a default Device Name of IotaWatt-last-3-octets-of-MAC (using a hyphen instead of underscore because underscores are not really supposed to be used in hostnames). Then all the discovery methods (mDNS, LLMNR, DHCP hostname) could use the Device Name which by default would be unique for each one, but could be overridden in the Setup screen if desired. I suppose if this was done, there should ideally be a MAC Address label affixed to the outside of each IotaWatt so you would know which one you are connecting to.

02_03_18 now in ALPHA sets the hostname. There is no MAC appendage. To avoid ambiguity you can change the name of an IoTaWatt.

1 Like