gopherwx is a service that pulls live weather data from a Davis Instruments Vantage Pro2 station and does stuff with it.
- Powers a live weather website with graphs (front-end code available here)
- Stores historical data in InfluxDB for graphing and analysis.
- Sends live weather data to Weather Underground for use as a WU Personal Weather Station (PWS). WU API key required.
- Sends data to APRS/CWOP. Ham radio license or CWOP station registration required.
- Streams live data over gRPC. Roll your own client or try my Linux client.
You will need a few things to use gopherwx:
A Davis Instruments VantagePro or VantagePro 2 weather station. This may work with the Vue. I'm not certain.
A way to connect your station to a Linux server. There are several options for this:
- A WeatherLink (or clone) serial/USB cable to connect your VantagePro console to your server.
- A Davis Instruments Wireless Weather Envoy. This device has a 900MHz reciever that decodes the transmissions from the VantagePro station and makes them available over TCP/IP.
- One or more of the following:
- InfluxDB, if you want to have your own weather website like the one I have at mhkweather.com.
- A Weather Underground API account for sending live data to WU. The base account level is free and is sufficient.
- A ham radio license if you want to send live data to APRS-IS
- A CWOP ID if you want to send live data to CWOP
- grpc-weather-bar, if you want to display live weather on your Linux desktop
The easiest and recommended way to use gopherwx is to use the ready-made Docker image,
chrissnell/gopherwx. This image makes use of
gosu to drop root privileges to
nobody:nobody. I have included an example Docker Compose file and systemd unit file to get you started.
To use Dockerized gopherwx, follow these steps:
Drop the systemd unit file
gopherwx.servicewherever you keep your aftermarket unit files. On my Ubuntu server, that's
Create a directory for the gopherwx configuration and compose files. I recommend
/etc/gopherwx. If you call it something different, be sure to edit the
docker-compose.ymlfiles to reflect your path. Most folks won't have to edit these.
docker-compose.ymlfiles from this GitHub repo into your
gopherwx.serviceby running this as root:
systemctl start gopherwx.service
Have a look at gopherwx logs to make sure everything is working correctly:
journalctl -u gopherwx -f
Make sure that
gopherwx.servicestarts at boot time by running
systemctl enable /etc/gopherwx/user/gopherwx.service
Setting up a live weather website
gopherwx doesn't serve a weather website, it only pulls the weather readings from the Davis device and stores them in the InfluxDB database for you to use as you wish. To make a website for your data, you will need a couple of additional components:
weather-proxy - Acts a gateway between people on the Internet and your InfluxDB database. Since InfluxDB isn't really suitable for exposing directly to the internet,
weather-proxyacts as a middleman, handling requests from your website visitors' browsers and querying InfluxDB to pull the requested weather data.
weather-proxyis suitable for exposure to the open Internet.
gopherwx includes a built-in gRPC server that can serve up a stream of live weather readings to compatible clients. I have written an example client, grpc-weather-bar, that reads live weather from gopherwx over the network and display it within Polybar, a desktop stats bar for Linux.
If you would like to build your own client, have a look at the protobuf spec.