meta data for this page
  •  

Weatherstation on Dockstar

Hardware:

  • Oregon Scientific WMR88
  • Seagate Dockstar Freeagent

Software

  • Uboot
  • Debian Linux
  • WeeWX

Installation of Uboot

Installation of Debian

Installation of WeeWX

First of all login to the Dockstar as root and download the latest deb package of WeeWX:

~# wget http://weewx.com/downloads/weewx_3.6.2-1_all.deb

Next step install necessary dependencies and WeeWX:

~# apt-get install python-usb python-serial python-imaging python-cheetah python-configobj rsync
~# dpkg -i ./weewx_3.6.2-1_all.deb

Configuration of WeeWX

Specify source and target directories

The weewx generated web files are stored in /var/www/html/weewx on the dockstar. They need to be copied via rsync to an apache/nginx host (web-host) in /var/www/html/weewx. On the web host it would be appropriate not to use root account for copying files via rsync. So the target directory should be user www-data.

~# chgrp -R www-data /var/www/
~# chown -R www-data /var/www/

Also the user www-data needs a home dir and a shell.

~# vi /etc/passwd
............
www-data:x:33:33:www-data:/var/www:/bin/bash
............
Configure ssh to use rsync without passwd

The process weewx on the dockstar is running as root and needs to upload the generated weather pages cyclically to the web host. For having a password-less rsync the user root must generate a ssh key pair and the public key needs to be copied to the web host.

~# ssh-keygen -t rsa
~# ssh-copy-id www-data@web-host

Test access from weewx by

~# ssh www-data@web-host

And a shell must be opened without passwd.

Configure weewx to use rsync to copy files to web host

On the dockstar the config files of weewx needs to be edited:

~# vi /etc/weewx/weewx.conf
............
[[RSYNC]]
        skin = Rsync
        server = web-host
        path = /var/www/html/weewx
        user = www-data
        delete = 1
............

After all restart weewx service:

~# systemctl restart weewx.service

Test with the browser page https://www.embedded-engineer.de/weewx/