Home AMX User Forum AMX Technical Discussion
Options

DEFINE_VARIABLE; PERSISTENT ISSUE dvWEATHER!

I wanted to post this to ask what people are using currently, I have written ~12 different full fledged weather modules now, each with the advantages and caveats. I am also looking for a system that wont change for a while and require a rewrite.

ones I know about

NOAA: http://www.nws.noaa.gov/
TWC: http://portal.theweatherchannel.com/myaccount.aspx
Weatherbug: http://weather.weatherbug.com/desktop-weather/api-documents.html
google: http://google.com/ig/api?weather=89123 (no documentation, unsupported officially)
AMX: duet module with paid service, yuck
yahoo weather: http://developer.yahoo.com/weather/
world weather: http://www.worldweatheronline.com/free-weather-feed.aspx
foreca: http://corporate.foreca.com/en/products/forecaweatherapi/ (not sure if they are still around, great for dumping all data to central server, then serving it to clients from there)

Finding that a few of these modules dont work anymore I am using the google api now, its tags changed a little, but it was a quick fix.

So, whats everyone else using?

Comments

  • Options
    viningvining Posts: 4,368
    I've been using RSS Weather for years and there was only one minor change in that time. I do track the returns and if I miss x out of 20? expected values I send the return to the office by email so I'm aware there's a problem and I can review it. Sometimes the service just provide less data but that doesn't break anything and I just post what they give me.

    The down side is they request that you not update more than once an hours which is fine when tracking only one city. I'm sure you can probably get away with once every 30 minutes and poll data for 2 city but I've never tried. If you poll too fast they return a "slow down" message with no weather data. I figure one city is good enough and now a days who really cares if it's on the TPs. They got iPad, Smart Phones, etc that can let them surf and find anything they want. Also a lot slicker than we can provide on a TP so it's only a matter of time before I don't even bother putting it on TPs anymore.
  • Options
    jimmywjimmyw Posts: 112
    vining wrote: »
    Also a lot slicker than we can provide on a TP so it's only a matter of time before I don't even bother putting it on TPs anymore.

    We just completed a house where I had to find traffic cam urls for over 90 cams and display them on 9000 laid out in a traffic route pattern! Most of our client want something super slick and super easy, they hate multiple devices.

    I guess I am lucky my clients are still lazy Americans :)
  • Options
    jjamesjjames Posts: 2,908
    Something I'm doing now is fetching the data from a web server that handles everything. So now, there only thing I need to change / rewrite is the server's code should that service go down or change and nothing on the masters.

    There's also absolutely no parsing on the AMX side whatsoever with the format I've chosen to serve it in. ;) Pick your poison from any of those above (except Weather.com now charges an amazing amount) and serve it out in a single format that never changes.
  • Options
    viningvining Posts: 4,368
    jjames wrote: »
    Something I'm doing now is fetching the data from a web server that handles everything. So now, there only thing I need to change / rewrite is the server's code should that service go down or change and nothing on the masters.

    There's also absolutely no parsing on the AMX side whatsoever with the format I've chosen to serve it in. ;) Pick your poison from any of those above (except Weather.com now charges an amazing amount) and serve it out in a single format that never changes.
    That's not a bad idea. I do that for CATV, SAT, Sirius channel line ups but it would fairly simple to do the same for client's weather since they're generally all in the same weather region and it would be easy enough route different city to different clients if they desire additional cities. The only problem I see is if they wanted dynamic city look ups. This could be done too but a bit more difficult.
  • Options
    jimmywjimmyw Posts: 112
    jjames wrote: »
    Something I'm doing now is fetching the data from a web server that handles everything.

    I think I may end up doing just that, do you store your weather image files on the server too?
  • Options
    viningvining Posts: 4,368
    jimmyw wrote: »
    I think I may end up doing just that, do you store your weather image files on the server too?
    I think that would depend on the upload speed you have with the ISP. If you have a symmetric account designed for hosting then I would think serviing the images would be best but if not just pass back the current URL and a real web server can serve it faster.
  • Options
    jjamesjjames Posts: 2,908
    I am not storing images.

    Something you could do for dynamic requests is vining-s-kick-butt-av-site.com/weather.php?zipcode=12345

    Use PHP, ASP, JSP, or whatever.
  • Options
    jjamesjjames Posts: 2,908
    I should mention - WeatherUnderground has a pretty good free feed. You are limited to the number of requests however. The first for-fee subscription isn't too bad if I recall correctly.
  • Options
    the8thstthe8thst Posts: 470
    I started using the yahoo developer xml feed when weather.com started charging for their RSS feed.

    I found a different URL than the one listed in the developer documentation that returns a 5-day forecast by using a zipcode instead of the USID the documentation uses.

    http://xml.weather.yahoo.com/forecastrss/<zipcode>.xml

    Very easy to parse the XML response too.
  • Options
    DHawthorneDHawthorne Posts: 4,584
    I used to use Vining's RSSWeather module, but one of the features I offered my customers was the ability to store various city presets and call them at will. One big change RSSWeather made was they only allowed (no idea if this is still the poilcy, by the way, they might have reverted it) you to access the feed once per hour. That change alone entirely killed my presets ... the entire point was for a client to be able to bounce around between home and office locations, checking the weather. Waiting an hour between checks just wasn't going to happen.

    So I shamelessly chopped up Vining's program, and turned it into a module that accesses Weatherbug. Much of the same data is available, though I had to completely re-do the parsing sections, add a few fields, kill a few others, etc., to make it work right. You can tell by looking at it that it was based on Vining's, but there are a lot of substantive changes as well.

    But, I've been using Weatherbug's RSS feed ever since. One really nice feature of it is they have a lot of local stations, and you can grab the nearest one by zip code. Their international support is pretty weak; but I can live with that.
  • Options
    jimmywjimmyw Posts: 112
    the8thst wrote: »
    I found a different URL than the one listed in the developer documentation that returns a 5-day forecast by using a zipcode instead of the USID the documentation uses.
    http://xml.weather.yahoo.com/forecastrss/<zipcode>.xml

    Nice find! 5 day forecast, and I dont have to go through the additional step of Zip to WOEID!
    I punched out a module for this in an hour or so, and it works great, I did a stress test at home and was able to request a new zip every 3 seconds for 10 minutes with no ill effects.
  • Options
    I like the wunderground site, easy to parse and lots of good info:

    api.wunderground.com

    The 'get' commands are:
    Current Observations: /auto/wui/geo/WXCurrentObXML/index.xml?query=',cZipcode,'
    Forecast: /auto/wui/geo/ForecastXML/index.xml?query=',cZipcode,'

    (where cZipcode is CHAR cZipcode [5])
Sign In or Register to comment.