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

PaPaTheGMan wrote 10/28/2021 at 13:57 point

Hopefully not a stupid question, but how do you exit the program?  I've tried all the usual suspects - CTL C, X, Q, etc.

  Are you sure? yes | no

David wrote 06/20/2021 at 13:50 point

Looking for a way to simulate the space bar so that I can toggle between the two views every 30 seconds automatically.....so far not luck....any suggestions?

  Are you sure? yes | no

Larry Stewart wrote 01/02/2021 at 12:20 point

When I went back to using DarkSky for PIClock every started to work fine. But a few days ago PIClock stopped working. How do find out what is wrong.

I found out I am an error 

------------------
(program exited with code: 127)
Press return to continue

  Are you sure? yes | no

Larry Stewart wrote 12/28/2020 at 17:25 point

Wen I try to run PiClock I get an error 

pi@raspberrypi:~/PiClock $ sh startup.sh -n -s
Disabling screen blanking....
Setting sound to max (assuming Monitor Tv controls volume)....
Checking for NeoPixels Ambilight...
Checking for GPIO Buttons...
Starting gpio-keys Service...
Checking for Temperature Sensors...
Starting PiClock.... logging to screen.
Traceback (most recent call last):
  File "PyQtPiClock.py", line 8, in <module>
    import dateutil.parser
ImportError: No module named dateutil.parser
pi@raspberrypi:~/PiClock $ ioctl UI_DEV_CREATE: Invalid argument

I am using the new 

# If you want to use Climacell.co, uncomment and add appid
ccapi = 'umGyMuHK8dUUxiiJopAE0vQvHPx66cDP''

When I run the old PIClock with Darksky PiClock works fine.

Please advisee.

  Are you sure? yes | no

cshekmen wrote 08/17/2020 at 18:37 point

I dont have the darksky API and google API. Mapbox api is successfully integrated and can see the data on left side of clock. However, I am not getting any reading in the right side weather forecast. Is it google api based or darksky based or Mapbox based? Also, it is possible to remove this right panel completely?  

  Are you sure? yes | no

Ricardo Cuan wrote 12/22/2020 at 00:22 point

same here. DarkSky is no longer available, but tried other Weather APIs with no luck. Will keep trying....

  Are you sure? yes | no

oneaustin wrote 07/07/2020 at 18:21 point

What is the plan now that DarkSky API and website is going away?

  Are you sure? yes | no

mansje.joling wrote 05/26/2020 at 19:19 point

Can someone give me a answer on my question about the raspberry 4

Thank you

  Are you sure? yes | no

mansje.joling wrote 05/20/2020 at 13:55 point

Hello,

I would like to build this clock but can I use a newest Raspberry 4 with 1GB 

  Are you sure? yes | no

Brian wrote 04/04/2020 at 19:53 point

I would like to add 3 ip cameras to the main screen on the right, instead of the forcast.  I've seen a picture of it, but cannot find instructions on how to do so.  Any thoughts would be appreciated.

  Are you sure? yes | no

john wrote 12/12/2019 at 15:43 point

Kevin,

I have PiClock up and running, the radar images and the map are correct, but the issue i have is the current conditions in the top left and the extended forecast on the right hand side doesn't show the correct information. I have checked and rechecked my darksky api and even gotten a new api generated and still have the same troubles. Any help in this matter? Other than that, everything is working like it should. 

  Are you sure? yes | no

Gen Vagula wrote 10/23/2019 at 19:13 point

That is nice clock. We created something simplistic and cool, if anyone would like to build then how-to instructions are over here: We created this slick fullscreen clock. Just to give back to the community, here’s the step-by-step tutorial: https://www.ampron.eu/article/use-case/digital-wall-clock-with-raspberry-pi

  Are you sure? yes | no

dude32web wrote 10/20/2019 at 12:21 point

I currently do not have any internet based audio NOAA feeds for Guam.  I do have the text based version of the NOAA forcast here:  https://forecast.weather.gov/product.php?site=NWS&issuedby=GUM&product=SFT&format=txt&version=1&glossary=0 which I entered in the line 12 config.py file.

noaastream = 'https://forecast.weather.gov/product.php?site=NWS&issuedby=GUM&product=SFT&format=txt&version=1&glossary=0'

Other feeds can be found here:  https://radar.weather.gov/radar.php?rid=GUA&product=N0Z&overlay=11100111&loop=yes

I am also not seeing multiple feeds on my display.  All I see is the PiClock, and 2ea. WX maps.

I am not getting any of the current forecast in the upper left hand corner, or any of the 9ea. forecasts on the right side of the screen.

Can anyone assist?

  Are you sure? yes | no

dude32web wrote 10/20/2019 at 12:34 point

Well, I fixed this issue by adding a darksky api key to the ApiKeys.py file.

All good!

  Are you sure? yes | no

dude32web wrote 10/19/2019 at 12:50 point

I am unable to launch the startup.sh


Can anyone help me with this error:

pi@raspberrypi:~/PiClock $ sh startup.sh -n -s
startup.sh: 8: startup.sh: Syntax error: newline unexpected

  Are you sure? yes | no

dude32web wrote 10/20/2019 at 11:16 point

I actually got it working.  I had to modify the ApiKeys.py file to include 'google api key'

I initially removed both of the '

  Are you sure? yes | no

Sam wrote 04/24/2019 at 03:30 point

Is it possible to add the weather radar imagery to radar2 and radar4? I have these centered differently and a tighter zoom but hoping to see the radar images at this level as well. Also is there any way to change the opacity of the rainfall so that the map below is still visible?

I have VERY limited coding skills but managed to tweak several settings (time format to 24hr vs 12 hr, removing the year from the date display and adding a second location and secondary coordinates to call when needed).

I am eventually hoping to add the third frame to call on another api for use as a status board at my fire station.

  Are you sure? yes | no

swolf01 wrote 12/19/2018 at 20:23 point

Wunderground going away as of 2019. Anyone using NOAA data?

  Are you sure? yes | no

Kevin Uhlir wrote 12/22/2018 at 00:37 point

A long (old) discussion is at https://github.com/n0bel/PiClock/issues/103, with the end of it showing PiClock being updated to DarkSky and RainView to replace WU

  Are you sure? yes | no

swolf01 wrote 12/19/2018 at 20:20 point

Google Maps grey: Google now requires an API Key to work. 

  Are you sure? yes | no

Kevin Uhlir wrote 12/22/2018 at 00:38 point

  Are you sure? yes | no

Blariv wrote 11/10/2018 at 01:17 point

It looks like Weather Underground is going away end of year 2018.  Have you looked at darksky api.  All kinds of good data.  Weather alerts would be a good addition to the interface.  If there is a advisory, watch, or warning you are interested in, you could display it over the bottom part of the screen under the clock.  

Would it be an option to go to google maps with the coordinates of your location, take a screen capture and edit for you desired image?  Then use the image instead of the url call.

  Are you sure? yes | no

Kevin Uhlir wrote 12/22/2018 at 00:38 point

A long discussion is at https://github.com/n0bel/PiClock/issues/103, with the end of it showing PiClock being updated to DarkSky and RainView to replace WU

  Are you sure? yes | no

Rick wrote 10/24/2018 at 12:07 point

Google Maps was the problem for my gray screen. I just went a head and counted the hits on the google api and it only hit 2 times in 2 days it shouldn't hit anymore unless I reboot it once it pulls the maps it doesn't hit it anymore. So I went a head and attached a payment account to it. They charge you $2.00 per 1,000 hits a month. I'll never hit that. Now my radar is back up and running. So I'm good until someone figures out something else. I just love this PiClock and it runs 24/7. Living in Florida it's very very useful with all the storms we get.

You can go to your google cloud console and see your hits. You want the "Maps Static API"  activated under your API

https://console.cloud.google.com

  Are you sure? yes | no

Tony wrote 10/18/2018 at 01:35 point

Same problem. The Google map comes thru as a gray panel but the radar overlay is fine. Started happening about a week ago. A reboot or two seems to fix it.

  Are you sure? yes | no

phatcatman wrote 10/15/2018 at 19:19 point

Don't know how recent the page is, but WU states,

"To improve our services and enhance our relationship with our users, we will no longer provide free weather API keys as part of our program."

  Are you sure? yes | no

Kevin Uhlir wrote 12/22/2018 at 00:39 point

A long (old) discussion is at https://github.com/n0bel/PiClock/issues/103, with the end of it showing PiClock being updated to DarkSky and RainView to replace WU

  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