Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple printers #113

Closed
guaifi opened this issue Apr 28, 2013 · 23 comments
Closed

Multiple printers #113

guaifi opened this issue Apr 28, 2013 · 23 comments

Comments

@guaifi
Copy link

guaifi commented Apr 28, 2013

It is possible to print with multiple printers? Maybe running various instances of OctoPrint? I dont know if Raspberry Pi will be able to do all the job.

@foosel
Copy link
Member

foosel commented May 1, 2013

It is only possible via multiple instances. I do not know if the RasPi will be up to the job of multiple concurrent prints either, I tend towards no, it won't.

Might change once I come around to #30

@foosel foosel closed this as completed May 1, 2013
@peteruithoven
Copy link
Contributor

I didn't test printing simultaneously but I got two instances running on a computer by changing the /home/pi/bin/octoprint file to:

#!/bin/sh
OCTOPRINT_HOME=/home/pi/OctoPrint
MJPEG_STREAMER_HOME=/home/pi/mjpg-streamer

# start mjpeg streamer
$MJPEG_STREAMER_HOME/mjpg_streamer -i "$MJPEG_STREAMER_HOME/input_uvc.so -r SXGA -f 15" -o "$MJPEG_STREAMER_HOME/output_http.so" &

# start the webui
$OCTOPRINT_HOME/run --daemon start

# start the webui 2
$OCTOPRINT_HOME/run --daemon start --port 5001 --pid /tmp/octoprint2

Of couse you need to change "pi" to whatever username you're using. In linux you can request this in the terminal using:

whoami

@guysoft
Copy link
Contributor

guysoft commented Jun 19, 2013

@peteruithoven Doesn't this configuration use same configuration at ~/.octoprint ? You should add --basedir

I am interesting in trying this too. The PI quite possibly might handle two instances.
I can set things up now, and try it at the maker group where we actually have 2 printers.
@foosel Would be glad to update about this and document.

@foosel
Copy link
Member

foosel commented Jun 19, 2013

@guysoft Sounds good!

Also yes, you should probably use a separate --basedir maybe better --config per instance. I honestly don't know how sharing the uploads folder between multiple instances would work once you take metadata analysis into account -- it will most probably work as long as you don't try to start them up simultaneously.

@peteruithoven
Copy link
Contributor

Thanks for the tips. I'll try soon.
We're trying to use it to control at least 4 Ultimakers in Fablab Amersfoort. Really great stuff.

@guysoft
Copy link
Contributor

guysoft commented Aug 5, 2013

Both printers broke in the maker space. But I can run successfuly on OctoPi a second instance on port 5001 using:
~/oprint/bin/python ~/OctoPrint/run --daemon start --port 5001 --pid /tmp/octoprint2 --basedir ~/.octoprint2

@bortek
Copy link
Contributor

bortek commented Dec 9, 2014

I have three printers in the makerspace and I am planning to hook them up to one RasPi. Note that I will be running octoprint for monitoring only so see the status of the prints, how much time left , webcam etc.

I am thinking of cloning /home/pi/OctoPrint or maybe whole /home/pi/ into another instance(s) and run them in parallel as much isolated as possible. What do you think ? Or maybe we should start running Docker containers in Raspi, LOL ?

@notrub
Copy link

notrub commented Apr 28, 2015

I know this thread is a couple years old now, but I was wondering how the B+ has changed how many printers can be run off one pi?

@guysoft
Copy link
Contributor

guysoft commented Apr 29, 2015

@notrub Well you are welcome to test it yourself.
You can start another instance of OctoPrint on OctoPi with the command given in the comment above: #113 (comment)
I'd imagine it should be possible.

@cronos45
Copy link

cronos45 commented Sep 4, 2015

@notrub Any luck? @guysoft I am new to this, where do I change settings for a second instance?
Thank you.

@jrpmedia
Copy link

jrpmedia commented Sep 7, 2015

I am assuming I can put a Raspberry Pi on each Printer and print to them from one workstation?
As each printer will then have a unique IP number, yes?

@markwal
Copy link
Member

markwal commented Sep 8, 2015

@jrpmedia yes

@kareem613
Copy link

Is there a way to change the bonjour name? I've got two Pis setup and would like to change the name of one of them. I don't see anything in the network config. Where can I make that change?

@foosel
Copy link
Member

foosel commented Oct 7, 2015

The bonjour name is the hostname (that's sadly nothing that can be changed). So you'll need to change the hostname of your Pi. That can be done via raspi-config, see here on how to do that

@DarkMatterMatt
Copy link

Has anyone tested the max simultaneous working instances of OctoPrint? My school has 15-20 3D printers (2x UP printers, 10 Makerbot Replicator Minis & 5 Makerbot Replicators) and I was wondering how many Raspberry Pi Bs we are going to need? 😄

edit: specified the types of 3D printers (just more info, I don't think it is really necessary)

@guysoft
Copy link
Contributor

guysoft commented Oct 16, 2015

What version of Makerbot Raplicators?
Most of the printers you mentioned are closed-source and have no way to be supported in OctoPrint.
I would have love to see OctoPi in schools, but you might also want to have a look at 3DPrinterOS, they are built to handle dozens of printers.

Of course, you could always add some kind of cluster API control to OctoPi, and have one sit on every 2-3 printers. But I know none who attempted.

@markwal
Copy link
Member

markwal commented Oct 16, 2015

If by Replicator you mean Replicator 1, then it will work with OctoPrint and GPX, but if you mean the new 5th Generation Replicator, it won't work. And it definitely won't work with the Replicator Mini and I don't know anything about Up printers, but I suspect not there too.

MakerBot went to a proprietary and closed protocol starting with Gen 5 so the GPX plugin doesn't work with them.

@DarkMatterMatt
Copy link

Thanks for the swift responses guys, I thought we had Replicator 1s but it turns out they are 5th generation models 😢

@cbusillo
Copy link

Is anyone running multiple instances on the newest OctoPrint? I've tried two different methods, but neither seem to work. I think the configs have changed or something. I am running the OctoPi distribution.

@CharlieJordan
Copy link

I upgraded from I-don't-know-which-version of Octopi to octopi-jessie-lite-0.13.0 yesterday and could not get multiple instances of OctoPrint running again, even after disabling haproxy. After much wailing and gnashing of teeth, and a blue million reboots, I finally did this:

Preamble:
I have 2 printers, a MakerFarm kit & a Prusa i3 that I built from scratch.
Both run Marlin firmware. I mostly use Simplify3D ( MacOS ) for slicing
and have configured Samba on the Pi so that I can "Save Toolpaths to Disk"
and simply choose the smb mounted volume associated with the printer I
want to use. The saved files then automatically show up in the Files menu
of the appropriate OctoPrint instance.

I think that it is possible to have multiple printers share the same files.
My printers are different enough that doing this has no value to me. If I'm
ever able to get the 2 printers to behave identically, then I'll probably
pursue this.

This guide is terse and assumes a certain level of Unix knowledge. It's
really not so much a guide as a set of notes documenting the process in
case I need to do it again... I'm assuming that you can figure out what
to change to reflect your preferences ( e.g.: vi, MakerFarm-i3v, Prusa-i3 )

I installed 2017-01-11-raspbian-jessie-lite & octoprint version 1.3.1


Initial raspbian install and config

install 2017-01-11-raspbian-jessie-lite.img on a microSD card
	( dd if=, blah, blah, blah )

touch /Volumes/boot/ssh
# eject SD card & use it to boot Raspberry Pi
ssh pi@raspberrypi.local
sudo raspi-config
	# expand filesystem & change hostname ( advanced options )
sudo apt-get update
sudo apt-get install samba samba-common-bin

--- configure samba ( with no authentication, probably not a good idea )

	mkdir ~/MakerFarm-i3v ~/Prusa-i3
	chmod 777 ~/MakerFarm-i3v ~/Prusa-i3

	sudo mv /etc/samba/smb.conf /etc/samba/smb.conf.orig
	...edits... i.e. diff /etc/samba/smb.conf /etc/samba/smb.conf.orig
	187,198d186
	< [Prusa-i3]
	<   path = /home/pi/Prusa-i3
	<   read only = no
	<   browseable = yes
	<   guest ok = yes
	< 
	< [MakerFarm-i3v]
	<   path = /home/pi/MakerFarm-i3v
	<   read only = no
	<   browseable = yes
	<   guest ok = yes

--- install latest OctoPrint

cd ~
sudo apt-get install python-pip python-dev python-setuptools python-virtualenv git libyaml-dev build-essential
git clone https://github.com/foosel/OctoPrint.git
cd OctoPrint
virtualenv venv
./venv/bin/pip install pip --upgrade

# this next part took several hours to complete on my system...
./venv/bin/python setup.py install

mkdir ~/.octoprint

--- setup serial ports

pi@octo:~ $ udevadm info /dev/ttyACM0 | grep ID_SERIAL_SHORT
E: ID_SERIAL_SHORT=75338323635351A051D0

pi@octo:~ $ udevadm info /dev/ttyACM1 | grep ID_SERIAL_SHORT
E: ID_SERIAL_SHORT=85436323631351511212

sudo vi /etc/udev/rules.d/z21_persistent-local.rules and insert
	ATTRS{serial}=="85436323631351511212", SYMLINK="ttyACM-Makerfarm-i3v"
	ATTRS{serial}=="75338323635351A051D0", SYMLINK="ttyACM-prusa-i3"
sudo usermod -a -G tty pi
sudo usermod -a -G dialout pi

--- configure scripts for automatic start up

cd ~/OctoPrint/scripts
cp octoprint.init octoprint1.init
cp octoprint.default octoprint1.default
# edits, i.e. diff octoprint.init octoprint1.init
	4c4
	< # Provides:          octoprint1
	---
	> # Provides:          octoprint
	20,21c20,21
	< NAME="OctoPrint1"
	< PKGNAME=octoprint1
	---
	> NAME="OctoPrint"
	> PKGNAME=octoprint
>>> edits, diff octoprint.default octoprint1.default
	7c7
	< BASEDIR=/home/pi/.octoprint
	---
	> BASEDIR=/home/pi/.octoprint1
	10c10
	< CONFIGFILE=/home/pi/.octoprint/config.yaml
	---
	> CONFIGFILE=/home/pi/.octoprint1/config.yaml
	13c13
	< PORT=5000
	---
	> PORT=5001
	
---

sudo cp ~/OctoPrint/scripts/octoprint.init /etc/init.d/octoprint
sudo chmod a+x /etc/init.d/octoprint
sudo cp ~/OctoPrint/scripts/octoprint1.init /etc/init.d/octoprint1
sudo chmod a+x /etc/init.d/octoprint1

sudo cp ~/OctoPrint/scripts/octoprint.default /etc/default/octoprint
sudo cp ~/OctoPrint/scripts/octoprint1.default /etc/default/octoprint1

sudo update-rc.d octoprint defaults
sudo update-rc.d octoprint1 defaults

--- Octoprint config, part 1

~/OctoPrint/venv/bin/octoprint
# point a browser to your_hostname.local:5000 and configure everything
# except for the serial ports, folders, color and name.  ( I set different
# colors on the instances to help me visually recognize which machine I'm
# working with )
  
cp -r ~/.octoprint ~/.octoprint1
sudo shutdown -r now

--- Octoprint config, part 2

# point browser windows at your_hostname.local:5000 and
# your_hostname.local:5001 and configure serial ports, folders, color 
# and name

@mikomiazaki
Copy link

@DarkMatterMatt I have successfully got 9 printers up and running off of a single Linux Box. Printers: 2 Printrbot Simple Metals, PrintrBot Play, Prusa i3, Monoprice Mini, Ultimaker O+, Rostock Kossel Delta, Tronxy X2, and a custom job. Running prints on all simultaneously did not affect print quality, it did, however, tax the system to have all 9 mjpg streamers running with yuyv cameras 😛

@guysoft
Copy link
Contributor

guysoft commented Apr 8, 2017 via email

@vrogy
Copy link

vrogy commented Jul 1, 2017

Woah, awesome, @mikomiazaki! I'd love to know the details as well- my hackerspace has 7 printers and unifying the interfaces would be awesome!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 29, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests