Reformatting EasyWeather data for UIView
 

The EasyWeather software supplied with the Watson W8681 wireless weather station (aka Fine Offset WH1080 / WH1081 and possibly rebadged under other names) produces a csv data file called EasyWeather.dat which is an accumulation of readings collected from the display unit across the USB interface. The data file is not directly compatible with UIView and there is no option to produce an output file that is.

When I first aquired my W8681 I wrote a REXX script for Kedit for Windows to produce a data file in the format needed. I did not publish that script as the software I used is proprietory and costs almost as much as the weather station. I had to install Python to overcome a bug between the WXtoImg software and my R2ZX satellite receiver and resolved to produce a Python script to do this conversion as Python is at least free software.

Python script
To make this work you will need to adjust the paths to what you have used on your own machine. Note that I don't produce rainfall data - this is because the EasyWeather version I am using is bugged and sometimes produces ridiculous rainfall data. Even if that were not the case I don't trust the rainfall data produced by my W8681 anyway.

I have no experience of Python - this script is probably badly written but does work for me - certainly I found the language to be idiosyncratic - for instance...
Why does tailer return a list with the second entry containing the required data?
Why does the substringing base the first position on index from 0 and the last position one higher than you'd expect?
I welcome any suggestions for changes from Python experts.


Installing Python
There are plenty of sites dedicated to the Python scripting language so I'll only include very brief notes on this.

Download and install Python for Windows - www.python.org

Download and install Python Extensions for Windows - PyWin32 Project

To make life easier now is the time to add paths for the python executables and scripts to your path environment variable. Typically you'll need to right click "My Computer" select properties then click advanced to find the environment variables. The current default you'll need to add to the end of the path is ;C:\Python25;C:\Python25\Scripts;

Download and install EasyInstall for Python - Easy Install for Python

Use EasyInstall to download and install the tailer package - open a command prompt (with run as administrator in Vista) and just type easy_install tailer

Bookmark this page
Bookmark to: Blogmarks Bookmark to: Del.icio.us Bookmark to: Digg Bookmark to: Facebook Bookmark to: Google Bookmark to: StumbleUpon Bookmark to: Windows Live Bookmark to: Yahoo

If at first you don’t succeed look in the trash for the instructions.

Get Cashback
TopCashBack really is the closest you'll get to Free Money. Read how.


© Copyright www.DigitalHam.co.uk 2005 - 2012