I’ve had my RaspberryPi for a while now, but lacked the time or ability to have a proper play with it. That changed the other night when a cheap HDMI-VGA adaptor arrived in the mail to allow me to connect the Pi to an old LCD monitor i have. (i got strange looks using the house big screen TV with the Pi as it was the only HDMI device we have)
I got my Pi a couple of months back when a number of the EMDRC club members were building them up for weather stations, and I had planned to do the same. Peter VK3PH had made up an SD card he was dealing out to club members based on the PYWWS software. His instructions are here. I put this SD card into the Pi, booted, followed the instructions, and had no luck, it didn’t seem to work, wouldn’t detect my weather station, didn’t seem to do anything!
So.. I googled pi and my weather station (an Oregon scientific WMR88) and a number of webpages appeared pointing to the wview weather package.
So, how did I install wview. The below is long and drawn out – designed to help ANYONE install the software!, though it is using the command line, you need to know a little bit. However, that is EASY! as i give you the commands! *the red bits..
I started by following the instructions on a number of webpages (and the wview webpage instructions) “they all agreed with each other” and after a number of frustrated failures, and 3* formats and reinstalls of the “wheezy” image later, changed the order of operation around and it worked. I was having trouble with PHP and getting the webpages to properly run!. and swapped to putting the php and web server on first. **its possible some was my lack of recent unix experience
Start by formatting your SD card using this! utility.
Once you have a clean install, put the SD card in the Pi and turn it on soon you will arrive at the Unix Command prompt.
You need to first modify your sources file to allow the APT installer package to get the correct source files.
pi@raspberrypi~ $ cd /etc/apt/ pi@raspberrypi /etc/apt $ sudo nano sources.list
The nano program is a text editor, you need to add the following URL’s to the sources.list file. Sudo lets you run this as superuser so you can save the changes.
deb http://www.wviewweather.com/apt/wheezy wheezy main deb-src http://www.wviewweather.com/apt/wheezy wheezy main
Save the sources.list file and APT will get the proper package in the next steps.
There are two steps to upgrading. First, run an update
pi@raspberrypi /etc/apt $ sudo apt-get update
in order to synchronise the database of available software packages and the versions available.
pi@raspberrypi /etc/apt $ sudo apt-get upgrade
which will cause any packages with newer versions available to be updated. (your pi software and core components)
Im adding one extra step, if you wish, this command will upgrade the device firmware on your Pi.
pi@raspberrypi /etc/apt $ sudo rpi-update
Now this is where I divert from the rest of the interwebs instructions and reverse the order.
To run the view software, you need to install apache2 first, This is the software tat drives the webpage’s that allow you to configure the system and locally look at the weather.
pi@raspberrypi /etc/apt $ sudo apt-get install apache2
and then PHP5 support on your Pi.
pi@raspberrypi /etc/apt $ sudo apt-get install php5 php5-sqlite libapache2-mod-php5
Once they have finished installing, reboot the Pi using
pi@raspberrypi/etc/apt $ sudo reboot
Once it comes back online, and now that you have installed the core components, you can test if the apache server is working correctly. Find out the IP address of your raspberry Pi using this command
pi@raspberrypi /etc/apt $ sudo ifconfig
Then from another computer on your home network, test the Apache server, in a web browser, type http://<your IP address>/ and you should see this
It’s wise to spend 30 seconds setting the timezone and ensuring your box knows the proper time, using this command you can localise the device, natively it gets time from a NTP server, but uses UTC time as its standard.
pi@raspberrypi /etc/apt $ sudo dpkg-reconfigure tzdata Current default time zone: 'Australia/Melbourne' Local time is now: Sat Jul 26 00:28:04 EST 2014. Universal Time is now: Fri Jul 25 14:28:04 UTC 2014.
Now you have a working web server, we can finally install the Wview software and get the box working.
pi@raspberrypi /etc/apt $ sudo apt-get install wview
Now you have the client installed, Plug in your USB weather station and now reboot the Pi again, using
pi@raspberrypi/etc/apt $ sudo reboot
Once it restarts again, you can check and confirm your USB weather station device is detected/connected using this command
pi@raspberrypi~ $ sudo lsusb Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp. Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. Bus 001 Device 004: ID 0fde:ca01 <<-- this is my weather station Bus 001 Device 005: ID 0bda:8176 Realtek Semiconductor Corp. RTL8188CUS 802.11n WLAN Adapter
Now comes the weather station bit. Get back on another computer on your network and browse to the management pages of the wview software. (if you are running the command line inside the Pi GUI, you can use the PI graphical web browser also)
http://<your ip address>/wviewmgmt/system_status.php *for me its http://192.168.0.71/wviewmgmt/system_status.php
This pops you at a login screen, the initial password is “” wview “” *suggest you change that once logged in! change it in the System Status page.
The main admin screen is below, you need to go into the following pages and set up your individual station for the services and functions you wish to run.
In the station page, you can choose your device type and set up some location information (make sure you set the height correctly so your barometer is accurate)
And finally, i have had some requests as to where I changed/set the date to Australian, and where I added the local Radar image, this is in the File Generation tab. Enter the relevant details for your location and station name, the local forecast link and local radar detail at the bottom. The date format, %d/%m/%y for the Australian way!.
Once you have changed the settings, make sure you save each page, then, once again reboot the weather station and log back into the webpage, within 5 mins, you should be seeing data flow to the outside world and the real time local webpage updating.
pi@raspberrypi~ $ sudo reboot
The local website has a wealth of information, with pages for current and historic weather recorded by the system. You access the internally generated website data (if you have turned on the local data generation) via this webiste
It takes you to a very nice set of pages showing lots of information
I held off exploring what the Pi could do as a number of people had mentioned it was often difficult, my fear was unfounded, Its been a fun experience having a tinker, playing with a command line and using unix, something I haven’t done in near on 20 years! now I’m looking for a 2nd Pi to continue my exploring with this nifty little box, I’ve got a WSPR Pi beacon to make yet!
And finally, another weather station package i might try is WEEWX, it should provide essentially the same experience using my weather station and Pi, something else to tinker with! the beauty of the Pi is all I need is another SD card, the current system can be put back in seconds with an SD card swap!
Finally, for my reference, some handy commands to show some pi info can be found at this website! Info such as device speed, setting the time, updating software and firmware and checking the Pi Temperature!