@emrhssla that log is only from the module file. Not node_helper
Read the statement by Michael Teeuw here.
Posts
-
RE: Even a simple node_help.js example does not run.
-
RE: Even a simple node_help.js example does not run.
@emrhssla sorry, I had a name of “sample” when I did it. I guess the - is not allowed
-
RE: MMM-SONOS showing then not showing
open the developers window
ctrl-shift-i
select the console tab
and scroll up to find any errors (usually red text) -
RE: Even a simple node_help.js example does not run.
@emrhssla said in Even a simple node_help.js example does not run.:
also, you need to install the python-shell component…
need a package.json file
{ "name": "MMM-Testpython", "description": "sample", "version": "0.0.1", "dependencies": { "python-shell": "latest" } }and then run
npm installin the module folder
the updated node_helper.js is
var NodeHelper = require("node_helper"); var {PythonShell} = require('python-shell'); module.exports = NodeHelper.create({ start: function() {}, socketNotificationReceived: function(notification, payload) { console.log(this.name + " received a socket notification: " + notification + " - Payload: " + payload); }, })and produces this message in the terminal window, when the UI component is clicked
MMM-Testpython received a socket notification: TEST - Payload: [object Object] -
RE: Even a simple node_help.js example does not run.
@emrhssla said in Even a simple node_help.js example does not run.:
Log.log(this.name + " received a socket notification: " + notification + " - Payload: " + payload);
as I posted in the other topic, the node_helper content would be displayed in the terminal window
where u started MM…also
Log.log will not work in node helper. that is only available in the module.js
-
RE: I don't know how to use node_helper.js.
@emrhssla ok, there are two different output areas…
the developers window, which u posted is from the module.js side…
the node helper content comes out in the terminal window.start you mirror app,
then start it withnpm start &(note the & at the end)
now you should be able to see any messages in the terminal window from the node_helper -
RE: Does MMM-MyCommute require payments to Google?
@mlcampbe no idea. I have had an account for a couple years. And never seen a bill. Use it for voice, maps, geolocation
-
RE: Struggling to get started
well, you picked two hard ones to start with…
google thinks it is talking to a device or ‘application’ on your end. its some name for the device… ‘bobs Mirror’
cause usage and authorization is tracked by device or application… pick a name
same for Twitter…you arent using THEIR app, so what app ARE you using? make up a name
-
RE: Does MMM-MyCommute require payments to Google?
@mlcampbe it does, but I have never seen a bill…
-
RE: How do I access my Pi from an externel network to install modules and change config.js?
With TeamViewer you don’t have to open a port