How's The Weather?
One of the items on the Geek Ranch agenda is a weather station. While we don't have one yet, we have learned a bit about weather stations and Linux.
First, why don't we have one? Well, there is no electricity at the Geek Ranch site yet for starters. But, more important, there is no Internet connection. So, let's just call this research.
I started my search for weather stations a few months ago. The criteria was simple:
- Reliable
- Inexpensive
- Works with Linux
The result was that I bought two different systems. The first is a La Crosse Technology, WS-2310TWC. The TWC in the model number means that it says "The Weather Channel" on it. I don't plan to use it with The Weather Channel but I paid $10 less to have that info on the box.
While it was the most inexpensive unit I found with a computer interface, I don't give it any awards for the "Works with Linux" test and, based on my experience with a different La Crosse model, I am not sure about the reliability. Talking to the La Cross tech support folks, they said there was no Linux software and they would not release the communications specifications.
A bit of searching and I found Open2300, software designed to talk to the 23xx series of weather stations. Clearly it is a bit of reverse engineering and, based on what I read, I understand why they don't want to release the specifications. The unit appears to be a 4-bit processor (can you still get those) with no API. That is, you just can read and write memory. Yuck.
The good news is that the software includes a Weather Underground interface routine. It doesn't work and I don't want to figure out why but it is there.
On the reliability issue, my previous La Crosse unit which didn't have a computer interface recently self-destructed. The wind speed and direction unit all but disintegrated after about two years in service. The good news is that the new unit has a totally different design that appears a bit sturdier.
Before I get into getting the 2300 to work, let me talk about what I really will use at the Geek Ranch. It is an Oregon Scientific WMR968. The one I have happens to be dark green and say "John Deere" on it. Much like The Weather Channel model of the other unit, I saved about $10 because of this ad. Whatever.
Both units are called wireless and communicate to the base station on 433MHz. The difference is that on the La Crosse unit wireless means that there are wires that run from the wind and rain sensors back to the outside temperature sensor which then wirelessly communicates with the base unit. With the Oregon Scientific, all the sensors, including the indoor temperature unit, are independent. All except the indoor temperature unit are solar powered.
Before you say "I need sun for the solar cells but I don't want the outside temperature sensor in the sun", don't panic. The sensors connect with cables to their own solar panel/transmitter unit. Clearly an easy to work with design. Comparing the two, I am glad I splurged for the extra money for the "real one".
Ok, back to getting the 2310 into operation. It boils down to the following:
- Download the software
- Modify the make file. (There is no configure script but the default setup is for Linux. I didn't have to make any changes.)
- Do a make install.
- Plug the cable from the base unit into a serial port and make sure you have read/write permission on the port.
- Run fetch2300 and you should see the info read from the unit.
If all went well, you are now up and running. In my case, all that worked fine so I decided to put myself on the map. That is, put Estelí, Nicaragua up on Weather Underground. (Note that the page you see there combines this weather station with some "airport" information. The airport actually shares little in common with Estelí as it is over 100km away and at a much different altitude. Clicking on the historical data link gets you the real information.)
To put the data up, all I had to do was log into Weather Underground and add the details of the station. That got me the station ID which is IESTELIE2.
That station ID and my password can then be added to the open2300.conf and then running wu2300 will poll the weather station and upload the information to Weather Underground. Easy. Unfortunately, it didn't work. No complaints but WU never got the data.
The next step was to turn on debugging. Setting DEBUG to non-zero in wu2300.c causes the program to echo the http request to standard output rather than send it. It looked just fine. I pasted it into a browser and got success back plus the page got updated.
After scratching my head a bit and realizing it was 3AM, I did what any real geek would do—glued the pieces together with a shell script. Here is the "quick hack" version.
data=D$$ ./wu2300 > $data wget -i $data rm $data updateweatherstation.php*
It just grabs the http request and sends it using wget. I then added a crontab entry to run the script and all is well. Ok, all works and I will clean up the mess someday. In the mean time, you can see that my weather here is better than your weather. Ok, maybe someone has better weather some of the year but I am guessing most people would prefer my weather to their weather most of the time.
Phil Hughes
Today’s modular x86 servers are compute-centric, designed as a least common denominator to support a wide range of IT workloads. Those generic, virtualized IT workloads have much different resource optimization requirements than hyperscale and cloud applications. They have resulted in a “one size fits all” enterprise IT architecture that is not optimized for a specific set of IT workloads, and especially not emerging hyperscale workloads, such as web applications, big data, and object storage. In this report, you will learn how shifting the focus from traditional compute-centric IT architectures to an innovative disaggregated fabric-based architecture can optimize and scale your data center.
Sponsored by AMD
Built-in forensics, incident response, and security with Red Hat Enterprise Linux 6
Every security policy provides guidance and requirements for ensuring adequate protection of information and data, as well as high-level technical and administrative security requirements for a system in a given environment. Traditionally, providing security for a system focuses on the confidentiality of the information on it. However, protecting the data integrity and system and data availability is just as important. For example, when processing United States intelligence information, there are three attributes that require protection: confidentiality, integrity, and availability.
Learn more about catching the bad guy in this free white paper.
Sponsored by DLT Solutions
| Using Salt Stack and Vagrant for Drupal Development | May 20, 2013 |
| Making Linux and Android Get Along (It's Not as Hard as It Sounds) | May 16, 2013 |
| Drupal Is a Framework: Why Everyone Needs to Understand This | May 15, 2013 |
| Home, My Backup Data Center | May 13, 2013 |
| Non-Linux FOSS: Seashore | May 10, 2013 |
| Trying to Tame the Tablet | May 08, 2013 |
- Making Linux and Android Get Along (It's Not as Hard as It Sounds)
- Using Salt Stack and Vagrant for Drupal Development
- New Products
- Validate an E-Mail Address with PHP, the Right Way
- Drupal Is a Framework: Why Everyone Needs to Understand This
- A Topic for Discussion - Open Source Feature-Richness?
- Home, My Backup Data Center
- New Products
- RSS Feeds
- Tech Tip: Really Simple HTTP Server with Python
- Epistle
10 min 9 sec ago - Automatically updating Guest Additions
1 hour 18 min ago - I like your topic on android
2 hours 5 min ago - Reply to comment | Linux Journal
2 hours 26 min ago - This is the easiest tutorial
8 hours 40 min ago - Ahh, the Koolaid.
14 hours 19 min ago - git-annex assistant
20 hours 19 min ago - direct cable connection
20 hours 41 min ago - Agreed on AirDroid. With my
20 hours 51 min ago - I just learned this
20 hours 55 min ago
Enter to Win an Adafruit Prototyping Pi Plate Kit for Raspberry Pi

It's Raspberry Pi month at Linux Journal. Each week in May, Adafruit will be giving away a Pi-related prize to a lucky, randomly drawn LJ reader. Winners will be announced weekly.
Fill out the fields below to enter to win this week's prize-- a Prototyping Pi Plate Kit for Raspberry Pi.
Congratulations to our winners so far:
- 5-8-13, Pi Starter Pack: Jack Davis
- 5-15-13, Pi Model B 512MB RAM: Patrick Dunn
- Next winner announced on 5-21-13!
Free Webinar: Linux Backup and Recovery
Most companies incorporate backup procedures for critical data, which can be restored quickly if a loss occurs. However, fewer companies are prepared for catastrophic system failures, in which they lose all data, the entire operating system, applications, settings, patches and more, reducing their system(s) to “bare metal.” After all, before data can be restored to a system, there must be a system to restore it to.
In this one hour webinar, learn how to enhance your existing backup strategies for better disaster recovery preparedness using Storix System Backup Administrator (SBAdmin), a highly flexible bare-metal recovery solution for UNIX and Linux systems.



Comments
new file engine search
Tired of the links in favorites for downloading? Visit http://newfileengine.com/ and find the straight link to the file required.
Weather back to normal
For those who looked at the weather reports and just thought it was always too hot here, we are back to normal. We felt the same--it was too hot for over a month. But, things are looking up now. Now we just have to go up to the Geek Ranch and see if the rain damaged the not yet completed road work.
Phil Hughes
Lacrosse weather station
I have a Lacrosse 2310 weather station and have it sending data to the
Weather Underground. I got the software from the Subversion repository
to work--mostly. My problem is that after some time, varies in length, the Lacrosse
unit causes the open2300 software to report "Unable to reset". This happens
even with a query interval of about 2-4 minutes. Once that happens, the
software stops sending data to the Weather Underground:( When I have
time, I will work something out so that the software gets killed and
restarted if the "Unable to reset" message shows up.
Does that happen with your "quick and dirty" solution?
Yes the unit is rather limited in its capabilities, but then I got
mine for free, as a Christmas gift.
dfranz
Not yet
It has been running fine now with updates every 15 minutes. The only "problem" I have is that we are still in "April weather". April is the one month that is too hot in Estelí. And, well, it still is. I think the weather is "running about 20 days late" this year as the first 2/3 of April were relatively nice.
For anyone concerned, the Geek Ranch is at a higher altitude. Where there is still no connectivity (and I have been in the office and not there for two weeks), I am sure it is still nice weather up there.
Phil Hughes
Don't support those who refuse to publish specifications
Why not buy a product that releases specifications so you can develop your own software, rather than having to resort to a reverse engineered product?
I would recommend Davis Vantage Pro. I've had mine for 4 years and it has worked flawlessly. Davis don't provide Linux software, but they do publish full specifications of the protocol and several people, including myself, have implemented Linux versions.
I would also doubt the accuracy of many of these cheaper products (toys?), which is why I could not recommended anything other than Davis Instruments for anyone wanting reliability, accuracy and good support at a very reasonable price.
+1 on Davis
I'm also using a Davis Vantage Pro with Linux. I've written a small daemon in C that collects the data and periodically fires off secondary processing (like web page generation and Weather Underground upload).
The only thing I've had to do with my system in the 2.5 years since I installed it is replace the backup battery in the sensor package and occasionally clean the leaves out of the rain collector.
I had one small glitch with one of my consoles when I initially set them up, but when I called Davis, the phone was answered by a human who actually dealt with my problem (!).
Davis weather
My weather data
BTW, the daemon is written so that it's relatively easy to add support for other weather stations (I did just that for the weather sensors at work). If anyone is interested in the code, contact me via the Weather Underground.
Link
The link to Lacrosse Technology is misspelled. It should be http://www.lacrossetechnology.com/.
Correct url
Hey, great article I've been looking at doing this for a while. Can you correct the url for Lacrosse Technology
Thanks
WMR-968
I've had an Oregon WMR-968 for some time now, and connected it to a small (8Mb RAM, 32Mb Flash disk) Linux embedded box using the WX200d software which has worked well for me. However my little Linux system is way too small to run the (python?) scripts that the wx200d software provides to upload data to Weather Underground, although the wx200d daemon that actually connects to the serial port is written in C and is small and extremely reliable.
I wrote my own data uploader that queries the wx200d daemon every 30 seconds and spawns a wget-clone program to upload the data. Note that the wget process can freeze if your network connection goes down, so the parent also needs to time out and kill the wget process if it takes too long to run. Initially this was coded as a couple of shell scripts, but more recently I converted it all to C which has been more reliable.
One other feature I included in the uploader was to calculate the actual dewpoint temperature myself from the %RH and the air temperature — if the dewpoint goes below freezing, the WMR-968 returns an error value. My uploaded data is found here.