Shell command to Connect the Printer

Is there a shell command that can be sent from terminal of raspberry pi to connect the printer to octoprint?

Hello,
yes, you can do this with curl and the API

# connect octoPrint and the printer again
curl -s -X POST  -H "Content-Type: application/json" -H "X-Api-Key":"$OCTOPRINT_X_API_KEY" -d '{"command":"connect"}' http://$PRINT_HOST/api/connection
sleep .5

5 Likes

I cannot remember where I got the instructions from (your Google search is going to be as good as mine), but I found instructions online so that when you insert the USB cable, Octoprint is notified, connects and runs the connect script.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.