This small node script pulls information from wunderground and pushes to infuxdb. It uses slack to notify of errors.
I use this to show outside conditions on my home weather monitoring dashboard.
Bot pulls the following data for the zip specified.
- current_temperature
- current_humidity
- pressure_mb
npm install
- Copy
env.dist
to.env
- Populate
.env
with the correct values. - Run with
node app.js
or for production use pm2 or similar.
INFLUX_HOST=host.com
INFLUX_PORT=8086
INFLUX_USERNAME=weather
INFLUX_PASSWORD=foobar
INFLUX_DB=highgarden
SLACK_API_TOKEN=foobar
SLACK_CHANNEL=bots
SLACK_BOT_NAME=wu-status
WUNDERGROUND_KEY=foobar
UPDATE_FREQUENCY=1800000
ZIP_CODE=97214
To see what data and how it is written to influxdb, see lib/influx.js
.
If you do not want to use slack for notifications just comment out the bot lines in app.js.