Introduction: Raspberry Pi: Wall Mounted Calendar and Notification Center

Before the “digital age” many families used wall calendars to show a monthly view of upcoming events. This modern version of the wall mounted calendar includes the same basic functions:

  • A monthly agenda
  • Sync of family members activities
  • Easy browse between months

Beyond those basic functions this gadget will also handle:

  • A whether forecast
  • Upcoming events in the surrounding area
  • Live information about the public transport
  • And even more...

What you need:

(Inspired by the instructable by Piney https://www.instructables.com/id/Raspberry-Pi-Wall-...)

Step 1: The Hardware

This is the hardware setup.

  1. Find a LCD laptop screen . Order a controller board on Ebay. Search for LCD Controller Driver Board and the serial number of your laptop screen.
    Read more: https://www.instructables.com/id/Old-laptop-screen-..
  2. Craft a piece of wood. Height should be more than 30mm, so the electronics can fit inside. The width and height depends on the size of your laptop screen, have a margin for an extra 10 mm on all sides. Carve out and make room for the electronics on the back. Drill holes for the buttons and wires.
  3. Fasten the laptop screen. I used the orginal mounting frame from the laptop.
  4. Cut out foamcore with equal thickness as the screen. and glue it on the wooden slab.
  5. Cover all sides with cork. Cut with a “snap-off blade knife” and glue with “glue spray”.
  6. Mount the Push Buttons. Use a large drill, and drill carefully by hand.
  7. Connect the electronics. Connect three of the Push Buttons to GPIO-pins 19/20/21 and to ground. https://ms-iot.github.io/content/images/PinMappin... Find out the pin for On/Off button for the controller board, and connect it with the fourth Push Button. (You will find it by trying to connect ground to each pin, suddenly the LCD will light up). Finaly, connect the HDMI cable between Raspberry and controller board, and connect the screen to the controller board.

Step 2: The Software

The setup is somehow turning the Raspberry Pi into a kiosk. The OS will auto start a website in full screen mode,
and the Push Buttons is used to control the information at the website. The setup is:

  1. Install Raspbain on Raspberry Pi
    (https://www.raspberrypi.org/documentation/installation/noobs.md)
  2. Sign up for a Google Calender. (https://calendar.google.com). Add your upcomming event. Ask for access to your family members calendar, or create a speceific "family calender" and give the rest of the familiy acess to it. Make your calendar more dynamic by adding external calenders. Facebook events, public holidays, and week number has been practical for me. More inspiration here: http://lifehacker.com/the-coolest-things-you-can-a...
  3. Set up a webpage and a webserver
  4. Install a web browser and customize the calendar design
  5. Set up the push buttons

Continue reading for details about 3-5 .

Step 3: Create a Webpage and Webserver

The webpage is the canvas the Raspberry Pi will display. The canvas can be filled with any information. I will show you how i to embed a google callender. The embeed code is generate by googles own aplication. This youtube shows how to get it to work: https://www.youtube.com/watch?v=2tnYwbs-yDk

Google Calendar have built in keyboard shortcuts. Press N and the next month will appear, press P and the previously month is shown. This will only work when the < iframe > is in focus. I have created a JavaScript that ensure that focus is correct.

An example file of html code is attached (change name from index.html.txt to index.html). For privacy, I have replace some of the code with “*___REPLACED___*”. Instead, use the embeed code generated by google.

Either put the index.html file on your own webhost, or turn your Raspberry Pi into a webserver and host it local. If you already have a webhost continue to the next step. Install a webserver by following this guide: https://www.raspberrypi.org/documentation/remote-a... Now save your modifed index.html to /var/www/html/index.html, like this:

sudo cp index.html /var/www/html/index.html

Step 4: Install a Web Browser and Customize the Calendar Design

There a many web browser out there. But I have only find one that can handle these three requirements; 1) can handle the modern version of google calendar, 2) has a full screen mode, 3) can run a local CSS. The local CSS is used to change the appearances of the google calendar. The redesign can’t be done at the webpage, because the CSS are embedded from another server (the google-server).

Install Iceweasel (Firefox for Linux)
https://www.youtube.com/watch?v=69fwZ8yMnz0

Install this extension for Iceweasel:
https://addons.mozilla.org/en-US/firefox/addon/stylish/

Open the “Stylish” extension tab in Iceweasel and customize the CSS to make the google callander look better. Se attached file i for an example.

Now, lets make Iceweasel to autostart and open your webpage at login. Type this in the Linux terminal:

cd /home/pi//.config/autostart
nano cal.desktop 

Write the following to the file. Change "localhost" to adress where your canvas-webpage are stored. Save and exit.

[Desktop Entry]
Type=Application
Name=hemsida
Exec=iceweasel localhost
StartupNotify=false

Step 5: Set Up the Push Buttons

The Push Buttons is used to browse forward and backwards in the calendar month view. By default this is done by pressing “p” and “n” at a keyboard. Therefore the buttons will emulate those two keyboards commands.

First, create a python script to make the push buttons work: http://razzpisampler.oreilly.com/ch07.html

Download and install python-uinput, a python API to create virtual keyboards: http://tjjr.fi/sw/python-uinput/ Raspbian comes with both Python 2 and Python 3. Make sure you install uinput with the version you are using.

Put the uinput-API and the button script together. The final python scipt is attached.

Auto-start the python script on startup: https://www.instructables.com/id/Raspberry-Pi-Laun... Our launcher.sh will look like bellow. Replace “/home/pi/py_switch” to the path where you have stored the python script.

cd /
cd /home/pi/py_switch
sudo modprobe uinput
sudo python switch.py
cd /

That's all!

UPDATE:

The number of possible commands can be extended with some if-else-statements in the python code. I have attached an upgraded switch.py-file in this step. The new is script has the following commands.

  • Press button 1 -> Key press “P” -> Browse previously month
  • Press button 2 -> Key press “N” -> Browse next month
  • Press button 3 -> Key press either "M" or "A" -> alternate between month-view or agenda-view
  • Long-press button 3. -> Key press "F5" -> Reload the webpage
  • Simultaneous press button 1, 2, 3 -> executes the shell command “sudo reboot” -> Restart of raspberry pi.

Comments

author
TheRealEleven (author)2017-07-24

I hope someone can help. I got this up and running with a RPI3, old laptop monitor + controller board with HDMI input. Everything worked perfectly until I assembled it in a frame. Now sometimes (almost every time) that I use the button to turn the monitor off, when I turn it back on, the calendar goes into constant 'next month' mode and won't stop until I pull the wire off the GPIO pins. If I put the wire back on, it continues cycling through the months.

I can't see how this is happening. If I totally unplug everything, starting up the unit again seems fine, but as soon as I turn off the monitor and turn it on again, boom: next month forever.

The monitor power button is not connected at all to the RPI, it's connected directly to the controller board wires for the monitor. The only thing that connects the two pieces together is the HDMI cable. Is there any way that info is being relayed from the controller board back to the RPI that would affect the python script waiting on button presses?

Also, I used Chromium and for the life of me I cannot find the right setting or command line parameter to prevent it from trying to restore previous sessions when I crash or have to reboot from SSH. It always prompts with the 'some tabs did not close, want to revert' message. Any help there?

author

(EDIT) I closed the browser, opened up a text editor and then tried turning the monitor off and on, and somehow it is actually returning a keystroke. In that case, it returned a P in the text editor. Same result after several attempts. How can the monitor being turned off and on be interpreted as a keystroke? Has to be related to the python script constantly waiting on a keypress, but I don't know how or why.

author
KevinC300 (author)2017-07-16

I was able to make the calender web sever however it in another language. Dose any one know how i can change it to English

author
MichaelK488 (author)2017-06-23

Hi

I'm not very bright when it comes to electronics... Would somebody be willing to show me how to cable up the four horn buttons? I have exactly the same ones as in the photos above but I can't quite make out how they are attached. Or if anybody has another way of doing so, could you show me with some really clear pictures? Thank you so much :)

author
JeffPNJ (author)2017-05-05

Anyone else having problems with the hotkeys not working anymore? I had the project 90% completed a few months ago and then when I went back to it the hotkeys (buttons I used or the keyboard) no longer change the months back and forth. When I go to the address on my pc I am able to use the hotkeys but not on Iceweasel or Chromium. Any ideas? They did work a few months ago I don't know if something changed with an update or an upgrade

Thanks for any tips

author
BlaineE1 (author)JeffPNJ2017-05-06

I'm having the same issue with hotkeys not working on an embedded calendar.

author
JeffPNJ (author)BlaineE12017-05-07

I guess thats good news. Its not just me. I put a ton of work into the display. My button box is made from marble and I have a 7" screen. It looks real nice but there is no point in having the buttons if I can't go back and forward. I sent a message to the author but have not heard back yet. I will let you know if I do. Its frustrating because I know they did work at some point.

author
Shamgar_BN made it! (author)2016-05-25

I made one for my wife's birthday since she's the organized one in our family. Built a custom frame and hung it on a wall painted with chalkboard paint (I'll be running a recessed power outlet up behind it soon to hide the cord). I am really happy with how it turned out.

From top to bottom:

- Static Image (I was still working out spacing, so this image is a little squished, but we'll address that later)
- Date/Time display
- Google Calendar (I blurred that junk out to keep you creepers from creepin')
- Weather forecast app from forecast.io
- Instagram feed from Snapwidget.com
- News reader that features World, Local, and Sports news
- Random quote generator (I store about 150 quotes locally on the Raspberry Pi's SD card. It's a massive overkill 16 GB, so I've got plenty of space to add more later. Also, I've got plans to add some buttons, voice command, and music player in the future, so I decided to start out with a ton of storage space into which I can grow.)

IMG_4317.JPGIMG_4316.JPGIMG_4136.JPG
author
MaryO70 (author)Shamgar_BN2017-04-12

Any chance you could post or send me the code you used for your version?

author
MriP (author)Shamgar_BN2016-11-28

Can you able to share your date and time code please?

Thanks

author
teamlkc (author)Shamgar_BN2016-09-08

I'm very impressed with what you have done here. I am not nearly as technical as you all but I have a couple of questions: 1) Can this be set-up with Apple Calendar? 2) is there something out there that I can buy that will do what you all are doing?

author
StewartP3 (author)Shamgar_BN2016-08-31

This looks great! I'm well on my way to completing this project - I've removed the LCD bezel and it's ready to be put into a frame like yours. How did you attach the display to the frame? I can't really tell from the picture.

Also, is the front of the frame one single piece which has been routed, or is it four seperate pieces with miter cuts?

Thanks!

author
Shamgar_BN (author)StewartP32016-09-06

You've pretty much got it... I made the frame first, used my router to cut in on the back of the interior lip of the frame, giving the frame just enough of a track to sit down into. I didn't use miter cuts, I actually just squared it off, making sure the box supported the frame across the square cuts. Since I was painting it, the cuts on the frame didn't matter all that much, so I didn't bother with the miter saw. The screen is held in place at the corners. This is probably the place where I could have spent more time/money getting it right, but I found that the screen almost wanted to stay in the track on its own. I used picture hangers tacked across all four corners and that is plenty secure.

author
StewartP3 (author)Shamgar_BN2016-09-07

Thanks! I'm giving this a go this week. I had a chop saw set to 45deg for the mitre cuts, but it was about a degree acute, so they didn't match up. I've just bought a mitre box, so will be trying it by hand this time around.

I'll post pics if successful! :)

author
iona5 (author)Shamgar_BN2016-05-30

How you hang it to wall?

Which material is the frame?

author
Shamgar_BN (author)iona52016-09-06

It's just pine boards I bought at the local hardware shop. It's premium boards, but since I painted it, anything would have worked with enough sanding. If I were going to build it again with just stain, I might use something that looked nicer, but paint covers a multitude of ugly spots on pine

author
ddevalco (author)Shamgar_BN2016-08-11

Anyone have the necessary code (redacted of course) for this particular build? It's got quite a few elements I like. In the process of making my own and trying to work out the best way to include elements such as these.

author
Bigsease30 (author)Shamgar_BN2016-08-06

@Shamgar_BN Do you mind sharing your code?

author
astralplaydoh (author)Shamgar_BN2016-06-29

Looks fantastic. I was able to mimic most of it, changing things where I wanted to. What did you use for your date/time? I've been trying to find some decent widget or javascript but I can't find anything good enough.

author
iona5 (author)Shamgar_BN2016-06-12

Can you upload all index?

author
MrDoreth (author)Shamgar_BN2016-05-29

This one looks really smooth. I'm stuck on mine because of the webpage being too ugly.

author
AnthonyB183 (author)Shamgar_BN2016-05-28

I really like this is there any way you could post your code?

author
MaryO70 (author)2017-04-12

Does anyone have a github of their code? I'd love to take a look at how other people are setting their webpage/webserver up

author
tangozulu10 made it! (author)2017-04-08

I made this but used Dakboard on Chromium, and initialized kiosk mode.

20170408_002948.jpg20170408_002940.jpg20170407_172005.jpg
author
ChadE22 (author)2016-12-07

So I am limited tech but as a teacher I have access to a vast number of students that could help with the tech aspect. What platform did you use for the webpage? I am confident in the building aspect but could use a little guidance on the webpage aspect.


Thanks!

author
dannyk6 (author)ChadE222016-12-12

Hi, if you're just looking for the webpage, take a look at DAKboard (http://dakboard.com). It has all the functionality here, and adds RSS news feeds and photos!

Hope that helps!

author
tangozulu10 made it! (author)dannyk62017-04-08

Great suggestion. I tried this project and used DAKboard and I got it up and running with minimal hassle.

20170408_002940.jpg
author
dhuss (author)dannyk62017-01-16

This is real nice. It's always the calendar that gets me because I can't for the life of me figure out why in the age of digital calendars everyone insists on displaying previous days and weeks in their default views... The fact that your monthly view starts at the current week and goes forward is excellent. I'm a fan of the 7-day custom view in Google calendar so thumbs up. The only other suggestion I have now would be to integrate some more To-Do providers (I'm personally on Toodledo). But since the To-Do functionality seems new, I'd guess that might still be a work in progress.

author
LouisS69 (author)2017-03-15

Fantastic project, I am going to dive into this myself as my first RP project!
Can anyone tell me an approximate timeframe for the build?

author
StM7 (author)2016-12-29

I have only one question - with a touchscreen I am not able to
modify anything. Yes, I can click on events that had been created in the
Calendar before but if I want to create a new event without going to
the button Create in Google calendar, I cannot do it. If I click on,
let's say, today's date, nothing happens. Going through Create button in
Google Calendar will. On Android it works either way. Do you know how
to resolve this problem? Maybe certain settings in the Calendar, even
though I have a touch screen at work and it works in Windows without
problem but in Iceweasel on Raspbian it is not. Thank you

author
The Arbiter (author)StM72017-01-01

It looked like it had USB ports. How about a small USB Bluetooth dongle and a blue tooth keyboard. I have a Bluetooth keyboard for my Android tablet and it is wonderful, but I can cut it off and stick it on a shelf. If you only need to make changes occasionally, this may be the way to do it.

author
IanB211 (author)The Arbiter2017-03-04

Bonus: the Pi 3 has built-in Wifi and Bluetooth.

author
fgeer (author)The Arbiter2017-01-01

Why not hang your desktop against the wall! Keep it only a screen or you lose the meaning of this idea!!!

author
The Arbiter (author)fgeer2017-01-01

Well, no. Since he was having trouble modifing the contents with only a touchscreen, keeping it only a screen would not be an interactive wall display, it would be an electronic picture frame. By using a blue tooth keyboard, he can make the changes needed or wanted, then put away the keyboard, leaving only the screen. If I do this project, which I may, I will probably use the keyboard and maybe even a BT mouse for information management.

author
kuptis (author)The Arbiter2017-01-08

Instead of connecting a mouse and keyboard why don't you just setup a remote desktop on the RPi and connect to it over the network? (https://www.element14.com/community/docs/DOC-78170/l/connecting-to-a-remote-desktop-on-the-raspberry-pi)

author
TheMiddle36 (author)2017-02-13

if anyone is still having problems with calendars, look at fullcalendar.io it's very good with loads of configurations and flexibility

author
mateus romao da silva (author)2017-01-25

Does the LCD stay touch?

author
MartinusM (author)2017-01-20

I see a lot of nice examples on how people made this.

Am planning myself also to make it, but i wonder what screen size is most common to use ? how much inch ?

author
aarnell (author)2017-01-02

Why did you go through the effort of configuring a web server? Won't the browser properly display a "webpage" that is locally stored? Don't get me wrong, this is a beautiful idea. I like the interactiveness afforded by the buttons and will most likely follow(steal) your programming if I can convince my wife that we need this in our home. :)

author
TheMiddle36 (author)aarnell2017-01-13

I was wondering this too. If it's all stored locally, surely the performance will be better? I still need wifi for external JS libraries, which might also dictate the need for my index.html to be on a web server

author
TheMiddle36 (author)2017-01-07

​I'm making this.
I've had a good read of the comments and can offer the following:
For calendar, consider www.fullcalendar.io when used with iCalendar2FullCalendar this allows you to link with ICloud calendars. I have this working, simply created shared link for my calendar and now when i create an event on my phone, it's on my webpage too!


http://blog.darksky.net/forecast-embeds/ for weather, but struggling to change the font and icon colours.
I've also created moveable and resizable post it notes that can be drawn on using the touch screen from here: https://zipso.net/a-simple-touchscreen-sketchpad-using-javascript-and-html5/
Next is a photos module and live traffic map. Probably this one: http://www.jqueryscript.net/gallery/jQuery-Draggable-Rotatable-Photo-Viewer-Polaroid.html

I might add random quotes, and news if i can find a display I like.

Lastly, has anyone got an iOS style clock?

author
AndyK33 (author)2017-01-04

I got the hardware all set up, when trying to get iceweasel it keeps getting a 404 not found. is there something I am missing or is there another way to do it?

author
EricF52 (author)2017-01-03

So i just realized the old HP laptop screen i have is complete crap when i turn it to be portrait like in the pictures. How hard would it be if the design was in landscape to use the weather widgets etc?

author
StM7 (author)2017-01-03

Thank you for your suggestion. I have to have a touchscreen. Just having a keyboard and mouse for example will not going to resolve my issue.

author
ktbffh2815 (author)2016-12-02

For those who completed their calendars using buttons. In my research I've been seeing a lot of folks saying pull up resistors are needed when using momentary button switches. Can anyone confirm this? Has anyone used them? Many thanks.

author
frarugi87 (author)ktbffh28152017-01-02

You always need pull-up (or pull-down) resistors when using *PST (SPST, DPST,...) switches (and usually momentary switches are SPST), because you need a way to force another value when the switch is not pressed. BUT, if you look at the switch.py or the switch-extended.py scripts, you will see that in the GPIOs initialization he wrote pull_up_down=GPIO.PUD_UP. This means that he enabled the INTERNAL pull-up resistors (yes, the rPI has internal pull-up and pull-down resistors). So you don't need external ones. See this link for further infos: bit.ly/2iYm9k8

author
woodbywright (author)2016-12-26

Such a sweet Idea! I love it!

author
baumansp (author)2016-12-12

?Hello,
Thanks for the scripts, may I suggest to add an extra time.sleep(0.1) at the very beginning of the loop ? otherwise your processor ( top ) will be almost 100% dedicated to run the python script ...


cheers !

author
ChrisH615 (author)2016-11-12

I was so taken with this i quickly put together a DAK board and mounted it in the kitchen on night while the wife was out. Short story is that Wife Approval Factor is extremely high and approval has been given for the "full" version.

i love the extensions that people have done to this and i will be using all of them!

I have an idea fro another 'extension, to add to my calendar, will keep you posted. actually i will probably be asking here for help to make it work!

thanks again!