Read the statement by Michael Teeuw here.
MMM-Remote-Control API Questions
-
@sdetweil Also how do i make it so that the python file is always running?
-
@sgarg15 that was the example of running a little js app on the command line node js_filename
The exact code here doesn’t help you, but the prior code I posted is what u want to try. Altho I don’t know how u will hook it to the sensors on your pc
-
@sgarg15 your python PGM has to loop somehow. I don’t do python
-
@sdetweil so, i have my python script running in the background, and in my nodeHelper.js i would have
import {PythonShell} from 'python-shell'; let pyshell = new PythonShell('Swiping.py'); // < --- whatever your script name, in the module folder // the .on handler gets called each time the pythin script writes a message to stdout pyshell.on('message', function (message) { // received a message sent from the Python script (a simple "print" statement) console.log(message); // send info up to modulename.js this.sendSocketNotification("movement", message) });
could you explain what movement and message mean in the
sendSocketNotification
? -
If you could help me achieve this, or give me some info that could help me do this i would really appreciate it
-
@ertopps do what?
-
I am stuck due to similar issues. And now I need some professional developers with Python knowledge and good programming skills. I am from the US, check this out. And you need to be able during my working hours, it will be a great advantage for fruitful cooperation. Send me a message to my private box for more details. I do hope to find someone here with your assistance.