Weather Station now running


169 posts   Page 4 of 7   1, 2, 3, 4, 5, 6, 7
by paranorm » Sun Nov 25, 2012 10:20 am
I had the same problem - fixed by doing the following:

sudo apt-get install libudev-dev
Posts: 1
Joined: Sun Nov 25, 2012 10:18 am
by derekk19 » Wed Dec 05, 2012 9:22 am
Thanks for the tips guys. I have this working down in NZ too. Using a local "Scientific Sales" WS1093 station which seems to be yet another Fine Offset knock-off. I also have an RFM01 receiver so the next job is to use that to read the radio signal directly and then do away with the USB display.

Some have apparently got the RFM01 receiver working on a Pi and I've got a few photos, but no schematics. Actually getting the right connections is tricky from pictures, so any schematics or detailed "connect a wire from here to here and a 10K resistor from here to here" instructions would be welcome. I've tried other radio receiver modules on an Arduino but not had any success deciphering the signal, I have big hopes for the RFM01

Cheers
Derek
Posts: 4
Joined: Sun Sep 16, 2012 2:01 am
by kenmc » Wed Dec 05, 2012 9:58 am
One thing I found is that the station ID changes when you install new batteries, so the code from kevin listed prior (susa.net) needs to be changed to not expect 0xa1 always. Otherwise it works well.

I've been running for over a week solidly, but have just disassembled it to mount all the components on stripboard and make it more permanent. I'm adding an LCD also to display information locally in case it gets hung up trying to find a signal or whatever.
http://goatstownweather.hostoi.com
Posts: 53
Joined: Fri May 04, 2012 8:02 am
Location: Dublin, Ireland
by pingu512 » Wed Dec 12, 2012 8:50 pm
For those interested I have updated and tested the Weather Station setup tutorial using the latest Raspbian Wheezy image. Some changes were needed to the cython-hidapi

It would be good to see more schools setting up weather stations providing live feeds to their web sites.

I am now getting links from
The Guardian's, A dozen things to do with a Raspberry Pi
C Net's, 24 fun things to do with a Raspberry Pi
The Frequencycast show Podcast No 82
Wired 8 Cool Raspberry Pi Projects
:P
www.weather.dragontail.co.uk
User avatar
Posts: 63
Joined: Sun Apr 01, 2012 2:39 pm
Location: Chester
by geppetto » Wed Dec 12, 2012 9:12 pm
I have updated and tested the Weather Station setup tutorial


Thanks very much for doing this...

I've got my Pi and a Maplin weather station which was on a sale price..
Looking forward to following your routines and getting this working..

Philip
Posts: 19
Joined: Mon Sep 19, 2011 8:03 am
by turbine2 » Thu Dec 13, 2012 1:26 pm
Thanks for doing this pingu512, my PI and weatherstation have recently arrived and I'll be looking at this over Christmas (subject to getting some free time).
David
Posts: 40
Joined: Thu Dec 06, 2012 11:21 am
by kenmc » Fri Dec 14, 2012 9:39 am
pingu512 wrote:For those interested I have updated and tested the Weather Station setup tutorial using the latest Raspbian Wheezy image. Some changes were needed to the cython-hidapi

It would be good to see more schools setting up weather stations providing live feeds to their web sites.

I am now getting links from
The Guardian's, A dozen things to do with a Raspberry Pi
C Net's, 24 fun things to do with a Raspberry Pi
The Frequencycast show Podcast No 82
Wired 8 Cool Raspberry Pi Projects
:P
http://www.weather.dragontail.co.uk


Pingu, just curious as to whether you experience the same USB hangs from the head-unit to the pi that is widely reported using pywws and the WH1080/Maplin weather station? I just notice that there's a couple of gaps in the graphs over the last 7 days, so was wondering if that was you messing with it, or the hangs again?
Reason I'm asking is that I gave up on the USB connection and instead went with intercepting the signal directly. Definitely more work, but more fun :)
mine's at goatstownweather.atwebpages.com/pywws. It's up and down a bit as I add sensors etc to the circuit.
I changed the graphs in some of them to use dygraphs instead of the horrible gnuplot or whatever that pywws uses by default.
http://goatstownweather.hostoi.com
Posts: 53
Joined: Fri May 04, 2012 8:02 am
Location: Dublin, Ireland
by pingu512 » Fri Dec 14, 2012 7:27 pm
kenmc wrote:Pingu, just curious as to whether you experience the same USB hangs from the head-unit to the pi that is widely reported using pywws and the WH1080/Maplin weather station? I just notice that there's a couple of gaps in the graphs over the last 7 days, so was wondering if that was you messing with it, or the hangs again?
Reason I'm asking is that I gave up on the USB connection and instead went with intercepting the signal directly. Definitely more work, but more fun :)
mine's at goatstownweather.atwebpages.com/pywws. It's up and down a bit as I add sensors etc to the circuit.
I changed the graphs in some of them to use dygraphs instead of the horrible gnuplot or whatever that pywws uses by default.


Yes Kenmc, I have had the odd problem with the weather station, hence the recent gap, but it will sometimes run for months with no problem. When it occurs, rebooting the pi or disconnecting the usb link does not solve it. The batteries need to be removed from the station, so I think this may be a station problem rather than a pi problem.
I am currently setting up a script to check the logs every hour and email me if there is a problem so it can be fixed quickly

I also have been experimenting with direct RF connection, but my knowledge is limited. Got an A59JN but not sure what to use as an aerial at the moment.
My idea is not to replace the head-unit, but once I understand a bit more about RF, intercept the signal from a power monitor supplied free from npower. Then I could do something similar to the weather station, but for my electricity usage.
User avatar
Posts: 63
Joined: Sun Apr 01, 2012 2:39 pm
Location: Chester
by pingu512 » Fri Dec 14, 2012 7:33 pm
slowtarget wrote:Thank you so much for the write up, I'd never have got up and running without it.

I now have a maplins touch N96GY weather station reporting to my pi, which is in turn uploading to metoffice, weatherunderground and some web hosting at http://jasonfarmer.co.uk, although not too thrilled with pywws and WBY templates and am now looking to smarten things up a bit...

The pi is also uploading webcam stills to the vps and I'm looking at incorporating these into some timelapse videos.

Hi Slowtarget
Are you using the same pi to drive the weather station and the web cam. I am using Motion to detect movement, which I think is very processor heavy. This caused problems with pywws so I moved it onto another pi. So now everytime something moves outside the house it uploads the picture to gdrive and once a day to www.weather.dragontail.co.uk
User avatar
Posts: 63
Joined: Sun Apr 01, 2012 2:39 pm
Location: Chester
by kenmc » Sat Dec 15, 2012 2:52 am
pingu512 wrote:
kenmc wrote:Pingu, just curious as to whether you experience the same USB hangs from the head-unit to the pi that is widely reported using pywws and the WH1080/Maplin weather station? I just notice that there's a couple of gaps in the graphs over the last 7 days, so was wondering if that was you messing with it, or the hangs again?
Reason I'm asking is that I gave up on the USB connection and instead went with intercepting the signal directly. Definitely more work, but more fun :)
mine's at goatstownweather.atwebpages.com/pywws. It's up and down a bit as I add sensors etc to the circuit.
I changed the graphs in some of them to use dygraphs instead of the horrible gnuplot or whatever that pywws uses by default.


Yes Kenmc, I have had the odd problem with the weather station, hence the recent gap, but it will sometimes run for months with no problem. When it occurs, rebooting the pi or disconnecting the usb link does not solve it. The batteries need to be removed from the station, so I think this may be a station problem rather than a pi problem.
I am currently setting up a script to check the logs every hour and email me if there is a problem so it can be fixed quickly

I also have been experimenting with direct RF connection, but my knowledge is limited. Got an A59JN but not sure what to use as an aerial at the moment.
My idea is not to replace the head-unit, but once I understand a bit more about RF, intercept the signal from a power monitor supplied free from npower. Then I could do something similar to the weather station, but for my electricity usage.


For the aerial, it's just a bit of wire approx 17cm long.
Having the headunit hang the USB every so often is really a pain. It seemed to run better for me with cumulus before I had a pi, but with pywws it was around 3-4 days uptime. I was livelogging rather than hourly, so maybe that makes a difference?
http://goatstownweather.hostoi.com
Posts: 53
Joined: Fri May 04, 2012 8:02 am
Location: Dublin, Ireland
by pingu512 » Sat Dec 15, 2012 8:06 am
kenmc wrote:
For the aerial, it's just a bit of wire approx 17cm long.
Having the headunit hang the USB every so often is really a pain. It seemed to run better for me with cumulus before I had a pi, but with pywws it was around 3-4 days uptime. I was livelogging rather than hourly, so maybe that makes a difference?

I use Hourly.py set to run from a script which is called from a crontab every 10 mins.
The relevant part of weather.ini are set as

[hourly]
last update = 2012-12-15 08:07:23
plot = ['24hrs_full_features.png.xml', '24hrs.png.xml', 'rose_24hrs.png.xml', '7days.png.xml', '2012.png.xml', '28days.png.xml', 'rose_7days_nights.png.xml']
text = ['feed_hourly.xml','24hrs.txt' ,'feed_daily.xml', 'forecast_week.txt', '7days.txt', 'allmonths.txt']
twitter = ['tweet.txt']
services = []

[logged]
last update = 2012-12-15 08:37:21
plot = ['rose_1hr.png.xml', 'rose_12hrs.png.xml', '6hrs.png.xml']
text = ['1hrs.txt', '6hrs.txt', '6hrs_html_cp.txt', 'forecast_icon_9am.txt']
twitter = []
services = ['metoffice']

[daily]
last update = 2012-12-14 09:07:22
plot = ['7days.png.xml', '2012.png.xml', '28days.png.xml', 'rose_7days_nights.png.xml']
text = ['feed_daily.xml', 'forecast_week.txt', '7days.txt', 'allmonths.txt']
twitter = []
services = []

[live]
services = []
twitter = []
plot = []
text = []
User avatar
Posts: 63
Joined: Sun Apr 01, 2012 2:39 pm
Location: Chester
by PaulCheffus » Mon Dec 17, 2012 10:23 pm
Hi

I am struggling to get this working.

I have managed to get the Pi to talk to the Weather Station and download data.

I have setup the Apache webserver with the template from "Weather By You" but I can only get the webpage to display the header and no data.


weather.jpg
weather.jpg (47.89 KiB) Viewed 2388 times

I have run

Code: Select all
sudo python pywws/Template.py /var/www/data /home/pi/weather/pywws-12.07_r537/text/24hrs.txt /var/www/data/24hrs.txt
sudo python pywws/Plot.py /var/www/data /tmp /home/pi/weather/pywws-12.07_r537/plot/24hrs.png.xml /var/www/data/24hrs.png


which has created the two files but when I select 24 hours from the page nothing appears.

Please help as I am tearing my hair out over this.

Cheers

Paul
Procrastination - The Thief of Time.
Posts: 372
Joined: Tue May 29, 2012 2:51 pm
Location: Lincolnshire UK
by pingu512 » Tue Dec 18, 2012 7:44 pm
PaulCheffus wrote:Hi

I am struggling to get this working.

I have managed to get the Pi to talk to the Weather Station and download data.

I have setup the Apache webserver with the template from "Weather By You" but I can only get the webpage to display the header and no data.


weather.jpg

I have run

Code: Select all
sudo python pywws/Template.py /var/www/data /home/pi/weather/pywws-12.07_r537/text/24hrs.txt /var/www/data/24hrs.txt
sudo python pywws/Plot.py /var/www/data /tmp /home/pi/weather/pywws-12.07_r537/plot/24hrs.png.xml /var/www/data/24hrs.png


which has created the two files but when I select 24 hours from the page nothing appears.

Please help as I am tearing my hair out over this.

Cheers

Paul

Hi Paul
You first need to check that the main site is working. index.php will initially load index.txt from the current directory. Is this working? Do you have php installed on the server?
Selecting 24 hours from the top menu will load (in my case) data/24hrs.txt. If it did not exist I would have expected just a blank page.
Have you checked that you can view 24hrs.txt and 24hrs.png. If so these have been created correctly.

Don't forget you will need gnuplot (http://www.gnuplot.info/) v4.2 or higher to create the png graphs on the Raspberry
User avatar
Posts: 63
Joined: Sun Apr 01, 2012 2:39 pm
Location: Chester
by PaulCheffus » Tue Dec 18, 2012 10:58 pm
pingu512 wrote:Hi Paul
You first need to check that the main site is working. index.php will initially load index.txt from the current directory. Is this working? Do you have php installed on the server?
Selecting 24 hours from the top menu will load (in my case) data/24hrs.txt. If it did not exist I would have expected just a blank page.
Have you checked that you can view 24hrs.txt and 24hrs.png. If so these have been created correctly.

Don't forget you will need gnuplot (http://www.gnuplot.info/) v4.2 or higher to create the png graphs on the Raspberry


Hi

Thanks for the reply.

I was missing index.txt from the web folder. It's all now working correctly.

Cheers

Paul
Procrastination - The Thief of Time.
Posts: 372
Joined: Tue May 29, 2012 2:51 pm
Location: Lincolnshire UK
by pingu512 » Mon Dec 24, 2012 9:12 am
Good to see another successful weather station running :)
User avatar
Posts: 63
Joined: Sun Apr 01, 2012 2:39 pm
Location: Chester
by gazza_d » Sun Dec 30, 2012 8:22 am
And another weather station is up and running...

Clas Ohlson WH1080 connected to a Pi. Thanks to loads of people who's comments and blog posts I read whilst setting it up. Especially pingu512 whos instructions helped a lot, Jim Easterbrook for the PYWWS software and also the Foundation for the Pi in the first place.

There was a few hiccups yesterday, but uploading to Wunderground ( http://po.st/np5mCh ) and Twitter ( @brockleywhinsw ) now happily.

I still need to knock some html up as the WBY template is not my thing really and doesnt work with my existing internal website. I may find some free hosting and place it there though.
Posts: 4
Joined: Thu May 24, 2012 9:36 pm
by pingu512 » Sun Dec 30, 2012 1:06 pm
My sd card die today, after 6 months of continuous running. I could reformat it, but don't want to risk it, so I have setup a new sd card. My backups are a bit random, so i have lost some data at http://www.weather.dragontail.co.uk . Note to self - setup crontab to upload raw files to web site every day as backup
User avatar
Posts: 63
Joined: Sun Apr 01, 2012 2:39 pm
Location: Chester
by dstorey » Sun Dec 30, 2012 6:38 pm
I've had my WH1080 up and running served up with the pi for a couple of days now but have also had an SD card failure. The Verbatim 4GB SD class 6 card failed so badly its only showing RAW and can't be accessed.

I've setup a 2nd card yesterday (Sandisk 16GB class 10) and am hoping this fairs better. What is the standard amount of time an SD card will run for before failure in a pi? Is it generally a power supply issue? My pi is being run through a UPS so should be getting pretty level voltage at least from the UPS socket...

The instructiuons on the dragontail website made it a doddle to set up... twice! :D

http://www.wunderground.com/weatherstation/WXDailyHistory.asp?ID=IHAMPSHI98&day=30&year=2012&month=12&graphspan=day
Posts: 1
Joined: Sun Dec 30, 2012 6:29 pm
by kenmc » Mon Dec 31, 2012 9:29 am
pingu512 wrote:My sd card die today, after 6 months of continuous running. I could reformat it, but don't want to risk it, so I have setup a new sd card. My backups are a bit random, so i have lost some data at http://www.weather.dragontail.co.uk . Note to self - setup crontab to upload raw files to web site every day as backup

I wonder if you have hit the read/write limit of the flash device in the memory card; they typically have a finite lifetime of Xhundred-thousand or Xmillion read/write cycles. Using them in a camera you're pretty unlikely to ever reach that limit, but if you're logging data from a weather station every minute, that's 1440 writes a day just there, never mind however many writes are done by the post-processing scripts, and you're starting to really rack up the cycles. Plus there's the usual linux message logs etc which are being written by the system.

Might be prudent to offload the data logs to a usb-stick perhaps, least that way the SD card should hopefully have a longer life, and you could replace the USB-stick with a wee hard drive if you wanted to either.
http://goatstownweather.hostoi.com
Posts: 53
Joined: Fri May 04, 2012 8:02 am
Location: Dublin, Ireland
by Maxion » Mon Dec 31, 2012 10:02 am
kenmc wrote:
pingu512 wrote:My sd card die today, after 6 months of continuous running. I could reformat it, but don't want to risk it, so I have setup a new sd card. My backups are a bit random, so i have lost some data at http://www.weather.dragontail.co.uk . Note to self - setup crontab to upload raw files to web site every day as backup

I wonder if you have hit the read/write limit of the flash device in the memory card; they typically have a finite lifetime of Xhundred-thousand or Xmillion read/write cycles. Using them in a camera you're pretty unlikely to ever reach that limit, but if you're logging data from a weather station every minute, that's 1440 writes a day just there, never mind however many writes are done by the post-processing scripts, and you're starting to really rack up the cycles. Plus there's the usual linux message logs etc which are being written by the system.

Might be prudent to offload the data logs to a usb-stick perhaps, least that way the SD card should hopefully have a longer life, and you could replace the USB-stick with a wee hard drive if you wanted to either.


Depending on the setup having 2x USB sticks and having error checking in the scripts which makes sure the stick is writeable before doing it would be a cheaper option if you don't have a spare HD lying around.

You can get small USB sticks from amazon for a few quid.
Posts: 138
Joined: Mon Dec 03, 2012 2:22 pm
by pingu512 » Mon Dec 31, 2012 10:32 am
Maxion wrote:
kenmc wrote:
pingu512 wrote:My sd card die today, after 6 months of continuous running. I could reformat it, but don't want to risk it, so I have setup a new sd card. My backups are a bit random, so i have lost some data at http://www.weather.dragontail.co.uk . Note to self - setup crontab to upload raw files to web site every day as backup

I wonder if you have hit the read/write limit of the flash device in the memory card; they typically have a finite lifetime of Xhundred-thousand or Xmillion read/write cycles. Using them in a camera you're pretty unlikely to ever reach that limit, but if you're logging data from a weather station every minute, that's 1440 writes a day just there, never mind however many writes are done by the post-processing scripts, and you're starting to really rack up the cycles. Plus there's the usual linux message logs etc which are being written by the system.

Might be prudent to offload the data logs to a usb-stick perhaps, least that way the SD card should hopefully have a longer life, and you could replace the USB-stick with a wee hard drive if you wanted to either.


Depending on the setup having 2x USB sticks and having error checking in the scripts which makes sure the stick is writeable before doing it would be a cheaper option if you don't have a spare HD lying around.

You can get small USB sticks from amazon for a few quid.


In my case i am running the RPI without a powered hub to keep the power usage to a minimum. Adding use sticks might require a usb hub.
Every 10 mins a crontab is run which creates entries in the log files so these would need to be moved as well.
Simple solution is to keep a copy of the raw data files on the web site and change the sd card every 6 months.
User avatar
Posts: 63
Joined: Sun Apr 01, 2012 2:39 pm
Location: Chester
by Frog Pi » Mon Dec 31, 2012 5:38 pm
pingu512 wrote:My sd card die today, after 6 months of continuous running. I could reformat it, but don't want to risk it, so I have setup a new sd card. My backups are a bit random, so i have lost some data at http://www.weather.dragontail.co.uk . Note to self - setup crontab to upload raw files to web site every day as backup

If, like me, the only access to your web server is via FTP then I would recommend using lftp for the backups. It is a simple command line FTP tool with a mirror function which is good for backing up data from the Pi. I have been doing a daily backup of the raw data as well as the hourly, daily and monthly processed data.
Posts: 29
Joined: Tue May 22, 2012 5:26 pm
Location: France
by mcgerard » Mon Dec 31, 2012 5:57 pm
And another WS 1080 up and running with pywws thanks to the instructions from pingus512. Not yet pushing the data to any service or website. That will be the next step.
Posts: 16
Joined: Tue Feb 14, 2012 3:42 pm
Location: UK
by bcre3306 » Thu Jan 03, 2013 9:22 pm
Is there any way for this to report indoor temp's also? I am using a offset 1080 and would like to report this on the website also.
Thanks
Posts: 21
Joined: Tue Jul 17, 2012 9:08 pm
by PaulCheffus » Thu Jan 03, 2013 10:13 pm
bcre3306 wrote:Is there any way for this to report indoor temp's also? I am using a offset 1080 and would like to report this on the website also.
Thanks


Hi

The data is there something like data['temp_in'] should provide the information. You would then need to include this in the web template.

Cheers

Paul
Procrastination - The Thief of Time.
Posts: 372
Joined: Tue May 29, 2012 2:51 pm
Location: Lincolnshire UK