G6EJD / ESP32-e-Paper-Weather-Display

An ESP32 and 2.9", 4.2" or 7.5" ePaper Display reads Weather Underground data via their API and then displays the weather
Other
959 stars 206 forks source link

Occasional freeze when retrieving forecast json data #148

Closed jhughes1010 closed 3 years ago

jhughes1010 commented 3 years ago

Occasionally, I notice the screen is blank when running. I initially thought that I might be reaching max attempts on data retrieval (nothing published to the screen on that branch) and modified to at least call DisplayGeneralInfoSection(); so I could see if things were alive and well, but that was not the problem.

I finally caught a situation where I was able to see on serial monitor, that forecast data was in the middle of period 21 and halted for some reason. Has anyone else seen this? I ended up making use of a WDT in the DecodeWeather() function. Someone else may have other ideas?

G6EJD commented 3 years ago

Sometimes the volume of forecast data gets very big, especially if it’s reporting / forecast prolonged periods of rain, I suggest you increase the memory in common.h here: DynamicJsonDocument doc(35 1024); to: DynamicJsonDocument doc(55 1024);

There is plenty of RAM to spare and the content of the API return has grown since this was first published.

jhughes1010 commented 3 years ago

Will do! Thanks for quick answer.

73 de KB0HHM

G6EJD commented 3 years ago

Also, as all the forecasts are identical then a failure at record 21 suggests an out of memory problem as the process is repeated. Occasionally OWM has issues but these usually affect the whole message. 73 Dave

jhughes1010 commented 3 years ago

I increased buffer size as you suggested, but left my WDT code in place also.

James Hughes

On Jun 28, 2021, at 5:42 AM, G6EJD @.***> wrote:

 Also, as all the forecasts are identical then a failure at record 21 suggests an out of memory problem as the process is repeated. Occasionally OWM has issues but these usually affect the whole message. 73 Dave

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub, or unsubscribe.