Page 1 of 1
Aerisweather forecast script..need some feedback.
Posted: Thu 09 Apr 2020 7:25 pm
by saratogaWX
I'm developing a AW-forecast.php script (like the DarkSky and Wunderground scripts) that uses the free API for PWSweather.com data submitters.
I've got the basics done so it looks like:
The issue with the aerisweather.com API is the forecast text words are only returned in English (unlike DarkSky and Wunderground where other languages are supported). In order to provide the translations, I've grafted code and language tables from the venerable WXSIM plaintext-parser.php to create a translation. It works, but some words/phrases are not used in the English WXSIM plaintext.txt forecasts, so there are missing entries (words remain untranslated) from the stock plaintext-parser-lang-LL.txt files (lang entries). I do have the language files in a subdirectory to not interfere with the existing WXSIM files.
Greek sample:
So, which would you rather see used in the script?
1) continue using the plaintext-parser-lang files (and have users fix them up for the specific language desired)
or
2) use Google Translate API for the phrase (would require an API key, and it's not free)
Please let me know if you have other suggestions.. Thanks!
Re: Aerisweather forecast script..need some feedback.
Posted: Thu 09 Apr 2020 9:42 pm
by Mapantz
Wow - you work fast, Ken! Great job.
I have been sending my data to PWSweather for a long time. I completely forgot that I did to be honest, and your post made me log on. They have done a big overhaul on the UI - looks good.
Re: Aerisweather forecast script..need some feedback.
Posted: Fri 10 Apr 2020 6:29 am
by zoomx
The Imperial Units remains untranslated?
Re: Aerisweather forecast script..need some feedback.
Posted: Fri 10 Apr 2020 2:47 pm
by saratogaWX
In the samples above, I selected US units. The script has support for SI, CA, UK, and US units, same as the DarkSky script has.
Code: Select all
// si: SI units (C,m/s,hPa,mm,km)
// ca: same as si, except that windSpeed and windGust are in kilometers per hour
// uk2: same as si, except that nearestStormDistance and visibility are in miles, and windSpeed and windGust in miles per hour
// us: Imperial units (F,mph,inHg,in,miles)
Re: Aerisweather forecast script..need some feedback.
Posted: Sat 11 Apr 2020 3:28 am
by saratogaWX
The results of the poll so far are unanimous for using the WXSIM type translations.. fortunately, that's what I'd developed
I'm keeping the poll open to see if I need to add an optional Google translate function, but I'm releasing V1.00 - 10-Apr-2020 for you all to try/test out. I'll be integrating it into the Saratoga template (Base-World) to replace the DarkSky forecast since new API keys are no longer available there.
Download:
https://saratoga-weather.org/scripts-AWforecast.php
Best regards,
Ken
Re: Aerisweather forecast script..need some feedback.
Posted: Wed 22 Apr 2020 9:05 pm
by Mapantz
Any plans to add the 'current conditions' in to it? Like the DarkSky one? I see it's available with the basic API.

Re: Aerisweather forecast script..need some feedback.
Posted: Wed 22 Apr 2020 10:55 pm
by saratogaWX
Yes, Aerisweather API does offer current conditions, and hourly forecasts. Unlike DarkSky, those queries (even when used in 'batch' mode) count as 3 API calls instead of one for DarkSky. With the free (PWSweather contributor) API key, you're allowed 1000 calls/day. Adding current conditions would mean you're down to an effective 500 calls per day, and if all three (7day, 24hr, conditions), a limit of 333 calls/day. That may not run out on your site if you have only one location used, but each additional site will further cut into the API limits.
Currently, the script does cache the returns for 1hr before asking for an API fetch so even with a long list of locations, you're unlikely to run out of API calls with the current 1-access-per-hour-per-location.
Adding back the code isn't difficult (I'd stripped it from the DS-forecast script to make AW-forecast), I just worry that the extra functions would expose folks to losing API capability due to the somewhat restrictive 1000/calls/day limit.
Re: Aerisweather forecast script..need some feedback.
Posted: Thu 23 Apr 2020 8:53 pm
by Mapantz
After looking in to it a bit more. There's serious problems with Aerisweather and my location.
Current conditions never update, because they are getting it from a METAR near me, and they don't update after 6pm. And quite often, METAR data won't update for 10 hours or so. The forecast temperatures are some of the worst I have seen.
https://wx.aerisweather.com/local/gb/wareham
It's showing 14°C tomorrow, that's 5° lower than what is expected.
That's poor of a weather company to be using data from an airport 15 miles away, and one that doesn't update properly.
Re: Aerisweather forecast script..need some feedback.
Posted: Fri 24 Apr 2020 12:51 am
by saratogaWX
Their API does allow a filter=allstations for a /observations/closest query, and that will return a PWS station if closest. The default for an /observations/closest query is to use nearest METAR only. When I tried it for my lat/long, it returned my stations data.