User Tools

Site Tools


pywws Python Weather Station HowTo

“pywws is a collection of Python modules to read, store and process data from popular USB wireless weather stations such as Elecsa AstroTouch 6975, Watson W-8681, WH-1080PC, WH1080, WH1081, WH3080 etc”


This is a guide on installing pywws and its dependencies from source (where necessary) without pip (python package manager) or the full python package to save space.

There is excellent official documentation here that describes how to do it with pip (easiest) if you have the space (perhaps via Rootfs on External Storage (extroot)):

I have a WH1080 into a Lenovo Y1 v1 running openwrt 15.05 with 16mb total flash which leaves about 10Mb after flashing, You will require about 5mb free to do all this.

Here is my underground weather station page:

system packages

These are required:

 libusb-1.0, zoneinfo-core, ca-certificates

These will make things easier, such as sftp with filezilla, wget downloading source and unpacking it via ssh:

  tar, wget, openssh-sftp-server, unzip

Once done create a symlink for your timezone, (needed by python tzlocal)

  ln -s /usr/share/zoneinfo/GMT+10 /etc/localtime

python packages

You will need these openwrt python packages (and what ever dependencies they come with) to compile and install pywws and it's dependencies.
Some of these can be removed after everything is installed, to make more space if needed, the biggest one ive tested as removable is python-distutils
More details on openwrt python can be found here: Python

python-base python-codecs python-ctypes python-distutils python-email python-light python-logging python-openssl python-unittest python-xml

pywws and python source dependencies

The following python modules will be downloaded as source, compiled and installed to avoid needing pip, after success with each one you can delete the unpacked and downloaded source files if you need the room.

Installing this from source instead of the python-setuptools package saves installing it's dependency python (full)
To install grap the install script, and:


tzlocal (download and unpack)

 python install

python-libusb1 (download and unpack)

 python install

pywws (download and unpack)

 python install

pywws setup and running

Your now ready to run, and can proceed setup from here:

Further into it you may want to use cron, who's jobs can be set in Luci System→Scheduled Tasks, and enabled:

 /etc/init.d/cron start
 /etc/init.d/cron enable


A thread about this guide at the 'forum' for pywws:

syncing data to a remote host

Say you want to sync your collected data to a remote web server for backup or further processing here's how i did it.
My main reason was that gnuplot is no longer in the 15.05 package feeds and i didnt really want it and the images taking up space on the router anyway, so i figured do it remotely.

Firstly you need to setup a key pair that lets scp/ssh connect to a remote server without password:

 dropbearkey -t rsa -f .ssh/id_dropbear

When done it will print your new public key, copy and past it all to your server users .ssh/authorized_keys file:

 ssh-rsa AAAAB3NzaC1ychaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaangedkDHJ8CZy5Dey+l7C2tS357e+Xtgs+INv5DZ [email protected]
 Fingerprint: md5 d9:be:27:echaaaaaaaangedb:95:80:f0:de:6f

Then the command (that you can put in cron) to sync your data files will be :

 scp -i .ssh/id_dropbear  ~/weather/ -r [email protected]:/destination/

Run it from the command line atleast once to test it works.
I then installed another instance of pywws on the remote server with gnuplot to process the data.

This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies
docs/guide-user/services/automation/pywws.txt · Last modified: 2018/03/03 21:26 by