• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

MMM-GoogleDriveSlideShow

Scheduled Pinned Locked Moved Entertainment
37 Posts 10 Posters 12.0k Views 11 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    amanzimdwini @clegallic
    last edited by Nov 14, 2020, 8:23 PM

    @clegallic - I am on a Rasp3A, but fully patched (npm 6.14.8, node 10.23.0, nodejs 10.23.0).
    As su, I fail npm run token:generate - with a

    Type Error: cannot read property '0' of undefined...
    

    (there is more). Upon inspection MY credentials.json file starts like

    {"web":{"client_id
    

    while your example begins

    {"installed":{"client_id
    

    (the rest looks similar to your example) Any idea what I did wrong? If I just replace my “web” with “installed”, I still fail.
    Thanks,
    K

    1 Reply Last reply Reply Quote 0
    • W Offline
      Wil
      last edited by Jan 19, 2021, 9:28 PM

      Hello,

      I was trying to install this module but got an error at the npm run token:generate:

      pi@raspberrypi:~/MagicMirror/modules/MMM-googleDriveSlideShow $ npm run token:generate
      
      > mmm-googledriveslideshow@0.0.1 token:generate /home/pi/MagicMirror/modules/MMM-googleDriveSlideShow
      > node generate-auth-token.js
      
      /home/pi/MagicMirror/modules/MMM-googleDriveSlideShow/generate-auth-token.js:33
        const OAuth2Client = new google.auth.OAuth2(client_id, client_secret, redirect_uris[0]);
                                                                                           ^
      
      TypeError: Cannot read property '0' of undefined
          at fs.readFile (/home/pi/MagicMirror/modules/MMM-googleDriveSlideShow/generate-auth-token.js:33:86)
          at FSReqWrap.readFileAfterClose [as oncomplete] (internal/fs/read_file_context.js:53:3)
      npm ERR! code ELIFECYCLE
      npm ERR! errno 1
      npm ERR! mmm-googledriveslideshow@0.0.1 token:generate: `node generate-auth-token.js`
      npm ERR! Exit status 1
      npm ERR! 
      npm ERR! Failed at the mmm-googledriveslideshow@0.0.1 token:generate script.
      npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
      
      npm ERR! A complete log of this run can be found in:
      npm ERR!     /home/pi/.npm/_logs/2021-01-19T20_03_53_720Z-debug.log
      

      and here is the associated log file:

      0 info it worked if it ends with ok
      1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'run', 'token:generate' ]
      2 info using npm@6.14.10
      3 info using node@v10.23.1
      4 verbose run-script [ 'pretoken:generate', 'token:generate', 'posttoken:generate' ]
      5 info lifecycle mmm-googledriveslideshow@0.0.1~pretoken:generate: mmm-googledriveslideshow@0.0.1
      6 info lifecycle mmm-googledriveslideshow@0.0.1~token:generate: mmm-googledriveslideshow@0.0.1
      7 verbose lifecycle mmm-googledriveslideshow@0.0.1~token:generate: unsafe-perm in lifecycle true
      8 verbose lifecycle mmm-googledriveslideshow@0.0.1~token:generate: PATH: /usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/pi/MagicMirror/modules/MMM-googleDriveSlideShow/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games
      9 verbose lifecycle mmm-googledriveslideshow@0.0.1~token:generate: CWD: /home/pi/MagicMirror/modules/MMM-googleDriveSlideShow
      10 silly lifecycle mmm-googledriveslideshow@0.0.1~token:generate: Args: [ '-c', 'node generate-auth-token.js' ]
      11 silly lifecycle mmm-googledriveslideshow@0.0.1~token:generate: Returned: code: 1  signal: null
      12 info lifecycle mmm-googledriveslideshow@0.0.1~token:generate: Failed to exec token:generate script
      13 verbose stack Error: mmm-googledriveslideshow@0.0.1 token:generate: `node generate-auth-token.js`
      13 verbose stack Exit status 1
      13 verbose stack     at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
      13 verbose stack     at EventEmitter.emit (events.js:198:13)
      13 verbose stack     at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
      13 verbose stack     at ChildProcess.emit (events.js:198:13)
      13 verbose stack     at maybeClose (internal/child_process.js:982:16)
      13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
      14 verbose pkgid mmm-googledriveslideshow@0.0.1
      15 verbose cwd /home/pi/MagicMirror/modules/MMM-googleDriveSlideShow
      16 verbose Linux 5.4.83-v7+
      17 verbose argv "/usr/bin/node" "/usr/bin/npm" "run" "token:generate"
      18 verbose node v10.23.1
      19 verbose npm  v6.14.10
      20 error code ELIFECYCLE
      21 error errno 1
      22 error mmm-googledriveslideshow@0.0.1 token:generate: `node generate-auth-token.js`
      22 error Exit status 1
      23 error Failed at the mmm-googledriveslideshow@0.0.1 token:generate script.
      23 error This is probably not a problem with npm. There is likely additional logging output above.
      24 verbose exit [ 1, true ]
      
      

      Anyone have an idea how to solve this?

      1 Reply Last reply Reply Quote 0
      • W Offline
        Wil
        last edited by Jan 21, 2021, 9:57 AM

        Ok I find the problem, my credential file was not good.
        I made a new one and the npm run token:generate worked.

        I write the config as mentioned, and start MM but no pictures appear.
        Is it long to load pictures?

        H 1 Reply Last reply Feb 17, 2021, 10:24 AM Reply Quote 0
        • C Offline
          clegallic
          last edited by Jan 22, 2021, 7:10 AM

          Hi Will,

          I’m glad to see that you have solved your token problem.

          The time it takes to load picture depends on the number of pictures you have. Note that only pictures meta-data are loaded at start. The picture binaries are loaded on demand when the slideshow starts.

          • if rootFolderId is not set, the module will retrieve the 100 first pictures found (maxResults)
          • if rootFolderId is set, the module will go through the 10 first folders (maxFolders) it founds. If you have a large amount of pictures, or if you specified a large value for maxFolders, it can take more times.

          If nothing is loaded or displayed, feel free to set debug to true and send me the logs.

          Regards,

          Charles

          1 Reply Last reply Reply Quote 0
          • W Offline
            Wil
            last edited by Jan 22, 2021, 9:13 PM

            Hi clegallic,

            To test I only put 2 pictures, so it should be quite fast.

            Sorry for my ignoring but after setting debug: true in the config file, where do i see/find the logs?

            1 Reply Last reply Reply Quote 0
            • C Offline
              clegallic
              last edited by Jan 25, 2021, 7:16 AM

              Hi,

              If your MM is deployed on a Raspberry Pi, you should find the logs in the /home/pi/.pm2 folder (pm2.log, logs/mm-error-0.log or logs/mm-out-0.log).

              Regards,

              Charles

              1 Reply Last reply Reply Quote 0
              • H Offline
                handelni @Wil
                last edited by Feb 17, 2021, 10:24 AM

                @wil said in MMM-GoogleDriveSlideShow:

                my

                Could you tell me how u did fix this issue? -> the read property ‘0’ of undefined?

                I did already change from web to installed

                1 Reply Last reply Reply Quote 0
                • A Offline
                  AFSC
                  last edited by AFSC Mar 11, 2021, 4:12 PM Mar 11, 2021, 4:02 PM

                  hello, I have two questions if you can help me
                  1 is it possible to change the photo manually using a touch screen?
                  2 it is possible to play videos

                  S 1 Reply Last reply Mar 11, 2021, 4:18 PM Reply Quote 0
                  • S Offline
                    sdetweil @AFSC
                    last edited by Mar 11, 2021, 4:18 PM

                    @afsc 1. looks like you could do it, IF you used something like MMM-Buttons to add touchable buttons and send the notification u configure… altho it looks like auto and manual are exclusive… so, once u pick manual then its manual all the time. see the README

                    1. don’t think so, not with this module, which displays pictures… it takes a different technology to play videos vs display pictures

                    Sam

                    How to add modules

                    learning how to use browser developers window for css changes

                    A 1 Reply Last reply Mar 11, 2021, 4:34 PM Reply Quote 0
                    • A Offline
                      AFSC @sdetweil
                      last edited by Mar 11, 2021, 4:34 PM

                      @sdetweil my idea was to be able to step back and move forward in the photos
                      I didn’t want it to stop being automatic

                      S 1 Reply Last reply Mar 11, 2021, 4:35 PM Reply Quote 0
                      • 1
                      • 2
                      • 3
                      • 4
                      • 4 / 4
                      • First post
                        Last post
                      Enjoying MagicMirror? Please consider a donation!
                      MagicMirror created by Michael Teeuw.
                      Forum managed by Sam, technical setup by Karsten.
                      This forum is using NodeBB as its core | Contributors
                      Contact | Privacy Policy