Weather Station Color and ESP Web Config

Hello,

i have made the project "Weather Station Color" with http://api.openweathermap.org,

all work great but i cant change the wifi network or api or local city remotly, so i have to upload the sketch for a specific place.

I implement the Web Config (hhtp server for ESP8266), but the hour, date, weather and forecasts dont update anymore.

the hhtp server works, i can read and write all parameters i need (ssid, password, appid, app_location_id, city_name...). The web server said i am connect to wifi, but the result for a hhtp get is -1, instead of 200 expected.

I have attached the complete code (too big to paste here, multiples tabs).

The serial information with weather station who works is :

Connecting to WiFi xxxxxxxxxxxxx/xxxxxxxxxxxxxxxx
....................................Connected...Initializing touch screen...
16:28:01.884 -> Mounting file system...
PIFFS opened: 

16:28:02.159 -> DST Rules Updated:
16:28:02.159 -> DST Start: Sun Mar 31 00:00:00 2019
16:28:02.159 -> DST End:   Sun Oct 27 00:00:00 2019
16:28:02.159 -> 
16:28:02.159 -> Time difference for DST: 14400Getting url: http://api.openweathermap.org/data/2.5/weather?id=935317&appid=xxxxxxxxxxxxx2658fced2570e1b5f0f2&units=metric&lang=fr
16:28:02.264 -> [HTTP] GET...
[HTTP] GET... code: 200
16:28:02.913 -> start document
Getting url: http://api.openweathermap.org/data/2.5/forecast?id=935317&appid=xxxxxxxxxxxx2658fced2570e1b5f0f2&units=metric&lang=fr
16:28:03.018 -> [HTTP] GET...
[HTTP] GET... code: 200
16:28:06.195 -> start document

And the serial information with the esp Web config result is :

Starting ESP8266
16:19:33.052 -> Reading Configuration
16:19:33.052 -> Configurarion Found!
!!!!!!!!!!!!!!!!!!ACCESS POINT MODE!!!!!!!!!!!!!!!!!!!
16:19:33.155 -> 15
Configuring Wifi
16:19:33.326 -> LE SSID EST : 
16:19:33.326 -> xxxxxxxxxxxxx
16:19:33.326 -> LE MP EST : 
16:19:33.326 -> xxxxxxxxxxxxxxxxxxxxxx
........Connected...HTTP server started
16:19:39.269 -> Initializing touch screen...
16:19:39.269 -> Mounting file system...
PIFFS opened: 
Time difference for DST: 14400Getting url: http://api.openweathermap.org/data/2.5/weather?id=935317&appid=xxxxxxxxxxxxx2658fced2570e1b5f0f2&units=metric&lang=fr
16:19:39.680 -> [HTTP] GET...
16:19:39.680 -> [HTTP] GET... code: -1
Getting url: http://api.openweathermap.org/data/2.5/forecast?id=935317&appid=xxxxxxxxxxxxx2658fced2570e1b5f0f2&units=metric&lang=fr
16:19:39.784 -> [HTTP] GET...
16:19:39.784 -> [HTTP] GET... code: -1

Is someone can help please?

I see i am connected to internet and dont understand why the request return -1 instead of 200 and dont upgrade data...

the main code is too big...error post exeed 9000 caracteres...

Thanks a lot if someone could help!

ESP_WebConfig_Master.zip (74.4 KB)

hello,

nobody respond...thanks community!

I have found another way, more simple, without ajax and css, not so beautiful web config but it works, i can change the location, utc, weather map ID, weather map location Id and of course wifi login and mp! everything that i have setup!

If there is no configuration or incomplete, the esp go in ap mode and withe the web server i can fill all that i have setup in the sketch and upload it into the eeprom.

After reboot it connect and open the location and city i have setup it for! great!

is someone is interesting by the code, mp me!

bye

nobody respond...thanks community!

You posted in a ection of the forum that doesn't get a lot of traffic. This section of the forum sees way too many people that don't speak English, or that don't have a clue what they are doing. So, personally, I don't read this section of the forum every day.

Between the time you posted, and the time you complained that nobody cares, I managed to flip my motorcycle, break my leg, get transported to the hospital, have surgery to permanently install a pin and some screws in leg, and get through all the pain, so that I can concentrate on reading the forum. And, I find this. I do not think you are being the least bit fair.

I would never have started with Ajax and Cascading Style Sheets. I would have written very simple server code that did what I wanted, without caring what it looked like in a browser. I would have made it pretty, if it mattered, after getting it all working. You started with making the code pretty and then making it functional. That was the wrong approach, IMHO.

I am pleased that you got something functional, in the end. Now, you can, f you want, make it pretty.