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-iCloud-Client

    Scheduled Pinned Locked Moved Troubleshooting
    11 Posts 7 Posters 8.0k Views 8 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.
    • lolobyteL Offline
      lolobyte @strawberry 3.141
      last edited by

      @strawberry-3.141 said in MMM-iCloud-Client:

      lts.contacts.forEach(function(contact) { //Line 135

      ok, now tis is my new node_helper.js in the module folder from MMM-iCloud-Client

      instance.login(this.config.username, this.config.password, function(err) {
      if (err) return console.log(“login failed”);
      instance.contacts(function(err, results) {
      if (err) return console.log(“failed to fetch contacts”);
      console.log(results);
      results.contacts.forEach(function(contact) {
      contactDB.update({“contactId”: contact.contactId}, contact, {upsert: true});

      and the log result ist this:

      0|mm | Whoops! There was an uncaught exception…
      0|mm | TypeError: Cannot read property ‘forEach’ of undefined
      0|mm | at Class. (/home/pi/MagicMirror/modules/MMM-iCloud-Client/node_helper.js:136:22)
      0|mm | at Request._callback (/home/pi/MagicMirror/modules/MMM-iCloud-Client/node_modules/icloud/index.js:117:13)
      0|mm | at Request.self.callback (/home/pi/MagicMirror/modules/MMM-iCloud-Client/node_modules/request/request.js:186:22)
      0|mm | at emitTwo (events.js:106:13)
      0|mm | at Request.emit (events.js:191:7)
      0|mm | at Request. (/home/pi/MagicMirror/modules/MMM-iCloud-Client/node_modules/request/request.js:1081:10)
      0|mm | at emitOne (events.js:96:13)
      0|mm | at Request.emit (events.js:188:7)
      0|mm | at IncomingMessage. (/home/pi/MagicMirror/modules/MMM-iCloud-Client/node_modules/request/request.js:1001:12)
      0|mm | at IncomingMessage.g (events.js:286:16)
      0|mm | MagicMirror will not quit, but it might be a good idea to check why this happened. Maybe no internet connection?

      strawberry 3.141S 1 Reply Last reply Reply Quote 0
      • strawberry 3.141S Offline
        strawberry 3.141 Project Sponsor Module Developer @lolobyte
        last edited by strawberry 3.141

        @lolobyte but the result is not logged in there, this is just the log of the exception which happens in the line after

        Please create a github issue if you need help, so I can keep track

        lolobyteL 2 Replies Last reply Reply Quote 0
        • lolobyteL Offline
          lolobyte @strawberry 3.141
          last edited by

          @strawberry-3.141

          Sorry, your first step was a little confuse for me.

          for you it’s maybe familiar what you can do with coding and so on, i’m very very newbie, my age is 46 and i’m new in this environment developing, coding and so on.

          Please give me than a step by step instruction about witch information u need.

          pi@raspi2-MM2:~/MagicMirror $ pm2 logs mm
          [TAILING] Tailing last 10 lines for [mm] process (change the value with --lines option)
          /home/pi/.pm2/logs/mm-error-0.log last 10 lines:
          0|mm | at Request._callback (/home/pi/MagicMirror/modules/MMM-iCloud-Client/node_modules/icloud/index.js:117:13)
          0|mm | at Request.self.callback (/home/pi/MagicMirror/modules/MMM-iCloud-Client/node_modules/request/request.js:186:22)
          0|mm | at emitTwo (events.js:106:13)
          0|mm | at Request.emit (events.js:191:7)
          0|mm | at Request. (/home/pi/MagicMirror/modules/MMM-iCloud-Client/node_modules/request/request.js:1081:10)
          0|mm | at emitOne (events.js:96:13)
          0|mm | at Request.emit (events.js:188:7)
          0|mm | at IncomingMessage. (/home/pi/MagicMirror/modules/MMM-iCloud-Client/node_modules/request/request.js:1001:12)
          0|mm | at IncomingMessage.g (events.js:286:16)
          0|mm | (node:11184) DeprecationWarning: sys is deprecated. Use util instead.

          /home/pi/.pm2/logs/mm-out-0.log last 10 lines:

          That’s the first log message of my mm2

          1 Reply Last reply Reply Quote 0
          • lolobyteL Offline
            lolobyte @strawberry 3.141
            last edited by

            @strawberry-3.141

            what u mean with in the line after?

            1 Reply Last reply Reply Quote 0
            • BehB Offline
              Beh @Kai-Christoph
              last edited by

              @Kai-Christoph

              You can use vdirsyncer to sync a private iCloud calendar with your mirror.

              I wrote a walkthrough here:

              https://forum.magicmirror.builders/topic/5327/sync-private-icloud-calendar-with-magicmirror

              1 Reply Last reply Reply Quote 0
              • Feedy88F Offline
                Feedy88
                last edited by

                Digging out this old topic. I successfully could sync my private calendar with vdirsyncer to my Mirror. What I would like to add are the birthdays of my contacts. The issue with this one is, that they are not an acutal calendar.

                I tried with another device specific password to bypass the two-factor authentification which I was assuming is the issue here but no success.

                I would even be fine in manually downloading an .ics with the Birthdays but have no idea how to extract them from the contacts. Does anyone have been successful?

                TazDevT 1 Reply Last reply Reply Quote 0
                • TazDevT Offline
                  TazDev @Feedy88
                  last edited by

                  @Feedy88 said in MMM-iCloud-Client:

                  Does anyone have been successful?

                  please upvote this: https://forum.magicmirror.builders/topic/16850/icloud-contacts-to-birthday-calendar-pyicloud-vcf-to-ics

                  i had success manually, it would be awesome to get this as working module

                  1 Reply Last reply Reply Quote 0
                  • 1
                  • 2
                  • 1 / 2
                  • 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