Notifications
Clear all

Multiple printers on Raspberry Pi with Octoprint.  

  RSS
Bob
 Bob
(@bob-2)
Reputable Member
Multiple printers on Raspberry Pi with Octoprint.

Greetings Esteemed Colleagues;

    If' you've been following my adventures, my Mk2.5S had a bed failure which I diag'd down to the Rambo.  While waiting for a replacement Rambo I assembled a Mk3S+ which I'd had on a shelf and I'm loving.  I got the Rambo and repaired my Mk2.5S so old faithful is back on the farm.  As I'd reported the main reason I hadn't built the Mk3S+ before was I didn't really have a place to put it.  Now that I have it running and the Mk2.5S back online I decided to put the Mk3S+ where the Mk2.5S had been and the Mk2.5S where my Ender3 had been sitting.

While I have many Raspberry Pi's, it seemed unnecessary to dedicate one to each of the machines.  This had been my solution in the past when I was running Raspberry Pi 3s, but the Raspberry Pi 4 seems quite adequate to manage multiple printers, I just needed to come up with a way to get Octoprint to be able to manage more than 1 printer on a single host.

I had an idea how I was going to do it, back in the dark days of the internet I'd learned to run multiple copies of Apache on a host to save the need for dedicated servers, this was before Apache could manage virtual servers and use name based instances, so I figured I could do it that way with Octoprint.  Fortunately for me I'm lazy and before I sat down to do the brain work to iron out the details I discovered this: https://github.com/paukstelis/octoprint_deploy a configurator that does exactly what I'd planned to do myself.

I'm rather impressed by the work that has gone into this, not only does it work with Octopi, but with other variations as well by doing stand alone installations of Octoprint on your platform.  Since I'm using a Raspberry Pi 4 my choice was Octopi.

If there's a failure with this project it's in the documentation.  The quick start guide that's provided does get you up an running quickly and the menu driven way of adding printers works well, but it does require that you be an advanced user Octoprint and knowledge of haproxy doesn't hurt either.  Using the tools provided I quickly had both my printers configured and talking to both instances of Octoprint.  My initial difficulty was that my instances were controlling the wrong printers.  During the setup the script is supposed to read the serial number off the system board and use that to tie a printer to an instance.  However, it doesn't seem that Prusa keys a serial number onto either Rambo and Einsy.  Still, the documentation tells you if the serial number does not exist it will bind to the USB port.  Except that it didn't.  As I made changes and rebooted the Pi or restarted Octoprint I found that the instances would randomly bind to a different printer.  My solution was to go into Octoprint, disable the Auto discover feature of each instance and set it to a specific USB port.  I'd assumed based on the docs that the script was supposed to do this for me, but it didn't, still it wasn't a difficult thing to figure out and all is good now.  I have one Pi running two printers which is the goal.

Also, while it appears that I have 2 instances of Octoprint that's really just an illusion, there is only one.  If I go into either instance and issue a shutdown command both instances shutdown and the API key is exactly the same for both instances which confused me at first when I sent a test job to the Mk2.5S and it initiated on the Mk3S+.  To send the job to the correct printer you need to use the correct name as configured in HA proxy.  In my case since my Mk3S+ is my default instance I can send to the FQDN or IP, otherwise I have to use the URI I gave the MK2.5S when I configured it which in my case is prusapi.local/MK2.5S so long as PrusaSlicer has that for the Octoprint name in settings for that printer it works fine.

 According to the docs you can bind a camera to each instance, I don't have any camera's configured yet so I haven't tested that feature yet though the docs warn that you understand how Octoprint manages cameras if you want to use it.  I don't expect this to be too much of a problem though if I want to add camera because I can always do this via the Octoprint GUI if the script should prove insufficient.

I'm not sure if any of you have done this though I did a search on the forum to see if anybody had asked or reporting on multiple printers with one Pi and I didn't find any so I thought I'd report my findings just in case any of you are thinking about it.

I have a couple of tweaks I'd like to make before I'm completely satisfied, but at this point I have full control over both of my printers with 1 piece of hardware so even if I don't make those I'm still pretty happy at what I've managed to accomplish in just a couple of hours.

Cheers

-Bob

This topic was modified 2 months ago 2 times by Bob

Prusa I3 Mk2 kit upgraded to Mk2.5s, Ender3 with many mods, Prusa Mini kit with Bondtech heat break, Prusa I3 Mk3s+ kit

Posted : 25/02/2024 4:34 am
Share: