neptune2 / esp8266-weather-station-oled-DST

Customized version of Squix78 ESP8266 OLED Weather Station w/ Auto Daylight Saving Time Adjust and other mods using SSD1306 OLED. See https://github.com/squix78/esp8266-weather-station for original code and library
61 stars 17 forks source link

SOLVED: updateData rapid successive API calls (update is looping???) #2

Closed aliceand closed 7 years ago

aliceand commented 7 years ago

First of all, great improvements. The original code is great and your updates have made it even better.

I'm running on an esp-01 so I removed the dht sensor and thingspeak code since I only have 2 ports. So I have a fairly streamline set of code. But once I turned on the app and let it run for awhile I got a wunderground API usage alert email detailing how I made 41 calls within a minute. I unplugged to take heed of the situation. Well, I took a serious look and didn't see anything wrong.

So, until I find the problem I slowed the update schedule (now every 30 minutes rather than 10). Obviously that's not the real problem, but if Ilet it run it won't keep hitting the WU servers every 10 minutes. Just ran it again, and at 30 minutes uptime it started updating. And updating. The updates seem to be in a loop. I unplugged it before weather underground could chastise me again. So far I can't tell why it would be looping on the update.

I mention this in case this seems an obvious problem for you. My esp-01 is embedded so I might have to switch to different hardware while debugging so I can get access to a serial monitor. If this problem is obvious to you, please let me know. In the meantime, I will be switching hardware and debugging away.

UPDATE: I've commented out the api calls to wu during test (so my account doesn't abuse the wu system) and have verified that I do have a loop. Will be looking for cause next.

SOLVED: I am a DUMMY. When removing code for the dht sensor and thingspeak I also removed readyForWeatherUpdate = false; which is kind of important! Sorry for the bother. And thanks again for the updates.

neptune2 commented 7 years ago

Thanks for the update. Good to know that you solved the issue.

-Neptune