-->
Page 1 of 1

Esp8266, does not reconnect wifi

PostPosted: Wed May 10, 2017 9:03 pm
by Grimdar
Hello, not much of a coder. I have an Esp8266 Wi-Fi board set up to trigger ifttt alerts when a door sensor has been triggered. It successfully connects to Wi-Fi and sends alerts.
Here's the tutorial where I learned from: http://www.simpleiothings.com/10-diy-door-sensor/

The problem is, if for whatever reason the Wi-Fi drops, it does not automatically reconnect unless I reset the power to the board.

Any way to solve this? I use LuaLoader to upload the lua files to the board.

Thanks in advance for any help.

Re: Esp8266, does not reconnect wifi

PostPosted: Sat May 13, 2017 3:43 am
by taikapanu
Hi,

You need to periodically check if the WIFI is still alive or not. If it drops then simply reconnect.

Re: Esp8266, does not reconnect wifi

PostPosted: Mon May 15, 2017 1:15 pm
by alex_g
Indeed, what the poster above said.

Easiest way is probably to monitor for "Station Connected" or "Station Disconnected" and either reconnect (or reset, if a reset will reconnect) as appropriate.