Comments on: ESP32 HTTP GET with Arduino IDE (OpenWeatherMap.org and ThingSpeak) https://randomnerdtutorials.com/esp32-http-get-open-weather-map-thingspeak-arduino/ Learn ESP8266, ESP32, Arduino, and Raspberry Pi Fri, 29 Mar 2024 16:32:46 +0000 hourly 1 https://wordpress.org/?v=6.8.2 By: Sara Santos https://randomnerdtutorials.com/esp32-http-get-open-weather-map-thingspeak-arduino/#comment-901975 Fri, 29 Mar 2024 16:32:46 +0000 https://randomnerdtutorials.com/?p=96790#comment-901975 In reply to Turlu.

Serial.println(myObject[“weather”][0][“description”]);

]]>
By: Turlu https://randomnerdtutorials.com/esp32-http-get-open-weather-map-thingspeak-arduino/#comment-901908 Fri, 29 Mar 2024 09:15:56 +0000 https://randomnerdtutorials.com/?p=96790#comment-901908 Hi everybody,
here is my json object :
JSON object = {“coord”:{“lon”:-21.4533,”lat”:40.88},”weather”:[{“id”:804,”main”:”Clouds”,”description”:”couvert”,”icon”:”04d”}],”base”:”stations”,”main”:{“temp”:10.9,”feels_like”:10.42,”temp_min”:10.9,”temp_max”:10.9,”pressure”:991,”humidity”:91,”sea_level”:991,”grnd_level”:966},”visibility”:10000,”wind”:{“speed”:5.56,”deg”:198,”gust”:11.67},”clouds”:{“all”:100},”dt”:1711703046,”sys”:{“type”:1,”id”:6569,”country”:”PT”,”sunrise”:171331123,”sunset”:1711736885},”timezone”:7200,”id”:3066953,”name”:”Vigo”,”cod”:200}
Which command to read the descrption valure (Couvert)?
Thanks all.
Bye

]]>
By: subhaniminhas https://randomnerdtutorials.com/esp32-http-get-open-weather-map-thingspeak-arduino/#comment-871433 Sat, 11 Nov 2023 10:44:18 +0000 https://randomnerdtutorials.com/?p=96790#comment-871433 In reply to Sara Santos.

// Convert JSONVar to String
String tempStr = JSON.stringify(myObject[“main”][“temp”]);

// Convert String to float
float temperature = tempStr.toFloat();

//float tempC = myObject["main"]["temp"].as<float>();
Serial.print("Temperature: ");
//Serial.println(tempC-273.0);
Serial.println(temperature-276.15);

]]>
By: subhaniminhas https://randomnerdtutorials.com/esp32-http-get-open-weather-map-thingspeak-arduino/#comment-871431 Sat, 11 Nov 2023 10:42:02 +0000 https://randomnerdtutorials.com/?p=96790#comment-871431 In reply to GIANNI.

// Convert JSONVar to String
String tempStr = JSON.stringify(myObject[“main”][“temp”]);

// Convert String to float
float temperature = tempStr.toFloat();

//float tempC = myObject["main"]["temp"].as<float>();
Serial.print("Temperature: ");
//Serial.println(tempC-273.0);
Serial.println(temperature-276.15);

]]>
By: michelangelo https://randomnerdtutorials.com/esp32-http-get-open-weather-map-thingspeak-arduino/#comment-860536 Thu, 14 Sep 2023 18:27:07 +0000 https://randomnerdtutorials.com/?p=96790#comment-860536 ciao!
I’ve been trying to connect the ESP32 to the weather vane unsuccessfully, and I’d like to know if you can provide some guidance on the connection, please

]]>
By: Robert N https://randomnerdtutorials.com/esp32-http-get-open-weather-map-thingspeak-arduino/#comment-805331 Sun, 25 Dec 2022 18:50:52 +0000 https://randomnerdtutorials.com/?p=96790#comment-805331 In reply to Yriy.

Thanks for this – I am still puzzled though as to what the [0] does in terms of decoding. Is it referring to the first variable in an array? I have played around to try to acces things like sunrise and feels_like but haven’t been able to figure how how to write it.

]]>
By: NTKKS https://randomnerdtutorials.com/esp32-http-get-open-weather-map-thingspeak-arduino/#comment-804131 Sun, 18 Dec 2022 20:53:27 +0000 https://randomnerdtutorials.com/?p=96790#comment-804131 For those getting a httpGETRequest prolem and using VSCODE, you have to put that function before the loop(). It is a function order thing handled differrently by some IDEs.

]]>
By: Michael https://randomnerdtutorials.com/esp32-http-get-open-weather-map-thingspeak-arduino/#comment-791271 Fri, 14 Oct 2022 13:25:02 +0000 https://randomnerdtutorials.com/?p=96790#comment-791271 In reply to Indika.

Problem is when using this server path, it returns this error: “https” was not declared in this scope. I can’t get this server path to work!!

]]>
By: Me-Chiel https://randomnerdtutorials.com/esp32-http-get-open-weather-map-thingspeak-arduino/#comment-786874 Thu, 29 Sep 2022 11:24:31 +0000 https://randomnerdtutorials.com/?p=96790#comment-786874 In reply to 37_633k0.

hey El Geeko,

I was just looking for this yesterday.
not for the description, but for the icon.
Serial.println(WebIcon.substring(1, 4));
for the description you also need to get the length. there’s a command for that as well. Google will help you there:)

]]>
By: Sara Santos https://randomnerdtutorials.com/esp32-http-get-open-weather-map-thingspeak-arduino/#comment-786863 Thu, 29 Sep 2022 10:20:33 +0000 https://randomnerdtutorials.com/?p=96790#comment-786863 In reply to 37_633k0.

Hi.
You can use the substring() method: https://www.arduino.cc/reference/en/language/variables/data-types/string/functions/substring/
Regards,
Sara

]]>