Hi,
I'm trying to stop python-function-node with a while loop in it. with a stop button on the dashboard. unfortunately i can't get the node to read in new msg. does anyone have an idea how i can solve this?
thanks for the help
Hi,
I'm trying to stop python-function-node with a while loop in it. with a stop button on the dashboard. unfortunately i can't get the node to read in new msg. does anyone have an idea how i can solve this?
thanks for the help
Welcome to the forum.
It would help us to help you if you posted your flow here in the forum, and also explain
what you are trying to do in a bit more detail.
Which node are you using for this ? If you are calling out to a python app then either the exec node or daemon node should let you kill and restart the process.
Hi,
thank you very much for your answer.
I use the python function from the node-red-contrib-python-function package.
thank you for your answer in the following my flow. unfortunately i can't publish the code because passwords etc. are in it.
Node-red is supposed to be a low-code programming system!
We can't tell which of those are python function nodes and which are the core (Javascript) function, but either way there seems to be an awful lot of them and very few of the other core nodes.
Have you taken a look at these videos to understand the Node-red way of doing things?
With regard to the python function, the help does say THIS IS NOT READY FOR PRODUCTION YET!
and since it's not been updated for more than two years, it seems unlikely that it will ever be ready.
As @dceejay has mentioned, you can run external python scripts with the exec and daemon nodes which are part of the core.
Hi jbudd
thanks for the answer. i am aware that i have not solved everything nod-red compliant. Actually i wanted to solve everything in python but i need a web interface. and node red offers a good and fast solution for that.
is it also possible to inagirate with the exec and daemon nodes with the dashboard ?
A good way to solve this might be to use MQTT to interface between your python process and the dashboard. Then you can implement your system in python completely independently of node-red, and have the dashboard running in node red communicating with the python process via MQTT.
Actually Node-red does let you glue together all sorts of scripts and executables and at the same time it provides a basic dashboard.
So if you prefer python, by all means call your scripts from node-red. Except the python function mode may be the wrong way to do it.
I suppose it does give you the Monaco editor for your script. But in my humble opinion, anyone who thinks that's a good code editor has never experienced the joy of vi.
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.