I was poking around with running a python script in my raspberry pi with the exec node.
It looks like my script was run by it but i don't think i know how to get the result crunched by my code in the msg.payload or debug tab in node red.
Can someone point me out as to what i need to do in my python code to make this show up in the debug panel of node red? My python code generates a json styled output which needs to be used to do something on the Node red dashboard.
You can freely develop your python script as normal, test it via python filename.py and once you see in your tests the values you want to push to node-red just run it trought exec node...
Have you checked all three outputs of the exec node to see what is there? Use three debug nodes configured to Show Complete Message and give them names so you can identify them in the debug pane.
I find it much easier to add MQTT support to a python script, and have said script run as a service. Then use NR to request and receive from the python (service) via MQTT. Not to say that exec method is not an option, but having python talk MQTT to and from NR is much easier in the long run, IMHO.
That is actually a wonderful idea !
MQTT is the easiest thing to work with. Since the script runs on my raspberry pi i can make use of crontab to run it at fixed intervals and spit out the information using MQTT
Thanks @Nodi.Rubrum