Slashdot Mirror


Integrating Weather Reports into a Webserver?

meteorologist asks: "I work at a small college (300 students) in a small town (1500 people), and on our website we have a weather section. The problem is that it can only get weather information from a town 40 miles away. There is one local reporting station, but it reports exclusively to weatherbug, which slows down computers, and inevitably leads to spyware infections. How do I go about setting up a weather meter (temperature, humidity, wind velocity, and so forth) so that its results can be integrated into an already established website?"

8 of 61 comments (clear)

  1. roll your own? by way2trivial · · Score: 4, Informative
    --
    every day http://en.wikipedia.org/wiki/Special:Random
  2. La Crosse Weather Station + Open2300 + LAMP by stefanlasiewski · · Score: 4, Informative

    How funny, I'm working on this today.

    I use a weather station made by La Crosse.

    The station measures temperature, rain, humidity, wind speed and even calculates the dew point. It also functions as an atomic clock receiver.

    The sensors are outside, and connect to a base station inside the house through a wired or wireless (433 MHz) connection. The base station connects to a PC over a serial connection. The sensors are battery powered. Mine have been running for 6 months off of NiMH batteries.

    The stations come with software for Windows, but you can also use connect via Linux using the Open2300 project.

    2300 includes most everything you need: The C programs read from the device via a serial port and write the information to a flat file or to an optional MySQL database.

    Using a set of PHP scripts, you can host the data on any Apache webserver. As an alternative, you can upload the data to Weather Underground, or even broadcast it over a HAM radio (Citizens Weather-- but I know nothing about this).

    The weather stations also listens to the NIST Atomic Clock in Boulder, Colorado. I'm looking at ways of using my weather station to set the time for my NTP service.

    It's all pretty straightforward, and requires very little technical knowledge if you use the vendor-supplied versions of MySQL, PHP (With GD) & Apache.

    My station for Berkeley has been setup for a month, but I need to remount the temperature sensors to a location that doesn't collect as much heat. It's not really 85F in Berkeley right now-- it's 85F right outside the office door, and a cool 80F inside.

    --
    "Can of worms? The can is open... the worms are everywhere."
  3. Wrong way by Solder+Fumes · · Score: 4, Informative

    See if NOAA has forecasts for your area. Then hunt down PHP code, or develop your own, to process METARs for current conditions and TAFs for weather forecasts. This stuff can be pulled straight from NOAA. I know there's a PHP Services_Weather class out there.

    If you try to simply display data from a cheap weather sensor kit, you won't get forecasts or anything.

    1. Re:Wrong way by bergeron76 · · Score: 4, Informative

      You might want to check out weatherunderground.com

      They have some useful weather info there, and I think it's contributed to by individuals as well.

      Perhaps you have a neighbor that's reporting to it.

      --
      Don't think that a small group of dedicated individuals can't change the world. It's the only thing that ever has.
  4. Wireless Weather Rock by fred+fleenblat · · Score: 5, Funny

    Wireless Weather Rock -- Tie a rock to a rope and hang the rope from a
    piece of wood stuck in the ground.

    If rock is wet: It is raining

    If rock is white: It is snowing

    If you can only see top half of rock: It is really snowing

    If white things are bouncing off side of rock: It is hailing

    If you can see shadow of rock: It is sunny

    No shadow: It is overcast

    If you cannot see rock: It is night time

    If rock is slowly swinging back and forth: It is windy

    If rock is pulling rope horizontal: It is a hurricane

    If rock, rope, and stick are gone: There was a tornado

  5. Re:Google by stefanlasiewski · · Score: 4, Insightful

    It's like a knowledge index for websites that returns results for stuff you want to know about!

    Although, frequently Google mostly returns results for stuff the Vendors want you to know about. The stuff YOU want to know about is burried deep within one of the 1,040,000 results, and you'd be better off asking your fellow geek. Who knows, maybe you'll spark a conversation or two.

    Sometimes asking a question to a discussion forum/newssite isn't wrong.

    --
    "Can of worms? The can is open... the worms are everywhere."
  6. Easy Answer! by cjsnell · · Score: 4, Informative

    Wow, I've been waiting for this topic to show up for, what, six years now? :)

    What you want is a Davis Instruments station. These stations hook up, via serial cable, to any PC. If you're running some form of *nix, I highly recommend the Device::WxM2 Perl module. I've written various collection daemons that use WxM2 to pull weather data from the station and store it in RRD format or in a PostgreSQL database. I even wrote an AGI script that allows people calling my Asterisk PBX to hear the latest weather data. I also wrote a handy widget for Konfabulator that lets you watch the weather on your Mac/PC desktop in real-time.

    Shameless plug: if you decide that the Davis station is right for you, stop by my employer's website, where we have a variety of Davis Instruments choices.

    One word of advice: we sell cheaper stations than the Davis models but if you are planning on putting this up on a roof and leaving it for 5+ years, you really want to go with a quality peice of equipment, not a Radio Shack toy that will disintegrate after a year in the sun.

    Questions? Ask and I'll be glad to answer.

    Chris

    1. Re:Easy Answer! by cjsnell · · Score: 4, Funny


      Judging by your userid and your post, it looks like you are new to Slashdot and computers in general. Welcome! We're glad you're here. How's your AOL trial working out for you?