0 votes
in WeatherStationClassic by (190 points)

Good afternoon all,

Purchased the Squix #1 Arduino WiFi ESP8266 Starter Kit from Amazon and have gotten it mostly working.  When I say "mostly working," I am experiencing intermittent "connection failed" messages as shown in the serial output.

I'm using the WeatherStationDemoExtendedDST example, but with an entry for Central Time *and* the ticker1 and ticker2 fixes per the information found here.

Below is a clip from the serial output.  As can be seen, everything connects fine, and I get the forecast data without any issues.  Then on the next update, the connection fails.  The clock then shows 12:00:00am on Thu 1 Jan 1970.  It will then randomly connect properly, set the time and date properly, and repeat the connection fail messages.

I'm at a loss on how to troubleshoot this.  Using Google, it appears that the ESP8266 can have wifi connection problems and "forget" the SSID.  This doesn't seem to be happening, as the ESP8266 does NOT enter Access Point mode as verified by my laptop using inSSIDer, and my tomato router still shows that the ESP8266 is connected...just not receiving or generating any IP traffic.

I wanted to test to see if the ESP8266 was forgetting the SSID, but the documentation for WifiManager doesn't make it really clear to me on how to do this.

I did change the NTP server list to include my local network's NTP server (a Raspberry Pi "NTPi" server) thinking that maybe it wasn't able to connect to the NTP Pool, but that didn't make a difference.

Switching the code to use manual wifi doesn't help.

Any help on troubleshooting this would be greatly appreciated!

thanks much,


*WM: AutoConnect
*WM: Connecting as wifi client...
*WM: Using last saved values, should be faster
*WM: Connection result: 
*WM: 3
*WM: IP Address:
Hostname: ESPWXfd88c1
Requesting URL: /api/XXXXXXXXXXXXXXX/conditions/lang:EN/q/US/Harvest,AL.json
start document
Requesting URL: /api/XXXXXXXXXXXXXXX/forecast10day/lang:EN/q/US/Harvest,AL.json
start document
0: partlycloudy:forecastday
0: Saturday
1: nt_chancerain:pop
1: Saturday Night
2: partlycloudy:pop
2: Sunday
3: nt_mostlycloudy:pop
3: Sunday Night
4: chancetstorms:pop
4: Monday
5: nt_chancetstorms:pop
5: Monday Night
6: chancetstorms:pop
6: Tuesday
7: nt_chancerain:pop
7: Tuesday Night
8: cloudy:pop
8: Wednesday
9: nt_partlycloudy:pop
9: Wednesday Night
10: clear:pop
10: Thursday
11: nt_clear:pop
11: Thursday Night
12: clear:pop
12: Friday
13: nt_partlycloudy:pop
13: Friday Night
14: partlycloudy:pop
14: Saturday
15: nt_chancerain:pop
15: Saturday Night
16: chancerain:pop
16: Sunday
17: nt_chancerain:pop
17: Sunday Night
18: clear:pop
18: Monday
19: nt_clear:pop
19: Monday Night
Requesting URL: /channels/67284/feeds.json?results=1&api_key=L2VIW20QVNZJBLAK
field1: 27.10
field2: 48.20

DST Rules Updated:
DST Start: Sun Mar 12 02:00:00 2017
DST End:   Sun Nov 05 01:00:00 2017

field1: 27.10
field2: 48.20
Setting readyForDHTUpdate to true
Setting readyForDHTUpdate to true
Setting readyForDHTUpdate to true
Setting readyForDHTUpdate to true
Setting readyForUpdate to true
Setting readyForDHTUpdate to true
connection failed
connection failed
connection failed

DST Rules Updated:
DST Start: Sun Mar 08 02:00:00 1970
DST End:   Sun Nov 01 01:00:00 1970

Setting readyForDHTUpdate to true
Setting readyForDHTUpdate to true
Setting readyForDHTUpdate to true
Setting readyForDHTUpdate to true
Setting readyForUpdate to true
Setting readyForDHTUpdate to true
connection failed
connection failed
connection failed

1 Answer

0 votes
by (190 points)
selected by
Best answer

Good morning all,

I let the unit run last night and logged all of the serial output to a file.  Here is a link to that file:


I also figure that uploading my sketch and settings files might be helpful as well.  Here those are, with the API keys deleted:



I also verified last night that this isn't a power supply problem - it is now powered off its own USB hub, the same one I used in the past to successfully power my RPi3 units without issue.

Thanks much,

ben, kd5byb

by (190 points)
I may have this figured out.  After doing many google searches...it seems that the ESP8266 can have issues with the Asus RT-N16 router and/or Tomato firmware...which is what I use.  I'm not exactly sure what is going on; one poster who tracked it down with Wireshark said that the RT-N16 was "being too chatty" and somehow messing up ARP/DHCP.  The solution suggested was to move to a static IP, and change the Arduino code to specify a static IP, gateway, and subnet.  This appears to have fixed my intermittent connection issues.  When I get back to my computer, I'll verify this by looking at the serial logging I started last night when I made the change to the static IP in the code and bound the MAC address of the ESP8266 to the static IP.

by (190 points)
I'm going to call this one fixed.  In reviewing the serial log...it had three connection fails over the last 24 hours, all in row, almost like the DSL modem quit for a minute which it does from time to time.
by (260 points)
dont know if you are using the Wemos D1 Mini Pro (16MB Flash) too,  in my case it showed up that the built in ceramic antenna is very ineffient. After changing to a external whip all my similar problems disappeared.
/beat (hb9atu)
by (190 points)
No - this particular unit is a NodeMCU clone with the printed PCB antenna.  It is within a meter from my wireless router, so signal strength / antenna efficiency shouldn't be an issue.

Welcome to ThingPulse Q&A, where you can ask questions and receive answers from other members of the community.