View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 35 posts ] 
Go to page Previous  1, 2, 3  Next

Print view Previous topic   Next topic  
Author Message
Search for:
 Post subject:
PostPosted: Tue Sep 09, 2008 4:37 am 
Offline
Joined: Sun Sep 02, 2007 2:30 pm
Posts: 94
Thanks for the guide graysky!

I was thinking that it'd be great to create a sought of mini-weather station and use this to graph the output, since unfortunately the nearest 'weather station' for me is quite far away!

_________________
Running Knoppmyth R5.5 on a Compaq EVO D510 (sff) w/ P4 1.8GHz, 1GB RAM, 330GB 7200rpm Maxtor IDE HDD, XFX Nvidia GeForce 6200 (AGP low profile, p/n: PV-T44A-WANG) and Huappauge NOVA-T 500 DVB-T dual tuner PCI card.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 09, 2008 5:27 pm 
Offline
Joined: Sun Jun 12, 2005 10:55 pm
Posts: 3161
Location: Warwick, RI
Hi,

Noticed the changes but haven't figured what you did between the two. I notice the forecast doesn't work for me any more :( That is ok as I really don't use it except to test before I make changes.

One change I haven't figured out is how to stop the cgi from running back to w3c every 5 mnutes or on refresh to validate. It is almost like a "mother may I " tattler.

I use it with a Texas Weather systems station for local stuff on a com port for data source. Still working the graph scale for the barometer (air pressure) as what the scale is now barly makes a wiggly line. Always something to learn.

Anyway, it works nicely. :)

I would personnally rather see all the the rrdweather stuff stay in one thread rather than stuff get lost in the 100,000 + entries.

Thanks
Mike


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 10, 2008 1:35 pm 
Offline
Joined: Wed Dec 10, 2003 8:31 pm
Posts: 1996
Location: /dev/null
mjl wrote:
I notice the forecast doesn't work for me any more :( That is ok as I really don't use it except to test before I make changes.


What zipcode are you using? The forecast data comes from an html source, not xml like the current, fells-like, dew point, etc. does. I can have a look and possibly adjust the parsing accordingly.

mjl wrote:
One change I haven't figured out is how to stop the cgi from running back to w3c every 5 mnutes or on refresh to validate. It is almost like a "mother may I " tattler.


That is something I'll haven't messed with...I think you can just comment out the lines in the weather.cgi for it, no?

_________________
Retired KM user (R4 - R6.04); friend to LH users.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 10, 2008 6:29 pm 
Offline
Joined: Sun Jun 12, 2005 10:55 pm
Posts: 3161
Location: Warwick, RI
Hi,

02886

I tried the disabling trick using the ! but then the script returns an error compliaining... :(

As for the pressure, that chart needs to be a single with the rang ~27.5 to 32.5 inches or what ever the milli bar numbers would be. I think I recall a 32 once many years ago but it may not have been official numbers. Anyway, I have not figured out how to do that scaling.

It is an interesting & fun project, thanks for getting me started :)
Mike


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 11, 2008 1:39 pm 
Offline
Joined: Wed Dec 10, 2003 8:31 pm
Posts: 1996
Location: /dev/null
mjl wrote:
Hi,

02886

I tried the disabling trick using the ! but then the script returns an error compliaining... :(

As for the pressure, that chart needs to be a single with the rang ~27.5 to 32.5 inches or what ever the milli bar numbers would be. I think I recall a 32 once many years ago but it may not have been official numbers. Anyway, I have not figured out how to do that scaling.

It is an interesting & fun project, thanks for getting me started :)
Mike


Odd, I entered in your zipcode and all the fields are getting populated just fine. The only one that may have a problem is the "forecast high temp" because after a certain point in the afternoon, they don't include data for it since the day is more or less over... it should start populating around 4-5 AM with their high temp for the day forecast.

Can you confirm that it's working on your machine now?

Here is the output of my test script for the data I downloaded for your zipcode:

Code:
======= From the XML ===========
Real temperature . : 70
Felt temperature . : 70
Dew point ........ : 46
Humidity ......... : 41
Wind ............. : 2
Wind Direction ... : 230
Pressure ......... : 30.35
UV index ......... : 2
Sunrise .......... : 6.22
Sunset ........... : 7.01
======= From the-fore.XML ======
Hi temp .......... : UUU
Low temp ......... : 54
Precip chance .... : 10
======= From the-extra.html======
Precip. to Date .. : 4.36
Average Precip ... : 3.70
Record High ...... : 100
Record Low ....... : 32
Average High ..... : 73
Average Low ...... : 55

_________________
Retired KM user (R4 - R6.04); friend to LH users.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 11, 2008 7:47 pm 
Offline
Joined: Sun Jun 12, 2005 10:55 pm
Posts: 3161
Location: Warwick, RI
Hi,

Appears the issue was on my end. I think I may have simply replaced your updated script with the original :oops: Redid the steps and it worked the second time. Sometimes it gets tricky with same nane files and moving them around, plus also maybe throw in a senior moment....

How about the scale for the barometer, is it do able?

Thanks
Mike


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 12, 2008 1:25 pm 
Offline
Joined: Wed Dec 10, 2003 8:31 pm
Posts: 1996
Location: /dev/null
Glad you got it solved... to alter the scale for pressure, simply edit your /usr/lib/cgi-bin/weather.cgi

Look for the variables that define it:
Code:
if($system eq "m") {
        $speed = 'kph';
        $pressurelowlimit = '980';
        $pressureuplimit = '1100';
        $rech_c = 'myrech';
        $aveh_c = 'myaveh';
        $avel_c = 'myavel';
        $recl_c = 'myrecl';
        $pressure_units = 'hPa';
        $precip_units = 'mm';
        $temp_units = '°C';
}
elsif($system eq "e") {
        $speed = 'mph';
        $pressurelowlimit = '20';
        $pressureuplimit = '40';
        $rech_c = 'rech_c';
        $aveh_c = 'aveh_c';
        $avel_c = 'avel_c';
        $recl_c = 'recl_c';
        $pressure_units = 'in Hg';
        $precip_units = 'in';
        $temp_units = '°F';
}


You can alter the '20' and '40' to whatever you want. You will need to manually delete the /myth/rrdweather/tmp/ZIPCODE/*.png or wait for the next update to have the png graphics reflect your change.

_________________
Retired KM user (R4 - R6.04); friend to LH users.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 12, 2008 8:30 pm 
Offline
Joined: Sun Jun 12, 2005 10:55 pm
Posts: 3161
Location: Warwick, RI
Hi,

That doesn't do it and the code in the -mod.cgi is a bit different.
I just need to do some more reading I guess :)
Thanks
Mike


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 12, 2008 10:01 pm 
Offline
Joined: Sun Jun 12, 2005 10:55 pm
Posts: 3161
Location: Warwick, RI
Hi,

Looks this will do it for the hg settings. just convert to mb for metric. Using the weather-mod.cgi script.

"--title= Barometric Pressure at $city",
'--vertical-label', 'Pressure',
# '--lower-limit', $pressurelowlimit,
'--lower-limit', 27,
# '--upper-limit', $pressureuplimit,
'--upper-limit', 32,
'--units-exponent', 0,
'--rigid',
'--slope-mode',
'--no-gridfit',
'--lazy',
# '-Y',

This gives a scale of 27 (hurricane) to 32 (siberian) inches which now displays trends very nicely. At least I think so.

Now to stop the w3c tally call.
Thank you
Mike


Top
 Profile  
 
 Post subject:
PostPosted: Sun Sep 14, 2008 4:13 am 
Offline
Joined: Wed Dec 10, 2003 8:31 pm
Posts: 1996
Location: /dev/null
:!: Sep-14 update to RRDWeather-mod (now version R5).

You can download it from the link in the first post and updating your existing "live" rrdweather-mod is trivial. Just untar and run the update.sh script!

CHANGELOG:
- added an update.sh script that'll just copy *.sh and weather.cgi to correct dirs. use this if you have a prev. release and don't wanna rebuild everything from scratch
- added error checking to all databases and included the spikeremoval script
- fixed small error in weather.cgi regarding precip. graph
- added a sea level line to pressure graph
- added some debug info for db_update.sh
- updated the README

_________________
Retired KM user (R4 - R6.04); friend to LH users.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 15, 2008 11:39 am 
Offline
Joined: Tue Apr 11, 2006 7:44 am
Posts: 287
Location: Los Angeles, CA
Wow, talk about easy!

Now I need to follow Mike's example and get this pulling from my weather station instead of weather.com. This I already have historical charts for my data, and this will give some comparison abilities.

Plus I can set this up to collect info for my brother in California as well.

Anyway, thanks for putting this "package" together. It took me a whole two minutes from the time I was downloading the file, to when it was creating the first set of data.

_________________
Tim

LinHES 8.4
HDHR3
BioStar A770, AMD X2 4050e, 2GB RAM
GigaByte GeForce 8400, Chaintech AV710
USB-UIRT


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 15, 2008 3:01 pm 
Offline
Joined: Fri Jul 21, 2006 11:12 pm
Posts: 1194
Location: SC
Great job graysky!

I believe that there is a typo in the install.sh script. Line 74:
Code:
        echo "Point your browser to http://IP_of_mythbox/weather.cgi?zip=12345"
Should be:
Code:
        echo "Point your browser to http://IP_of_mythbox/cgi-bin/weather.cgi?zip=12345"


Also, I added a link to /var/www/index.html just below the RRDTool link so that there is easy access to the Weather page:
Code:
      <p><a href="cgi-bin/weather.cgi?zip=56110"><b>RRDWeather for 56110</b></a>: <br>

                &nbsp; &nbsp; Weather graphs.
          </p>
It might be helpful to have install.sh do this.

Thanks,
Britney


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 15, 2008 3:29 pm 
Offline
Joined: Wed Dec 10, 2003 8:31 pm
Posts: 1996
Location: /dev/null
@opel70 - thanks for the kind words. I'm very glad people are enjoying this too.

@brfransen - thanks for catching that! I changed it and will update the tgz soon (day or so). As to your suggestion to edit the html. How could we do so such that it would automatically see how many zips folks added and update itself if they add/remove additional ones?

_________________
Retired KM user (R4 - R6.04); friend to LH users.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 15, 2008 5:07 pm 
Offline
Joined: Fri Jul 21, 2006 11:12 pm
Posts: 1194
Location: SC
graysky wrote:
How could we do so such that it would automatically see how many zips folks added and update itself if they add/remove additional ones?
I didn't think about the multiple zips issue. That would take a little scripting to parse the zips line. I don't know of a way to have it update itself without the user running another script if they add/remove additional ones later.

Britney


Top
 Profile  
 
 Post subject:
PostPosted: Sat Sep 27, 2008 5:03 am 
Offline
Joined: Wed Dec 10, 2003 8:31 pm
Posts: 1996
Location: /dev/null
Updated RRDWeather-Mod to R6. For a changelog and d/l link, see the first post of this thread.

Update today :)

_________________
Retired KM user (R4 - R6.04); friend to LH users.


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 35 posts ] 
Go to page Previous  1, 2, 3  Next



All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 19 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu