yes, single client.print in my codes :
Code: Select all WiFiClient client;
// connexion au serveur ThingSpeak pour mise à jour du canal par requete GET
if (!client.connect(host, httpPort)) {
//Serial.println("echec de connection");
// on passe son tour !!
ESP.deepSleep(intervalle * 60 * 1000000, WAKE_RF_DEFAULT); // WAKE_RF_DEFAULT ou WAKE_NO_RFCAL
}
// composer le contenu de la requete GET, dans la chaine 'url'
String url = "/update?key=";
url += myWriteAPIKey;
url += "&field1=";
url += String(voltage);
url += "&field2=";
url += String(session);
url += "&field5=";
url += String(tdallas);
// envoi requete GET au serveur
client.print(String("GET ") + url + " HTTP/1.1\r\n" +
"Host: " + host + "\r\n" +
"Connection: close\r\n\r\n");
Did you try
.....
with no DNS ??
Yes but I don't remember effect from each 'trick' !!!!
Using static IP I am now able to get a consistent 165ms for router connection
Here (noisy environnement ? too many strong AP around me ?) I can't get consistant 200mS router's connection if device is more than 3 or 4 meter from AP.
I want to reach 9 month logging with 1500 mAh LifePo4 and begin some tests in two directions :
-replace DS18B20 by fast 12bits I2C TMP102
-send ("publish") data to local MQTT broker (Raspberry Pi connected to 'box' with Ethernet) and then
relay data to ThingSpeak withg some simple NodeRed code
(I still have no success in setting a local ThingSpeak server on my Raspberry Pi)
Amicalement