Octoprint and node-red dashboard


#1

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.

I'm not printing Marvin right now, but I set some payloads for this image.

Cheers!


#2

Where does this run? (phone, workstation, on the Pi itself)


#3

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).


#4

I'm trying trying to conceptualize if this is a client-server sort of thing and that the client is remote. I'm guessing so.

I've worked with Node-RED so it's somewhat interesting to me. It's a bit like ladder programming.