Here's my node-red integration via the mqtt plugin. The LED ON/OFF uses the api POST via /api/system/commands/custom to turn a 2 channel relay module (one for printer, other for led).
For the cam, I have a static image in place. A switch will open the stream for 15 sec and then return to the static image, otherwise the dashboard would leave it streaming continuously. The octoprint web does a good job of disconnecting the stream, when not in use.
Node-RED usually runs on a Pi or BBB or some other SBC, but you can run it on almost anything that can run node.js, AFAIK. You could most likely manage to run Node-RED and mosquito (MQTT broker) on the same Pi as OctoPrint, as long as you're not going ape with it, since there's usually plenty of RAM available, and you shouldn't need too much CPU (again, so long as it's lightly loaded...if you're going to go nuts with it, put it on a separate SBC).
Hello @octoMqtt I am trying to do the same as your work, integrating OctoPrint with MQTT and Node-Red. May I ask how you created your dashboard? I'm new to this. Can you share your exported flows? I was able to subscribe to all topics and I tried to make a dashboard but it's not working. I also don't know how to display the camera stream. Big help if ever you respond!