This project is now deprecated as AmbientWeather.net now supports automatic data submittion to PWSWeather. Please see the Ambient Weather Blog for more information.
ambient2pwsweather is an open source Node.js project providing a software bridge between Ambient Weather Stations (through AmbientWeather.net) and PWSWeather.com (and therefore Aeris Weather).
- Node.js 6.x
- AmbientWeather.net account (API Key and Application Key)
- PWSWeather.com account
To use ambient2pwsweather, you must first install Node.js. After Node is installed, download and unzip the latest release into any given directory.
Customize the configuration by copying the config/default.json
file to config/local.json
and then editing your settings. If you edit default.json directly, it is likely that future versions of ambient2pwsweather will overwrite your customizations. Alternatively, you can use environment variables to override specific configuration variables.
Open a command line window (terminal
on MacOS or follow these instructions for Windows) and issue the following commands within the ambient2pwsweather directory:
npm install
node index.js
The first command will install all the prerequisites and the second starts ambient2pwsweather. You will need to keep this window and process running in order to allow it to continue to retrieve data from AmbientWeather.net.
Below is the default configuration. You can easily customize and override any setting by copying the config/default.json
file to config/local.json
and then change any settings you desire.
{
"ambient" : {
"api_key" : "",
"app_key" : ""
},
"pwsweather" : {
"station_id" : "",
"password" : ""
},
"log_level" : "info",
"pws_base_url" : "http://www.pwsweather.com/pwsupdate/pwsupdate.php"
}
Alternatively, the following environment variables can be used to override configurations.
- AMBIENT_API_KEY - (Obtained from your AmbientWeather.net profile page)
- AMBIENT_APP_KEY - (Obtained by requesting from AmbientWeather support)
- PWD_STATION_ID - (From your PWS Weather account)
- PWD_PASSWORD - (From your PWS Weather account. NOTE: Your password cannot have any punctuation or special characters)
- LOG_LEVEL - (debug, info, warn, error)
To install as a service, you must first install a service tool for your platform.
// for macOS
npm install node-mac
// for Windows
npm install node-windows
// for Linux
npm install node-linux
Then install as a service:
npm run service install
You can view logs through the standard/system logging for your platform.
For more details, visit the respective module npm page: macOS, Windows, Linux
Dan Wilson (@killroyboy / Web)
MIT
Code contributions are greatly appreciated, please submit a new pull request!