This code is built to be hosted on the free Google Apps Script platform. It takes in weather station data from:
and periodically sends it on to
- Wunderground,
- Windy,
- PWSWeather,
- WeatherCloud, and/or
- OpenWeatherMap.
- Create a new Google Apps Script project and give it a name
- Copy the code from
code.gs
from the latest release in this repository to your new file - Configure the script for you
-
Choose your datasource:
Wunderground
Uses the IBM Wunderground API.
Note: Unfortunately, it looks like the new Wunderground API keys have started expiring 6 months after being generated, so you may need to replace the key if that happens.
- Set the
datasource
toibm
on line 10 - Set your
ibmAPIKey
on line 12 - Set your
ibmStationId
on line 13
MyAcurite
Experimental. Uses the undocumented MyAcurite private API.
- Set the
datasource
toacurite
on Line 10 - Set your
acuriteUsername
on Line 15 - Set your
acuritePassword
on line 16 - Set your
acuriteHubName
on line 17 - Set your
acuriteStationName
on line 18
Davis Weatherlink
Uses the Davis Weatherlink API v2.
- Set the
datasource
todavis
on line 10 - Set your
davisApiKey
on line 20 - Set your
davisApiSecret
on line 21 - Set your
davisStationName
on line 22
Weatherflow Tempest
Uses a Weatherflow Tempest Personal Use Token.
- Set the
datasource
toweatherflow
on Line 10 - Set your
weatherflowPUT
on line 24 - Set your
weatherflowSationId
on Line 25
- Set the
-
and choose one or more your forwarding destinations:
Wunderground
Send to Wunderground.
- Set
updateWunderground
totrue
on Line 29 - Set your
wundergroundAPIKey
on Line 30 - Set your
wundergroundStationId
on line 31
Windy
Send to Windy.com.
- Set
updateWindy
totrue
on Line 33 - Set your
windyAPIKey
on Line 34 - Set your
windyStationId
on line 35. It's likely0
,1
,2
, etc.
PWSWeather
Send to PWSWeather.
- Set
updatePWSWeather
totrue
on Line 37 - Set your
pwsWeatherAPIKey
from your station's admin page on line 38 - Set your
pwsWeatherStationID
on Line 39
WeatherCloud
Send to WeatherCloud. Retrieve your station's ID and API Key by going to your Devices, then clicking Settings → 🔌 Link on your station.
- Set
updateWeatherCloud
totrue
on Line 41 - Set your
weathercloudStationId
on line 42 - Set your
weathercloudAPIKey
on Line 43 - Set whether or not you have a WeatherCloud Pro or Premium account with
hasWeatherCloudPro
astrue
orfalse
on line 44
OpenWeatherMap
Send to OpenWeatherMap.
- Set
updateOpenWeatherMap
totrue
on Line 46 - Set
openWeatherMapAPIKey
to your API Key on Line 47 - Set your
openWeatherMapStationId
on line 48 to your OpenWeatherMap station'sexternal_id
- Set
- Run the "Schedule" function with the
▷ Run
button in the toolbar. You're done! You can see it periodically running in the☰▶
Executions tab on the left sidebar.
If you ever make changes to the API keys or enabled services, just run the Schedule function again.
- Copy the code from
code.gs
from the latest release in this repository to yourCode.gs
file and💾 Save
. - Make sure your API Keys and settings on lines 10 through 48 are correct.
- Run the "Schedule" function again with the
▷ Run
button in the toolbar.
Feel free to take a look at the source and adapt as you please. This source is licensed as follows:
Wunderground Station Forwarder is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.