This a module for MagicMirror
https://magicmirror.builders/
https://github.com/MichMich/MagicMirror
This module displays your most recent notes from your Google GMail account.
- Navigate to your MagicMirro
modulesdirectory and execute
git clone https://github.com/jclarke0000/MMM-MyNotes.git - Enter the new
MMM-MyNotesdirectory and executenpm install.
It is very important that you follow these steps carefully. Before this module will work, you need to grant authorization for this module to access your GMail account.
- Go to https://console.developers.google.com/flows/enableapi?apiid=gmail&pli=1 and create a new project. Don't use an existing one, as we need to make some specific configurations that may conflict with your existing project.
- Once you've created yopur project, click Continue, then Go to credentials.
- On the Add credentials to your project page, click the Cancel button.
- At the top of the page, select the OAuth consent screen tab.
- Enter the Product name
Magic Mirror Notes. - Select your GMail address. This is just the account with which you are associating your developer account. It doesn't need to be the same as the GMail account for which you want to display notes.
- Click the Save button.
- Select the Credentials tab, click the Create credentials button and select OAuth client ID.
- Select the application type Other
- Enter the name
Magic Mirror Notes. It is important that this matches exactly. - Click the Create button.
- Click OK to dismiss the resulting dialog.
- Click the file download icon button to the right of the client ID.
- Rename this file
client_secret.jsonand copy it to your MMM-MyNotes directory. - In the MMM-MyNotes directory execute
node authorize.js. - Follow the instructions to authorize the GMail account for which you want to display notes on your mirror.
If everything went well, you shoudl see MMM-MyNotes is authorized in your console. No you can configure your module as below:
| Option | Description |
|---|---|
maxNotes |
The maximum number of your most recent notes to display Type NumberDefaults to 10 |
pollFrequency |
How frequently to poll your GMail account for changes in notes. Type NumberDefaults to 300000 (5 minutes) |
showDatePosted |
Whether to show the date when the note was created Type BooleanDefaults to true (5 minutes) |
dateFormat |
the date format to use for the posted date. Uses Moment.js supported date formats (https://momentjs.com/docs/#/displaying/) Type StringDefaults to MMM D (e.g.: Jul 1) |
{
module: 'MMM-MyNotes',
header: "Bulletin Board",
position: 'top_right',
classes: 'default everyone',
config: {
maxNotes: 5,
pollFrequency: 600000,
showDatePosted: true,
dateFormat: 'D-MMM-YYYY'
}
},