HUB
Sign inSign up
weewx-armhf logo

instantlinux/weewx-armhf

By instantlinux

•Updated over 6 years ago
Archived

Weather station software WeeWX for Raspberry Pi

Image
0

2.3K

instantlinux/weewx-armhf repository overview

⁠weewx

amd64: armhf:

Weather station software WeeWX

Please use the multi-arch image instantlinux/weewx⁠ for newer versions of this container. This is deprecated.

This includes WeeGreen skin; see the live site⁠ for an example. Two architectures are supported; look for amd64⁠ (Intel/AMD) and armhf⁠ (Raspberry Pi) images on Docker Hub.

⁠Usage

First create secrets as defined below, in /var/adm/admin/secrets. Ensure your weather station device (usually /dev/ttyUSB0) is read/writeable by user "weewx" (uid 2071) or by gid 20 (group "dialout") via udev rules--all other parameters can be set as below.

Then deploy this service with docker-compose; see the example docker-compose.yml. Available environment variables are below.

To create the external-facing web site, use the simple nginx.conf configuration provided here⁠ under docker swarm with the docker-compose-nginx.yml stack definition, or (even easier) under Kubernetes deploy the wx-nginx.yaml⁠ resource definition.

⁠Variables
VariableDefault valueDescription
ALTITUDE"100, foot"elevation of station
LATITUDE50.00coordinates
LONGITUDE-80.00coordinates
DB_BINDING_SUFFIXmysqlsuffix for db binding stanzas
DB_DRIVERweedb.mysqldatabase driver
DB_HOSTdbhostname of db
DB_NAMEweewx_aname of main archive database
DB_NAME_FORECASTweewx_fname of forecast database
DB_USERweewxusername for db
DEVICE_PORT/dev/ttyUSB0serial-port device
HTML_ROOT/var/www/weewxtmp directory for generating html/png images
LOCATION"Anytown, USA"location to display in banner
LOGGING_INTERVAL300sampling interval
RAIN_YEAR_START7month to start collecting annual rain data
RAPIDFIRETrueenable Weather Underground realtime updates
RSYNC_DEST/usr/share/nginx/htmlrsync destination path
RSYNC_HOSTweb01rsync destination host
RSYNC_PORT22rsync ssh port
RSYNC_USERwxrsync username
SKINStandardskin to enable (Seasons, Standard, WeeGreen)
STATION_IDunsetWeather Underground station ID
STATION_TYPEVantagestation type (see usersguide⁠
SYSLOG_DEST/var/log/messagesSyslog file or TCP dest (@@host:port)
TZUS/EasternLocal timezone
TZ_CODE10Davis VantagePro timezone code see index⁠
WEEK_START6day of week to start weekly data (0 = Mon)
WX_USERweewxrun-as username
XTIDE_LOCATIONunsetxtide setting, see index⁠

You can volume-mount a different skin to a subdirectory of /home/weewx/skins if you prefer one that isn't already included.

⁠Secrets
SecretDescription
weewx-db-passworddatabase password for MySQL
weewx-rsync-sshkeyprivate ssh key for rsync upload
weewx-wunderground-apikeyAPI key for Wunderground.com
weewx-wunderground-passwordpassword for Wunderground.com
⁠Notes

This can't run in swarm because it needs to attach the weather stations as devices. Currently, docker-compose doesn't support "external" secrets outside a swarm so they have to be stored as plain-text files.

Tide info for US locations is generated by a library called xtide⁠; there's no binary package for it in Alpine Linux so a somewhat complicated set of commands is included here to package it from source within Dockerfile.

Output logging from weewx is a bit of a mess: when running in foreground, a lot of verbose clutter appears on stdout; the real logs go to syslog and there's no configuration method to send these elsewhere (like stdout to conform to Docker's logging standard). So the SYSLOG_DEST environment variable provided here can provide a way to send proper logging (via the rsyslogd process included in this image) to a central syslog service.

Tag summary
Recent tags
Content type
Image
Digest
Size
126.6 MB
Last updated
over 6 years ago
docker pull instantlinux/weewx-armhf:latest