Raspberry Pi Google Wall Calendar Project

Raspberry Pi Google Wall Calendar Project

Revised: 1-12-2017

Pi - Front

Project Background:

I’ve been hearing a lot about Raspberry Pi’s lately and thought it was time for me to get in on the action to see what they are all about. Before starting in on this endeavor, I had a general idea of what a Raspberry Pi was, but I had no idea how awesome they are or what really could be done with them.

For those of you that don’t know what a Raspberry Pi is, it’s basically a very small, low cost computer (approx. $35) that can do amazing things.  You can use them for almost anything, such as high altitude photography, learning to program, home weather stations, time lapse video recorders, mini arcade cabinets, thin clients…. You are essentially limited by only your imagination.

To begin learning more about them, I started off by going to raspberrypi.org. It’s the homepage of the Raspberry Pi Foundation, which oversees it’s development. It’s a great place to start learning all about them. They have recent news, project ideas, operating system downloads, user forums, teacher resources and a lot of great documentation.

One of my goals recently has been to get more involved with Linux and learning more about the Raspberry Pi’s goes hand-in-hand with that, being that the default operating system for them, Raspbian, is Debian Linux based. From my experience, you’ll want to have a good basic understanding of Linux to get the most out of them.

Once I felt I had a good understanding of Raspberry Pi basics, I began to search for project ideas. A very helpful website for project resources and ideas is http://www.instructables.com/id/Raspberry-Pi-Projects. It’s the site I used to get a lot of information for this project.

After searching through many different projects, I decided to build a Google Wall Calendar, as gift for my girlfriend Mary. I have a standard wall calendar in my kitchen, but it seems so limited, since I mainly use my Google Calendar for everything.

With Google, you can store all calendar events there and sync everything across all of your devices. I thought it would be very useful and would make a nice conversation piece. If you wanted, you can easily modify this project to display anything you wanted. As you’ll see below, I modified the calendar to display the weather as well.

 

Raspberry Pi 3 Media Center Kit:

To complete this project, I first needed a Raspberry Pi so I ordered a Raspberry Pi 3 Media Center Kit from Vilros on Amazon.com. I chose this kit because I liked how it came with everything I needed to get started, such as an SD card, HDMI cable, and case. Below is a link to the kit I purchased, along with detailed specifications.

Pi - Media Center Kit

Raspberry Pi 3 Media Center Kit Details:

Product Website: http://www.vilros.com/raspberry-pi/raspberry-pi-kits/raspberry-pi-3-media-center-kit.html

IMPORTANT: The included 8GB SD Card in this kit allows the Raspberry Pi to operate with OSMC (XBMC)–RASPIAN & OPENELEC ONLY—-This Kit Will Not Operate with Windows 10 IoT

Build a Raspberry Pi Media Center With This Raspberry Pi Media Center Kit from Vilros.

The Kit includes the new Raspberry Pi 3 Model B (Latest Version Released on 02/29/2016)

Raspberry Pi 3 Model B Technical Specifications:
• Broadcom BCM2837 64bit ARMv8 Quad Core Processor powered Single Board Computer running at 1.2GHz
• 1GB RAM
• BCM43143 WiFi on board
• Bluetooth Low Energy (BLE) on board
• 40pin extended GPIO
• 4 x USB2 ports• 4 pole Stereo output and Composite video port
• Full size HDMI
• CSI camera port for connecting the Raspberry Pi camera
• DSI display port for connecting the Raspberry Pi touch screen display
• MicroSD port for loading your operating system and storing data
• Upgraded switched Micro USB power source (now supports up to 2.4 Amps)

Kit Content:
Raspberry Pi 3 Model B
Raspberry Pi Enclosure Case (Clear)–Includes Mounting slot and screws for a raspberry pi camera module (the camera module is not included in this kit)
8GB Micro Sd Card Pre-loaed with NOOBS
SD card Adapter
2500 mA Micro USB Power Supply — 5-Feet Long
High Quality HDMI Cable
Heat-sink for Raspberry Pi – Set of 2 Heat Sink
Vilros Raspberry Pi 3 Quick Start Guide

Additional Project Items Purchased Separately:

Assembling the Raspberry Pi 3 Starter Kit:

Please watch the video below to view the initial setup of the Raspbery Pi kit.

 

Setup Instructions:

These instructions will provide you with the necessary steps to setup a Google Wall Calendar using Chromium, which is the open source web browser Google Chrome is based on. More information on Chromium can be found at www.chromium.org.

  1. The first step is to install the Raspbian operating system. If you are using the Raspberry Pi kit, power on your device then use the pre-loaded NOOBS (New Out of Box Software) tool to install it. Additional information on the NOOBS setup can be found at  www.raspberrypi.org/help/noobs-setup.

2. After you’ve booted to the desktop, configure localization options. Click the Menu button, go to Preferences, select Raspberry Pi Configuration, then click the Localization Tab. Here you can set your Locale, Timezone and Keyboard layout.

Pi - Localization Setup

3. Connect your Raspberry Pi to the Internet using either the LAN port or the wireless card. For a wireless connection, click the wireless icon on the toolbar then select your wireless network. In my setup, I’ve used a wireless connection.

Pi - Wireless

Note: Not all Raspberry Pi models have built-in wireless.

4. Before you go any further, you may want to determine your Raspbian OS version. These instructions are mainly based on Raspbian Jessie with Pixel, since it comes with the Chromium web browser. Other OS versions may not work. In order to find the version, enter the following from LXTerminal, which is the default terminal (command-line) application in Raspbian. LXTerminal can be launched from the taskbar at the top of the screen.

Pi - LX

cat /etc/os-release

Pi - Version

5. Update your system’s package list.

sudo apt-get update

Note: For those of you not familiar with Linux, the sudo command allows you to execute commands as a superuser, which has full administrative rights to a system. Here, it is being used to run the package handler apt-get, to download and install package updates.

6. Upgrade all your installed packages to their latest versions. When prompted, enter “Y” to continue.

sudo apt-get dist-upgrade

Pi - Upgrade

7. Restart your Raspberry Pi.

Pi - Reboot

8. Launch Chromium, then sign into your Google Calendar by going to https://calendar.google.com.

9. Disable the session restore bubble UI by going to chrome://flags then changing the Enable session restore bubble UI option to Disabled. This will stop the session restore bubble from showing up if Chromium crashes, such as during an improper shutdown of your Raspberry Pi.

Pi - Chomium Setup

10. Open the Raspberry autostart configuration file by entering the following from LXTerminal.

sudo nano /home/pi/.config/lxsession/LXDE-pi/autostart

Note: For those of you not familiar with Linux, the sudo nano command is essentially launching the nano text editor as the superuser in order to edit the autostart file.

11. Setup Chromium to auto start in kiosk mode with error dialog boxes, the session crash bubble and info bars disabled, by entering the following line in the autostart file. If you don’t disable info bars, Chromium, will display a yellow info bar at the top of the screen after an improper shutdown of your Pi or if the browser crashes.

@/usr/bin/chromium-browser –noerrdialogs –disable-session-crashed-bubble –disable-infobars –kiosk http://localhost/cal.html

Note: The http://localhost/cal.html address is used to load the customised website file hosted on your Pi, which you’ll be setting up in later steps. 

12. While still in the autostart file, enter the following to configure monitor display settings. Your autostart file should look like the screen shot below once you are finished. Press Ctl + X to exit. Press “Y” to save the changes, then press Enter.

@xset s off

Disable screen saver

@xset -dpms

Disable DPMS (Energy Star)

@xset s noblank

 Disable blanking the video device

13. Install Unclutter to remove the mouse cursor from the screen.

sudo apt-get install unclutter

Pi - Unclutter

14. Install the Apache web server package using the command below. We’ll need it for hosting a custom webpage to display both the Google Calendar and weather forecast.

sudo apt-get install apache2 -y

Pi - Apache Install

15. Change ownership on the /var/www/html folder so that the default pi user account has write permissions. This will allow you to create a .html file in the directory for the webpage we’ll be creating.

sudo chown -R pi /var/www/html

Pi - chown

Note: If you need additional help with creating or editing file/folder permissions, please refer to this site for additonal information. https://www.raspberrypi.org/documentation/remote-access/web-server/apache.md

16. Browse to the /var/www/html directory by using the File Manager. Right-click in the folder, go to Create New… then select Empty File.

Pi - Cal File

17. Name the file cal.html (or anything you like), but be sure to use the .html extension in the file name and be sure it matches the file name in step 12.

18. Open the file and this will launch the Leafpad text editor. Enter the following into the file then save and close it. Your file should look similar to the screenshot below.

Pi - Cal Config

<meta http-equiv=”refresh” content=”900″>

Description: This is for auto-refreshing the page after 900 seconds (15 minutes).

<iframe src=”https://calendar.google.com/calendar/embed?src=whutskycalendar%40gmail.com&ctz=America/New_York” style=”border: 0″ width=”1254″ height=”768″ frameborder=”0″ scrolling=”no”></iframe>

Description: This is the embedded calendar code from Google. It can be obtained from your Google Calendar settings page. The width and height options can be changed depending on your monitor size and display options.

<iframe id=”forecast_embed” type=”text/html” frameborder=”0″ height=”240″ width=”100%” src=”http://forecast.io/embed/#lat=40.4383&lon=-79.9975&name=Pittsburgh, Pennsylvania”> </iframe>

Description: This is the embedded code for the weather. I got it from forecast.io, which has very nice weather information you can embed on websites. You’ll want to customise the coordinates and location name, depending on where you live. Please be sure to use valid coordinates for your location or the weather data will not display.

Coordinates must be obtained from the National Weather Service at www.weather.gov, if you are from the United States. I believe this is because forecast.io pulls its weather data from them. If you search for your location, the appropriate coordinates should display for you under where it says “Current Conditions at”.

19. Reboot/power-cycle your Raspberry Pi and test to ensure the calendar loads properly.

Note: You may want to pull the power while it is on to see how it loads back up to ensure everything automatically loads properly. 

20. All finished!! *celebrate* If you need to do a celebratory safety dance for completing this project, here you go.

 

Project Notes:

Originally, I was only going to setup a calendar, but thought having the weather along with it would be a great feature to add and I’m glad I did it. I searched many different website for a nice weather display and thought that the one offered by forecast.io was the best looking one available for my needs.

For easy remote access to my device, I installed xrdp so that I could RDP into it from other systems at my house. This makes it very convenient to make changes to it without using a mouse/keyboard connected directly to your Raspberry Pi.

Pi - xrdp

I secured Raspberry Pi and cables behind the a monitor using Velco tie wraps then attached an arm mount to the monitor.

Pi - Back

Tip: Once you are finished getting everything setup, I recommend creating an image file of your SD card. If something were to happen to your card or device, you can quickly restore everything from the image back up file. There are a few ways to do this, including using Win32DiskImager.

Special Thanks:

I was only able to figure out how to put together a lot of this project by standing on the shoulders of some giants. I want to give a lot of credit to Piney and Ozua from Instructables.com for much of the information that went to this project and Nick Heath from TechRepublic.com for providing instructions on getting Chromium to install. Below are links to their pages.

http://www.instructables.com/id/Raspberry-Pi-Wall-Mounted-Google-Calendar

http://www.techrepublic.com/article/five-tips-for-getting-the-most-out-of-a-raspberry-pi-3-as-a-pc

http://www.instructables.com/id/Raspberry-Pi-Wall-Mounted-Calender-and-Notificatio/?ALLSTEPS

Help:

I hope these instructions help you create one of of your own or at least give some ideas for some of the amazing things a Raspberry Pi can do. If anyone has any problems or questions with this project, please feel free to reach me at walter@walterhutskyjr.com.

Proudly powered by WordPress   Premium Style Theme by www.gopiplus.com