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 341.2k 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 @zolabus
      last edited by

      @zolabus

      • Show me your configuration
      • What log says?
      • How much albums and photos in your account?
      Z 1 Reply Last reply Reply Quote 0
      • Z Offline
        zolabus @Guest
        last edited by

        @Sean
        {
        module: “MMM-GooglePhotos”,
        position: “middle_center”,
        config: {
        albums: [“Noi”, “2019 New York”],
        updateInterval: 1000 * 60,
        sort: “random”,
        showWidth: “426px”,
        showHeight: “320px”
        }
        },

        Only 2 albums, I don’t know how to read the logs…

        Thanks

        Z 1 Reply Last reply Reply Quote 0
        • Z Offline
          zolabus @zolabus
          last edited by

          @Sean Any news for me? Still not working
          Thanks

          ? 1 Reply Last reply Reply Quote 0
          • ? Offline
            A Former User @zolabus
            last edited by

            @zolabus
            Without more details, I have nothing to say…

            You can get a backend-log and frontend-log together by npm start dev on MagicMirror directory. (If you are using pm2, stop it first)

            Z 1 Reply Last reply Reply Quote 0
            • K Offline
              kykzzang
              last edited by

              @Sean
              I have same error with @zolabus.
              but it works very occasionally.
              Perhaps it got worse recently.

              condition :

              rpi 4B
              MM 2.11.0
              npm 6.14.4
              nodejs 10.20.1
              photo counts : about 3000
              

              errorlog:

              [2020-04-24 13:03:05.421] [LOG]    [GPHOTOS:CORE] Getting Album info chunks.
              [2020-04-24 13:03:06.566] [LOG]    [GPHOTOS:AUTH] Token is alive.
              [2020-04-24 13:03:06.567] [LOG]    [GPHOTOS:CORE] Getting Album info chunks.
              [2020-04-24 13:03:07.519] [LOG]    [GPHOTOS] Finish Album scanning. Properly scanned : 1
              [2020-04-24 13:03:07.533] [LOG]    [GPHOTOS] Initialized
              [2020-04-24 13:03:07.535] [LOG]    [GPHOTOS] Start first scanning.
              [2020-04-24 13:03:07.537] [LOG]    [GPHOTOS] Start Album scanning
              [2020-04-24 13:03:07.541] [LOG]    [GPHOTOS:AUTH] Token is alive.
              [2020-04-24 13:03:07.543] [LOG]    [GPHOTOS:CORE] Indexing photos now.
              [2020-04-24 13:03:10.195] [LOG]    [GPHOTOS:CORE] Indexing photos now.
              [2020-04-24 13:03:12.284] [LOG]    [GPHOTOS:CORE] Indexing photos now.
              [2020-04-24 13:03:13.953] [LOG]    [GPHOTOS:CORE] Indexing photos now.
              [2020-04-24 13:03:15.580] [LOG]    [GPHOTOS:CORE] Indexing photos now.
              [2020-04-24 13:03:18.212] [LOG]    [GPHOTOS:CORE] Indexing photos now.
              [2020-04-24 13:03:27.554] [LOG]    [GPHOTOS:CORE] Indexing photos now.
              [2020-04-24 13:03:29.439] [LOG]    [GPHOTOS:CORE] Indexing photos now.
              [2020-04-24 13:03:31.248] [LOG]    [GPHOTOS:CORE] Indexing photos now.
              [2020-04-24 13:03:32.969] [LOG]    [GPHOTOS:CORE] Indexing photos now.
              [2020-04-24 13:03:41.248] [LOG]    [GPHOTOS:CORE] Indexing photos now.
              [2020-04-24 13:03:43.034] [LOG]    [GPHOTOS:CORE] Indexing photos now.
              [2020-04-24 13:03:54.235] [LOG]    [GPHOTOS:CORE] Indexing photos now.
              [2020-04-24 13:03:56.981] [LOG]    [GPHOTOS:CORE] Indexing photos now.
              [2020-04-24 13:03:58.694] [LOG]    [GPHOTOS:CORE] Indexing photos now.
              [2020-04-24 13:04:02.317] [LOG]    [GPHOTOS:CORE] Indexing photos now.
              [2020-04-24 13:04:17.583] [LOG]    [GPHOTOS:CORE] Error: Client network socket disconnected before secure TLS connection was established
              [2020-04-24 13:04:17.587] [ERROR]  (node:1902) UnhandledPromiseRejectionWarning: Error: Client network socket disconnected before secure TLS connection was established
                  at connResetException (internal/errors.js:559:14)
                  at TLSSocket.onConnectEnd (_tls_wrap.js:1355:19)
                  at Object.onceWrapper (events.js:288:20)
                  at TLSSocket.emit (events.js:205:15)
                  at endReadableNT (_stream_readable.js:1154:12)
                  at processTicksAndRejections (internal/process/task_queues.js:84:9)
              [2020-04-24 13:04:17.589] [ERROR]  (node:1902) UnhandledPromiseRejectionWarning: Error: Client network socket disconnected before secure TLS connection was established
                  at connResetException (internal/errors.js:559:14)
                  at TLSSocket.onConnectEnd (_tls_wrap.js:1355:19)
                  at Object.onceWrapper (events.js:288:20)
                  at TLSSocket.emit (events.js:205:15)
                  at endReadableNT (_stream_readable.js:1154:12)
                  at processTicksAndRejections (internal/process/task_queues.js:84:9)
              [2020-04-24 13:04:17.590] [ERROR]  (node:1902) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
              [2020-04-24 13:04:17.591] [ERROR]  (node:1902) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
              [2020-04-24 13:04:17.591] [ERROR]  (node:1902) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
              [2020-04-24 13:04:17.592] [ERROR]  (node:1902) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
              

              config.js

              module: "MMM-GooglePhotos",
              position: "fullscreen_below",
              config: {
                    albums: ["딸래미들"], // Set your album name. like ["My wedding", "family share", "Travle to Paris"]
                    updateInterval: 1000 * 30, // minimum 10 seconds.
                    sort: "random", // "old", "random"
                    uploadAlbum: null, // Only album created by `create_uploadable_album.js`.
                    condition: {
                      fromDate: null, // Or "2018-03", RFC ... format available
                      toDate: null, // Or "2019-12-25",
                      minWidth: null, // Or 400
                      maxWidth: null, // Or 8000
                      minHeight: null, // Or 400
                      maxHeight: null, // Or 8000
                      minWHRatio: null,
                      maxWHRatio: null,
                      // WHRatio = Width/Height ratio ( ==1 : Squared Photo,   < 1 : Portraited Photo, > 1 : Landscaped Photo)
                    },
                    showWidth: 800, // These values will be used for quality of downloaded photos to show. real size to show in your MagicMirror region is recommended.
                    showHeight: 1700,
                    timeFormat: "YYYY/MM/DD HH:mm", // Or `relative` can be used.
                    autoInfoPosition: true,
                    debug: true,
              },
              
              
              ? 1 Reply Last reply Reply Quote 0
              • ? Offline
                A Former User @kykzzang
                last edited by

                @kykzzang said in MMM-GooglePhotos:

                [GPHOTOS:CORE] Error: Client network socket disconnected before secure TLS connection was established

                It means, your network is not stable.

                G 1 Reply Last reply Reply Quote 0
                • G Offline
                  gonzonia @Guest
                  last edited by

                  @Sean I’m thinking it might be something on Google’s end. I’m having the same issue.

                  [2020-04-23 18:54:25.134] [LOG] 2020-04-23T18:54:25 [GPHOTOS:CORE] Error: Client network socket disconnected before secure TLS connection was established (/home/pi/MagicMirror/modules/MMM-GooglePhotos/GPhotos.js:124 GPhotos.log)

                  Is it possible to handle this error at all? Everything works fine for hours, then this error. Then it never recovers to try again but just stays on the last photo displayed.

                  ? 2 Replies Last reply Reply Quote 0
                  • ? Offline
                    A Former User @gonzonia
                    last edited by

                    @gonzonia
                    I’ll add some routine for graceful logging and retry in a few days. However, network stability issue couldn’t be solved by this module.

                    1 Reply Last reply Reply Quote 0
                    • ? Offline
                      A Former User @gonzonia
                      last edited by

                      @gonzonia
                      For staying the last photo displayed, It is not so easy as our hope.
                      Because, the URL of GooglePhotos has short term life - 1 hour. Without downloading and storing, the image will be expired. Anyway I’ll consider how to solve this problem.

                      G 1 Reply Last reply Reply Quote 0
                      • Z Offline
                        zolabus @Guest
                        last edited by

                        @Sean
                        Hi from npm start dev I have only this error
                        [ERROR] (node:1472) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.

                        bheplerB 1 Reply Last reply Reply Quote 0
                        • D Offline
                          dumitrudany
                          last edited by dumitrudany

                          Hi,
                          I’m using this module. Thank you for developing it. Everything seems to work normal except that it’s not scanning for new added or deleted photo from the albums.
                          I’m using the node serveronly command to start the MagicMirror2 without no errors reporting. I couldn’t figured with npm start dev. I have activated the debug, and only once it’s scanning the album.

                          Is this config parameter still working: scanInterval: 1000*60*10,?
                          As for me it isn’t and I saw it’s not described in readme doc. Or is there any other way to let the module scan automatically for new added photos?
                          I only found the way of refreshing the browsing page, which works but it’s not what I need.

                          Thanks!

                          This is my config:

                          {
                          			  module: "MMM-GooglePhotos",
                          			  position: "fullscreen_below",
                          			  config: {
                          					albums: ["TESTARE"], 
                          					updateInterval: 100 * 60, // minimum 10 seconds.
                          					scanInterval: 1000*60, //10 minutes
                          					sort: "new", // "old", "random"
                          					uploadAlbum: null, // Only album created by `create_uploadable_album.js`.
                          					condition: {
                          						fromDate: null, // Or "2018-03", RFC ... format available
                          						toDate: null, // Or "2019-12-25",
                          						minWidth: null, // Or 400
                          						maxWidth: null, // Or 8000
                          						minHeight: null, // Or 400
                          						maxHeight: null, // Or 8000
                          						minWHRatio: null,
                          						maxWHRatio: null,
                          						// WHRatio = Width/Height ratio ( ==1 : Squared Photo,   < 1 : Portraited Photo, > 1 : Landscaped Photo)
                          					},
                          					showWidth: 1080, // These values will be used for quality of downloaded photos to show. real size to show in your MagicMirror region is recommended.
                          					showHeight: 1920,
                          					//timeFormat: "YYYY/MM/DD HH:mm", // Or `relative` can be used.
                          			  }
                          			}
                          
                          ? 1 Reply Last reply Reply Quote 0
                          • ? Offline
                            A Former User @dumitrudany
                            last edited by

                            @dumitrudany
                            Not possible immediately as you wish. There is no way to detect whether you add/modify photos or not. Maybe frequent scanning would get a similar result, but it will consume and waste too many API quota. I can’t recommend it at all.

                            1 Reply Last reply Reply Quote 0
                            • G Offline
                              gonzonia @Guest
                              last edited by

                              @Sean Thanks. I think if you can gracefully handle the bad connection (no matter where it’s from) and reconnect once the connection works again, the image being stuck won’t be an issue. Right now once the connection breaks the module can’t recover.

                              G 1 Reply Last reply Reply Quote 0
                              • G Offline
                                gonzonia @gonzonia
                                last edited by

                                @Sean I’ve been looking into this, because I’m really don’t think it’s my network (no other module has this issue and there’s no similar problems anywhere else on the network). The first error doesn’t seem to be fatal, but the second is.

                                These are the errors I’m seeing in my Out.log

                                [2020-04-27 17:33:15.365] [LOG]    2020-04-27T17:33:15 <log> [GPHOTOS:CORE] Error: socket hang up (/home/pi/MagicMirror/modules/MMM-GooglePhotos/GPhotos.js:124 GPhotos.log)
                                

                                and

                                [2020-04-27 18:51:15.155] [LOG]    2020-04-27T18:51:15 <log> [GPHOTOS:CORE] Error: Client network socket disconnected before secure TLS connectionwas established (/home/pi/MagicMirror/modules/MMM-GooglePhotos/GPhotos.js:124 GPhotos.log)
                                
                                

                                I came across this issue on gitub related to Google APIs. https://github.com/googleapis/nodejs-bigquery/issues/624
                                Not sure it’s related.

                                In Error.log I see

                                2020-04-27 17:33:15.356] [ERROR]  2020-04-27T17:33:15 <error> Error: socket hang up
                                    at connResetException (internal/errors.js:559:14)
                                    at TLSSocket.socketOnEnd (_http_client.js:436:23)
                                    at TLSSocket.emit (events.js:205:15)
                                    at endReadableNT (_stream_readable.js:1154:12)
                                    at processTicksAndRejections (internal/process/task_queues.js:84:9) {
                                  code: 'ECONNRESET'
                                } (/home/pi/MagicMirror/js/app.js:40 process.<anonymous>)
                                [2020-04-27 17:33:15.361] [ERROR]  2020-04-27T17:33:15 <error> Error: socket hang up
                                    at connResetException (internal/errors.js:559:14)
                                    at TLSSocket.socketOnEnd (_http_client.js:436:23)
                                    at TLSSocket.emit (events.js:205:15)
                                    at endReadableNT (_stream_readable.js:1154:12)
                                    at processTicksAndRejections (internal/process/task_queues.js:84:9) {
                                  code: 'ECONNRESET'
                                } (/home/pi/MagicMirror/js/app.js:40 process.<anonymous>)
                                [2020-04-27 17:33:15.367] [ERROR]  2020-04-27T17:33:15 <error> (node:17589) UnhandledPromiseRejectionWarning: Error: socket hang up
                                    at connResetException (internal/errors.js:559:14)
                                    at TLSSocket.socketOnEnd (_http_client.js:436:23)
                                    at TLSSocket.emit (events.js:205:15)
                                    at endReadableNT (_stream_readable.js:1154:12)
                                    at processTicksAndRejections (internal/process/task_queues.js:84:9) (/home/pi/MagicMirror/internal/process/warning.js:27 writeOut)
                                [2020-04-27 17:33:15.368] [ERROR]  2020-04-27T17:33:15 <error> (node:17589) UnhandledPromiseRejectionWarning: Error: socket hang up
                                    at connResetException (internal/errors.js:559:14)
                                    at TLSSocket.socketOnEnd (_http_client.js:436:23)
                                    at TLSSocket.emit (events.js:205:15)
                                    at endReadableNT (_stream_readable.js:1154:12)
                                    at processTicksAndRejections (internal/process/task_queues.js:84:9) (/home/pi/MagicMirror/internal/process/warning.js:27 writeOut)
                                [2020-04-27 17:33:15.369] [ERROR]  2020-04-27T17:33:15 <error> (node:17589) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2) (/home/pi/MagicMirror/internal/process/warning.js:27 writeOut)
                                [2020-04-27 17:33:15.369] [ERROR]  2020-04-27T17:33:15 <error> (node:17589) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2) (/home/pi/MagicMirror/internal/process/warning.js:27 writeOut)
                                [2020-04-27 17:33:15.370] [ERROR]  2020-04-27T17:33:15 <error> (node:17589) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. (/home/pi/MagicMirror/internal/process/warning.js:27 writeOut)
                                [2020-04-27 17:33:15.371] [ERROR]  2020-04-27T17:33:15 <error> (node:17589) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. (/home/pi/MagicMirror/internal/process/warning.js:27 writeOut)
                                
                                

                                and

                                [2020-04-27 18:51:15.161] [ERROR]  2020-04-27T18:51:15 <error> (node:17589) UnhandledPromiseRejectionWarning: Error: Client network socket disconnected before secure TLS connection was established
                                    at connResetException (internal/errors.js:559:14)
                                    at TLSSocket.onConnectEnd (_tls_wrap.js:1355:19)
                                    at Object.onceWrapper (events.js:288:20)
                                    at TLSSocket.emit (events.js:205:15)
                                    at endReadableNT (_stream_readable.js:1154:12)
                                    at processTicksAndRejections (internal/process/task_queues.js:84:9) (/home/pi/MagicMirror/internal/process/warning.js:27 writeOut)
                                [2020-04-27 18:51:15.164] [ERROR]  2020-04-27T18:51:15 <error> (node:17589) UnhandledPromiseRejectionWarning: Error: Client network socket disconnected before secure TLS connection was established
                                    at connResetException (internal/errors.js:559:14)
                                    at TLSSocket.onConnectEnd (_tls_wrap.js:1355:19)
                                    at Object.onceWrapper (events.js:288:20)
                                    at TLSSocket.emit (events.js:205:15)
                                    at endReadableNT (_stream_readable.js:1154:12)
                                    at processTicksAndRejections (internal/process/task_queues.js:84:9) (/home/pi/MagicMirror/internal/process/warning.js:27 writeOut)
                                [2020-04-27 18:51:15.166] [ERROR]  2020-04-27T18:51:15 <error> (node:17589) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 4) (/home/pi/MagicMirror/internal/process/warning.js:27 writeOut)
                                [2020-04-27 18:51:15.168] [ERROR]  2020-04-27T18:51:15 <error> (node:17589) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 4) (/home/pi/MagicMirror/internal/process/warning.js:27 writeOut)
                                
                                1 Reply Last reply Reply Quote 0
                                • bheplerB Offline
                                  bhepler Module Developer @zolabus
                                  last edited by

                                  @zolabus - That is merely a warning, not an error. That won’t be the source of the problem.

                                  S 1 Reply Last reply Reply Quote 0
                                  • S Offline
                                    sdetweil @bhepler
                                    last edited by

                                    @bhepler Unhandled promise rejection.

                                    I disagree… that means the code didn’t anticipate the error, and was waiting for the good completion which will never come…

                                    gotta have a .catch() on every .then()

                                    Sam

                                    How to add modules

                                    learning how to use browser developers window for css changes

                                    bheplerB 1 Reply Last reply Reply Quote 0
                                    • ? Offline
                                      A Former User
                                      last edited by

                                      Unhandled promise rejection is not the reason of this symptom, rather result.
                                      Anyway,
                                      I think Client network socket disconnected before secure TLS connection was established is not coming from program logic. It probably might be caused from unstable network status. (Especially handling TLS connection).
                                      There is no one reason of that issue, so it has no simple solution to diagnose or solve.
                                      I can’t represent this symptom, so hard to find the solution at this moment.

                                      @gonzonia
                                      For me;

                                      reconnect once the connection works again, the image being stuck won’t be an issue. Right now once the connection breaks the module can’t recover.

                                      When I force to break the connection then reconnect again, the module works again without issue. This module just loads an image from external google URL on each update schedule. So, if network is ok, image should be loaded and displayed. I suspect your router or proxy setting is interfering TLS connection between Google Server. but not sure.

                                      Anyway, at this moment hard to find reason why yours are not working.

                                      G 2 Replies Last reply Reply Quote 0
                                      • G Offline
                                        gonzonia @Guest
                                        last edited by

                                        @Sean I appreciate you trying. I’ll see if I can figure out more detail. It’s weird because it’ll work fine sometimes for days and then all of a sudden I can’t get it to do more than 1 or 2 photos before it stops. Nothing else on the pi has that issue, newsfeeds still update, weather updates, CalendarExt2 updates.

                                        I’m going to circumvent the pihole I have set up and point to GoogleDNS and see if that helps.

                                        I wasn’t seeing anything from the MagicMirror in the query logs for the pihole which was in itself odd.

                                        1 Reply Last reply Reply Quote 0
                                        • bheplerB Offline
                                          bhepler Module Developer @sdetweil
                                          last edited by bhepler

                                          @sdetweil - I was replying to the warning about the buffer package being deprecated.

                                          S 1 Reply Last reply Reply Quote 0
                                          • S Offline
                                            sdetweil @bhepler
                                            last edited by

                                            @bhepler ah. never mind!

                                            Sam

                                            How to add modules

                                            learning how to use browser developers window for css changes

                                            1 Reply Last reply Reply Quote 0

                                            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                                            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                                            With your input, this post could be even better 💗

                                            Register Login
                                            • 1
                                            • 2
                                            • 3
                                            • 4
                                            • 5
                                            • 14
                                            • 15
                                            • 3 / 15
                                            • 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