Weather Station now running


168 posts   Page 1 of 7   1, 2, 3, 4, 5 ... 7
by pingu512 » Wed Jun 27, 2012 6:01 pm
Finally I have got the PI working :D and taking to my weather station and uploading to my website at http://www.dragontail.co.uk
Thanks must go to Peter Mctaggart for providing the help with the software version required.
So what’s the setup:
It’s a Maplin USB Touch weather station code N96GY
I am using the python based pywws software from Jim Easterbrook at http://code.google.com/p/pywws/
I am running on the standard debian squeeze version 6-19-04-2012 on a Transcend 8gb SD class 10
The Weather station is now plugged directly into the PI with no powered hub. I have installed ssh to control or monitor from another PC when required. The idea being that I keep power consumption to a minimum.
Additional notes from Peter

“1. I updated to Cython 0.16 (complied from src)
2. I installed libusb-1.0.9 (compliled from src)
3. I have installed cython-hidapi from https://github.com/gbishop/cython-hidapi.git


Note; I needed to update setup.py in cython-hidapi as it was trying to include /usr/include/libusb-1.0 but libusb has installed into /usr/loca/include/libusb-1.0”

I had trouble with some of the compiling when working in xwindows, but then compiled correctly from a standard console window. One of the errors was a memory problem but not sure.
I have a small shell script which runs every hour using cron (crontab –e). This calls the pywws python script hourly.py to read from the weather station, update the local files and uploads to the web site.
I will get some pictures on the web site soon
Now its working I can do some more work with the displays on the web site.
I’m now going to need another PI :roll:
User avatar
Posts: 62
Joined: Sun Apr 01, 2012 2:39 pm
Location: Chester
by pingu512 » Wed Jun 27, 2012 6:03 pm
By the way, the weather station was only £59 just before Christmas. I think they discount them every so often.
User avatar
Posts: 62
Joined: Sun Apr 01, 2012 2:39 pm
Location: Chester
by jamesdigby » Thu Jun 28, 2012 11:47 am
well done getting it working!!

I have given in to trying to get wview to run nice and stable.

I am going to try pywws to see if i can get it to work, looks like i have the same weather station as you.

Is there any chance of a tutorial based on what you did to get yours up and running, my linux knowledge is close to zero.

I am happy (might even say looking forward) to work on some html to make more user friendly weather pages, and will of course share the files, that is if i ever manage to get wview or pywws to work.

I have seen a couple of people have had success with pywws on a rPi, but as soon as they start with 'compile' this or 'install' my linux skills let me down.
Posts: 3
Joined: Fri Jun 22, 2012 9:04 am
by pingu512 » Thu Jun 28, 2012 7:53 pm
I will create a tutorial , but I will need a little time. I am creating an image of my system that you could write to an SD to get you up and running. The instructions are on my web site
http://www.dragontail.co.uk/raspberry.html
I have not uploaded the file yet so if the link on my web site does not work try again later
User avatar
Posts: 62
Joined: Sun Apr 01, 2012 2:39 pm
Location: Chester
by brimstone » Thu Jun 28, 2012 10:29 pm
Hi,
I too have same weather station and wview has now been stable for over a week though I'm still getting lots of
mmc0: final write to SD card still running
mmc0: Timeout waiting for hardware interrupt.
mmcblk0: error -110 sending stop command, original cmd response 0x900, card status 0x900

Haven't tried the new Debian beta yet which may eliminate this problem and am continuing to experiment, so far unsuccessfully with pywws.

One thing I don't understand because of my minimal Linux experience is the choice of two options for USB library when installing pywws as described at http://pywws.googlecode.com/svn/trunk/d ... arted.html. Option 1 is libusb + PyUSB; option 2 is hidapi + cython-hidapi + cython.

I had assumed that it had to be one option or the other but you have cython + libusb + cython-hidapi. Maybe you could enlighten me, here or in your upcoming tutorial? Which packages can be installed without conflict. How does pywws or another application choose which API/package to use?

Cheers
Posts: 4
Joined: Sun Jun 17, 2012 12:54 pm
by pingu512 » Sun Jul 01, 2012 7:12 am
I have now added instructions on how to setup the Pi to run with pywws and communicate to a weather station
http://www.dragontail.co.uk/raspberry.html
Give me some feed back on how everyone gets on
User avatar
Posts: 62
Joined: Sun Apr 01, 2012 2:39 pm
Location: Chester
by hrgdavid » Wed Jul 04, 2012 9:06 pm
pingu512 wrote:I have now added instructions on how to setup the Pi to run with pywws and communicate to a weather station
http://www.dragontail.co.uk/raspberry.html
Give me some feed back on how everyone gets on


Pingu,

I've tried following the steps on your website and have successfully got as far as downloading the libraries and applications required. I've also managed to expand cython and pywws. However, I cannot expand libusb. The command

pi@raspberrypi:~/dls$ tar xvjf libusb-1.0.9.tar.bz2

returns with the error:

bzip2: (stdin) is not a bzip2 file
tar: child returned status 2
tar: Error is not recoverable: exiting now

I'm very new to Linux - and so my ability to troubleshoot is fairly limited ! I can confirm that the "wget" command succeeds - at least it creates a libusb-1.0.9.tar.bz2 in the directory (DLS) that I created for the application build. It's just the expand command that fails.

Any idea what I'm doing wrong ?

Thanks for any help.
Regards,
David L.
Posts: 12
Joined: Thu Jan 05, 2012 10:39 pm
by JonSenior » Wed Jul 04, 2012 9:55 pm
First things first, you can simplify that tar command:

tar xf <filename> will automagically detect compression type... a useful feature that I discovered by accident.

Secondly, it sounds like the download failed. If you run

> more libusb-1.0.9.tar.bz2

My bet is that you'll get some html back, probably saying something like Error 404. wget will just grab what it's given, so if it's given a 404 page instead of a file, that's what you'll get.
Posts: 7
Joined: Fri Jun 01, 2012 8:53 am
by hrgdavid » Wed Jul 04, 2012 10:35 pm
Jon,

JonSenior wrote:First things first, you can simplify that tar command:

tar xf <filename> will automagically detect compression type... a useful feature that I discovered by accident.

Secondly, it sounds like the download failed. If you run

> more libusb-1.0.9.tar.bz2

My bet is that you'll get some html back, probably saying something like Error 404. wget will just grab what it's given, so if it's given a 404 page instead of a file, that's what you'll get.



THANK YOU !! You were right - the "tar xf <filename>" command returned the same bzip2 error as before - but the "more libusb-1.0.9.tar.bz2" command showed I had downloaded an html file.

After some further digging on sourceforge (where I was downloading from), I realised I had missed the actual filename out of the wget command and must have been downloading the directory file rather than the contents of the directory (the filename and the directory had the same name).

Anyhow, that's one step further ! Thanks again for your help.

Regards,
David L.
Posts: 12
Joined: Thu Jan 05, 2012 10:39 pm
by slothbag » Thu Jul 05, 2012 1:41 am
Thanks Pingu512, excellent tutorial.

Following your instructions I got my Pi talking to a WH1081 weather station with minimal fuss.

It's been running for just over 48 hours now using pywws logging hourly. Very stable so far.

I decided to put the pywws data dir on a remote NFS folder, hopefully reduce stress on my old SD card.

I've also got a home power meter plugged directly into the Pi that is also logging live data, no issues with power supply operating the two devices.

Cheers
Posts: 2
Joined: Thu Jul 05, 2012 1:28 am
by pingu512 » Sat Jul 07, 2012 7:50 am
Fantastic news, I have had no problem at all.
User avatar
Posts: 62
Joined: Sun Apr 01, 2012 2:39 pm
Location: Chester
by pingu512 » Sun Jul 08, 2012 7:10 am
Slothbag, where's your website, as I would be interested in your power link
User avatar
Posts: 62
Joined: Sun Apr 01, 2012 2:39 pm
Location: Chester
by slothbag » Sun Jul 08, 2012 11:51 am
No public website, its running on my internal network.

My power meter is the "Current Cost" energy meter. And I used this http://code.google.com/p/measureit/ excellent free software for logging / charting.

It was really easy to set up, no compiling or configuring.. the usb serial driver is already supported in debian for Raspberry Pi.. just plug it in a go.
Posts: 2
Joined: Thu Jul 05, 2012 1:28 am
by kenmc » Thu Jul 12, 2012 9:19 am
I've had mine up for about 7 days straight one time, but it seems to have become a bit less reliable recently. I don't know if it's because I have moved it to wireless, but it seems to go into an endless loop reading at times, like it never wakes up to read the weatherstation. I might try and implement a "forced restart" periodically, but I'm reluctant to do that in case it ends up hanging the USB connection. There's no way to reset the USB line from what I can see, without unplugging the USB and removing the batteries (WH1080)
http://goatstownweather.hostoi.com
Posts: 52
Joined: Fri May 04, 2012 8:02 am
Location: Dublin, Ireland
by jbeale » Thu Jul 12, 2012 4:57 pm
I don't have a weather station but in general, a system logging data with a wireless link is a very different situation from wired. You definitely will have dropped packets from time to time, and maybe also corrupted packets if you don't have a strong enough checksum in your protocol. So the error handling in your system has to be a lot more robust with wireless.
User avatar
Posts: 2010
Joined: Tue Nov 22, 2011 11:51 pm
by pingu512 » Thu Jul 12, 2012 5:55 pm
I have only had one problem, which I put down to the weather station needing new batteries (its been running for 6 months). However I do keep rebooting the Pi because I need experiment with other things like web cams. Need another Pi.
By the way Maplin have the weather stations on offer at the moment for £64.99
http://www.maplin.co.uk/usb-touchscreen-wireless-weather-forecaster-228825
User avatar
Posts: 62
Joined: Sun Apr 01, 2012 2:39 pm
Location: Chester
by pingu512 » Tue Jul 17, 2012 6:54 pm
Now added instructions on how to use Filezilla to copy the weather station data files to a PC without disturbing the pi
http://www.weather.dragontail.co.uk
User avatar
Posts: 62
Joined: Sun Apr 01, 2012 2:39 pm
Location: Chester
by Yfory » Tue Jul 17, 2012 9:09 pm
Hi Pingu,

Many thanks for your hard work in this area, as it is -almost- exactly what I hope to use a Pi for. I'm also hoping in the future to be able to connect to weather satellites, perhaps using the FunCube Dongle Pro, is this something that interests you?

Also, I note that a lot of homebrew weather stations use APRS, is this something that interests you?

Diolch yn fawr!
Posts: 96
Joined: Thu Apr 19, 2012 10:29 am
by pingu512 » Wed Jul 18, 2012 7:09 pm
Helo Yfory
Good idea but the FunCube Dongle Pro is a little expensive to try.

Pob hwyl
User avatar
Posts: 62
Joined: Sun Apr 01, 2012 2:39 pm
Location: Chester
by pingu512 » Wed Jul 18, 2012 8:54 pm
Upgraded to the new 2012-07-15-wheezy-raspbian image and everything look ok using the same instructions.
http://www.weather.dragontail.co.uk
User avatar
Posts: 62
Joined: Sun Apr 01, 2012 2:39 pm
Location: Chester
by Nige C » Thu Jul 19, 2012 12:27 am
Well done! I have the same weather station and would use my Raspberry Pi to run it when the Pi arrives. Your post helps a lot! Thank you.

Nige C
Early retired power engineer with a lot of real life experience. Life is an adventure again, now, I'm in my late fifties, with time for my interests :)
Posts: 45
Joined: Thu Jul 19, 2012 12:22 am
Location: Hadleigh, Suffolk
by RaspberryGeek » Fri Jul 20, 2012 11:12 pm
Maplins have it discounted : £69.99 at the moment :
http://www.maplin.co.uk/usb-wireless-we ... ter-223254

is this the same one?? !! => £39.99 inc VAT and Shipping
http://www.clasohlson.com/uk/Weather-St ... r363242000
Posts: 20
Joined: Mon May 21, 2012 10:58 pm
Location: Evesham, Worcs
by ksangeelee » Fri Jul 20, 2012 11:52 pm
Looks like they're the same spec - they're both just Fine Offset WS1080 or WS1081 units. I think that Maplin's is a 1080, which needs to have the clock set manually or when connected via USB. The 1081 includes a radio-clock (DCF77 - Germany, as I recall).

So the cheaper one should have at least the functions of Maplin's, with the possibility of the clock if it happens to be a 1081.

From what I've read, there's some variability in quality between devices that are ostensibly the same, although you wouldn't be able to tell until you've taken them apart and compared them.
Posts: 193
Joined: Sun Dec 25, 2011 5:25 pm
Location: Edinburgh, UK
by Nige C » Sun Jul 22, 2012 2:01 am
My WH1081 from Maplins does not have the radio clock module, but does keep good time. I am however looking to mod my weather station and control with an Arduino as a data logger, connected to the internet. Project 1 add a radio controlled clock.

The Raspberry Pi will deal with the rest :)
Early retired power engineer with a lot of real life experience. Life is an adventure again, now, I'm in my late fifties, with time for my interests :)
Posts: 45
Joined: Thu Jul 19, 2012 12:22 am
Location: Hadleigh, Suffolk
by ksangeelee » Mon Jul 23, 2012 2:10 am
Nige C wrote:My WH1081 from Maplins does not have the radio clock module, but does keep good time. I am however looking to mod my weather station and control with an Arduino as a data logger, connected to the internet. Project 1 add a radio controlled clock.


My mistake, it's the other way round (1080 has DCF77 clock, 1081 doesn't).

I'm also hoping to mod this unit, but I think might be possible to get the Pi to receive RF from the sensors either via an RFM01 module (I think this is what the receiver uses) or by hooking in new TX/RX modules (e.g. XRF or RFM12b) to get better range. In any case, I don't think the 11 bytes transmitted will be very difficult to decode into meaningful sensor information.
Posts: 193
Joined: Sun Dec 25, 2011 5:25 pm
Location: Edinburgh, UK