Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Sat Jul 20, 2019 2:58 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 51 posts ]  Go to page Previous  1, 2, 3, 4  Next
Author Message
 Post subject:
PostPosted: Thu Sep 01, 2005 8:17 am 
Offline

Joined: Tue Aug 30, 2005 5:17 am
Posts: 4
If anyone is interested I have european verison of this stuff (metric units + corrected location parameter passing)


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 01, 2005 8:37 am 
Offline
Cacti User
User avatar

Joined: Mon Apr 26, 2004 7:18 am
Posts: 68
Location: Switzerland
i'm interested in a european version.
cheers
tom

_________________
http://www.lounge-radio.com/


Top
 Profile  
 
 Post subject:
PostPosted: Mon Oct 24, 2005 3:47 pm 
Offline

Joined: Tue May 06, 2003 7:48 am
Posts: 16
@zoltar,
I'm also interested. Could you send it to me.

Wietze


Top
 Profile  
 
 Post subject: AccuWeather Graphing Problems
PostPosted: Mon Aug 14, 2006 10:27 am 
Offline

Joined: Thu Oct 06, 2005 9:14 am
Posts: 6
I noticed a couple of days ago that my graphs for AccuWeather are no longer showing the temperature or RealFeel values. Has anyone else seen this problem? Did they change the layout of their page?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 29, 2006 1:38 am 
Offline
Cacti User
User avatar

Joined: Mon Dec 13, 2004 5:14 pm
Posts: 141
Location: Jurmala, Latvia
Updated Accuweather script. Based on PHP and using metric values.

Installation:
1. Put accuweather.php in scritpts folder
2. Edit variable $file on second line to represent your location
3. Upload host template

Be aware that this scripts is for one minute polling interval!


Attachments:
accuweather.jpg
accuweather.jpg [ 66.8 KiB | Viewed 13604 times ]
cacti_host_template_weather_server.xml.gz [4.48 KiB]
Downloaded 1028 times
accuweather.php.gz [1 KiB]
Downloaded 1005 times
Top
 Profile  
 
 Post subject: I get an error
PostPosted: Wed Aug 30, 2006 2:51 am 
Offline
User avatar

Joined: Fri Jun 16, 2006 4:05 am
Posts: 39
Location: Zurich, Switzerland
I adjusted your script like this:
<?php
$file = "http://forecastfox.accuweather.com/adcbin/forecastfox/weather_data.asp?location=EUR;CH;SZ026;ZURICH;&metric=1&partner=forecastfox";
$stack = array();
$masivs = array();

on the command line a get the following error:

/srv/www/htdocs/cacti/scripts # ./accuweather.php
./accuweather.php: line 1: ?php: No such file or directory
./accuweather.php: line 2: =: command not found
./accuweather.php: line 3: syntax error near unexpected token `('
./accuweather.php: line 3: `$stack = array();'


what could be causing this errror?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 31, 2006 10:53 am 
Offline
Cacti User
User avatar

Joined: Mon Dec 13, 2004 5:14 pm
Posts: 141
Location: Jurmala, Latvia
it is not executable, you have to execute php and pass this file as argument like this one:
Code:
/<path_to_php>/php ./accuweather.php


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 01, 2006 3:07 am 
Offline
User avatar

Joined: Fri Jun 16, 2006 4:05 am
Posts: 39
Location: Zurich, Switzerland
Thank's a lot !!! If only i would have known...

Now i have a different error message. I checked the URL and get a XML file back with lot's of weather data but my graphs are still empty and on the cmd i get this error:

Code:
Warning: fopen(http://forecastfox.accuweather.com/adcbin/forecastfox/weather_data.asp?location=EUR;CH;SZ026;ZURICH;&metric=1&partner=forecastfox): failed to open stream: Connection refused in /srv/www/htdocs/cacti/scripts/accuweather.php on line 31


in this line i see this:

Code:
$xml_parser = xml_parser_create();
29: xml_set_element_handler($xml_parser, "startElement", "endElement");
30: xml_set_character_data_handler($xml_parser, "cData");
31: if (!($fp = fopen($file, "r"))) {
32: die("could not open XML input");
}


What can i do to get the graphs working?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 08, 2006 3:26 am 
Offline
Cacti User
User avatar

Joined: Mon Dec 13, 2004 5:14 pm
Posts: 141
Location: Jurmala, Latvia
Your PHP settings in php.ini doesn't allow to open files on remote servers.


Top
 Profile  
 
 Post subject: How can i change this?
PostPosted: Thu Oct 05, 2006 3:39 am 
Offline
User avatar

Joined: Fri Jun 16, 2006 4:05 am
Posts: 39
Location: Zurich, Switzerland
Back from a long break i would like to make this weather graphs work.
How can i change the php.ini settings?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 05, 2006 8:14 am 
Offline
Cacti User

Joined: Thu Oct 06, 2005 5:03 am
Posts: 402
wvr120364 wrote:
@zoltar,
I'm also interested. Could you send it to me.

Wietze


is possible to attach it to the forum? thx



Also, one more question.
Is possible to graph more than one locations??

_________________
cacti rulez!


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 13, 2006 1:45 pm 
Offline

Joined: Wed May 31, 2006 6:07 pm
Posts: 4
Instigater wrote:
2. Edit variable $file on second line to represent your location
3. Upload host template



Could anyone point me in the right direction for how represent my location field-wise in the second line?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 16, 2006 10:53 am 
Offline
Cacti User

Joined: Tue May 03, 2005 8:54 am
Posts: 298
Location: GA
same here??? How do you define a location elsewhere ...US for example..

also in the echo statement at the end how can you put a carriage return to return you promt to a new line after all variables are presented??

echo "temperature:".$temperature." humidity:".$humidity." windgusts:".$windgusts." windspeed:".$windspeed." visibility:".$visibility." realfeel:".$realfeel." uvindex:".$uvindex." pressure:".$pressure ; <<< new line??


Top
 Profile  
 
 Post subject: Hmmm...
PostPosted: Thu Nov 16, 2006 6:14 pm 
Offline

Joined: Wed May 31, 2006 6:07 pm
Posts: 4
After banging my head on trying to figure what the codes mean, I tried a couple of different combos..

This returns data for where I am:

http://forecastfox.accuweather.com/adcb ... orecastfox


At least it looks sane.. gonna test it out over the next few days, I hope to be able to narrow it down to zip codes.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 17, 2006 8:58 am 
Offline
Cacti User

Joined: Tue May 03, 2005 8:54 am
Posts: 298
Location: GA
That looks perfect to me, I tried changing the link to fit my area in GA and it works perfectly...changing that metric to 0 also is nice....i upgraded these templates with my current accuweather graphs since most of them had stopped working.

Thanks


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

All times are UTC - 5 hours


Who is online

Users browsing this forum: Bing [Bot] and 5 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

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group