n0bel / PiClock

A Fancy Clock built around a monitor and a Raspberry Pi
MIT License
568 stars 184 forks source link

API key usage #52

Closed zcarlson closed 7 years ago

zcarlson commented 7 years ago

I've implemented just a few lines to automatically change the frame every few minutes, but then I received an email saying I had reached Weather Underground's 500 call limit in one day. It appears that every time a frame is switched, a new api call is made. Is this true? Any suggestions for workarounds?

Thanks! Zach

n0bel commented 7 years ago

I did try to put code into the radar.start and stop routine to only get their images when they were active on the current frame. The timing is such that 1 weather call every 30 minutes and radar updates every 10 minutes for 2 radar images stays below the threshold of 500. If you raise that to 4 radar calls every 10 minutes you end up going over. So flipping back and forth could cause such an issue. One solution would be to change the radar timing to 20 minutes instead. Just an FYI, the radars each work independently, they don't just resize the smaller images, but instead get the rightly sized image, preserving a decent resolution.