1. Gran Torino syndrom

In the video, the mirror reminds me my next meeting. This smart behavior is done connecting our software to google calendar thru API.
Frankly, I don’t understand why Google didn’t make C++ API to connect to Google Calendar. I’m feeling like Clint Eastwood in Gran Torino, with my old good gcc compiler, alone and abandoned by all.
clint

2. Using Libgcal

Hopefully, there is Ligcal, a C library to handle google calendar and contacts. I don’t know if it’s officially supported.
sudo apt-get update
sudo apt-get install libgcal0
sudo apt-get install libgcal-dev

3. Testing Libgcal

This small source code (download here) connects to google calendar (thru login/pwd given as arguments or harcoded), gets all yours events/meetings and selects the next one.
gcc -lgcal testcal.cpp -o cal

Frankly, it doesn’t work each time. Curiously, this code works randomly. It get connected but sometimes, it doesn’t return list of events :-(. If you find why, please let me know.

gcalender

Once tested, copy this exemple to your mirror source code, create a dedicated function and call it from the speakTo function.

At this stage, you should be able to have a smart mirror which reminds you your next meeting. Create a new event “do a backup” and let your mirror do its job…

Advertisements