RaspberryPi Wview Weather Station

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.

wview_website

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.

Then by downloading the Raspbain “Wheezy” image and install on your SD card as per the instructions.

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.

Next, run

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

webserver_working

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.

loginwview

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.

config_main

Ive turned on almost everything, My weather station is sending information to weather underground and also to the APRS CWOP program here.wview_services

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)

config

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!.

weather_page

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

http://<youripaddress>/weather/

It takes you to a very nice set of pages showing lots of information

weather_currentweather_snapshot

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!

ssh_pi

55 thoughts on “RaspberryPi Wview Weather Station

  1. Pingback: RaspberryPi WSPR Beacon - WsprryPi - VK3BQ

  2. Thank you so much for this info.. Actually, thanks to your write up, I think it was easier to install wview, which I’ve been using for years, on the RPI, than it was putting on my Fedora based file server. I always had problems installing on Fedora every time I did an upgrade. And I had some stability problems occasionally with Fedora. Your write up worked like a champ on my first try.. Very impressive work indeed! Thank you so much! The RPI makes my weather station much more stable and dependable.

  3. I did the install according to the above. The first time i opend the wview mgmt all was running. But after reboot wview keeps in status booting. anyone an idea?
    the button stop wview does not seem to do anything.
    My Station is a WH1080

    • Im not 100% sure, have you picked the correct device type in the setup pages, its a pulldown where you choose the device type?? otherwise? I’m not sure, it works for me, and many others. sorry..

  4. Getting the error “/usr/bin/wviewd_wmrusb: symbol lookup error: /usr/bin/wviewd_wmrusb: undefined symbol: radsqliteOpen” when starting (happens with whichever device I choose, eg sim)
    I think I need to recompile sqlite3, but being new to RPI, am struggling with it.

  5. Thanks for the easy installation instruction from wview on RaspberryPi. Some attempts of installation I had brought with other recommendations behind me, which unfortunately did not bring the desired success. For this statement, everything super. THANK YOU VERY MUCH!

  6. Hello.
    Many thanks for very good web page.
    Just a little question :
    Is wview can create a wxnow.txt file in order to use it in aprs ?
    I don’t want to use cwop, I would like to use my wmr200 + raspberry ans send data on aprs via radio and not only via web.
    Many thanks

    73 de F5PHW Phil
    F5phw-3 f5phw-9 on aprs

    • Im sorry, i do not know the answer to your question. i use the inbuilt CWOP function and it works well (for me). but i cannot answer your question, because I have not tried? thanks

  7. Set up and after an hour or so following your detailed instructions carefully, it’s working with my Oregon WMR88. The only data I can’t see are the inside temp and humidity. The outside temp and humidity are by default on channel 1 of the weather station console screen. Also, I only want metric units which I have ticked on management screen, all data has reverted to metric, but pressure is still shown in inches. Any ideas? Thanks again for a fun project.

  8. OK, so I’ve had this running successfully for a few days now, sending data to CWOP.
    I needed to move the Rpi and Oregon console around, so did a sudo shutdown. Unplugged power, and restarted after the move. I could not get Wview to reboot after start, spent hours fiddling, but in the end did a complete erase of the SD and a reinstall of Wview. I think something has corrupted, even though powered down.
    For the next time, is there a recommended way to stop Wview and restart?
    Anyone else experienced this problem?
    Also, still nothing from inside temperature and humidity, just outside data shown. I have an Oregon WMR88.
    Wind Chill always showing as NA?

    Thanks,
    Jules

    • Im not sure it can show more than one Temperature source, so the Prime (outside) is it.. but again, its not my software, so I haven’t had much of a look beyond my tutorial on how to install, my weather station only pass one sensors values to the software, so I only get outside as the prime,, as for the shutdown and start up, it does take some time to come back online after a power outage/being off. 10-15mins for data to flow? mine has happily worked for over 12 months now with no major issues. and a normal years power outages.. as for metric or imperial, in file generation , in the config menu pages, you choose metric. it also allows you to choose both metric and imperial (here comes the metric system) my tutorial is on how I installed my instance of the software, it tells me its being happily going for 406 days now, with no issues..

    • i knew i forgot something, wind chill on the oregon scientific devices (from their manual) only displays below 10 degrees and with a wind speed above ??9its fats like 20km.hr?) needs very specific criteria to gauge wind chill value.. google it.. 😀

      • Thanks for the info. Guess I can live with just one set of temp and humidity readings. I have ticked “show graphs in metric and imperial units”. On the graphs shown by local server under wviewmgmt, the graph axes show both metric and imperial units, but the conversion is wrong! I had 1mm rain recently, shown on the graph as a blue bar at 1.00 (inches), converted to 25mm! Seems the conversions are reversed. My temp of 21C (should be 70F) is shown as 21 against the F scale, then converted to below zero on the C scale.

        CWOP shows the data correctly, as I always click on the metric units tab.

        I have had a look around the wview forum, and there have been others who had similar problems after a power out, or just shutting down. The daemons dont start up so the wview doesn’t boot up. It seems you cant just pull the plug when it is running.
        It works after “sudo reboot” if the power stays connected, but not after “”sudo shutdown -h now, when I pull out the power lead. wview doesnt start automatically. I tried “sudo /etc/init.d/wview restart”, but received an error message, on the lines of nothing killed!

        How do you shut down, remove power and get a successful restart?
        many thanks,
        Jules

  9. Thanks for your help, I’ve used this site a couple of times for good information on setting up Wview (I always forget how to!).

  10. Have already installed OwnCloud on the Pi, and now trying to get wview up and running.
    Yes, I know it’s a bit of an ask, but just want to see if it can be done, and how each works…
    Have updated, and upgraded, (running Jessie) and get the following error when trying to install wview:

    Some packages could not be installed. This may mean that you have
    requested an impossible situation or if you are using the unstable
    distribution that some required packages have not yet been created
    or been moved out of Incoming.
    The following information may help to resolve the situation:

    The following packages have unmet dependencies:
    wview : Depends: libgd2-noxpm (>= 2.0.36~rc1~dfsg) but it is not installable or
    libgd2-xpm (>= 2.0.36~rc1~dfsg) but it is not installable
    Recommends: php5-sqlite but it is not going to be installed
    E: Unable to correct problems, you have held broken packages.

    Not being a Linux expert (but able to get myself out of a bit of trouble….), wondering if I can get a bit of help.
    Have googled, but not come upon a usable fix.
    Thanks.

    • I’m sorry. But I haven’t tried. I do know my weather station has happily worked for 2 years without issue. Based on the above.

          • It’s a Jessie wheezy thing. Read / find the comment from Mr Magoo. He has he fix for the Jessie / rpi3 install

          • I had another Rpi2 so I just installed wheezy, and everything went smooth as silk, the ‘simulator’ post’s to my ftp site as well as cwops & wxunderground however when I enable my Vantage Pro2 and select ‘serial’ ‘/dev/ttyUSB0’ , wview does not get the data, I checked with lsusb and the port is there. As a test I hooked the Pro2 up to the old windows computer with Weatherlink software and it reads data just fine. Is there a way to kick start the usb as there is in Weatherlink?

          • The Google group on VPro2 suggested running wviewcleardata (after stopping wview) to clear data generated by the simulator. That worked!
            Thanks for all of your suggestions
            73 John
            W5GFI

    • I wonder if it’s a Jessie thing. I think I’m on Wheezy, the prior version.
      I do know that incompatibilities spring up between versions, but there’s usually a solution by going back a version on the thing that’s broken.
      I’d try installing libgd2-xpm, looking at the errors that come from that and trying to fix them. (This is one of the joys of Unix/Linux. All the coders think that the users are coders!)
      If – as I suspect – it is in need of php5-sqlite, then try installing that and trying again.
      Please let us know how you go. These pages become lifelines for people with problems such as this, and it’s great if we can find a solution. Sadly, I don’t know if I know anything else to try!

  11. Thank you for the time that it took to create the instructions for wview install to the pi. Is it possible to change location of saved data to a usb flash stick instead of the sd card? I would get a 128 or 256gb in hopes of saving years worth of data. I am new to this so please excuse me if I should know. Thanks

    • there is no reason you couldn’t set the target location for the files, note, I’ve run mine for a number of years and the standard micro sd card i used (8gb) has around 7.8gb left! the volume of data is TINY… 😀

  12. Thank you for the reply on storage. It is helpful to know. Can’t seem to get “wheezy” any more and “Jessie” has errors on install for me as well. Are you willing to try a “Jessie” install and post your differences to this tutorial? There is no definitive tutorial for the newer Rpi operating system for wview and “Jessie” that I can find. The differences seem to be a problem between the two operating systems, and I am not sure why. Any help is appreciated and I understand time to do this may be a problem. Thanks

  13. Hi, Thanks for the write-up. Looked easy enough for me to try. I still get a error message when running pi@raspberrypi /etc/apt $ sudo apt-get install wview on my Pi3. It says the following packages have unmet dependencies. Any idea?
    Hermann

  14. A wonderful program. Can you add support for the Arduino with weather shield that picks up data from wireless sensors? That would be fantastic.

    • It’s not my software. So no. I can’t. You might want to ask the creator. I just shared the way of installing it 🙂

  15. Hello
    Thank you for nice web-page,I can set up weather-station in my Pi.
    If you OK,I tell the way to install wviewer to Japanese people.
    I will announce this page and I will rewrite this page in Japanese.
    I hope to receive your answer.
    Thank you.

    • More than happy for you to translate this into Japanese. Note a recent comment about how to make it work on the Jessie release. Thanks. And good luck.

  16. Hi. Just wondering if your Rpi setup is still going strong? Any hiccups. .. especially from power outages? Have you tried it with wunderland at all? Cheers Scott

    • one of the children pulled the power out a couple of months ago and the SD card corrupted. i haven’t gotten around to try and fix it, it worked for 2ish years without a problem until the child… power outages didn’t bother it either, only the child.. grrr

Leave a Reply

Your email address will not be published. Required fields are marked *