PiClock – Time And Weather Information Overload


[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.

48 thoughts on “PiClock – Time And Weather Information Overload

      1. 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

  1. 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.

  2. 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?

      1. 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!

        1. 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.

  3. 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?

  4. 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!

    1. 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’]
      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'])+' '
      s += 'High Tide:'
      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'])+' '
      print "done with the tide "+s

  5. 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.

    1. 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.

    2. 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

  6. 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.

    1. 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 :)

  7. 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

  8. 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!

      1. 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!

  9. 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!

  10. 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?

  11. 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

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.