I have my Octoprint set up with a few system commands that run python scripts to turn on/off led lights, and turn the printer on/off.
So my Pi is powered from the printers power supply (which is always on), and then I have the power to the printer ran through a relay that is controlled by a GPIO. That all works great, but I want to add one feature.
Once I click the power on under system commands, I also want it to connect to the printer (as it of course loses the connect when the printer is shut off.)
Is there a command that I can execute via python script to tell it to attempt a connection to the USB serial port on my printer? So far my research has come up empty.