@sean
Hello Sean, Again thank you very much for you’re valued help!.
I spend yesterday after midday and evening with a friend figure out how you’re code is working. and we did some tests to send also somthing back to the Node helper and alote came clear by you’re example.
So realy thank u very much.
To day I spend my morning figure out one last problem the text on the screen is [ Object ArrayBuffer] and not the string I put true the stdout.write.
The text that is displayed on the screen is :
I did some debugging of my own. and wenn I override the data in the node helper just after it come from the spawn function this is displayed on the mirror. so the code is working until the spawn function.
/// node_helper.js
const spawn = require("child_process").spawn
var NodeHelper = require("node_helper")
module.exports = NodeHelper.create({
socketNotificationReceived: function(notification, payload) {
switch(notification) {
case "GIVE_ME_DATA":
this.job()
break
}
},
job: function() {
var process = spawn("python", ["/home/pi/src/test.py"])
process.stdout.on("data", (data)=>{
data= "test hello World"
console.log(data)
this.sendSocketNotification("HERE_IS_DATA", data)
})
}
})
So i tested also the python test project. and wenn I run it in the terminal it give no error. so the python project is fine aswell I think.
import sys
sys.stdout.write("Hallo Ik ben Paul")
So I think the spawn function is not correct at this time?
Can you help me out one more time please?