Read the statement by Michael Teeuw here.
Kalliope assistant + MM
-
@sispheor I’ve tried multiple positions for the module, still nothing gets displayed. Not sure why though. I’ve tried refresh, reboot etc. still nothing. Maybe I should delete the module and try a fresh install. The curl should work with just the module installed right?
-
@sispheor trying to help, I installed the module on my mirror… but… curl notifications don’t work…
is there an install step missing? or a package.json that defines the install process for the dependencies?
cut paste from the module readme…
~/MagicMirror/modules$ curl -H "Content-Type: application/json" -X POST -d '{"notification":"KALLIOPE", "payload": "my message"}' http://localhost:8080/kalliope curl: (7) Failed to connect to localhost port 8080: Connection refused
netstat shows nothing listening on 8080
so, my mirror is NOT on 8080, but 8086, due to other components on the normal MM ports…
you should update the instructions to say use the MM port on the curl…
now… I got the notification, and see the debug log (ctrl-shft-i) say
MMM-kalliope received a socket notification: KALLIOPE Payload: my message
and the content shows for the configured amount of time (8 seconds per the above config settings)
-
@sispheor So using the ctrl-shift-i I was able to find the error that it is throwing.
Uncaught TypeError: console.log is not a function
This error is repeated in the log each time it receives the post request.
What are your suggestions?
-
@dmwilsonkc edit the MM/modules/MMM-kalliope/MMM-kalliope.js and change all console. to Log.
console.log is ONLY allowed in the node_helper.js and Log.log is ONLY allowed in the module.js
-
@sispheor So… I figured out how to get rid of the error. I deleted line 86 of MMM-kalliope.js .
console.log(this.name + " received a socket notification: " + notification + " - Payload: " + payload);
Everything works fine for now. Not sure why this is, but I’m assuming the chromium browser does not like the console.log code, but I could be wrong.
-
@sdetweil huumm… yes it is obvious that you have to call your magic mirror url. Including the port if you changed it.
-
@dmwilsonkc indeed it’s weird, I use this code as it in prod on my mirror without any issue.
Maybe a recent update of chromium or MM. -
@sdetweil Thanks for the info, I didn’t see it in time. I deleted the entire line of code. It worked after that. I will replace the line with your suggestion this evening.
-
i have 5 lines of console.log on my MMM-kalliope.js
-
@sispheor well, as a new MM user, obvious is not so…