Read the statement by Michael Teeuw here.
MMM-iCloud-Client
-
The problem is not fixed.
I had hoped the developer or some other people here would answer me for this issue, but they doesn’t. -
you get no error in the response of
instance.contacts
, but at the same timeresult.contacts
is undefined. therefore it will be interesting what you getting as a result in the callback: tryconsole.log(results);
between line L134 and L135 in node_helper.jsinstance.contacts(function(err, results) { if (err) return console.log("failed to fetch contacts"); console.log(results); results.contacts.forEach(function(contact) { //Line 135 ....
-
@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? -
@lolobyte but the result is not logged in there, this is just the log of the exception which happens in the line after
-
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
-
what u mean with in the line after?
-
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
-
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?
-
@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