A MagicMirror² helper to include the birthdays of your Google Contacts in the default calendar.
🛠 Work in progress
The module is kind of a MVP (minimum viable product) at the moment. That means you can use it in your setup, but things will definitely change on the way to v1.0. Also, be aware that there are some known issues! Use it with care 😉
The module reads the birthdays of your Google Contacts via Google's People API and exposes them as an iCal Feed through an internal URL, so you can include it in the default calendar.
You need to have a project setup on Google Cloud Platform for your mirror. If you use other Google Services (like the Directions API with MMM-MyCommute), you most likely already have a project.
To enable the People API:
After the API is enabled, you need to create credentials for the module.
You should be redirected to the credentials overview
In your modules/
directory, git clone https://github.com/PalatinCoder/MMM-GoogleBirthdaysProvider.git
cd
in the new MMM-GoogleBirthdaysProvider
directory
npm install --production
(note the production flag, so you don't get all the dev dependencies - you don't need them if you just want to use the module)
Place the JSON file with the credentials (from step 6 above) in google-api-credentials/credentials.json
Run npm run token:generate
and follow the instructions. This will authorize your instance of the module against your GCP project and store an authorization token.
Add the module to your config.js
:
{
module: "MMM-GoogleBirthdaysProvider",
config: {}
},
Note: Don't give the module a position, as it doesn't render any DOM at all
Add http://localhost:8080/mmm-googlebirthdaysprovider
to your calendar URLs, something like this:
(...)
{
module: "calendar",
position: "top_left",
config: {
calendars: [
{
url: 'http://localhost:8080/mmm-googlebirthdaysprovider',
symbol: 'birthday-cake',
color: '#f00'
}
]
}
}
(...)
(optional) If you want to see which birthday it is, set the following:
Set `displayRepeatingCountTitle` to `true` and set the suffix for the count in the `repeatingCountTitle` in the calendar's options, like so: ``` (...) { module: "calendar", position: "top_left", config: { displayRepeatingCountTitle: true, calendars: [ { url: 'http://localhost:8080/mmm-googlebirthdaysprovider', symbol: 'birthday-cake', repeatingCountTitle: "Birthday" color: '#f00' } ] } } (...) ```
That's it, now have fun 😉