![]() ![]() This way you can design your contents to look good on the mirror. Change the background color of your Google Doc to match your MagicMirror background.Watch out for scope errors and urls to open your browser in case the scope is not sufficient (like The drive API returned an error: Error: Insufficient Permission: Request had insufficient authentication scopes.). While setup watch the logs: tail -f /home/pi/.pm2/logs/mm-out.log. To ensure it execute the command explicitly as user pi: sudo -u pi - node authorize.js Outputs Since the OAuth-Authorization-Token is stored in the users home directory make sure to execute node authorize.js as the same user that runs the MagicMirror instance (user pi in my case). The current procedure: it queries for all documents, filters by titles that start with notesPrefix, orders by the last edited document and displays at most maxNotes number of noes. The prefix of your documents titles you store your note in. Uses Moment.js supported date formats ( ) The short date format to use for the posted date (today and yesterday). The date format to use for the exact posted date (not today and not yesterday). Whether to show the date when the note was created How frequently to poll Drive for documents. The maximum number of your most recent documents to display Note: This application uses the following scopes: Now you can configure your module as below. If everything went well, you should see MMM-GoogleDocs-Notes is authorized in your console. Follow the instructions to authorize the Google account for which you want to display notes on your mirror.In the MMM-GoogleDocs-Notes directory execute sudo -u pi - node authorize.js (Change pi to the user that runs the Magic Mirror application).Rename this file client_secret.json and copy it to your MMM-GoogleDocs-Notes directory.Click the file download icon button to the right of the client ID.Click OK to dismiss the resulting dialog.It is important that this matches exactly. Select the Credentials tab, click the Create credentials button and select OAuth client ID.It doesn’t need to be the same as the Google account for which you want to display notes. This is just the account with which you are associating your developer account. Enter the Product name Magic Mirror Notes.At the top of the page, select the OAuth consent screen tab.On the Add credentials to your project page, click the Cancel button.Once you’ve created your project, click Continue, then Go to credentials. ![]() Don’t use an existing one, as we need to make some specific configurations that may conflict with your existing project. Before this module will work, you need to grant authorization for this module to access your Google Drive account. It is very important that you follow these steps although they are not very exact but you should be able to follow. Therefore we use a Google Doc that can be edited by multiple users. Unfortunately Google does not provide an API for Keep to query the content for a note from there. Add the module to your config (see below).(use MMM as title or remember it for later configuration of the notesPrefix key) Create a Google Doc and write the note you want to display at the MagicMirror.Enter the new MMM-GoogleDocs-Notes directory and execute npm install.Navigate to your MagicMirror modules directory and execute.MagicMirror a module for MagicMirror to display notes from a Google Doc. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |