You are not logged in.
arclances weather script v6.2.1
Here is my conky weather script which uses a lua script for display in conky.
It features buttons that change what data is displayed.
There is a daily forecast view which by default shows data for Today and the next four days.
There is a button on the right that switches between showing the forecast for the next 4 days and the forecast for the four days after that.
If your location does not have forecast data for some of those days nothing will be displayed for them.
There is an option to show the current floodstage of a river in this view using data from NOAA.
There is also a hourly forecast view which by default shows data for the 8 hours.
There is a button on the right the advances through the data for the next 36 hours 8 hours at at time.
Statistics about todays weather is displayed along the bottom of the hourly view.
The full text of weather alerts scrolls across the top of the text area in both of these display modes.
Watch the movie to see what the scrolling alert looks like.
Animated radar and satellite maps are part of the weather display in all modes.
There is a button on the right that changes to a view with larger radar and satellite images.
If you use the NOAA floodstage option a graph of past and predicted floodstage levels is displayed in this mode.
By clicking on the radar or satellite image you can toggle between a local and wide area view.

---> Here is a movie that shows what the animated features look like and what the buttons do here. <---
Most of the weather data is from the Wundergound API but some data is available from Intellicast and NOAA as well.
The interactive elements are based on mrpeachys interactive conky code.
------> You can download the current version of the code here, images are included. <------
I have written setup instructions for the script, they are in the readme file in the archive.
Please report any problems you have or bugs you find in this thread.
Last edited by arclance (2012-09-27 02:45:32)
Offline
Changelog
v6.2.1 - 2012-09-26
Readme
Fix accidentally removed installDirectory setup instructions for Lua Script. (Thanks AndyOpie150)
Add names of required packages in Ubuntu.
Update Wunderground API location string instructions.
The old API documentation page for this is gone.
I improved what I had about selecting the location string in this guide already.
A full guide needs to be written later.
Improve directions for setting latitude and longitude for the radar and satellite images.
Added instructions that this value should be only a number.
More complete directions for how to find these values should be written in the future.
Lua Script
Fix installDirectory variable altered by a pervious update.
Add more terminal debugging output.
Added version information to startup debug output.
Added installDirectory information to startup debug output.
Python Script
Add more terminal debugging output.
Added version information to startup debug output.
Added installLocation information to startup debug output.
Added check for radarWU_API_LAT and radarWU_API_LON not being numbers (catch non-number characters).
v6.2 - 2012-09-16
Lua Script
Now have the 10 day forecast data but it does not always have 10 days of data.
The script will show all that there are, up to 9 days.
Update button script to work with more window managers.
"xdotool search --sync --classname conky behave %@ mouse-click getmouselocation" returns different Window ID's with some window managers, the button code now checks for both of the know possibilities.
This should have been in v6.0 but I forgot to add it.
Fix some mistakenly global variables.
Fix undeclared global variables.
Remove unnecessary variable firstBackup from the line2_UpdateMonitor() function.
Python Script
Get data collection start time at the right place in the code.
Fixes following user specified update interval (was running long).
Get 10 day forecast instead of 7 day forecast.
Use https for WU API.
v6.1 - 2012-09-03
Add button to switch to radar and satellite images of a larger geographic area.
In the daily forecast section show as many days as there is forecast data for up to nine days.
This was needed because the 10 day forecast data does not always cover 10 days of data.
Improve stability of url opener (added catcher for socket.error)
Fix detection of satellite image connection failure.
v6.0 - 2012-08-13
Initial Release
Include Weather Images and Moon Images in download.
This only shows the changes since the first release of the lua version of this script.
The full changelog is available in the readme file.
Last edited by arclance (2012-09-27 03:10:03)
Offline
Reserved For Updates/Instructions
Offline
I have finished the readme for the script and uploaded the first full release.
You can find the download in the first post.
Please read the readme for setup instructions.
I will update the images and movie the next time I get a weather alert so you can see what the scrolling alerts look like.
Last edited by arclance (2012-08-13 21:39:21)
Offline
Offline
New Version Released
v6.1 - 2012-09-03
Add button to switch to radar and satellite images of a larger geographic area.
In the daily forecast section show as many days as there is forecast data for up to nine days.
This was needed because the 10 day forecast data does not always cover 10 days of data.
Improve stability of url opener (added catcher for socket.error)
Fix detection of satellite image connection failure.
The first post has been updated to show the better represent the scripts features.
The movie has been updated to show a scrolling weather alert along with the changes in this update.
Offline
Been working on it all morning. Have only been able to get a transparent window along the bottom of my screen that has nothing in it. I can barely see the borders of it. I give up, any idea what I'm doing wrong? Probably something simple. Haven't been in bed since I got up yesterday morning...
Jed
jed@XPS-15z:~$ python /home/jed/conkyWeather_arclance_v6.0_release_2012-08-13/conkyWeather_arclance_v6.0.py
using cPickle
no pull yet
timeDifference = 1347548701.66
pulling data
geolookup/conditions/forecast7day/hourly/astronomy/alerts/history_20120913
Pulling -- WU Data -- Location = http://www.wunderground.com/cgi-bin/findweather/getForecast?query=04769
Pulling -- Intellicast Data
Traceback (most recent call last):
File "/home/jed/conkyWeather_arclance_v6.0_release_2012-08-13/conkyWeather_arclance_v6.0.py", line 906, in <module>
conkyWeather()
File "/home/jed/conkyWeather_arclance_v6.0_release_2012-08-13/conkyWeather_arclance_v6.0.py", line 285, in conkyWeather
intellicastData = intellicastForecast(webData)
File "/home/jed/conkyWeather_arclance_v6.0_release_2012-08-13/conkyWeather_arclance_v6.0.py", line 749, in intellicastForecast
return [day0,day1,day2,day3,day4,day5,day6,day7,day8,day9]
NameError: name 'day0' is not defined
jed@XPS-15z:~$ conky -c /home/jed/conkyWeather_arclance_v6.0_release_2012-08-13/conkyrc_conkyWeather_arclance
Conky: llua_load: ...6.0_release_2012-08-13/lua/conkyWeather_arclance.lua:161: attempt to index local 'f' (a nil value)
Conky: desktop window (1000095) is subwindow of root window (b8)
Conky: window type - normal
Conky: drawing to created window (0x3c00001)
Conky: drawing to double buffer
Conky: llua_do_call: function conky_main execution failed: attempt to call a nil value
Conky: llua_do_call: function conky_start_xdotool execution failed: attempt to call a nil value
Conky: llua_do_call: function conky_main execution failed: attempt to call a nil value
Conky: llua_do_call: function conky_main execution failed: attempt to call a nil value
Conky: llua_do_call: function conky_main execution failed: attempt to call a nil value
Conky: llua_do_call: function conky_main execution failed: attempt to call a nil value
Conky: llua_do_call: function conky_main execution failed: attempt to call a nil value
Conky: llua_do_call: function conky_main execution failed: attempt to call a nil valueRunning 'VSIDO' GNU/Linux! Worlds Greatest all-in-one Debian based DISTRO! | Tried the rest, now try the best!!! | My blog | Monster Conky Thread
Offline
The python script is failing to parse the Intellicast page and it crashes.
Since it crashes it can't prepare the data that is read by the lua script so conky will show nothing.
You appear to have setup the Python script incorrectly.
This line, which is for debugging, should not have a url in it.
Pulling -- WU Data -- Location = http://www.wunderground.com/cgi-bin/findweather/getForecast?query=04769This is because you have set the location string incorrectly here.
location = "Your Location Setting Here" # string specifying location to pull weather data forIt should be something short like your zip code or local airport callsign.
This is not the cause of the Intellicast parse crash however it is possible you also set this up wrong.
Could you PM me the script as you have it setup now so I can look at it?
Last edited by arclance (2012-09-13 16:55:48)
Offline
@arclance, your truly a genius!!! The mistakes were all mine, from a bad api key, to having the wrong version number typed in the python script. Many thanks for all you help.
Below is my screeenshot with my multiple conky's going. Everything starts at startup with the use of a couple of scripts running in the Startup Applications. One is a delay script, the other starts the three conky's you see running! I'll do some more work on the one on the right to get the colors just right, but I'm happy for now. Been scratchin' conky for 2 days straight, no sleep! Time for a break!
Again, many thanks to "arclance" who has been helping me most of the day. A real scripting god!!!
Jed

Running 'VSIDO' GNU/Linux! Worlds Greatest all-in-one Debian based DISTRO! | Tried the rest, now try the best!!! | My blog | Monster Conky Thread
Offline
Thank-you vastone! It's amazing what one can achieve with a lot of 'cut-and-paste'! All the credit is definitely arclances. His work entirely. The other two on the left and right are truly cut and past jobs while experimenting with conky. Accidental learning! You gotta love it...
Jed
Running 'VSIDO' GNU/Linux! Worlds Greatest all-in-one Debian based DISTRO! | Tried the rest, now try the best!!! | My blog | Monster Conky Thread
Offline
As a matter of fact, I'll just go ahead and ask now. The conky on the right, what would be the simplest code to cut and paste into the existing file in order to easily change the font colors?
Just kidding. Here it is with the colors "maybe" finished.
Jed
Last edited by jed (2012-09-14 07:10:06)
Running 'VSIDO' GNU/Linux! Worlds Greatest all-in-one Debian based DISTRO! | Tried the rest, now try the best!!! | My blog | Monster Conky Thread
Offline
Now all I really need is an interactive scrolling news reader/rss conky for the top. Something that looks like the ticker at the bottom of the newscasts on FoxNews or CNN...
Jed
Running 'VSIDO' GNU/Linux! Worlds Greatest all-in-one Debian based DISTRO! | Tried the rest, now try the best!!! | My blog | Monster Conky Thread
Offline
Ok, so I decided I liked Vin's (vinDSL) conky for sysinfo stuff better than the one I was using in the previous screenshot. This is the new one. One question, I can see the outline of the conky on the right side of the screen, while on the left the Tao conky is completely transparent; How can I make the one on the right the same way if possible?
Thanks,
Jed
![]()
Running 'VSIDO' GNU/Linux! Worlds Greatest all-in-one Debian based DISTRO! | Tried the rest, now try the best!!! | My blog | Monster Conky Thread
Offline
I think that the problem with the VinDSL conky is its background shading method.
I am not very familiar with that conky you would probably get faster help by asking in the general conky thread.
Offline
New Version Released
v6.2 - 2012-09-16
Lua Script
Now have the 10 day forecast data but it does not always have 10 days of data.
The script will show all that there are, up to 9 days.
Update button script to work with more window managers.
"xdotool search --sync --classname conky behave %@ mouse-click getmouselocation" returns different Window ID's with some window managers, the button code now checks for both of the know possibilities.
This should have been in v6.0 but I forgot to add it.
Fix some mistakenly global variables.
Fix undeclared global variables.
Remove unnecessary variable firstBackup from the line2_UpdateMonitor() function.
Python Script
Get data collection start time at the right place in the code.
Fixes following user specified update interval (was running long).
Get 10 day forecast instead of 7 day forecast.
Use https for WU API.
Please update to this version both the Lua and Python script have important updates.
I will not provide support for Lua script button related issues if you are using a earlier version the Lua script.
Last edited by arclance (2012-09-16 20:57:04)
Offline
Hi thanx for this by the way... anyway I am having trouble understanding what to put in for steps 4a and 4b. I have went to the link that says Documented here and I am not sure what I am looking for.
...to swing on the spiral of ...our divinity and ...still be a human.
Offline
^ Okay that link is not good anymore they changed the documentation page a lot.
It used to be one big page.
I have not found where the location stuff is in the new documentation page yet.
If you live in the US you can run the script once with your zip code like this
location = "ZIP CODE"and the json file you get will contain a list of airports and personal weather stations nearby that you can use.
You can see the json data by opening the file "wuAPI_json_current_log.txt" found in the log folder with a text editor.
The location of other weather sources is found in the "location" section of that file.
If you don't live in the US I will need some time to write a guide on finding the location string.
You can get it from the weather underground website but it is hard to find if you don't know where to look.
It is my moms birthday so I don't have time to do that tonight.
Offline
Ok I tried what you said anf followed the rest of the directions and when I run the pythin for the first time I get this
ian@Hell:~/Downloads/conkyWeather_arclance_v6.2_2012-09-16$ python conkyWeather_arclance_v6.2.py
using cPickle
no pull yet
Traceback (most recent call last):
File "conkyWeather_arclance_v6.2.py", line 987, in <module>
conkyWeather()
File "conkyWeather_arclance_v6.2.py", line 233, in conkyWeather
lastPullBackup = open(logDirectory + "/lastPullBackup.txt", "r") # file for keeping local copy of weather information incase of program/internet errors and to keep track of lastPull if the program is stopped
IOError: [Errno 2] No such file or directory: '/home/ian/Downloads/conkyWeather_arclance_v6.1_2012-09-16/log/lastPullBackup.txt'but the file definately exists in that location and all permissions are set on every file there.
...to swing on the spiral of ...our divinity and ...still be a human.
Offline
^ Yikes that is a really hard error to debug over the Internet.
Could you zip up the whole folder for the script and upload it somewhere so I can look at it?
I need to look at the log files generated by the python script to see what the problem is.
Offline
^ Yikes that is a really hard error to debug over the Internet.
Could you zip up the whole folder for the script and upload it somewhere so I can look at it?
I need to look at the log files generated by the python script to see what the problem is.
This is my folder zipped up:
https://www.box.com/s/ia8p9z9m5f3zlkoohjdh
...to swing on the spiral of ...our divinity and ...still be a human.
Offline
arclance wrote:^ Yikes that is a really hard error to debug over the Internet.
Could you zip up the whole folder for the script and upload it somewhere so I can look at it?
I need to look at the log files generated by the python script to see what the problem is.This is my folder zipped up:
https://www.box.com/s/ia8p9z9m5f3zlkoohjdh
Okay it looks like it was a typo in script from when I was updating the version.
In the python file this line
installLocation = "/home/ian/Downloads" + "/conkyWeather_arclance_v6.1_2012-09-16" # location of the conkyWeather_arclance_v6.1.py fileshould be
installLocation = "/home/ian/Downloads" + "/conkyWeather_arclance_v6.2_2012-09-16" # location of the conkyWeather_arclance_v6.2.py fileOffline
Okay thanx and yes that resolved the first issue, but now I run the py file and it seems to hang at
Next Update At: 2012-09-24 | 04:56:05 PM CDTshould I wait a while or should it not hang there? Sorry for the million questions, but I'd liek to see this work, it looks very useful.
Last edited by Lateralus138 (2012-09-24 21:47:09)
...to swing on the spiral of ...our divinity and ...still be a human.
Offline
Okay thanx and yes that resolved the first issue, but now I run the py file and it seems to hang at
Next Update At: 2012-09-24 | 04:56:05 PM CDTshould I wait a while or should it not hang there? Sorry for the million questions, but I'd liek to see this work, it looks very useful.
That is normal, it means it is working correctly.
What is happening is that the script is waiting until it is time to update the weather data.
At that time it will wakeup, update the information, and go back to sleep again.
This allows the script to alway update at the correct interval even if you kill and restart the script.
Offline
Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.