WeeWX - Weather Station Data Gathering
Note, I eventually gave up on installing the weatherflow-udp extention under docker, and just wrote a UDP-to-CGI bridge tool, documented later. However, I opted to post this anyway because of what I ran into and it could be useful for someone out there (I got fairly close, actually).
This is an interesting tool to accept data for the weather system. I'm using a weatherflow tempest, which means I have a UDP port I have to translate. Plus, it is a little more complicated than the others we've dealt with. First, let's create a pre-run form of docker-connect.yaml :
services:
weewx:
image: felddy/weewx:latest
container_name: tempest
restart: unless-stopped
ports:
- "50222:50222/udp" # Map WeatherFlow UDP port
environment:
- TZ=America/Boise
volumes:
- type: bind
source: ./weewx-data
target: /data
Then, let's create our data directory to grab configuarion files from :
mkdir weewx-data/
chown 1000:1000 weewx-data
Now we can run a "fake" start of the docker image to get the configurations we need :
docker compose run --rm weewx
At this point, the weewx-data/weewx.conf file is ready for manipulation. Copy the weewx.conf into the docker image directory, then modify it by changing the station name, the latitude and longitude, etc. Once ready, change your docker-compose.yml file by adding the bind volume for the weewx.conf file, e.g. :
volumes:
- type: bind
source: ./weewx-data
target: /data
becomes :
volumes:
- type: bind
source: ./weewx-data
target: /data
Then, start the docker (usual "docker compose up -d").
It is now possible to run and install extensions. First, just to make sure it's showing, run :
docker exec -it tempest weectl extension list
Then install with :
docker compose run --rm weewx extension install --yes https://github.com/captain-coredump/weatherflow-udp/archive/refs/heads/master.zip
Now, it was right about here that I gave up on getting the extension installed. I'm leaving my notes, just in case. But really, all I need is a UDP translator, anyway. I'm not trying to do anything fancy like serve weather data (that will all happen through Grafana, so, yeah).\
On giving up, I just wrote a UDP listener.


No comments:
Post a Comment