Read the statement by Michael Teeuw here.
Python in to the magic mirror.
-
does your python script continue to run once its started? the design of the node helper starting the script every second depends on the script ending…
or as you have found you will kill the system (doesn’t matter, pi or larger)…
you could do it your suggested way… but typically, one would add code in the notification received to start it once…
-
@paulvanderheijden90
You can putvar process = spawn("python", ["/home/pi/src/P2000.py"])
intostartfunction if you want to execute when module is successfully loaded.Or you can make some
STARTnotification from main module then use it as trigger for execution. You can usesocketNotificationReceivedfunction to that purpose.Or, you can terminate spawned child process when it becomes needless.
-
@sdetweil
Yes one time start the python and it will run.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login
