David Ferguson


Posts tagged with "gtwthr"

Gtwthr update..

I’ve been working on rewriting Gtwthr, the weather service I was hosting to provide easy weather data to GeekTool users. Gtwthr was unfortunately shut down at the beginning on November when Weather.com decided to begin charging obscene amounts of money for access to their weather API. For Gtwthr to have continued the way it was would have required a ~$600/mo payment to weather.com, plus my hosting fees, which were constantly going up due to excessive traffic resulting from users being too lazy to read how to set it up correctly.

The next iteration of Gtwthr will be released to the public. I will be distributing the source code on Github or another location for users to download and set up themselves. Then more users can set ip up for personal use if they want, or could open it up to other users if they so choose.

Watch here for updates on the progress. Hopefully I can release it in the next week or so, depending on how much customization I add into it. The core functionality is currently there. I think I am going to go back and add somewhat of an admin interface to it.

Gtwthr and GeekTool


Gtwthr is a little service I set up back in March or so that allows you to create GeekTool geeklets to display the weather information. Now, there are obviously several other places you can find instructions on how to setup weather geeklets that require a rather lengthy command line script. That’s where Gtwthr differs. Gtwthr is set up so that it’s easy for even a novice user to be able to set these geeklets up.

Setting Up Geeklets

I get asked almost on a daily basis, “Why did I get banned?”. Gtwthr is currently set to automatically ban a user when the user generates over 100 requests to the server in less than 1 hour. That sounds like a lot, right? Well, kind of. One of the biggest issues I see is that users try to set things up without reading the instructions at all. They then set their refresh rates too low and get banned before they really even get started good. Gtwthr uses Weather.com as its data source. Weather.com has limits on how often you can request updated information from their servers. These settings are once per 25 minutes (per location) for current conditions, and once per 3.5 hours for forecast data. Refresh rates should be set to at least 1500 seconds (25 minutes). If you are refreshing more frequently than that, you’re getting cached data that won’t change, wasting bandwidth, and creating unnecessary traffic/strain on the server.

A lot of people ask how I would recommend that they setup their geeklets so that they do not get banned while setting things up. The easiest way would be, if you know what data you are going to be displaying in that geek let, initially set it to just echo that data, get everything set correctly, then change the command to pull data from Gtwthr. You may ask “why do it this way?”. The reason is simple. GeekTool is written in kind of a different way where, any time a geeklet gains focus (clicked on when it was currently the active geeklet), is moved, the font is changed, etc, GeekTool refreshes the geeklet’s data. GeekTool is also constantly trying to update as you type the URL also. That is continuously eating into your available number of requests per hour. So get everything set the way it should be with a simple echo statement, set refresh times accordingly, type the URL first, then skip back to front, and add the “curl” at the beginning. 

What happens if I get banned?

First off, don’t worry about it. I’ve not permanently banned anyone. The ban is only in place to prevent excessively large amounts of traffic due to incorrect settings. For example, before the auto ban was implemented, I received 600,000 requests over a seven hour period. Those 600,000 requests, were from only two users.

If you get banned, simply contact me with your external ip address (easily found at whatismyip.com), and I will get the ban removed asap.

Other notes

Please consider donating. There is a Donate button on the site. Money donated is used to pay for hosting the site. I’m not some big company that has tons of money to pay for this. I’m one guy. The hosting and such is paid for using my money. Every month, Gtwthr exceeds the amount of traffic its supposed to have, and costs extra money on top of the regular hosting fees.

If the site goes down or starts showing errors, I promise I’m going to be working to fix it asap. There are plenty of things that could go wrong. I try to be as careful as I can when making changes and such, but with a site thats generating 16,000-18,000 hits per hour, it’s hard sometimes. Just be patient.

Don’t send mean emails because you got banned. This site/service works constantly for several thousand users. If you got banned, something you have done is wrong or was set up incorrectly. So, don’t be mean. I’m providing you with a free service. The code isn’t written with a personal vendetta against you. 

David Ferguson