WeatherBug script & templates version 3.0 (weatherbug AP
Moderators: Developers, Moderators
- chrisgapske
- Cacti User
- Posts: 278
- Joined: Tue May 22, 2007 7:56 am
- Location: Pensacola, Fl - Padacuh, Ky-Alpena, MI-Gulf Shores,AL
OK I am lost on how you install this .. The included directions are a bit hard to follow. Seeing there are no directions.
I could use just a little help installing and using this.
OK Well I can see that the xml file is not a template.
Error: XML parse error.
I put the script in cacti/scripts/..
And than what ?
I could use just a little help installing and using this.
OK Well I can see that the xml file is not a template.
Error: XML parse error.
I put the script in cacti/scripts/..
And than what ?
Fix for XML error
Let me premise my post with the fact that I'm not a programmer, but a huge tinker'er. So if there is something wrong, oh well, you're on your own.
Anyways, I was also getting the XML parse error when I was importing the template. I found that the Degree symbol for the temperature in the xml file was giving my linux system the fits. It must be something that I'm missing in my distro. Anyways, I removed the degree symbol and it imported just fine.
I've attached it to the post so hopefully it works for you all out there.
Anyways, I was also getting the XML parse error when I was importing the template. I found that the Degree symbol for the temperature in the xml file was giving my linux system the fits. It must be something that I'm missing in my distro. Anyways, I removed the degree symbol and it imported just fine.
I've attached it to the post so hopefully it works for you all out there.
- Attachments
-
- cacti_host_template_weatherbug_174.xml
- (41.1 KiB) Downloaded 992 times
- chrisgapske
- Cacti User
- Posts: 278
- Joined: Tue May 22, 2007 7:56 am
- Location: Pensacola, Fl - Padacuh, Ky-Alpena, MI-Gulf Shores,AL
I've setup the script and it's creating graphs, but the data doesn't seem to be correct. When I run the script from a command line the data is accurate but the graphs are wrong.
Code: Select all
[root@anubis scripts]# perl ./weatherbug_api.pl A3651xxxxxx 98550
DewPoint:46 Temp:55.4 Humidity:71 Wind:0 FeelsLike:55 Rain:0.00 Pressure:30.17
- Attachments
-
- humidity98550.JPG (26.11 KiB) Viewed 9379 times
-
- temp98550.JPG (29.99 KiB) Viewed 9379 times
Here's a fix to the weatherbug_api.pl script. I noticed that I was constantly getting large gaps in my graphs. Well, I decided to run it in my browser and received "Access Denied" when the page loaded.
So, I looked through it and did some changes. Here's the change you need to do:
You need to change
to
So, I looked through it and did some changes. Here's the change you need to do:
You need to change
Code: Select all
my $httpaddr = "http://$ARGV[0].api.wxbug.net/getLiveWeatherRSS.aspx?ACode=$ARGV[0]&citycode=$ARGV[1]&unittype=0";
Code: Select all
my $httpaddr = "http://api.wxbug.net/getLiveWeatherRSS.aspx?ACode=$ARGV[0]&zipcode=$ARGV[1]&unittype=0";
Is there a way to include a few features from the weatherbug.pl script?
I'm noticing a large string of data, but still trying to decode it.
http://wisapidata.weatherbug.com/WxData ... 015084854/
Plus, this script doesn't work when the temperature reaches below zero. It's currently -9F here and all it says is 'nan'.
I'm noticing a large string of data, but still trying to decode it.
http://wisapidata.weatherbug.com/WxData ... 015084854/
Code: Select all
10991|4:11:00p|12/13/2008|-2|29|17|3|37|0.00"|0.00"/h|29.78s|84%|28°|-2°|-6°|-23°|0.00"|+0.0|+0.0|+0.00"/h|85.0|77.0|29.78"|29.21"|0.00"/h|8:53a|30|17|-0°|-53|0|0.00"|+0.0°/h|+0.0|+0.0|Billings Logan International Airport|Billings, MT|300|3600|
Bug - Negative temperatures don't display correctly
When the temperature drops below zero the temperature graph stops displaying any values at all.
When I run the script (it's currently below zero here):
But with a different zip (and above zero temps):
I've attached the modified the script to fix this. It now displays:
and:
I've also incorporated the fix for the "Access Denied" error that Simba7 posted above since that appears to be required for the script to work.
It appears to be working and the graph is displaying now. However, it's still morning so I might have missed something.
When I run the script (it's currently below zero here):
Code: Select all
./weatherbug_api.pl myapicode 00000
Humidity:89 Wind:0 Rain:0.00 Pressure:30.32
Code: Select all
./weatherbug_api.pl myapicode 00001
DewPoint:6 Temp:10.0 Humidity:82 Wind:0 FeelsLike:10 Rain:0.00 Pressure:30.4
Code: Select all
./weatherbug_api.pl myapicode 00000
DewPoint:-10 Temp:-8.0 Humidity:89 Wind:0 FeelsLike:-8 Rain:0.00 Pressure:30.32
Code: Select all
./weatherbug_api.pl myapicode 00001
DewPoint:6 Temp:10.0 Humidity:82 Wind:0 FeelsLike:10 Rain:0.00 Pressure:30.4
It appears to be working and the graph is displaying now. However, it's still morning so I might have missed something.
- Attachments
-
- weatherbug_api.pl
- weatherbug_api.pl script modified to register negative temperatures correctly
- (1.1 KiB) Downloaded 569 times
anyone else getting an error when trying to find a city code?
http://api.wxbug.net/getLocationsXML.as ... ring=Perth
and
http://code.api.wxbug.net/getLocationsX ... ring=Perth
replacing 'code' with the personal api code given, generates an 'access denied' message
http://api.wxbug.net/getLocationsXML.as ... ring=Perth
and
http://code.api.wxbug.net/getLocationsX ... ring=Perth
replacing 'code' with the personal api code given, generates an 'access denied' message
Re: WeatherBug script & templates version 3.0 (weatherbu
Am I correct in assuming that this script is working only on a Linux Cacti Box? I am running a Windows Cacti Box and the graph is not populating with data.Alives wrote:Previous versions of this script here:
2.0: http://forums.cacti.net/viewtopic.php?t=22691
1.0: http://forums.cacti.net/viewtopic.php?t=8821
You must register for the WeatherBug API Code in order to use this template/script. This is a much better way of polling the weatherbug data and is approved by them.
Register for your API Code here: http://apireg.weatherbug.com/defaultAPI.aspx
Place the script in your cacti/scripts/ directory and make sure it is executable.
I am pretty new to this and appreciate some help.
Thanks
I have updated to Version 0.8.7e and i have debug the perl script for working with metrics values
Here we go !!!
exemple http://trueweb.fr/meteo.html
Here we go !!!
exemple http://trueweb.fr/meteo.html
- Attachments
-
- weatherbug_api.pl
- the script now work properly with metrics value
- (1.13 KiB) Downloaded 522 times
-
- cacti_graph_template_weatherbug.zip
- my exported templates
- (13.88 KiB) Downloaded 452 times
No love
I tried the first script, and templates posted and this worked in that I did not receive any errors. However, it seems like I'm not getting any data in my graph. I would be very thankful if there were any suggestions as to why.davibou wrote:I have updated to Version 0.8.7e and i have debug the perl script for working with metrics values
Here we go !!!
exemple http://trueweb.fr/meteo.html
- Attachments
-
- Also, I get this kind of message in my log file over and over.
- cacti.JPG (113.07 KiB) Viewed 6969 times
-
- graph.JPG (82.49 KiB) Viewed 6997 times
get my templates and my modified perl script
if you try the templates in the first post and my perl script it will not work!!!
please erase the templates and data and test to add my templates and my perl script and also try to test if the perl script return you any data
login to the console as root or with a user who as execute rights go to the cacti scripts directory and try this
./weatherbug_api.pl XXXXXXXXX YYYYY
Where
XXXXXXX is your register code @wheatherbug
YYYYY is your météo station code
you should have an answer like this
DewPoint:15.5555555555556 Temp:19.0 Humidity:82 Wind:11 FeelsLike:19 Rain:0.00 Pressure:1014.9
Regards David
if you try the templates in the first post and my perl script it will not work!!!
please erase the templates and data and test to add my templates and my perl script and also try to test if the perl script return you any data
login to the console as root or with a user who as execute rights go to the cacti scripts directory and try this
./weatherbug_api.pl XXXXXXXXX YYYYY
Where
XXXXXXX is your register code @wheatherbug
YYYYY is your météo station code
you should have an answer like this
DewPoint:15.5555555555556 Temp:19.0 Humidity:82 Wind:11 FeelsLike:19 Rain:0.00 Pressure:1014.9
Regards David
Hi, I have other problem, only graph that generates and show data is one showing pressure, others don't show up. I've used last script and templates posted in this thread. Anyone with similar problem? Oh, console shows:
Code: Select all
perl weatherbug_api.pl A4338164343 72869
Temp:-14.0 Humidity:78 Wind:7 FeelsLike:-19 Rain:0.00 Pressure:1002.03
Weird one for ya, got everything running finally, have a couple graphs that are not graphing the correct data.
Any ideas what i need to do to fix this?
thanks in advance.
Any ideas what i need to do to fix this?
thanks in advance.
- Attachments
-
- Screen shot 2009-12-23 at 2.30.20 PM.png (45.55 KiB) Viewed 6171 times
-
- Screen shot 2009-12-23 at 2.30.28 PM.png (13.71 KiB) Viewed 6171 times
Who is online
Users browsing this forum: No registered users and 4 guests