Closed PPCM closed 4 years ago
WITHOUT_WS
?I don't know which version of the library I use, I downloaded it from here: https://github.com/mozilla-iot/webthing-arduino/releases
I use WebThing 0.4.1 on the gateway, but I didn't add any URL of the ESP8266 device, I simply add the device with the + button.
I don't think the device is low power mode because it responds to pings and direct access to the ESP8266 webserver succeed
@mrstegeman Your post made me think about the way I added the device. So I changed the procedure:
Previously When I added an element, I used the "+" button in "Things" menu, and the gateway recognized automatically the device. With the procedure, the device is deconnected after one or two minutes.
Now When I add an element, I use the "+" button in "Things" menu, then I use "Add by URL..." link. Now the device is no more disconnected.
That's mean there are 2 ways to add a new device, one works fine and the second doesn't work correctly. Perhaps, it will be good if only one way becomes available.
An other reflection: my devices are on a network with a DHCP server, what happen if the device changes its IP address? Does the gateway store devices with there MAC Address?
Ah, good. Glad that's working for you. It seems like there's probably an mDNS issue, then. Lots of those seem to exist with the ESP mDNS libraries: https://github.com/mozilla-iot/webthing-arduino/issues
An other reflection: my devices are on a network with a DHCP server, what happen if the device changes its IP address?
The device will become disconnected. You're best off assigning a static IP to your device, if possible.
Does the gateway store devices with there MAC Address?
No. Ideally, mDNS resolves those issues. However, that doesn't seem to work all the time.
Hello there,
I made a simple webthing with Wemos D1 Mini. The source file is joined to this post. Wifi_led.ino.txt
The connection to the WIFI and WebThings Gateway is done correctly. I can control the led without problem. But if there is no action after one or two minutes on the device, it is disconnected from WebThings Gateway.
Some investigations :
To reconnect the device to the gateway, the device has to be reseted.
How to make a stable permanent?