doc:howto:pywws

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"

intro

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)): http://pywws.readthedocs.org/en/latest/index.html 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: http://www.wunderground.com/personal-weather-station/dashboard?ID=INEWSOUT968

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.

https://pypi.python.org/pypi/setuptools#unix-wget

Installing this from source instead of the python-setuptools package saves installing it's dependency python (full)

To install grap the install script, https://bootstrap.pypa.io/ez_setup.py and: python ez_setup.py

tzlocal

https://github.com/regebro/tzlocal (download and unpack) python setup.py install

python-libusb1

https://github.com/vpelletier/python-libusb1 (download and unpack) python setup.py install

pywws

https://github.com/jim-easterbrook/pywws (download and unpack) python setup.py install

pywws setup and running

Your now ready to run, and can proceed setup from here: http://pywws.readthedocs.org/en/latest/guides/getstarted.html#test-the-weather-station-connection Further into it you may want to use cron, who's jobs can be set in Luci System→Scheduled Tasks, and enabled: https://wiki.openwrt.org/doc/howto/cron#activating_cron /etc/init.d/cron start /etc/init.d/cron enable

A thread about this guide at the 'forum' for pywws: https://groups.google.com/d/topic/pywws/aNi2dE9J8OM/discussion

syncing data to a remote host