WebThingsIO / webthing-arduino

Simple server for ESP8266, ESP32, Ethernet, or WiFi101-compatible boards compliant with Mozilla's proposed WoT API
Mozilla Public License 2.0
207 stars 78 forks source link

Missing `MDNS.update()` in `update()` #58

Closed willdurand closed 5 years ago

willdurand commented 5 years ago

Hi,

using the latest Arduino 2.5.0 library and any example from this library (e.g., the LED sketch), mDNS does not work anymore: no device can be reached via its <hostname>.local domain.

According to this comment, there should be a call to MDNS.update() in the loop() so this call should be added to https://github.com/mozilla-iot/webthing-arduino/blob/305860fdd3aba08914c4f5d2d82d17eadc9617e5/ESPWebThingAdapter.h#L74-L76.

If I add MDNS.update() in the loop() of the LED sketch, the device is reachable again (via ping w25.local). The LWIP version does not matter (I tried v2 and v1.4).

hobinjk commented 5 years ago

Thanks for bringing this up! I was wondering why we hadn't had an issue previously and reading through that issue was fascinating

willdurand commented 5 years ago

❤️