Adds, edits, or deletes an event from a google calendar, using API. Currently tokens require user reauthorization approximately every 7 days. Any progress towards persistent or tokens that will be automatically refreshed will be posted.
This module currently requires MMM-SimpleKeyboard and my fork of MMRIZE's fantastic MMM-CalendarExt3 module. Both are also in my git.
To install the module, use your terminal to:
- Navigate to your MagicMirror's modules folder. If you are using the default installation directory, use the command:
cd ~/MagicMirror/modules
- Clone the module:
git clone https://github.com/tjat84/MMM-GoogleCalendarEventAdder.git
- Install dependencies:
runnpm install
from the MMM-GoogleCalendarEventAdder directory.
This process is similar to that used by randomBrainstormer's MMM-GoogleCalendar. My setup utilizes the same project as GoogleCalendar, but I have two separate credentials.
- Go here, and follow the instructions found in the
prerequisites
section to create the Google Cloud project (you could also use an existing project if you wish). Make sure to enable the GoogleCalendarAPI and turn on readonly and write access scopes. - Once you have enabled setup the project and created your OAuth ID client, download the client ID as
json
(look for the download option) and rename itcredentials.json
. NOTE: When creating the OAuth ID client you should see a list of diffrent credential types, this module is currently only supportingDesktop app
. - Move
credentials.json
to your MMM-GoogleCalendarEventAdder directory (MagicMirror/modules/MMM-GoogleCalendarEventAdder/) - Open 'credentials.json' and change the redirect_uri to 'http://localhost:3000/oauth2callback'. This will create a temporary callback server for authentication, which will be closed upon successful authentication.
- Enable Google Calendar API. Select the same project as in step 1.
- Run this command from the MMM-GoogleCalendarEventAdder directory:
node authenticate.js
and follow the instructions that will display in the console.
{
module: 'MMM-GoogleCalendarEventAdder',
position: 'top_right',
config: {
//no config options exist
},