Take a look at www.wunderground.com for another network of citizen weather stations. There is softwre for OWW among other things. OWFS support would be great!

Paul

On 6/5/06, Vincent Fleming <[EMAIL PROTECTED]> wrote:

Paul,

 

Nothing on Weatherbug's webpage, but I did find http://wxqa.com/ - sign up through there and you can report your weather to NOAA/NWS.

 

This page http://www.rdrop.com/mrtg/weather.html has downloadable software - in there is an example of sending data in.

 

Interesting link: http://www1.findu.com/cgi-bin/cw.cgi - a listing of all the "citizen weather" stations (signed up folks) sites, complete with nice graphs.  Unfortunately, you can't easily search for one near you (unless I'm missing something).  There must be THOUSANDS of them.

 

You need to be registered to pass them data.

 

Is there much interest in doing this sort of thing?  I might be able to be convinced to help, if anyone *really* wanted this feature.  I suspect oww (oww.sourceforge.net) may already have this feature, though.

 

Regards,

 

Vince

 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of Paul Alfille
Sent: Monday, June 05, 2006 11:27 AM
To: [email protected]
Subject: Re: [Owfs-developers] handy shell script

 

Nice,

Now we need something going the other direction: OWFS->weatherbug.

Paul

On 6/5/06, Vincent Fleming <[EMAIL PROTECTED]> wrote:

For those within North America:

 

I wrote this script to get (some) weather station output from weatherbug.com – my local high school (1/2 hile away from here) participates, and this script grabs their data.

 

Substitute your zip code into the script, and you're collecting from your nearest weatherbug weather station.

 

It prints out the current temp and humidity, there is other info on the page as well, such as wind speed, but I'm not interested in that right now.  Add more lines such as the ugly 'sed' lines near the end of the script to yank out more information.

 

I have a simple script to insert this data into temploggerd/rrdtool.  It's the second file included here.  I'm using cron to take the samples right now… I have to look at temploggerd's scripts more closely and integrate it there sometime…  ;-)

 

For now, I've just hacked the temploggerd web pages to include my data.  Don't forget to create your .rrd files manually. (you can pull the command lines from temploggerd sources… which is what I did)  That was the easy part – getting the wget's working with the cookies that they require was the tough part.

 

I hope someone finds this useful.

 

-Vince

 

 

--------GetWeatherbugData-------------

# get temp & humidity from local High School from Weatherbug.com

                                                                                                          

# settings

MYZIPCODE=07748

                                                                                                           

# tempfiles

STEP2=/tmp/step2.$$.html

STEP3=/tmp/step3.$$.html

COOKIES=/tmp/cookie$$.txt

                                                                                                          

# begin a session

/usr/bin/wget --save-cookies $COOKIES --keep-session-cookies http://web.live.weatherbug.com -O /dev/null 2>/dev/null

                                                                                                          

# set our location

/usr/bin/wget --save-cookies $COOKIES --keep-session-cookies \

        " http://web.live.weatherbug.com/Common/Page/SetLocation.aspx?loc=$MYZIPCODE&x=21&y=10&no_cookie_world_stat=&zcode=$MYZIPCODE HTTP /1.1" -O $STEP2 2>/dev/null

                                                                                                          

# get the link out of our last retrieved page

LINK=`/bin/grep "to see more observations" $STEP2 | /usr/bin/tail -1 | /bin/sed 's/.*href="" | /bin/sed  's/class=.*//' | /bin/sed 's/\&amp\;/\&/g'`

                                                                                                          

#  Fetch the page with temp & humidity

/usr/bin/wget --save-cookies $COOKIES --keep-session-cookies "$LINK" -O $STEP3  2>/dev/null

                                                                                                          

echo -n "Temperature "

/bin/sed -n -e '0,/Temperature/d' -e 'P' $STEP3 | /usr/bin/head -1 | /bin/sed -e 's/<[^>]*>//g' -e 's/[ \t]//g' -e 's/&deg;F//' -e 's/%//' | /usr/bin/tr -d '\r'

                                                                                                          

echo -n "Humidity "

/bin/sed -n -e '0,/Humidity/d' -e 'P' $STEP3 | /usr/bin/head -1 | /bin/sed -e 's/<[^>]*>//g' -e 's/[ \t]//g' -e 's/&deg;F//' -e 's/%//' | /usr/bin/tr -d '\r'

                                                                                                          

# clean up tempfiles

rm $STEP2 $STEP3 $COOKIES

 

 

-------end-----------

 

-------InsertData---------

#!/bin/sh

RRD_DIR=/var/www/html/temploggerd/rrd

                                                                                                          

WEATHERBUG=`/usr/local/bin/GetWeatherbugData`

                                                                                                      

                                                                                                          

TEMP=`echo $WEATHERBUG | awk '{ print $2 }'`

HUM=`echo $WEATHERBUG | awk '{ print $4 }'`

                                                                                                          

/usr/bin/rrdtool 2>&1 update $RRD_DIR/hum.weatherbug.rrd --template WEATHERBUGhumid N:$HUM

/usr/bin/rrdtool 2>&1 update $RRD_DIR/temp.weatherbug.rrd --template WEATHERBUGtempe N:$TEMP

-----------end-----------




_______________________________________________
Owfs-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/owfs-developers

 




_______________________________________________
Owfs-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/owfs-developers



_______________________________________________
Owfs-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/owfs-developers

Reply via email to