[Kevin] wanted a display where he could take a quick glance and get all the current environmental information he uses throughout the day. That information includes, of course, the time and date as well as weather information. We’re not just talking the current weather information but the forecast for the upcoming week as well as a map showing current weather patterns. To do this, [Kevin] came up with a unique system he’s calling the PiClock.
[Kevin] did some serious programming to get this clock project off of the ground. The weather data comes via the Weather Underground API and the map data from the Google Maps API. The main program is written in Python and will run on any OS running Python 2.7+ and PyQt4. If you’re interested in doing something similar, check out the source at github.
From the project’s name, it is no surprise that a Raspberry Pi is the brains here. A USB WiFi adapter allows access to the internet but an Ethernet connection would do just fine. Having the RaspPi hanging out with wires everywhere would be a little lazy, so [Kevin] opened up his 19″ LCD monitor and mounted the RaspPi inside the case. He tapped 5vdc off of the monitors power supply and used that to power the RaspPi, no external wall wart necessary! And if the PiClock’s background isn’t cool enough, some RGB LED strips were mounted to the back of the monitor to give an Ambilight effect.
Very nice. I must make one of these.
Clean, check. Useful, check. RGB LEDs, check. Meets all the requirements of an awesome project, congrats! Might make one too.
And not an arduino in sight… blessed be!
well a raspberry pi running python is hardly more creative than programming an arduino.
Maybe if the creator flipped the bits of a 68000 using only a jar of butterflies glinting sunlight off their wings, you’d be pleased :P
Actually achieving this with an Arduino would be impressive (not to mention impossible) :D
But I just don’t get the point of being “featured” here.
He took an off-the-shelf pc (raspi) and wrote a python script doing some Qt magic
LED?
This is awesome, exactly what I wanted for a project and I already finished everything but the software. Never had time to sit down and write it myself and I failed to find anything appropriate on the Internet. Ended up using XBMC with a custom plug in for now, but it’s really awkward.
Two things I’d like to change about this clock (or to be flexible rather) is to have a digital face instead of analog and somehow to be able to change the background image (my ultimate desire is to have Astronomy Picture Of the Day there).
So I guess I’m switching to this solution and will have to tweak it a bit.
Great job!
P.S. Tip: a great display for such projects is Motorola’s LapDock. If you disassemble it you’ll find a great LCD panel there with a compact HDMI controller.
It would be more useful with a HaD feed. ;)
I don’t see why he couldn’t do this with a 555 timer, a single resistor and some magic cat hair, to many components IMO
but honestly, pure awesome, love the effects :D
Anyone else think that this is reminiscent of Deus Ex: Human Revolution’s computer terminals?
Has anyone else tried this? I thought this would be a great addition to the office so I tossed one together. After following the directions I got it all built but I’m hitting a few snags.
1. The audio from NWS comes through great, but I’m getting what seems like a 4 Hz tick through the audio feed.
2. I have a key registered with WU but I am not getting any forecast. The Google side of the house works great as wel las the clock.
Any ideas?
I’ve been working with Chris to get things working, and he helped me uncover a few bugs as well.
I know it’s been almost a year since you’ve commented, but do you know if it’s possible to display tide information with the moon phases or in lieu of the moon phases? Thanks!
If its in the weather undergound api data, then its pretty straight forward… Just dig into the code and string together the data in place of where the moon data is put together.
I Replaced the weather Feed with a Local radio stations Stream the Station KLRC They will broadcast KNWA during Severe weather. May look into your favorite radio stations stream.
For this to work properly do I need a paid Weather Underground account? WU give me 500 request a day for free, but I see that I am making , on the order of 40 requests an hour. This seems to be the 4 radar displays updating about every 6 minutes. Any suggestions on a strategy on running this on a free WU account?
I’ve updated the PiClock to fix this problem. Pull a new update.
Fantastic! Worked first time thanks to the great installation guide you produced! Much better than all the other wall weather/time displays I’ve run on my Pi in the past!
I’d love to see traffic conditions on the first page too! Something similar to the maps shown at http://www.sytadin.fr for example (that’s for Paris, but I’m sure Google Maps shows traffic data too). And a final cherry on the cake: an additional page allowing me to see realtime arrivals and departures for an airport (or airports) of my choice!
Thanks and keep up the great work! I’m looking forward to see how this evolves further!
Is there a way to use mpg123 to stream net radio in lieu of the NOAA stream?
I made it works great. Just wondering if anyone has put tide information on one yet and how to do it. Thanks!
Change request in getwx()
wxurl = Config.wuprefix + ApiKeys.wuapi + ‘/conditions/astronomy/hourly10day/forecast10day/tide/q/’
At the end of wxfinished()
add this:
s = ‘Low Tide:’;
f = wxdata[‘tide’][‘tideSummary’]
tidesize=len(f)
i=0
done=0
while ((i<=(tidesize-1)) and (done!=1)) :
f = wxdata['tide']['tideSummary'][i]
if f['data']['type'] == "Low Tide":
s += str(f['date']['hour'])+':'+str(f['date']['min'])+' '
done=1
i=i+1
s += 'High Tide:'
i=0
done=0
while ((i<=(tidesize-1)) and (done!=1)) :
f = wxdata['tide']['tideSummary'][i]
if f['data']['type'] == "High Tide":
s += str(f['date']['hour'])+':'+str(f['date']['min'])+' '
done=1
i=i+1
temp.setText(s)
print "done with the tide "+s
Nice! I still have this running daily in my home office. Love it.
Any further information you can provide? I’d love tide, but can’t get it working.
Hi, Does anyone know how to get the Maps to load in the background of the Radar? Mine are just gray boxes. I’ve tried everything including rebuilding. API keys are perfect no spaces.
The only time I had that problem was when my internet connection when to shit. Reach out to Kevin. He’s helped me a few times.
Hi I’ve got the same problem now. PiClock has been running for 2 years on autopilot. Weather radar always visible on top of google maps. now google maps is a gray square. updated the API key’s (key’s where empty, now my own keys are inserted, but no success). PiClock doesn not display any error message. Any help greatly appreciated.
Hi Everybody.. I ran into the same problem. Google Maps is nog a grey square. Google maps behinf the weather radar has been running fine for the last 2 years. Inserted the Google Maps API key (this was empty before) but nu succes
Please can you help me?? I get stuck here everytime, and i cant get any further.
i@raspberrypi:~/PiClock $ sh startup.sh
numid=2,iface=MIXER,name=’PCM Playback Switch’
; type=BOOLEAN,access=rw——,values=1
: values=on
pi@raspberrypi:~/PiClock $
The clock doesnt launch or anything.
Any help would be greatly appreciated, for i have spent hours on this.
There are several log files in PiClock/Clock named like PyQtPiClock.1.log (1 thru 7). Look at the one with the latest date/time. It should show an error message that will help track down the problem.
ok.. i have this error…
Traceback (most recent call last):
File “PyQtPiClock.py”, line 19, in
import ApiKeys
File “/home/pi/PiClock/Clock/ApiKeys.py”, line 3
wuapi = 44abd0dd321d7c6ea
^
SyntaxError: invalid syntax
Have you encountered this error before?
Thank-you for the reply :)
sorry.. this is the full error i am getting.
Traceback (most recent call last):
File “PyQtPiClock.py”, line 19, in
import ApiKeys
File “/home/pi/PiClock/Clock/ApiKeys.py”, line 3
wuapi = 44abd0dd321d7cXXX
^
SyntaxError: invalid syntax
You need quotes around the key
wuapi = ’44abd0dd321d7cXXX’
Doh!
Thank-you sir. Very much appreciate the help.
Works fine now.
Fun stuff! I got this up and running in about 20 minutes with no problems to mention. Since then I’ve spent several days modifying it. I’m now using a different set of icons/weather images. Rather being actual sized, they seem to be squished a bit. My images are the same sizes as the originals. Other than that minor annoyance, this works great!
Great! You might take a look at the code to see what size frame is created for the weather icons and set your size to that.
Thank you very much sir! I used the “Tick” weather icons… They look great now that the icons are sized properly. I have noticed one strange bit; the time does not increment in frame2. It only will show the time from when the program is initially run (the clock from the main page runs just fine however). Any solutions for this?
Additionally, thank you for continuing to support this, Many developers abandon their projects after posting. I was very surprised and grateful you are still on top of it!
I’ve just fixed the bug. Looks like its been there since day 1. Thanks!
To update, follow the update instructions on https://github.com/n0bel/PiClock/blob/master/Documentation/Install.md#updating-to-newerupdated-versions
Recently, on 2 separate installs (1 raspberry pi and 1 windows install), the top left weather icon has disappeared (wxicon I believe) no changes have been made, any thoughts?
My installation recently stopped working after months on autopilot. A peek in the logs show a series of
¨X Error: BadAccess (attempt to access private resource denied) 10
Extension: 130 (MIT-SHM)
Minor opcode: 1 (X_ShmAttach)
Resource id: 0x175¨
type errors. Any ideas? I miss my PiClock!
Reinstalled Raspbian (newest flavor), used a new WU key and still getting the black screen. Simply does not display anything.
SD chip went bad. Replaced and reloaded and all is well.
YAY… Holidays were very busy for me, sorry for the long delay. I’m glad you solved the problem, because.. with that error message I had no clue!
I set the clock to auto start via Autostart Method 1. The 15 second delay is not long enough for the wifi to connect before the clock starts. Question: where can I go to change the autostart to lets say 25 seconds?
In PiClock.desktop, change the number after -m to something else (in seconds)
For reference here’s what PiClock.desktop looks like: https://github.com/n0bel/PiClock/blob/master/PiClock.desktop
Thank you…
Changed it to 30 seconds and it works perfectly.
Looking for some assistance in regard to the WU API. It is no longer free and I was curious to find out if another service was being used that did provide a free API. Thanks for any help