diff --git a/.gitignore b/.gitignore index 9125b72..562d45a 100644 --- a/.gitignore +++ b/.gitignore @@ -33,6 +33,7 @@ bower_components # Compiled binary addons (https://nodejs.org/api/addons.html) build/Release +build # Dependency directories node_modules/ diff --git a/index.js b/index.js index fea0638..82ceb63 100644 --- a/index.js +++ b/index.js @@ -25,8 +25,8 @@ const got = require('got'), logger.info('------- ambient2weather v' + pkg.version, '--------'); logger.debug('Ambient Application Key:', appKey); logger.debug('Ambient API Key:', apiKey); -logger.debug('PWD Station ID:', pwsStation); -logger.debug('PWD Password:', pwsPassword); +logger.debug('PWS Station ID:', pwsStation); +logger.debug('PWS Password:', pwsPassword); if (!appKey || !apiKey || !pwsStation || !pwsPassword) { logger.error('Insufficient configuration data. Missing API Key, App Key, Station ID or PWS Password.'); @@ -68,7 +68,7 @@ api.on('data', data => { baromin : data.baromrelin, dewptf : data.dewPoint, humidity : data.humidityin, - rainin : data.totalrainin, + rainin : data.hourlyrainin, UV : data.uv, softwaretype: 'ambient2pwsweather-' + pkg.version, action : 'updateraw' @@ -81,6 +81,8 @@ api.on('data', data => { delete params.baromabsin; delete params.feelslike; delete params.maxdailygust; + delete params.totalrainin; + delete params.hourlyrainin; // logger.debug('params', params); diff --git a/package.json b/package.json index b0d80b0..30f9e62 100644 --- a/package.json +++ b/package.json @@ -1,13 +1,13 @@ { "name": "ambient2pwsweather", - "version": "0.0.5", + "version": "0.0.6", "description": "Pull weather data from AmbientWeather.net and push to PWSWeather", "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1", "start": "node index.js", "start dev": "nodemon index.js", - "build": "zip -x 'node_modules/*' -x 'config/development.json' -r /tmp/ambient2pwsweather-$(npm run version).zip *", + "build": "mkdir -p build && zip -x 'node_modules/*' -x 'build/*' -x '.git/*' -x '.idea/*' -x 'config/development.json' -r build/ambient2pwsweather-$(npm run version --silent).zip *", "version": "echo $npm_package_version" }, "repository": {