Download and write to SD Card the debian image for Raspberry PI.
Boot and connect via SSH (Putty from Windows)
Change to root using sudo su – alternative use sudo in front of commands. Using sudo su – is bad, but I always do it.
Run
apt-get update
apt-get upgrade
Download the latest Debian Weewx version (http://sourceforge.net/projects/weewx/files/) using wget. Then run
dpkg -i weewx_2.6.4-1_all.deb
This will most likely throw error errors about missing dependencies. Install them using apt-get install
dpkg -i weewx_2.6.4.1_all.deb
(Reading database ... 75409 files and directories currently installed.)
Preparing to replace weewx 2.6.4-1 (using weewx_2.6.4.1_all.deb) ...
Unpacking replacement weewx ...
dpkg: dependency problems prevent configuration of weewx:
weewx depends on python-configobj (>= 4.5); however:
Package python-configobj is not installed.
weewx depends on python-cheetah (>= 2.0); however:
Package python-cheetah is not installed.
weewx depends on python-imaging (>= 1.1.6); however:
Package python-imaging is not installed.
weewx depends on python-usb (>= 0.4); however:
Package python-usb is not installed.
dpkg: error processing weewx (--install):
dependency problems - leaving unconfigured
Errors were encountered while processing:
weewx
So in my case I run
apt-get install python-configobj python-cheetah python-imaging python-usb
During the install you’ll be asked several configuration questions, fill them in (You can always edit the config file later if you make a mistake).
For the maplin WH1080, Select the FineOffsetUSB.
Once installed weewx should attempt to start (if not you can start it with /etc/init.d/weewx start). Check the syslog for any errors
tail /var/log/syslog -n 50
If all goes well you should see something like
wxengine: Initializing weewx version 2.6.4
wxengine: Using Python 2.7.3 (default, Mar 18 2014, 05:13:23) #012[GCC 4.6.3]
wxengine: pid file is /var/run/weewx.pid
wxengine: Using configuration file /etc/weewx/weewx.conf
wxengine: Loading station type FineOffsetUSB (weewx.drivers.fousb)
fousb: driver version is 1.6
fousb: polling mode is PERIODIC
fousb: polling interval is 60
fousb: altitude is 4.2672 meters
fousb: pressure offset is 0.0
fousb: found station on USB bus=001 device=005
wxengine: StdConvert target unit is 0x1
wxengine: Record generation will be attempted in 'hardware'
wxengine: The archive interval in the configuration file (300) does not match the station hardware interval (60).
wxengine: Using archive interval of 60 seconds
archive: Created and initialized table 'archive' in database 'weewx.sdb'
wxengine: Using archive database: archive_sqlite
stats: Created schema for statistical database
stats: stats database up to date.
wxengine: Using stats database: stats_sqlite
wxengine: Starting up weewx version 2.6.4
If you encounter errors you can edit your weewx configuration using nano -w /etc/weex/weewx.conf
Once you’ve finished editing press ctrl+x (to exit), then y(to save), then enter(same filename). Then restart weewx using /etc/init.d/weewx restart
If all has gone well you may also see entries in your syslog like
weewx[12559]: archive: added record 2014-09-20 18:32:44 UTC (1411237964) to database 'weewx.sdb'; table 'archive'
You should also have /var/www/weewx loaded with files.
As we haven’t yet installed a webserver though you can’t view them.
We’ll install Apache2 Server to handle our webpages.
apt-get install apache2
Once apache is installed open the weewx pages by visiting http://{raspberry pi ip address}/weewx from your browser. e.g. http://192.168.1.52/weewx
This setup does leave weewx running as root, not really something you would do for a system running on the internet. but outside the scope of securing your server for here.
Checkout http://www.weewx.com/docs/usersguide.htm#installing for more info on installing, problems and further guides for configuring your weewx installation.
Also checkout http://davies-barnard.co.uk/2013/12/weewx-rasp/ for a better looking skin template (the link is in one of the comments).
One thought on “Raspberry PI + Maplin WH1080 Weatherstation”