How to never miss a video call with Raspberry Pi and NextEvent

Since lockdown started, I’ve found I often miss video meetings. It’s not intentional, I simply lose track of time. Though my phone is set to remind me of upcoming meetings ten minutes before they begin, I have a habit of trying to fill that time with something productive and before I know it, I have Eben on the phone, fifteen minutes after the meeting’s start, asking where I am.

Fixing the issue using code

Due to this, and because I was interested in playing with the Google API and learning a little more Python, I decided to write a simple application that will get your upcoming events from your Google Calendar and give you notifications as often as you want, visually on screen as well as through sound.

I call it NextEvent

Here’s the video tutorial to show you more:

And here’s the written tutorial too!

Installing NextEvent to your Raspberry Pi

To install NextEvent, open a terminal window (Ctrl-Alt-T) on Raspberry Pi and type:

sudo apt update
sudo apt upgrade
git clone

This will get the files from my GitHub repository. Next you’ll need to install some dependencies, and I’ve created a script to make that easy:

cd nextevent

The dependencies are dateutil (a library for manipulating time and dates), the Google API client libraries, and the gi-cairo library (which is for drawing the GUI).

Then fire up NextEvent:


The next thing you’ll see is NextEvent starting up, and then it’ll open Chromium. It is here that you will give Google permission to share your calendar with the application.

You’ll then need to log into your Google account and give NextEvent access to your calendar. Chromium will tell you when everything is fine and you can close the browser.

Now you can see your next five events along with the time left until each one. When the time gets down to five minutes, the application will turn red and ‘ding’ at you. It’ll ‘ding’ twice at one minute to go, and four times when your meeting is about to start!

In case you want to delve into the code, maybe to create a meeting room ‘now and next’ display, the source contains the GUI and event processing part of NextEvent. You should be able to go here and change the number of lines, the colours, and the notification sounds.

How does it work?

If you’re the sort that likes to know HOW the code works, here’s a follow-up to the tutorial video where I explain exactly that!


Carlos Luna avatar

Amazing! And even more amazingly, I made something very similar a couple of months ago. In my case we are 5 people at home and it was difficult to track everybody’s activities (classes, work meetings, on-line karate, on-line choir rehearsal… you get the idea) specially in the early days of lockdown. So I got a spare AIY kit I had and made a little Python program very similar to yours. It checks the events in all of our calendars and when an event is in 15 minutes or in 5 minutes, it reads outloud (using a TTS package) something like “Attention nnn, you have yyy in 15 minutes”. The AIY box is placed in a central part of the house with enough volume level so you can listen the announcements no matter where you are. It has a very simple GUI made with Tkinter because the idea was to give it a display, but it runs headless for now.

The first version was a very quick and dirty one, and I had the intention of improving it. But it’s been working flawlessly for a couple of months, so v2 got indefinitely postponed… Now I have to check you code to see what ideas I can use to inspire my version 2!

Khakhathi avatar

Hi Carlos, a good idea you have there. Would you please share the code on GitHub?

Carlos Luna avatar

I’ll try to do it this weekend. Will have to tidy up the code a little bit!

Anders avatar

I missed a video meeting today because it was a nice morning and I decided to sit outside. I quickly fell asleep

Ashley Whittaker avatar

? “Sorry I’m late, I didn’t want to come”

Harry Hardjono avatar

Sleep and cowsay is no good anymore?

Jim avatar

So… I guess y’all haven’t heard of Google reminders, or even the calendar app?

Khakhathi avatar

I have just tried this out and I’m really impressed.

Dave avatar

We use a different video conf service. I would lose track of time working on otheer things just like everyone else. Made a script to set to correct webcam zoom, force correct mic input device, start a browser inside a private firejail going to the URL for that meeting.
I use either sleep XXm or alarm-applet or an ‘at’ script to kick off the chat srcipt. Have slightly different start script for each different meeting (diff URLs).
We don’t use google stuff. Mostly self-host. The normal 45min reminder is ideal most of the time.
firejail –private /usr/bin/chromium-browser

Todd Sharp avatar

Hey Gordon, really cool project! Well done! Question for you – what did you use to create the awesome animations in this video? Cheers!

Comments are closed