Wednesday 29 December 2010

Personal Weather Station using NSLU2



While I wait for my new bifferboard to be delivered I thought I would get the weather station working and updating to weatherunderground.com using a Linksys NSLU2 that I have available.
The NSLU2 is already configured to run Linux.  There are quite a few varieties of NSLU2 linux, and I think this one was called OpenSlug when I installed it, but it now seems to be called SlugOSBE.
When I first set it up there was no python package available for it, so I had to write my utility meter monitoring program using Perl (yuk!).
Fortunately there is now a repository at http://ipkg.nslu2-linux.org/feeds/optware/slugosbe/cross/unstable/ that includes python packages.
To get python running (with USB support) on the NSLU2 I had to download the following packages from the repository, and install them with ipkg install .ipk:
libusb, libdb, libstdc++,ncursesw,readline,sqlite_3, zlib, python25, py25-usb

The python distribution did not put an executable in /usr/bin, so I had to do
ln -s /opt/bin/python2.5 /usr/bin/python

With all this installed I could plug the weather station into the NSLU2 (via a USB hub in my case) and pywws just worked.
I hope the bifferboard is as easy!

1 comment:

Anonymous said...

Hello.

Thanks for your post!

I recently Unslung my NSLU2 to create a web-server using the following links and that is working well:

http://www.nslu2-linux.org/wiki/Unslung/HomePage

http://www.nslu2-linux.org/wiki/HowTo/SimpleHomeWebsite

I decided to install Python on the NSLU2 since I am teaching myself that language but could not start the Python interpreter until I found and added your fix: ln -s /opt/bin/python3 /usr/bin/python

John