Close

Even more updates, (fixes my dumb bug)

A project log for PiClock - A Raspberry Pi Clock & Weather Display

This project is a fancy Clock and weather display built around a monitor and a Raspberry Pi.

kevin-uhlirKevin Uhlir 06/14/2015 at 20:340 Comments

The software as originally written used up the 500 api calls allowed by weather underground using free api keys in about 8 hours. OOPS! sorry...

I never noticed this because I pay for a key because I have several friends I've made clocks for, as well as other apps and usage of the api.

I've done several things to insure this works now within the free 500 api calls per day. 1) new config variable radar_refresh default 10 minutes. 2) new config variable weather_refresh default 30 minutes 3) stopped radar api calls when the radar is not visible, and corresponding restart when pages flip to make it visible. 4) ensure at least 2 seconds between radar api calls (getting them too quickly causes failures) This combines to make a total of 336 calls per day ( (2 per hour forecast + 6 per hour per radar * 2 radars) * 24 = 336/day

Discussions