A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.
Read the statement by Michael Teeuw here.
Need helping sending notifications between module and module node_helper
-
@seann node_helper.js uses console.log, and the output shows in the console window where you did npm start dev
the module.js uses Log.log() and the output shows up in the console tab of the developers window started with npm start dev or ctrl-shift-i (letter i)
-
-
@sdetweil Nevermind, received the notification now somehow. Thank you for your help.
-
@seann and u really should wait til you get the “ALL_MODULES_STARTED” notification before starting communications between components… .like this
// helper.js var helper; Module.register("helper", { defaults: { }, start: function(){ helper = this; Log.info("Started Module: " + helper.name); }, notificationReceived: function (notification, payload) { if(notification ==="ALL_MODULES_STARTED") helper.sendSocketNotification('helper_notification', {}); }, socketNotificationReceived: function(notification, payload){ Log.info("Helper Recieved notification: " + notification); } });
also, if you use Log.error() in the module,the messages will be easier to find in early development
-
@sdetweil Perfect, thank you! :)