close-circle
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
close
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 Weather Underground using their API (http://www.wunderground.com/weather/api/ ). The maps are from Google Maps API. You must get an API Key from weather underground 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 strea

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/http://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 Weather Underground using their API ( http://www.wunderground.com/weather/api/ ). The maps are from Google Maps API. You must get an API Key from weather underground 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

There is also an instruction guide here on Hackaday.io. https://hackaday.io/project/6184-piclock-a-raspberry-pi-clock-weather-display#menu-instructions

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 47 forks and 242 stars. Here on Hackaday.io, there are almost 100 skulls (likes) 40,000 views and over 1,000 followers. As well as 90 comments in the form of questions and answers.

I try to answer questions either here or on github, or facebook or reddit.

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 19 project logs

  • 1
    Step 1

    Choosing your Options

    The PiClock in its basic configuration is a Raspberry Pi, and an HDMI Monitor (and power and SD card of course, and possibly a WiFI dongle). This project has a number of optional items.

    • NeoPixel Ambilight
    • DS18B20 Temperature sensors
    • IR Receiver
    • Push Button controls

    You could proceed through these instructions without any of these hardware extras, and then add them later.

    All of the optional hardware wiring and instructions are documented here: https://github.com/n0bel/PiClock/blob/master/Documentation/Hardware.md

    I'd suggest you read through that first if you're considering adding these options.

  • 2
    Step 2

    Hook things up

    Begin by setting up your HDMI Monitor, Raspberry Pi, and power supply. Some kind of keyboard and mouse will also be handy, connected via USB. I'm assuming most everyone can get this far on their own. If you're going to do those hardware extras, mentioned in the prior instruction, put them together as well.

  • 3
    Step 3

    Download Raspbian Jessie and put it on an SD Card

    PiClock and this install guide are based on Raspian Jessie released on https://www.raspberrypi.org/downloads/ It will work with many raspbian versions, but you may have to add more packages, etc. That exercise is left for the reader.

    What follows is a step by step guide. If you start with a new clean raspbian image, it should just work. I'm assuming that you already know how to hook up your Raspi, monitor, and keyboard/mouse. If not, please do a web search regarding setting up the basic hardware for your Raspi.

    The image and instructions for doing this are on the following page: https://www.raspberrypi.org/downloads/

View all 22 instructions

Enjoy this project?

Share

Discussions

gdm44752 wrote 09/30/2017 at 20:18 point

Thanks buddy! It's a nice and simple idea and construction. I just made one for my self, we have it in the living room connected to the TV, anytime we want to check the weather we just switch to the HDMI port and voila! :) just in case I made a video-journey during my experience in this project


  Are you sure? yes | no

ryanuptain wrote 09/25/2017 at 01:23 point

Hello Kevin (and all you guys who know what you are doing),

So I set this amazing little guy up. I just have a couple questions...so far...

How can I change the background and the style of the clock? I don't want to mess around and ruin the code...I am a beginner. Thanks!

  Are you sure? yes | no

gdm44752 wrote 09/30/2017 at 20:20 point

It's easy, take a look here, by the end there's how to change and load the different backgrounds, icons styles.. etc.

You can do it via SSH or/and FileZilla

  Are you sure? yes | no

jratha wrote 09/23/2017 at 12:03 point

Hi Kevin.

Just a quick Query/ Is it possible to show the the attached temperature sensors in °F instead of just numbers. Like in the top left of my screen?

  Are you sure? yes | no

Wilson wrote 08/15/2017 at 14:09 point

Would it be possible to pull the Google Maps traffic API and show that also? Looking for any knowledgeable to help..

Thanks

  Are you sure? yes | no

Danny Martin wrote 07/20/2017 at 15:48 point

Kevin I am still having trouble with the NeoPixel lights. I have tried 4 different brands of lights including a Adafruit NeoPixel Ring with the same results. I have even tried running just the NeoAmbi.py stand alone. I would welcome any additional help you might have.

Thanks

  Are you sure? yes | no

Danny Martin wrote 06/28/2017 at 19:28 point

Hello Kevin:

I am trying to get the LED strip to work with the PIClock. I have tested my strip and all is well with that. I have installed the following:

apt-get install libboost-python1.49.0

I have searched all the discussions and don't seem to find any references to the LEDs, I did some research on NeoPixel Ambilight, but not sure this is what I want to do. Do you have some code or option to select that turns on the lights, or  should I just set up a python script to start  at boot and use that? Any  help would be appreciated, again thanks for the wonderful project.

Danny

  Are you sure? yes | no

Kevin Uhlir wrote 06/28/2017 at 21:51 point

The LEDs are run by the script and library in the Leds folder.   It is started along with everything else in startup.sh

  Are you sure? yes | no

Danny Martin wrote 06/29/2017 at 03:34 point

I am using the Raspberry Pi 7 inch display. Does this code look for an HDMI monitor? I cannot get the leds to come on. Do I need to select a special GPIO (currently using 18)?

  Are you sure? yes | no

Kevin Uhlir wrote 06/29/2017 at 03:52 point

PiClock doesn't care about your monitor.  It uses whatever desktop gui is running on.  

https://github.com/n0bel/PiClock/blob/master/startup.sh runs NeoAmbi.py from the Leds folder (around line 75).

https://github.com/n0bel/PiClock/blob/master/Documentation/Hardware.md shows how to hook up the NeoPixels.

  Are you sure? yes | no

Danny Martin wrote 06/30/2017 at 03:48 point

Kevin I have my neo pixel installed properly, I can make it function by using the script strandtest.py with my current connections. I have tried both the NeoPixel Ring - 24 x 5050 RGB LED with Integrated Drivers and Adafruit NeoPixel Digital RGB LED Strip - White 30 LED - WHITE. Both with the same results. Any more suggestions?

Thanks,

Danny

  Are you sure? yes | no

Kevin Uhlir wrote 06/30/2017 at 04:42 point

no idea... have you tried manually running 

cd Leds

sudo python NeoAmbi.py

If so does it get any errors?

  Are you sure? yes | no

Danny Martin wrote 06/30/2017 at 05:41 point

I have tried that and it just seems to run with no activity. When I hit Ctrl C it just aborts the program. Is there any changes that need to be made in the NeoAmbi.py in reference to the number of pixels that are being used?

Thanks,

Danny

  Are you sure? yes | no

Kevin Uhlir wrote 06/30/2017 at 05:45 point

in NeoAmbi.py line 32

  Are you sure? yes | no

Danny Martin wrote 06/30/2017 at 15:58 point

Kevin, I would like to run a test of Ambi.py on a standalone pi. Do I need to load any additional software or all of the libraries contained in Raspbian Jessie?

Thanks,

Danny

  Are you sure? yes | no

Danny Martin wrote 07/02/2017 at 21:37 point

Kevin I ran the test  with a clean install of Raspbian and  ran your Ambi.py with no results. What is the type and brand name of the strips you used in your project?

Thanks

  Are you sure? yes | no

Kevin Uhlir wrote 06/24/2017 at 17:55 point

NOAA weather radio streams have reappeared on the net. You can find it here: http://noaaweatherradio.org/
They don't put the .mp3 urls where they are easily accessable, so you
need to use your browser to "View Page Source" in order to find the
proper .mp3 url.

  Are you sure? yes | no

Rick wrote 06/14/2017 at 10:18 point

A co-worker and I have figured out how to make the PiClock rotate screens. It flips from the clock to the radar screen (Space Bar) 

Instructions:

apt install xdotool

We created a subfolder called scripts under PiClock as we will be adding more to this. You can put the file anywhere just adjust the crontab path.

create a sh file MAKE SURE TO chmod +x the file. You can call the file whatever you want just adjust the crontab job path.

chmod +x switchPiClockscreens.sh

Edit the file and add this:

#!/bin/bash
# Script to switch panels
export DISPLAY=":0"; xdotool key space

Add this line to crontrab -e MAKE SURE YOU'RE NOT LOGGED IN AS ROOT

*/5 * * * * sh /home/piclock/PiClock/scripts/switchPiClockscreens.sh

The 5 is minutes for rotation. You can set it to whatever you'd like.

  Are you sure? yes | no

Kevin Uhlir wrote 06/14/2017 at 16:16 point

Great work!..   You may run into a problem with the Weather Underground API limits.  

  Are you sure? yes | no

Rick wrote 06/14/2017 at 18:07 point

I thought about that. I might need to change it Does it hit the API key every time it switches from screen to screen? I figured rotation at 5 mins. That's 12 times an hour X 24 hrs = 288 API hits per 24 hrs. The limit on the free API is 500 hits a day. Not sure if that's how it works.

  Are you sure? yes | no

peter wrote 06/08/2017 at 23:57 point

All is good. A couple of things I would request from the developer; move icons around, and more config. ability around text formatting. I found the "Chance of thunderstorms" does not fit on the screen by default.

  Are you sure? yes | no

Wilson wrote 05/15/2017 at 04:44 point

Hi and thanks for this great project..

Everything working in default..

Was wondering, is it possible to get Traffic on the google maps API?  

I would like to have at least one of the maps have current traffic if possible. 

If so, how?

Also, have a slide show routine that I easily run, but trying to figure out how to rotate them after X amount of time. 

Thanks.

  Are you sure? yes | no

eric2693 wrote 04/22/2017 at 15:24 point

So I have the PiClock running but when I change something like the clock or background, I go into the nano file to edit it and I have to retype the changes and NOA and lat/lon. Am I doing something wrong to have to keep putting this information in again after I go through trying to edit one thing? This is my first ever project on the Pi so I'm not too familiar with this stuff.

  Are you sure? yes | no

Annabellesolman wrote 04/03/2017 at 20:13 point

IR Receiver: do we need it to run the project?

  Are you sure? yes | no

Kevin Uhlir wrote 04/12/2017 at 00:48 point

No, it is one of the optional items.

  Are you sure? yes | no

Dillon Bradshaw wrote 03/24/2017 at 02:35 point

Hey guys! So i got everything running smoothly for my dorm, except the noaa stream, but that seems to be common. My one question is how do i go about changing the font of the clock? I have the font i want installed, just dont know how to implement it. And only for the clock, none of the other text! Thanks!

  Are you sure? yes | no

fred.hancock wrote 03/11/2017 at 19:03 point

Still trying to change weather latlong in python - any good beginner's guide? ApiKeys.py also seems to fail to be found - I just open a blank file - is this right? Thanks

  Are you sure? yes | no

Kevin Uhlir wrote 04/12/2017 at 00:55 point

Part of the Install.MD file:

Now that you have your api keys...

cd PiClock
cd Clock
cp ApiKeys-example.py ApiKeys.py
nano ApiKeys.py

Put your api keys in the file as indicated

#change this to your API keys
# Weather Underground API key
wuapi = 'YOUR WEATHER UNDERGROUND API KEY'
# Google Maps API key
googleapi = '' #Empty string, the key is optional -- if you pull a small volume, you'll be ok

  Are you sure? yes | no

danjhofer wrote 03/05/2017 at 16:11 point

Like others have asked, is the function for the audio feeds not working for everyone or are some of us doing something wrong?

  Are you sure? yes | no

Kevin Uhlir wrote 04/12/2017 at 00:52 point

At this point it looks like the NOAA weather streams are down.   I have no further information.

  Are you sure? yes | no

Danny Martin wrote 06/24/2017 at 15:45 point

The have been removed.

  Are you sure? yes | no

Brian wrote 02/12/2017 at 13:53 point

This is a great beginner project, got it up and running and learned a lot in the process. I tried changing the NOAA audio feed to a radio station URL without much luck. Does anyone have any thoughts?

Thanks!

  Are you sure? yes | no

Kevin Uhlir wrote 04/12/2017 at 00:53 point

At this point it looks like the NOAA weather streams are down.   I have no further information.

  Are you sure? yes | no

Cold wrote 01/11/2017 at 02:15 point

Thank you!

I have your clock software successfully configured.  What is the chances of a alarm feature being added to the base build?  Do you have any suggestions for the setup of an touch screen alarm function?

  Are you sure? yes | no

Kevin Uhlir wrote 04/12/2017 at 00:53 point

As the PiClock gets reorganized into its second incarnation, an alarm may be a plugin to be added.   Check out the project on github where you'll see many issues discussed.

  Are you sure? yes | no

david.kingsleyjr wrote 12/25/2016 at 06:45 point

Hello Kevin. the radar isn't showing up properly on my screen. all there is, is reflectivity and a grey background. i am unsure as to why this is. 

Also, is there a way that i can move the data above the radar to the center of the screen? it wouls be nice to move that information to occupy the center of the screen and the date/time to the top of the screen. perhaps even making the radar just a bit bigger would be nice as well.

I'm running an RPI3 wirelessly with a fresh raspbian jessie image.

  Are you sure? yes | no

Kevin Uhlir wrote 01/07/2017 at 17:37 point

Generally speaking the grey map background is caused by using a google maps api key that hasn't been activated.   However its best *not* to use a google maps api key at all.   Just leave that option as ''  (empty string).

googleapi = '' #Empty string, the key is optional -- if you pull a small volume, you'll be ok

  Are you sure? yes | no

david.kingsleyjr wrote 01/07/2017 at 17:44 point

Ok,  I will give this a try. Using the provided instructions led me to believe I needed the Google API key to see my town on a map. What's odd though,  is that my Google API key IS activated.

  Are you sure? yes | no

miles.d.oliver wrote 12/24/2016 at 19:30 point

I'm using this with my Raspberry Pi  2 and 7" Pi touchscreen beside my bed with 2 other packages.  'alarmpi' https://github.com/skiwithpete/alarmpi  .  and HuePI http://www.floodgap.com/software/huepl/  with a bash script to give a sunrise simulation of the lights to come on gradually and to give the latest news and weather audibly as well as a morning song.   For the last few months its been a good alarm clock that wakes me up via cron jobs and my mp3 library.   I'm no coder but am investigating how I can place a 'snooze box' on the screen so I could just kill the alarmpi job with a simple touch of the screen. For now I run the alarmpi job twice at 00 and 05 past the hour and this is enough to get me up.  Combining all 3 projects has been the best overall alarm clock I've ever had. 

  Are you sure? yes | no

Kevin Uhlir wrote 01/07/2017 at 17:36 point

Great work!  YAY!  Glad you're digging into the code too.  Great to see!

  Are you sure? yes | no

Quancard wrote 12/19/2016 at 09:12 point

Helo Kevin,

I love you project :) I have already run it on my Pi! It works great. It is quite clever to dim the screen for the night but I got other question about it. How could I turn background color into White for the day and leave black, dimmed for the night? Thanks for help! :)

  Are you sure? yes | no

Quancard wrote 12/19/2016 at 10:39 point

Uuu... now I see that there is a tool for changing clock faces... I think my question is obsolete! I will play with changing look of the clock by myself :)

  Are you sure? yes | no

Wilson wrote 12/30/2016 at 19:59 point

Where is this tool? Would like to change clock face.

  Are you sure? yes | no

Kevin Uhlir wrote 01/07/2017 at 17:35 point

The tool he speaks of is the switcher.sh script which is talked about in the next comment.   Check the instructions @ github  https://github.com/n0bel/PiClock/blob/master/Documentation/Install.md#switching-skins-at-certain-times-of-the-day   Its not so much a tool, but a way to switch configs at certain times.   The config itself controls the background and all other aspects of the display

  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