Close
0%
0%

PiClock - A Raspberry Pi Clock & Weather Display

This project is a fancy Clock and weather display built around a monitor and a Raspberry Pi.

Similar projects worth following
The PiClock is a clock (duh), weather forcast, and radar map display based on the Raspberry Pi and a display monitor. The display monitor is assumed to be an HDMI monitor, but it will probably (possibly) work with the composite output as well, but this is not a design goal.

The main program (Clock/PyQtPiClock.py) will also run on Windows, Mac, and Linux, as long as python 2.7+ and PyQt4 is installed.

The Weather data comes from DarkSky using their API ( https://darksky.net/dev/ ). The maps are from Mapbox ( https://mapbox.com ) or Google Maps.

The PiClock can be customized with several supported additional things:
* RGB LED strips (NeoPixel) to create an ambilight effect
* gpio buttons for changing the view
* IR Remote Control for changing the view
* Streaming the NOAA weather radio

Introduction

The PiClock is a clock (duh), weather forcast, and radar map display based on the Raspberry Pi and a display monitor. The display monitor is assumed to be an HDMI monitor, but it will probably (possibly) work with the composite output as well, but this is not a design goal. The main program (Clock/PyQtPiClock.py) will also run on Windows, Mac, and Linux, as long as python 2.7+ and PyQt4 is installed.

The Weather data comes from DarkSky using their API ( http://darksky.net/dev/ ).  The maps are from Google Maps API.  You must get API Keys from DarkSky and Google in order to make this work.  It is free for low usage such as this application.

The Weather data comes from OpenWeatherMap or Tomorrow.io.  The maps are from Google Maps API or Mapbox.  You must get API Keys from OpenWeatherMap or Tomorrow.io and Google or Mapbox in order to make this work.  It is free for low usage such as this application.

The PiClock can be customized with several supported additional things:

  • RGB LED strips (NeoPixel) to create an ambilight effect
  • gpio buttons for changing the view
  • IR Remote Control for changing the view
  • Streaming the NOAA weather radio stream for your area

The power usage I've measured is about 35watts with a 19" HDMI Monitor, 27 LEDs and the Pi. The LEDs contributed 3 or so watts, and I think the Pi is about 2-3 Watts normally.

This is the basic PiClock, with some options added. PiClock Picture

I chose to remove the plastic frame from my monitor and mount the Pi directly on it, as well as tap power from the display's power supply. PiClock Pi Mounting

I've made it work on multiple platforms and form factors. PiClock Pi Mounting

And I've made some for friends and family with different customizations. PiClock Pi Mounting

Overview on GitHub

There's an overview, install guide and hardware guide along with the source on GitHub. https://github.com/n0bel/PiClock/blob/master/Documentation/Overview.md

PiClocks have been successfully built and proudly displayed around the world by many people. Some examples can be seen on closed github issues, as well as my public facebook page. I can't tell how many PiClocks are out there. The github page shows 123 forks and 395 stars. Here on Hackaday.io, there are almost 273 skulls (likes) 158,000 views and over 2,000 followers. As well as 189 comments in the form of questions and answers.

I try to answer questions mostly on github, open new issues here: https://github.com/n0bel/PiClock/issues.

I've made several PiClocks for friends and family. A few friends have made their own as well.

Maybe you'd like to give it a try.

Here are some successful PiClock build pictures.

Craig Moench


blboyd



Micheal Jacques


  • 1 × A Raspberry Pi (revision 2) Model B, or B+ or Pi 2 Model B or Pi 3 or Pi Zero
  • 1 × A Display Monitor & Cable
  • 1 × 5V Power Supply (for Pi) Power Supply (or if you're ambitious tap your display power supply, you'll probably need a switching down regulator to 5v) Remember the Pi likes something that can source up to 2A.
  • 1 × A USB Keyboard and Mouse for setup (if you want something small and semi-permanent, I've had good luck with this: https://www.google.com/search?q=iPazzPort+2.4G+Mini+Wireless+Keyboard I like the one with the mousepad on the side)
  • 1 × USB Wifi or Internet Connection

View all 10 components

View all 23 project logs

View all instructions

Enjoy this project?

Share

Discussions

Derek Tombrello wrote 03/30/2016 at 19:05 point

Hi. I really like your WeatherClock here. It is exactly what I was looking for, but on an old linux laptop instead of a Pi. I've been using a Pi for OSMC for a while now, but I had an idea last night for a project using another Pi. I've never had any experience programming for the Pi, though. I have programmed in C+ (for the MSP430), BASIC (for the PicBASIC) and PHP (for basic websites). Do you have any good resources I could look at for how to interface the outside world to the Pi, namely pushbuttons and a 2-line alphanumeric LCD panel? Thanks!

  Are you sure? yes | no

Kevin Uhlir wrote 03/30/2016 at 23:09 point

Almost any google search for raspi with GPIO, Pushbutton, LCD, will turn up hits on instructables, youtube videos, etc on all that.   For whatever reason Python has become the go-to language for Pi stuff.   There are a couple of GPIO modules, and I'm sure LCD modules and more.   I did some searches and found:

and

  Are you sure? yes | no

Dan Allen wrote 03/07/2016 at 03:22 point

Is there a way to set the time on the second screen (the screen with the two larger radar maps) with a 24 hour clock instead of the 12 hour clock?  Also, is there a way to auto-cycle between the two screens?  I too am having the 4hz popping sound on my audio mentioned by Chris Muncy below.

  Are you sure? yes | no

Kevin Uhlir wrote 03/07/2016 at 04:41 point

Those options could only be added by modifying the source code.  I'll consider all pull requests on github.  I've never heard the popping, so I don't have a fix.  Maybe send him a note, he may have fixed it.

  Are you sure? yes | no

QuestionsToAsk wrote 02/23/2016 at 19:10 point

I just set this up and am happy with it, but is screen burn in an issue?  Is it possible to alternate the display etc.?

  Are you sure? yes | no

Kevin Uhlir wrote 02/23/2016 at 19:26 point

If its LCD its fairly rare, and its called image persistence, because it isn't permanent..  If you wanted to add a background process to inject spaces (ala uinput) periodically, it screen would flip between the clock and the big double radar display.   I've seen some guides and youtube videos to clear it.  

  Are you sure? yes | no

mbrocher303 wrote 01/01/2016 at 02:41 point

This was one of the first projects I did with my pi. One thing I think would be neat is to integrate a GPS receiver. NWS brodcast would probably still need to be done manually, but it could be great if you were using it in a smaller/more portable platform.

  Are you sure? yes | no

Kevin Uhlir wrote 01/01/2016 at 02:47 point

so i guess you'd want to integrate GPS so it follows your movements and displays the right maps.....  I made a version with a 7" screen, but i don't have it running anymore.. Its was just a proof concept.  Hmmm.. Pi Clock Mobile in the car might be cool.. something to think about.

  Are you sure? yes | no

1958cjansen wrote 12/31/2015 at 04:21 point

Ok, had time to change my background and that worked really well.
Thanks again.

  Are you sure? yes | no

Kevin Uhlir wrote 12/31/2015 at 17:51 point

Woo hoo.. can't wait to see it.

  Are you sure? yes | no

PZ wrote 05/25/2016 at 02:50 point

me too

  Are you sure? yes | no

1958cjansen wrote 12/26/2015 at 21:31 point

I do not have facebook but thanks a million, I have one question, can i change the background pictures to my own pictures?

  Are you sure? yes | no

Kevin Uhlir wrote 12/27/2015 at 01:47 point

Yes certainly...

Look at the config, you'll see it referencing all the images...

background = 'images/clockbackground-kevin.png'

squares1 = 'images/squares1-kevin.png'

squares2 = 'images/squares2-kevin.png'

background is the entire background image.

squares1 is the squares around the radar images.

squares2 is the squares around the forecast.

Just edit/replace them as needed.   You'll need to keep them the same dimensions.

/K

  Are you sure? yes | no

1958cjansen wrote 12/26/2015 at 19:12 point

I followed your instructions and really enjoyed building this clock/weather display.
I posted my video of it at youtube.

Did run in to a few things but managed to figure it out and got it to work.
Great Job you did and keep up the good work.

  Are you sure? yes | no

Kevin Uhlir wrote 12/26/2015 at 20:22 point

YAY Cool.. I posted it on my facebook page.

  Are you sure? yes | no

iandavidgreen wrote 12/18/2015 at 22:33 point

Great project. Will there be any issues with running this on the new Raspberry Pi Zero?

  Are you sure? yes | no

Kevin Uhlir wrote 12/26/2015 at 20:18 point

As long as you can still run Debian Weezy... I've not got a Pi Zero yet.   Remember you need internet, so you'd need to do the USB OTG able, then ethernet or wifi.

  Are you sure? yes | no

skottdc wrote 08/31/2015 at 18:19 point

Hi Kevin.

Sorry to bother you but I need some help with your clock project. I've followed the instructions and have a working clock with relevant data but I cannot get any temperature sensors to work. I've been using DS18B20's which you mention in your tutorial. The error is "no module named w1thermsensor" I've followed everything and can't see the problem. I've even done a format and clean install and am left with exactly the same error. Any idea what's wrong?

The other question I have is the column on the right, where the day of the week is displayed, the day often gets the top few lines clipped off. Is there a way I can change the font size to avoid this?

Thanks in advance!

  Are you sure? yes | no

Canonmasta wrote 05/16/2016 at 18:29 point

Hi! Same problem here! Did you fix the "no module named w1thermsensor" problem? i've installed and configured everything but gives me this. Thank you in advance

  Are you sure? yes | no

Anand Dhanda wrote 08/21/2015 at 13:07 point

Any chance of having automatic rotation through pages at a timed interval?

  Are you sure? yes | no

KrX wrote 08/17/2015 at 21:58 point

Hi, first i need to say is that its a wonderfull project. I´m testing the clock on my windows notebook, because an rasberry pi is on its way to me :P

But i want to know how to change the language ?

Is there a file i can translate, or do i need to do something else?

  Are you sure? yes | no

Kevin Uhlir wrote 08/18/2015 at 17:20 point

Sorry I have nothing in the code for dealing with multiple languages.

  Are you sure? yes | no

Chris Muncy wrote 07/18/2015 at 02:50 point

Hey Kevin I have one more for you.

On the main clock display, the 2 radar boxes on the left, more of the time I will get weather but I'm not getting the map. Even when I hit space and go to the 2 radar images I only see the rain but no maps. Any thoughts on that?

  Are you sure? yes | no

Kevin Uhlir wrote 07/18/2015 at 03:00 point

The map is retrieved from Google.  It is only retrieved once, on startup.   If it fails then it'll never show up.   Do you have the system reboting at 3 something am as in my instructions?   If so, is there some possibility that you don't have internet at that time?   Everything else implicitly re-fetches -- radar, 10 min, weather 30 min.. etc... I should be able to add something that does a delay/retry on the maps if they fail.

  Are you sure? yes | no

Chris Muncy wrote 07/18/2015 at 14:30 point

Yeah as I am getting the weather forecast on the right columns and I have it rebooting at 1 am every morning.

  Are you sure? yes | no

Chris Muncy wrote 07/18/2015 at 14:32 point

So if I reboot it it should grab the maps right? It's not doing that.

  Are you sure? yes | no

Chris Muncy wrote 07/18/2015 at 14:34 point

Also, I am not using a google api key and I have updated the code.

  Are you sure? yes | no

Kevin Uhlir wrote 07/18/2015 at 15:49 point

Strange... does it *ever* get a map?   Is it possible there is some garbage in the google API key?   Be sure that in ApiKeys.py it has exactly    googleapi = ''   thats     googleapi equals single-quote single-quote, no spaces inside the quotes.

  Are you sure? yes | no

paulvdwal1 wrote 07/07/2015 at 15:31 point

Hi Kevin!
Today made your project.
As i'm in the Netherlands, I use Metric.

That is working fine, I get nice temperature in celcius from WU, except 1 part.

I use a DS18B20 for indoor temperature, it is working, but it is reporting the temperature as 80.5, i guess that is fahrenheit, because that is around 26,9 degrees celcius, which it is right now.

Is it possible to change it to celcius?

Kind Regards,

Paul

  Are you sure? yes | no

Kevin Uhlir wrote 07/09/2015 at 21:09 point

Yes, I'll make the change this weekend, along with a few others I have in test mode right now.

  Are you sure? yes | no

Kevin Uhlir wrote 07/11/2015 at 16:53 point

Okay.. I've made the change.   Just do a git pull on your piclock.

  Are you sure? yes | no

Chris Muncy wrote 06/24/2015 at 22:39 point

Good evening Kevin. I did an update last Wednesday and am now getting duplicated days in the right hand column of weather forecasts. Right now its shows Wed 8 pm, Wed 11 pm, Thursday 2 am, then it goes back in order starting at wed, then thur, fri, sat, sun then the last mon.

Any ideas? I grabbed the updates today and rebooted.

  Are you sure? yes | no

Kevin Uhlir wrote 06/25/2015 at 03:28 point

It is designed to do this:  The first 3 blocks on the right show now+3 hours now+6 hours and now+9 hours.   The last 6 blocks show today, tomorrow, next day, etc.

  Are you sure? yes | no

Chris Muncy wrote 06/25/2015 at 12:54 point

Ahh OK that makes sense. And I thought I had broke it :p.

  Are you sure? yes | no

Chris Muncy wrote 06/25/2015 at 12:55 point

As a side note I have not had any issues going over my wunderground api limit.

  Are you sure? yes | no

Kevin Uhlir wrote 06/27/2015 at 00:55 point

Great!

  Are you sure? yes | no

Chris Muncy wrote 06/14/2015 at 16:10 point

So after 2 full days I've been alerted twice about going over my usage. The first one I understand, but the second one I have essentially let my PiClock sit and haven't messed with it. Since we are getting some storms I've left it on the second screen showing local and regional weather radar. When or how often does the software ping wunderground?

  Are you sure? yes | no

Kevin Uhlir wrote 06/14/2015 at 16:17 point

It gets 4 radar maps and 1 query for the current + forecast every 5 minutes.   So 5 queries every 5 minutes.   Perhaps that should be a configurable time?   A reboot/program restart may cause 10 queries with the 5 minutes, which may push you over the top.

  Are you sure? yes | no

Chris Muncy wrote 06/14/2015 at 16:25 point

Looking at my stats on WU it appears that I've hit 500 for today ( I guess since midnight) at refreshing the API key web page shows that my key is now disabled. I love this project but it looks like the api restrictions are going to kill it. Unless there is another source that can be had for the weather data.

  Are you sure? yes | no

Kevin Uhlir wrote 06/14/2015 at 16:35 point

500 times represents about 8 hours.... hmmm.. i see thats not going to work..  I pay for mine since I've got several friends up on on.   I'll make some changes and make the times configurable.   I'll also change the radar so it only pulls the active ones.   That should drop the usage down.

  Are you sure? yes | no

Kevin Uhlir wrote 06/14/2015 at 20:27 point

I've updated the project github.  I've done several things to insure this works now within the free 500 api calls per day.   1) new config variable radar_refresh default 10 minutes.  2) new config variable weather_refresh default 30 minutes 3) stopped radar api calls when the radar is not visible, and corresponding restart when pages flip to make it visible.  4) ensure at least 2 seconds between radar api calls (getting them too quickly causes failures)   This combines to make a total of 336 calls per day ( (2 per hour forecast + 6 per hour per radar * 2 radars) * 24 = 336/day

  Are you sure? yes | no

Chris Muncy wrote 06/13/2015 at 00:13 point

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?

  Are you sure? yes | no

Kevin Uhlir wrote 06/13/2015 at 06:13 point

I've had 2 reports of successful usage of WU,  but failed maps.   The maps thing was because they didn't activate their map key in google.   Are you using wifi or wired internet?  Wifi has issues sometimes which is fixed by turning off wifi power saving.   mpg123 is used to play the audio.  Try running it from the command line, using some other feed, or even changing the feed to anything else, to see  if its in the feed.  You could try a different mpg player for the Pi, as a test too. Beyond that, troubleshooting the audio on the Pi itself will be needed.   

  Are you sure? yes | no

Chris Muncy wrote 06/13/2015 at 13:50 point

I'll check those Kevin. Yes I'm on wifi. The ticking starts about 10 seconds after starting the app even before I hit F2 to listen to the NWS broadcast. AS a side note,  Idid this on a fresh raspian build just for this project. I'll keep digging. Thanks for the help.

on edit:

looking at the console window it appears that I have an error:

KeyError: 'current_observation"

I've verified my api key but it looks like that might be the error? 

  Are you sure? yes | no

Chris Muncy wrote 06/13/2015 at 14:24 point

So for shits and giggles I generated a new api key and that seems to have done the trick. Now on to the audio issue.

  Are you sure? yes | no

Kevin Uhlir wrote 06/13/2015 at 16:26 point

YAY! great work... 

  Are you sure? yes | no

Kevin Uhlir wrote 06/11/2015 at 14:55 point

Thanks!  It's a fun project.

  Are you sure? yes | no

Jeremy Lambert wrote 06/10/2015 at 14:25 point

that is super slick. nice work.

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates