Remote script execution on Pi


Maybe i should open another issue on the matter but here is a question i have:

I use the Process::run() command to start a python script which will be running “forever” and communicate with the particle firmware through named pipes. I want to be able to read the Output of the process started with Process:run but it looks like i don’t get the output unless i wait for the process to finish. Is there a way to retrieve the output of the started process while it is actively running ?



Did you ever find a solution? I am running Particle on an old RasPi model 1 B+ and I want to remotely start a python script through IFTTT. I began by using Process proc = Process::run(“sudo python”); then attempted …run("/home/pi/"); and everything between the two. Nothing worked. I then moved on to writing a shell file that would start the python file for me. When I run it through an ssh, it starts the python program fine, then prints a string. However, when I have particle try to run it, particle will spit out my string, but refuses to start my python script. SOS


[Solved] It turned out that I had two problems. The first was that I needed to make the python script executable. I tried this early on, but it didn’t work because of my second problem: I didn’t have permission to access/edit the database that was storing my variables [note my attempts to include sudo in the Process::run() above]. I gave my script permissions, and it works like a charm now.