Instructions and support code for getting a cheap USB weather station connected to the Met Office wow.metoffice.gov.uk using a Raspberry Pi.
Decide how often you want to report data to WOW, and set the interval using the command below, the Met Office WOW FAQ suggests you upload data every 15 minutes.
python ~/weather/pywws/code/SetWeatherStation.py -r 15
In order for the live logger to continue running it is necessary to restart the logger if it stops for any reason (a reboot for example). The following instructions will download a script to keep the live logger running:
mkdir -p ~/weather/scripts cd ~/weather/scripts wget https://raw.github.com/trastle/rpi-weather/master/cron/pywws-live.sh chmod 755 pywws-live.sh
The script is designed to be run by the Linux cron service, in order to install the script into your cron service you must do the following: Open your crontab:
crontab -e
Append the following line to the end of the:
@reboot /home/pi/weather/scripts/pywws-live.py 25,55 * * * * /home/pi/weather/scripts/pywws-live.sh
Save and close the file by hitting:
Crtl + x
To start the pywws weather station software enter the commend:
/home/pi/weather/scripts/pywws-live.sh
Your weather station should now be collecting data every 15 minutes.
First you’ll need to logon to wow.metoffice.gov.uk and create a site. During the site creation process you’ll be asked to enter a six digit automated weather station pin. Make note of the PIN you enter along with the Site Id you are allocated.
The first time you started pywws a file weather.ini was created in your data directory. Open the file now:
nano /home/pi/weather/data/weather.ini
Scroll down through the file until you find the [logged] section. Add the MetOffice to the list of logged services:
[logged] services = ['metoffice'] twitter = [] plot = [] text = []
Scroll down to the end of the file and add the following section, switching out the dummy values for your site id and automatic weather station PIN.
[metoffice] site id = 11111111 aws pin = 123456
Save and close the file.
Restart the live logger application so that it can re-load your configuration:
killalll python /home/pi/weather/scripts/pywws-live.sh
You're all done.