-
Notifications
You must be signed in to change notification settings - Fork 367
Forecasts not updated properly on cold boot and reset. #178
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Forecasts not updated properly on cold boot and reset. #178
Comments
I just built my own yesterday and have the exact same issue. |
Maybe it's not you but the ESP8266 Arduino Core. Which version are you using? https://docs.thingpulse.com/guides/wifi-color-display-kit/#install-the-esp8266-toolchain Also, are you using v2 of the weather station lib as per https://github.com/ThingPulse/esp8266-weather-station/releases? |
I am using version, 2.6.3, of the ESP8266 Arduino Core, which happens to be the latest, as of now. Plus, I want to add that that I tested the WeatherStationDemo example of the ESP8266 Weather Station library with my 0.96" I2C OLED display and observed similar anomalous behavior, wherein forecasts were not updating properly. |
Thanks for that extra information. I guess the behavior is not surprising considering that the parsing & mapping of the data happens in the weather station library. -> I'll transfer the issue |
I was actually using version 1.6.6 of the library in December. |
Just tested the fix provided by @reiyawea. And I'd say the probability of timeout happens to be more than 90% on my color display with nodeMCU setup.
As a side note, am yet to test this fix on my I2C display setup. Will update in a few hours from now. |
Exactly similar behavior observed on I2C display setup with nodeMCU. The debugging log is completely identical to the one I posted for the color display setup, though of course, it's missing the SPIFFS related portion. |
I have tested version 1.6.6, 1.6.5 and 1.6.4 library,the monitor works and http calls back 200. |
1.6.6 version can't get the proper data now. |
It seems that the HTTP library has some trouble dealing with HTTP response with large payload. Maybe we shall try using TCP socket directly, which may be tough to code, but hopefully memory-efficient. |
It's not tough to code at all - at least not for basic HTTP operations. True, it's a major PITA for things like multi-part file upload over HTTPs as we experienced first-hand. I argue that the code in the fix I will propose is at least as legible as the current version. Let's see how that turns out once I'm done. Give me a few days. |
Use plain TCP communication to fetch & process remote resources Fixes #178
Use plain TCP communication to fetch & process remote resources Fixes #178
Based on the discussions here and in #179 I created a new PR #180 that supersedes #179. I encourage everyone to test that one so we can verify it also works outside my test bed. The essentials of the new code: esp8266-weather-station/src/OpenWeatherMapForecast.cpp Lines 55 to 87 in 9a59df2
|
I've tested the code with both my SPI color LCD as well the I2c OLED display and I can say that the changes made in the PR #180 have caused both the setups to work just fine. Also, during my testing, I observed no timeouts as such, so as @reiyawea believes, it must have something to do with bad network condition. |
@manj9501 Thanks for testing so thoroughly and for the encouraging feedback. |
Use plain TCP communication to fetch & process remote resources Fixes #178
Use plain TCP communication to fetch & process remote resources Fixes #178
Use plain TCP communication to fetch & process remote resources Fixes #178
Use plain TCP communication to fetch & process remote resources Fixes #178
The fix was shipped with v2.0.1: https://twitter.com/thingpulse/status/1242136395336036360 |
I've updated to the latest and it works like a charm! |
Whenever I cold boot my setup or reset it, only a few number of forecasts are updated, with the rest appearing blank as shown below in attached pictures
However, after one or two updates of the forecasts after the specified UPDATE_INTERVAL_SECS, the issue gets resolved sometimes.
Can someone please point me to what I am doing wrong?
The text was updated successfully, but these errors were encountered: