loading

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 http://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: http://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: http://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.
<p>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.</p>
<p>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.</p><p>From top to bottom: </p><p>- Static Image (I was still working out spacing, so this image is a little squished, but we'll address that later)<br>- Date/Time display<br>- Google Calendar (I blurred that junk out to keep you creepers from creepin')<br>- Weather forecast app from forecast.io<br>- Instagram feed from Snapwidget.com<br>- News reader that features World, Local, and Sports news<br>- 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.)</p>
<p>Can you able to share your date and time code please?</p><p>Thanks</p>
<p>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?</p>
<p>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.</p><p>Also, is the front of the frame one single piece which has been routed, or is it four seperate pieces with miter cuts?</p><p>Thanks!<br></p>
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.
<p>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.</p><p>I'll post pics if successful! :)</p>
How you hang it to wall?<br><br>Which material is the frame?
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
<p>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.</p>
<p>@Shamgar_BN Do you mind sharing your code? </p>
<p>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.</p>
<p><a href="http://time.is/widgets/California_City" rel="nofollow">http://time.is/widgets/California_City</a></p>
<p>Can you upload all index?</p>
<p>This one looks really smooth. I'm stuck on mine because of the webpage being too ugly.</p>
<p>I really like this is there any way you could post your code?</p>
<p>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 &quot;full&quot; version.</p><p>i love the extensions that people have done to this and i will be using all of them!</p><p>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!</p><p>thanks again!</p>
<p>I'm making this to have a use for an old Pi B board that I just can't bring myself to throw away. I picked up a driver board, traced down 5 VDC and ground, and connected it to the pi for power there. Overall things are working really well on the bench (okay - the footstool :)), so now it's woodworking time. <br><br>My question is - has anyone made the python code for the buttons work any more efficiently? It's taking up around 50% CPU, and I'd really like to cut that down. I already had to switch from Iceweasel to Epiphany for performance reason, which was working fine with me. That such a simple piece of code is strangling the CPU is concerning, but despite having passed a Coursera class in python programming - I know when to admit I'm in over my head and tweaking python is a weakness of mine. </p>
<p>I haven't looked at the code, but if the python is just looping forever waiting for a keypress, you may want to add a sleep command in there to let the other threads have some CPU.. That could be the problem there.. I've seen similar on other projects..</p>
<p>Wondering how things are coming with this. I too am trying to figure out a way to keep my Pi 1 B alive and this seemed like a good idea. I've only just begun and installed the latest version of Raspbian. Both IceWeasel and Epiphany spike the cpu to 100%. Any browsing activity spikes the cpu to 100%, so you can imagine it took a while to get to Goggle Calendar and once there the hot keys (M/A, N, P) were slow to respond. I'm wondering if I just have too high of expectations since it's an old Pi 1 B or if you have made any tweaks (overclocking, etc.). Thanks!</p>
I used a Pi B+ board for a while, and I had inconsistent loads of the web page info. Like you my board was always pegged at 100% CPU, and it just didn't respond well. <br><br>The reason I used the Pi B+ board in the first place was that I couldn't bring myself to throw it away, and in the end that was kind of a curse. One day I looked at the unused Pi 2 board I had, gracefully shut down my pical, snapped the Pi B+ board in half so I'd not be tempted to use it again, and replaced it with the Pi 2 board. Since then it always loads correctly, and the previously static weather map was animated. That was a surprise because it hadn't been before, which tells me that the system was trying to animate it but the pegged CPU just couldn't handle the load for that simple animation. <br><br>I totally get you wanting to use the Pi B board because I was in your shoes. If you can spare the dough for a Pi 2 or 3 board though, my advice is to ditch the Pi B board.
<p>You just saved me a lot of time. I tend to get a little stubborn when I think there's a chance I can make something work, so thanks for the reply. Pi 3 it is. Take care and thanks again.</p>
<p>You and me both, ad you're very much welcome. I hated to see that Pi B+ just sitting around doing nothing, and snapping it in half was the only way to make sure I wasn't in this same boat with another project later. You won't regret using a Pi 3 with this. </p>
<p>Can you upload all index?</p>
Can't really upload my whole index.html as it has the Google info linked to my personal calendar. :)<br> <br> However, I have updated how my piCal looks / works. I found the previous weather radar to occasionally cause resource issues because it was trying to do animation. To eliminate that, I have a script that I created (/usr/userscripts/radargrab) downloading the NOAA radar for my area every five minutes, and then changing the size of the picture to match what I want on my screen. I then updated my index.html to just grab that image.<br> <br> Here's my index.html, less the calendar info:<br> &lt;html&gt;<br> &lt;head&gt;<br> &lt;meta http-equiv=&quot;refresh&quot; content=&quot;900&quot;&gt;<br> &lt;script&gt;<br> <br> function setFocus() {<br> &nbsp;&nbsp;&nbsp; var iframe = document.getElementById(&quot;calender&quot;);<br> &nbsp;&nbsp;&nbsp; iframe.contentWindow.focus();<br> }<br> <br> <br> &lt;/script&gt;<br> &lt;/head&gt;<br> <br> &lt;body onLoad=&quot;setFocus()&quot;&gt;<br> &lt;br&gt;<br> &lt;iframe INSERT YOUR CALENDAR CODE HERE id=&quot;calender&quot;&gt;&lt;/iframe&gt;<br> &lt;br&gt;<br> &lt;iframe style=&quot;align:left&quot;id=&quot;forecast_embed&quot; type=&quot;text/html&quot; frameborder=&quot;0&quot; height=&quot;245px&quot; width=&quot;750px&quot; src=&quot;http://forecast.io/embed/#lat=35.2670&amp;lon=-81.1016&amp;name=Lowell,NC&amp;color=#00aaff&amp;font=Georgia&amp;units=us&quot;&gt; &lt;/iframe&gt;<br> &lt;br&gt;<br> &lt;img src=&quot;radar.jpg&quot; alt=&quot;Local Radar&quot;&gt;<br> &lt;/body&gt;<br> &lt;/html&gt;<br> <br> Here's the script I have running every five minutes:<br> #!/bin/bash<br> <br> cd /var/www/html<br> rm -f radar.jpg clt.gif<br> wget -q http://images.intellicast.com/WxImages/Radar/clt.gif<br> convert clt.gif -resize 745x450! radar.jpg<br> <br> I then added this to root's crontab:<br> */5 * * * * /usr/userscripts/radargrab<br> <br> I like how it works, and my piCal seems to have gotten some attention. My girlfriend has officially asked me to make her a piCal for her use. &quot;Sure, find me a working laptop screen&quot; was the reply she received. :)
<p>Hi Wonder if you can help me. Built me a raspberry pi3 calendar as per instructions using the latest raspbian jessie with chrominum and used your code to get my google calendar code. Placed it between the iframe brackets and run. Cant get my calendar to load but your weather app loads fine. HELP Please</p>
<p>Hey wood70 - Run through everything in Step 3 and you should be fine. That's what I did, and then I tweaked the weather forecast and radar from there. </p>
<p>Sorry about the late reply. Done what you said and if by magic up came my calendar. Now to play around with it. Thanks</p>
Perfect! Thanks men, i want to integrate a clock but i have some problem.<br><br>When i edit the index and insert clock code, i go to my web and the calenfar open but then it dissapears and then only shows clock....
<p><a href="http://time.is/widgets/California_City" rel="nofollow">http://time.is/widgets/California_City</a></p><p>You can type in the city name in the upper right corner (search icon) translate the page so you will see it in English.</p><p>This works perfectly for me</p>
<p>Thanks men!</p>
Here's what my new index.html looks like when combined with the script I wrote and the cron job.
<p>How you connect raspberry to controller for power?</p>
I just traced out some of the connectors on the driver display board, cut up a USB cable, and soldered them in. After that, it was just a matter of plugging the pi into it.
<p>FYI, your high cpu usage is caused by a bug in iceweasel.. If there are any animations on a screen it will eat up processor. I've been playing with a few options just because I don't want my pi running at 50% all the time. I'll post something once I get it, but it'll most likely just be a different forecast embed. </p>
<p>I deleted all unnessacry files and just started from ''scratch'' My Pi B+ couldn't run Iceweasal because of it being too big.</p>
<p>Yeah, same here. Had to go with Epiphany on my B board above. </p><p>It has occasional issues loading things, but a refresh fixes them. </p>
<p>Thanks for the heads up on this. Sucks to hear it because I've been working on a hybrid page that uses JavaScript to switch between the weather radar and a Google traffic map periodically. Any suggestions for performance improvements that could be made would be appreciated.</p>
<p>Where could I buy that usb cable you have connected to your controller board? And did you solder it onto the board? </p>
<p>I just bought a cable from a dollar store, cut the end off, traced the wires to make sure which were the wires I needed and soldered accordingly. </p>
<p>I'm working on mine and trying to power it using a similar method. I found a spot that provides 5 VDC all the time whether the monitor is powered on or not, so I could easily solder a power cord to that, I'm just if it will provide enough amps for the Pi3. I read somewhere that the Pi3 really only peaks out at about 800ma, but I'm not sure how much this circuit is built to handle. It's basically the power connector from the main board of the monitor (that powers the led's) to the video controller board. Anyway, I suppose I could just try it, and I'm sure it will work, just not sure if the Pi3 is going to draw too many amps at any given time. </p><p>It really won't ever have anything plugged into the USB ports, but I think I want to put ports on the side in case I ever need to connect a keyboard and mouse to it. Otherwise, that would be all it would power.</p><p>Oh and this is from an LCD monitor, not a laptop monitor.</p>
<p>Where could I buy that usb cable you have connected to your controller board? And did you solder it onto the board? </p>
I bought a super short cord on eBay for $4.25. Here's the link for the one I got. (I'm not affiliated with them in any way.)<br> <br> <a href="http://www.ebay.com/itm/301482963024?_trksid=p2057872.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AIT" rel="nofollow">http://www.ebay.com/itm/301482963024?_trksid=p2057872.m2749.l2649&amp;ssPageName=STRK%3AMEBIDX%3AIT </a><br> <br> Yes, I found a spot on the monitor driver board that had +5VDC regardless of whether the monitor was on or not, so I cut a cheap USB cord and soldered +5VDC and ground onto the controller board. That way I only had to run one power cord to my piCal instead of two.
<p>Where could I buy that usb cable you have connected to your controller board? And did you solder it onto the board? </p>
<p>Can you post your entire HTML file? I really like the look of that..</p><p>Also, what size monitor is your setup?</p><p>Thanks!</p>
Actually, there's not much to post that's different aside from the weather radar. It's just the code for the Google Calendar, the repurposed code for the weather stats that ouza posted in his index.html example, and the snippet of code above for the weather radar.<br> <br> As for the screen, it's an HB156WX that I pulled out of a very dead Toshiba laptop that my girlfriend had. (Note to self: Girlfriend Hulk-smashed a misbehaving laptop. Might want to avoid getting her too angry.) :)
<p>Thanks for the reply.. So is the screen you are using a 15.6&quot; with a 1280*800 resolution? </p><p>I'm just trying to get a feel of what can fit and how it would look on what size screen.</p><p>Thanks</p>
<p>I think I've got it in 1366x768 resolution, but I can look it up once I fire it up again. I have everything to get it mounted and hope to assemble everything together. <br><br>Don't get me wrong - it looks good on the foot stool and all, but I'd prefer it on the wall. ;)</p>
<p>Where did you get the html embed for the weather radar? I have been looking around but don't see anything for that part of it.</p>
<p>I forget exactly how I found it, but this is the code from my page:</p><p>img src=&quot;http://www.adiabatic.weather.net/cgi-bin/razradar.cgi?zipcode=28098&amp;width=750&amp;height=450&quot; width=&quot;750&quot; height=&quot;450&quot; alt=&quot;Local Radar&quot;</p><p>Place appropriate brackets around it when you use it. If I included those, it wouldn't let me paste the code in. :)</p>

About This Instructable

312,464views

2,163favorites

License:

More by ozua:Raspberry Pi: Wall Mounted Calendar and Notification Center 
Add instructable to: