How to trigger Python script on Raspberry Pi from Node-Red

0 votes
I'm using Node-Red, hosted on a Raspberry Pi for an IoT project.

How do I trigger a Python script that is on the raspi from Node-Red? I want to run a script that updates the text on an Adafruit LCD shield which is sitting on the Pi

Should I be looking to expose the Python script as a web service somehow?

I'm using a Raspberry Pi B+
Sep 14, 2018 in IoT (Internet of Things) by Annie97
• 2,190 points
1,050 views

1 answer to this question.

0 votes
Node-RED supplies an exec node as part of its core set, which can be used to call external commands, this could call your python script.

More details of how to use it can be found in the info sidebar when a copy is dragged onto the canvas.

Or you could wrap the script as a web service or just a simple TCP socket, both of which have nodes that can be used to drive them.
answered Sep 14, 2018 by Upasana
• 8,530 points

Related Questions In IoT (Internet of Things)

0 votes
1 answer

How to connect Raspberry Pi and lighting the LED?

You might want to try instead to ...READ MORE

answered Jul 23, 2018 in IoT (Internet of Things) by anonymous2
• 4,260 points
36 views
0 votes
1 answer

Display random images from USB on Raspberry Pi

Hey, it's a cool idea! And, since ...READ MORE

answered Nov 27, 2018 in IoT (Internet of Things) by nirvana
• 3,060 points
67 views
0 votes
1 answer

Issue with connection on Watson IoT Out node on Raspberry Pi

The frequent disconnects could be due to ...READ MORE

answered Dec 20, 2018 in IoT (Internet of Things) by Shubham
• 13,300 points
63 views
0 votes
1 answer
0 votes
1 answer

Display time in a Windows Core IoT app with a clock!

It is possible, but you should understand ...READ MORE

answered Jul 9, 2018 in IoT (Internet of Things) by nirvana
• 3,060 points
111 views
0 votes
1 answer
0 votes
1 answer

raspberry pi details

I think It's only possible if the ...READ MORE

answered Jan 22 in IoT (Internet of Things) by Shubham
• 13,300 points
27 views
0 votes
1 answer