• 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-GooglePhotos

Scheduled Pinned Locked Moved Entertainment
294 Posts 56 Posters 267.4k Views 59 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.
  • ? Offline
    A Former User @kapsolas
    last edited by Jul 27, 2018, 2:53 PM

    @kapsolas
    The picture was not created by you, right?
    I’ll research and try to fix it.

    1 Reply Last reply Reply Quote 0
    • K Offline
      kapsolas Module Developer
      last edited by Jul 27, 2018, 2:57 PM

      Correct.

      The setup is as follows:

      1. I created a shared album
      2. Invited my wife to it
      3. I uploaded photos
      4. My wife uploaded photos

      When I tried to set up the plugin, I discovered it was failing. I modified the code to print the body to the console and saw the message from the Google Photos API.

      The response is:

      error:
      { code: 400,
      message: ‘The media item is not in the user's library. It was contributed by another user to a shared album that this user joined to.’
      status: ’ INVALID_ARGUMENT’ }
      }

      If we could get this to work, it would be a nice way to use GooglePhotos act like an online digital photo frame. Anyone with access to the shared album can upload photos.

      ? 2 Replies Last reply Jul 27, 2018, 3:00 PM Reply Quote 0
      • ? Offline
        A Former User @kapsolas
        last edited by A Former User Jul 27, 2018, 3:04 PM Jul 27, 2018, 3:00 PM

        @kapsolas
        I guess the reason is the scope rule. “readonly” is set for the scope of API using. I’ll change it to “https://www.googleapis.com/auth/photoslibrary.sharing”, but it’s just guessing. Test will be needed.
        After fixing, I’ll tell you.
        (Today, I purchased my new MBP and am migrating, so I’m not ready to develop something, so it’ll take somewhat time.)

        1 Reply Last reply Reply Quote 0
        • ? Offline
          A Former User @kapsolas
          last edited by Jul 27, 2018, 4:28 PM

          @kapsolas
          Fixed. (I think). Try it. (just git pull, no need to npm install)

          mediaItem:search API could access photos shared from others, but mediaItem/ID API couldn’t. It looks so weird. Anyway, I changed it to use mediaItem:search. The only risk is expiration of temporary image URL, so you’d better keep scanInterval under 1 hour.

          1 Reply Last reply Reply Quote 1
          • K Offline
            kapsolas Module Developer
            last edited by Jul 29, 2018, 3:51 PM

            Awesome! That worked and solved it!

            I’ll need to pay around a bit with the sizes in the config (hopefully not the code) to see if I can get the images to display in the screen fully.

            For now the images are being cropped as they are larger than the display area on the screen.

            Again thank you!

            ? 1 Reply Last reply Jul 29, 2018, 4:07 PM Reply Quote 0
            • ? Offline
              A Former User @kapsolas
              last edited by A Former User Jul 29, 2018, 4:08 PM Jul 29, 2018, 4:07 PM

              @kapsolas set the mode to cover or contain. cover will be fit your entire region as large as possible but cropped, contain will show the entire image but has some black tape around top and bottom or left and right by the ratio of photo width/height like movie film.

              1 Reply Last reply Reply Quote 0
              • K Offline
                kivlow
                last edited by kivlow Aug 2, 2018, 4:06 PM Aug 2, 2018, 4:06 PM

                Hello i use node auth_and_test.js but i dont have any album ID in terminal only info : auth_and_test started.
                What to do to get album ID ??

                ? 1 Reply Last reply Aug 2, 2018, 5:59 PM Reply Quote 0
                • K Offline
                  kapsolas Module Developer
                  last edited by Aug 2, 2018, 4:49 PM

                  If you don’t see any response, it may be because an error is being returned by Google. Errors in the script are suppressed now.

                  If you are familiar with updating the code, you can add a console.log(body) message to see the error.

                  1 Reply Last reply Reply Quote 0
                  • K Offline
                    kivlow
                    last edited by Aug 2, 2018, 5:07 PM

                    @kapsolas said in MMM-GooglePhotos:

                    console.log(body)

                    in auth_andtes is console log error and i dont have any just info in console:
                    auth_and_test started
                    so i dont have i thing any error but no album ID :/

                    1 Reply Last reply Reply Quote 0
                    • ? Offline
                      A Former User @kivlow
                      last edited by Aug 2, 2018, 5:59 PM

                      @kivlow At your first execution, have you countered allowance process?

                      K 1 Reply Last reply Aug 3, 2018, 6:15 AM Reply Quote 0
                      • 1
                      • 2
                      • 3
                      • 4
                      • 5
                      • 29
                      • 30
                      • 1 / 30
                      1 / 30
                      • First post
                        9/294
                        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