Allows for importing weather station data from WeeWX to InfluxDB v2.
- Tested with a Raspberry pi 2, but should work on most other distros.
- WeeWX configured on this device.
- Either Docker or Python 3.7+ installed on this device.
- InfluxDB v2 installed on this or another device, and a bucket created in influxDB.
Dependency: Docker installed.
- Locate the
weewx.sdb
file, for example by runningfind / -name weewx.sdb
- Download and run the Docker image:
sudo docker run --name weewx-influx -v config.yaml:/app/config.yaml -v /var/lib/weewx/weewx.sdb:/var/lib/weewx/weewx.sdb vdbg/weewx-influx:latest
- Copy template config file from image:
sudo docker cp weewx-influx:/app/template.config.yaml config.yaml
- Edit
config.yaml
by following the instructions in the file - Start the container again to verify the settings are correct:
sudo docker start weewx-influx -i
- Once the settings are finalized,
Ctrl-C
to stop the container,sudo docker container rm weewx-influx
to delete it - Start the container with final settings:
sudo docker run \
-d \
--name weewx \
-v /path_to_your/config.yaml:/app/config.yaml \
-v /path_to_your/weewx.sdb:/var/lib/weewx/weewx.sdb \
--memory=100m \
--pull=always \
--restart=always \
vdbg/weewx-influx:latest
Dependency: Python 3.7+ and pip3 installed. sudo apt-get install python3-pip
if missing on raspbian.
- Git clone and cd into directory
cp template.config.yaml config.yaml
- Edit file
config.yaml
by following instructions in file pip3 install -r requirements.txt
python3 main.py
or./main.py
There's a good WeeWX plugin here
- pros: no delay to import (runs in WeeWX's main loop), more options for types of units.
- cons: missing records if InfluxDB is temporarily unreachable, no historical import capabilities.
Also, the alternative plugin works against Influx v1.8 vs. 2.x.