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!
Welcome to the Cumulus Support forum.
Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024
Cumulus MX V4 beta test release 4.0.0 (build 4019) - 03 April 2024
Legacy Cumulus 1 release 1.9.4 (build 1099) - 28 November 2014
(a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)
Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki
Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024
Cumulus MX V4 beta test release 4.0.0 (build 4019) - 03 April 2024
Legacy Cumulus 1 release 1.9.4 (build 1099) - 28 November 2014
(a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)
Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki
Aerisweather forecast script..need some feedback.
Moderator: saratogaWX
- saratogaWX
- Posts: 1186
- Joined: Wed 06 May 2009 5:02 am
- Weather Station: Davis Vantage Pro Plus
- Operating System: Windows 10 Professional
- Location: Saratoga, CA, USA
- Contact:
-
- Posts: 1809
- Joined: Sat 17 Dec 2011 11:55 am
- Weather Station: Davis Vantage Pro2
- Operating System: Windows 11 x64
- Location: Dorset - UK
- Contact:
Re: Aerisweather forecast script..need some feedback.
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.
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.
-
- Posts: 65
- Joined: Sat 15 Mar 2014 4:50 pm
- Weather Station: Froggit GW1000
- Operating System: Windows-Linux
- Location: Italy
Re: Aerisweather forecast script..need some feedback.
The Imperial Units remains untranslated?
- saratogaWX
- Posts: 1186
- Joined: Wed 06 May 2009 5:02 am
- Weather Station: Davis Vantage Pro Plus
- Operating System: Windows 10 Professional
- Location: Saratoga, CA, USA
- Contact:
Re: Aerisweather forecast script..need some feedback.
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)
- saratogaWX
- Posts: 1186
- Joined: Wed 06 May 2009 5:02 am
- Weather Station: Davis Vantage Pro Plus
- Operating System: Windows 10 Professional
- Location: Saratoga, CA, USA
- Contact:
Re: Aerisweather forecast script..need some feedback.
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
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
-
- Posts: 1809
- Joined: Sat 17 Dec 2011 11:55 am
- Weather Station: Davis Vantage Pro2
- Operating System: Windows 11 x64
- Location: Dorset - UK
- Contact:
Re: Aerisweather forecast script..need some feedback.
Any plans to add the 'current conditions' in to it? Like the DarkSky one? I see it's available with the basic API.
- saratogaWX
- Posts: 1186
- Joined: Wed 06 May 2009 5:02 am
- Weather Station: Davis Vantage Pro Plus
- Operating System: Windows 10 Professional
- Location: Saratoga, CA, USA
- Contact:
Re: Aerisweather forecast script..need some feedback.
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.
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.
-
- Posts: 1809
- Joined: Sat 17 Dec 2011 11:55 am
- Weather Station: Davis Vantage Pro2
- Operating System: Windows 11 x64
- Location: Dorset - UK
- Contact:
Re: Aerisweather forecast script..need some feedback.
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.
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.
- saratogaWX
- Posts: 1186
- Joined: Wed 06 May 2009 5:02 am
- Weather Station: Davis Vantage Pro Plus
- Operating System: Windows 10 Professional
- Location: Saratoga, CA, USA
- Contact:
Re: Aerisweather forecast script..need some feedback.
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.