Master your day with a Pi-powered organised with Nate Drake
One staple in futuristic films is that everyone has a handy panel on the wall showing their appointments for the day. While we have calendars on our smartphones and tablets, now, thanks to the Raspberry Pi, it’s possible to have an economic wall-mounted calendar in your home or office.
Given that we have just admitted that we could, for instance, use a calendar app on our phones instead, is this just a novelty, or are there any advantages to doing this? Well, mounting your calendar on a wall is certainly more aesthetically pleasing than many smartphones, but the main advantage is that it enables you to share a calendar with others, by putting it in a public place, such as your living room. Your family can see your own appointments, and you can make sure you schedule your commitments around theirs. In the workplace, you can use calendar views, such as Agenda in Google Calendars, to organised meetings and assign tasks to colleagues.
CRAFTING YOUR CALENDAR
For this project, you need a Raspberry Pi with Internet access [Image A]. In the interests of saving on cabling and space, it’s best to use the Raspberry Pi 3, which has integrated Wi-Fi.
You also need to choose a monitor. One excellent option is the Official Raspberry Pi Touchscreen Display (see ‘Choosing a Monitor’, opposite) but any compatible monitor will do. This isn’t a DIY tutorial, so please only attempt to mount the Raspberry Pi and display if you are comfortable with using a drill and installing brackets. If the display comes with a stand, there’s no reason it can’t be placed on a desk or table.
This is also a good time to start measuring cable lengths, so you can be sure both the monitor and the Pi will have power wherever they’re mounted.
Once your equipment is in order, you need to consider the type of calendar you wish to use. If you and your family or colleagues already have a calendar you share, you can start following the tutorial right away.
If that’s not the case, you may wish to create a single calendar for this purpose. If you’re using Google Calendars, you can follow the steps at support.google.com/calendar/answer/ 37095?hl=en to do this. For Mac users, visit support.apple.com/kb/PH2674? locale=en_AU to create a new iCloud Calendar. Outlook users can also create a calendar by visiting calendar.live.com.
It’s not particularly important which calendar service you use, provided it can be displayed in Mozilla Firef ox, which we’re using for this project. Try to give the calendar a distinctive name, such as ‘Smith Family Calendar’, so everyone using it knows it’s distinct from their personal calendar.
If you do have an existing calendar, you may wish to import your personal appointments, birthdays and so on into the new one. It may not be necessary, because providers such as Google and iCloud allow multiple calendars. Events are color-coded to show which calendar they belong to [Image B].
However, if one of the people using your new calendar previously used a different platform — for example, you have decided that you will all use a Google Calendar, but one person has been using an iCloud one on their iPhone — you need to import it.
To import events from an iCloud Calendar into Google, first export them into an ICS file by following the steps at support.apple.com/kb/PH11524? locale=en_AU. Then import the file by following Step 2 at support.google.com/ calendar/answer/37118?hl=en.
To export a Microsoft Outlook Calendar to Google Calendar, follow the steps at bit.ly/2cll7IN.
MOM Once you have a single, shared calendar, take some time to set it to a format with which you’re comfortable. Most providers have the option of a daily, weekly or monthly view.
Next, feel free to fine-tune the appearance. You can make changes to the iCloud Calendar — for example, to change the viewable time period — by following the instructions at support.apple.com/kb/PH2678? locale=en_AU.
Google Calendar’s default look and feel is rather spartan. If you would like to experiment with different themes, there’s a number available from userstyles.org/styles/browse?search_ terms=google+calendar. However, you need the Stylish Firefox extension in order to install them, so visit addons.mozilla.org/en-US/firefox/addon/ stylish/?src=ss, then click ‘Add to Firefox’ to install this.
Because you’ll be using a much smaller screen than you’re used to, space will be at a premium, so consider installing the Real Kiosk (r-kiosk, addons.mozilla.org/en-US/firefox/addon/r-kiosk) add-on for Mozilla Firefox. Real Kiosk does what it says on the tin: It’s designed to turn your browser into the equivalent of an internet kiosk.
This means the menus, toolbars and even the right-click function are disabled. The chief advantage of this is that Firefox always opens in fullscreen mode, making your calendar much easier to see. This also makes sure your device can only be used as a calendar, because people trying to view other websites are bounced back. If you do need to close down Firefox for any reason, you can do this by connecting a keyboard, holding down the Alt key, then pressing F4.
Reading this project so far, it would seem that viewing the calendar in the web browser is a passive experience. However, if you have a central calendar on your wall, wouldn’t it be ideal to let people add and edit appointments as well?
If you are using the official Raspberry Pi Touchscreen Display [Image C], tapping anywhere with your finger simulates moving the mouse and left-clicking in that place. You can use this to edit the time of events, and even create new ones.
Problems may arise when you want to edit the text of events or create names for new ones. Naturally, you could connect a small wireless keyboard, and leave it near the wall-mounted calendar in case data needs to be entered.
A much less clumsy solution, however, would be to have the keyboard built into the browser itself. The Mozilla Firefox extension VKeyBoard [Image D] is designed for kiosk browsers, and pops up when clicked to allow users to enter text.
Simply visit addons.mozilla.org/en-AU/ firefox/addon/vkeyboard/?src=search inside the browser, and click Add to Firefox’ to install. If you have already installed the r-kiosk add-on, and can’t change your web page, restart Firefox in safe mode, as outlined in the instructions at tinyurl.com/apc440-ffsm.
Choosing a monitor
There’s no shortage of suitable small monitors to connect to your Raspberry Pi. If you feel comfortable with a small amount of wiring, the Official Raspberry Pi Seven-Inch Touchscreen Display is the ideal size to display a calendar, as well as having a handy slot at the back to place your Pi. The screen, along with assembly instructions, is available from the Adafruit website (www.adafruit.com).
If you don’t like messy wires all over the place, Amazon sells a short micro-USB power cable, to allow the Raspberry Pi to draw power from the monitor’s USB port.
The Touchscreen Display has the added advantage of enabling you to scroll through appointments with a click of a finger. If this isn’t important, or the display is out of your budget, Amazon and eBay also sell Pi-compatible displays. As the Pi has an HDMI port, any HDMI-compatible monitor will do, but some come with a driver board to allow you to connect it to the Pi’s own DSI port.
If you are very comfortable with electronics, and want to save money, find a broken-down laptop with a working LCD. If you can remove the screen safely and buy a compatible controller board online, it can be made to work with the Raspberry Pi. Visit www.instructables.com/id/Old-laptop-screen-into-Monitor/?ALLSTEPS for some tips.
SHARING THE DATES
If you want to use any device besides the Pi to add or change appointments in Google Calendar, you either need to sign into your Google or iCloud account on that device, or share your calendar with others.
To share your Google Calendar, follow the steps at support.google.com/calendar/answer/37082?hl=en. You can send a link to only certain email addresses, or make the calendar viewable to anyone with the link.
You can do the same for iCloud Calendars by following the steps at support.apple.com/kb/ph2690? locale=en_AU.
If you use Outlook 2010, it’s also possible to publish a calendar to Outlook.com by visiting tinyurl.com/apc440-outlook, and following the section entitled ‘Share a Calendar by Publishing it Online’.
Once your calendar has been shared online, people who wish to edit it need to access it from their own devices.
For anyone with a computer, this is a simple matter of visiting the link, as you would on the Pi, by using their browser.
It’s also possible to view and edit the calendar on smartphones. If the shared calendar is with Google, Android users can access it from their own calendar app, even if they have a different Google account, by following the instructions at tinyurl.com/apc440-android. There is an official Outlook app for Android, which allows for easy viewing and editing of Outlook calendars. Sadly, iCloud Calendars aren’t so easy, but there’s a number of third-party apps, such as SmoothSync, in the Google Play store, which enable you to synchronise between calendars.
If you are an iPhone user, you’re in luck. There’s an official Google Calendar app in the iTunes Store, with which you can sign in and view your calendars. There is also an official Microsoft Outlook Email and Calendar app, which can be used to view and edit Outlook Calendars.
If you create or change an appointment, and it doesn’t appear right away on everyone’s device, wait for 5-10 minutes before attempting troubleshooting, to let it percolate through. If the changes are visible on the wall calendar — that is, on the website — the issue is most likely to do with the device, not the Raspberry Pi.
The software and add-ons used to view the calendar are very easy to install, so the most problematic part of this project is likely to be when it comes to adding the monitor, and fixing it to your wall [Image E].
You can make life much easier for yourself by buying a monitor specifically designed for the Raspberry Pi, so you have somewhere to put the computer itself. If the place you want to install the wall calendar is hard to reach, you may be able to buy a longer micro-USB cable, but bear in mind that the voltage drops as cable length grows. Consider using shorter cables and/or a powered USB hub.
If the Raspberry Pi crashes for any reason, Firefox tries to restore all open web pages once it reboots, which may mean you have to plug in a mouse or keyboard to close down any extra tabs.
You can reduce the chance of this happening by starting Firefox in safe mode, and then entering ‘about:config’ in the address bar. Press Return to be taken to the settings screen for Firefox. Once you’re there, simply scroll down to the setting marked ‘Browser.sessionstore.resume_from_ crash’ and double-click to change from ‘True’to’False’.
If you’re using Google Calendars, anyone who scrolls to the top of the screen can switch from your calendar to your other Google Apps, such as Gmail. They can also use the search bar to view documents stored in your Google Drive.
If this concerns you, consider setting up a dedicated Google account, just for the calendar. You can still access and edit the calendar from your own account.
Calendar tweaks & tips
When the calendar is on your wall, the cursor can look untidy, especially when using a touchscreen. A handy app called Unclutter can hide the cursor except when it’s being moved or you’re touching the screen. Open Terminal on your Pi (or connect via SSH), and run the command:
sudo apt-get install unclutter
In case the Pi crashes, and you’re forced to reboot, it’s best to have Firefox programmed to open automatically, saving you the trouble of reconnecting a keyboard and mouse. Open Terminal on your Pi (or connect via SSH), and run the command:
sudo nano /etc/xdg/lxsession/LXDEpi/autostart . Scroll to the bottom of the window and add the line @firefox-esr . Press ‘Ctrl-X’, then ‘Y’, then Return to save your changes.
Finally, to make sure the display doesn’t sleep after a few minutes, open Terminal or connect via SSH once again, and run the command: sudo nano /etc/lightdm/lightdm.conf . Scroll down to where it says ‘#xserver command=X’ and remove the hash at the start of the line. Next, put a space after the letter ‘X’ and type “-s 0 –dpms”. Press ‘Ctrl-X’, then ‘Y’, then Return to save your changes, then reboot your Raspberry Pi.
If you are using Google Calendars, click the arrow beside ‘Other Calendars’, then ‘Browse Interesting Calendars’ to see a list of calendars to which you can subscribe — for example, Holidays in Ireland. Click ‘Subscribe’ to have them appear on your own calendar.
Set up your wall calendar
- UPDATE RASPBIAN AND INSTALL FIREFOX
Before you can physically transform your Raspberry Pi into a wall calendar, you need to connect the device to the internet, and open the Terminal app. Run sudo apt-get update and then sudo apt-get upgrade to bring your RPi up to date.
Next, enter sudo apt-get install iceweasel to install Firefox Extended Support Release on to your mini computer.
- SET FIREFOX PREFERENCES
Go to ‘Menu > Internet > Firefox ESR’ to open Firefox. Visit your calendar address — calendar.google.com, for example — and sign in if necessary. If Firefox prompts you to remember your preferences, say ‘Yes’. Once you can see your calendar, go to ‘Edit > Preferences’ and click the ‘Set to Current Page’ button to make sure Firefox always displays the calendar.
- SET FIREFOX FOR FULL-SCREEN
This step is optional but recommended. Visit addons.mozilla.org/en-US/firefox/addon/r-kiosk to install the Real Kiosk add-on — this disables menus and toolbars. Firefox needs to restart for it to work. Remember, you can still close the window by connecting a keyboard to the Raspberry Pi and pressing ‘Alt-F4’
- PERFORM TWEAKS
Make sure the calendar is in the view you want — for example, Monthly. Next, follow the steps in the ‘Calendar Tweaks and Tips’ box (opposite) to hide the mouse when not in use, disable the RPi’s sleep function, and make Firefox start every time you switch on the machine, if you wish. Restart the RPi to ensure your changes have taken effect.
- CONNECT IT UP
The specific steps to connect your monitor vary from device to device. If you are using the official Raspberry Pi Touchscreen Display, assembly instructions are available from The Pie Hut, tinyurl.com/apc440-pihut.
- FINISHING TOUCHES
Once you’ve connected your Raspberry Pi up to a screen, you’ll want to position it somewhere that everyone can access.
If it’s in your home, you’ll probably also want to make it look as good as possible. You can let your imagination run wild here — take a look online to see what other people have achieved.