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,200 points
2,084 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,620 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,280 points
138 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,120 points
191 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,450 points
197 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,120 points
399 views
0 votes
1 answer

Building Python Server for Secure communication with Raspberry Pi

There could be several ways to add ...READ MORE

answered Jan 10, 2019 in IoT (Internet of Things) by DataKing99
• 8,210 points
727 views
0 votes
1 answer

raspberry pi details

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

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