Disconnect and reconnect ESP8266


I have an issue with a NodeMCU esp8266, that is connected a shitty access point (sorry for the french),

The access point kicks clients without any apparent reason (even when Im connected from my phone, I see how it losses connection and connects again)

What I thought is to add a routine and disable thinger.io, by the thinger.stop() command, I thougth that will stop wifi and start it again, by the thinger.handle() command, and it will try to connect it again to network, but it doesn’t.

Someone knows how to disconnect and try to reconnect this device to a wifi network, and of course, to thinger platform without restarting it?


Hi @ega,

the stop will disconnect the device from the network. If you do not call thing.handle again, it should not connect to the network. So, please, be sure you do not call thing.handle after the thing.stop, until you are ready to connect again.


Thanks for your answer

I’m avoiding to call thing.handle() when thing.stop() is called, Im stoping thinger 20 seconds every 10 minutes, my code is something like:

if (comm)     //all "thing.handle()" call is in one if like this

if (10min && comm) //  "10min" is kind of timer, every 10 mins this routine runs

if (20sec && !comm) // 20sec after 10mins previous routine is called

I was reading about to turn off wifi in esp8266, with lightsleep, so the microcontroler will turn off wifi but it keeps running the process

I will dig a little bit more on this, if I achieve something will post here



I’m facing a somehow similar problem with an Arduino Yun.
I have the Yun using my celular as access point in order to connect to Thinger.
When for some reason I disconnect the cell obviously the connection to Thinger drops because the Yun is not connected to the internet anymore.
The problem is that the connection to Thinger is not reestablished even when the cell is reconnected and the Yun is up again (unless I perform a hard reset on the YUN)
Shouldn’t Thinger reconnect as well without the need of a hard reset?

ThingerWebConfig Bug

Maybe I was doing something wrong, I did the code again and its working with no issues, even I turn off the wifi router and after the timer cycle runs, the device connects again to wifi and internet.