-->
Page 1 of 2

ESP8266WebServer and WiFiClient

PostPosted: Thu Jan 12, 2017 5:58 am
by Nic Roche
Hi,

I have a sketch that:
- Hosts some webpages
- Reads soil sensors
- Controls relays
- Controls servos
- GET requests to http://www.timeapi.org and api.thingspeak.com

The pages are hosted through ESP8266WebServer (and served via server.sendContent) and the GETs are using WiFiClient - client.print(String("GET ") +...

The first (and only) connection to http://www.timeapi.org works routinely but subsequent connections to api.thingspeak.com (after starting the webserver) mostly fail.

Is there a restriction (and strategy for handling) hosting a server and spawning a client?

There are a few ino and *.h files but I can post further details as needed.

Thanks.

Re: ESP8266WebServer and WiFiClient

PostPosted: Thu Jan 12, 2017 2:49 pm
by anotherjoe
if subsequent connections/requests to api.thingspeak.com mostly fail, but some succeed, are you coming up against the 15 second rate limiting interval between requests?

Re: ESP8266WebServer and WiFiClient

PostPosted: Thu Jan 12, 2017 7:11 pm
by Nic Roche
They rarely succeed and possibly due to my disabling the httpServer (during debug iterations). I'm not sure what the 15 second interval is ,but the connections to api.thingspeak.com happen every minute; the first one 2 minutes after the GET to www.timeapi.org.

Re: ESP8266WebServer and WiFiClient

PostPosted: Thu Jan 12, 2017 7:30 pm
by Nic Roche
Also I have the OTA updates but do it manually (UpdaterClass) from a handler callback "on" (httpServer.on("/update", HTTP_POST...) assignment.