Archive:PrinterBot: Difference between revisions
m (Vrs moved page PrinterBot to Archive:PrinterBot without leaving a redirect) |
|||
(19 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
{{outdated|type=member project}} | |||
<noinclude> | <noinclude> | ||
{{project | {{project | ||
|name = PrinterBot | |name = PrinterBot | ||
|status = | |status = obsolete | ||
|image = | |image = | ||
|description = 3d Printers multiple octoprint machine | |description = 3d Printers multiple octoprint machine | ||
Line 14: | Line 15: | ||
VoomPC-2 Enclosure [http://www.mini-box.com/VoomPC-Enclosure-2?sc=8&category=1544] | VoomPC-2 Enclosure [http://www.mini-box.com/VoomPC-Enclosure-2?sc=8&category=1544] | ||
Point of view nvidia ion mini-itx board - QuadCore Atom 1.6Ghz | Point of view nvidia ion mini-itx board - QuadCore Atom 1.6Ghz (from the free to use shelf) | ||
2 x HP 2Gb ddr2 800 ECC | 2 x HP 2Gb ddr2 800 ECC | ||
M1-ATX [http://www.mini-itx.com/store/information/m1-atx-manual.pdf] | M1-ATX [http://www.mini-itx.com/store/information/m1-atx-manual.pdf] | ||
19V 3.4A laptop charger (from the free to use shelf) | 19V 3.4A laptop charger (from the free to use shelf) | ||
8gb SanDisk usb pen as main disk | 8gb SanDisk usb pen as main disk -- only class 4 device :( | ||
Line 30: | Line 31: | ||
[[File:PrinterBot-1.jpg|250px]] | [[File:PrinterBot-1.jpg|250px]] | ||
''' | user: mumalab | ||
ip: 10.10.20.25 | |||
'''Installing Octopi:''' | |||
sudo apt-get install python-pip python-dev git | |||
sudo apt-get install python-setuptools | |||
git clone https://github.com/foosel/OctoPrint.git | |||
cd OctoPrint | |||
sudo python setup.py install | |||
sudo usermod -a -G tty,dialout mumalab | |||
Test Run: | |||
mkdir ~/.octoprint | |||
~/Octoprint/run | |||
Open http://10.10.20.25:5000 to check if it works | |||
'''Creating n-home folders for the octoprint instances:''' | |||
numInstances=9 | |||
for ((i = 1; i<=$numInstances; i++)); do cp -rf .octoprint .octoprint$i; done | |||
rm -rf .octoprint | |||
'''Creating script to boot the instances:''' | |||
Edit /home/mumalab/octoprintInstances.sh | |||
#!/bin/sh | |||
OCTOPRINT_HOME=/home/mumalab/OctoPrint | |||
numInstances=4 | |||
die () { | |||
echo >&2 "$@" | |||
exit 1 | |||
} | |||
[ "$#" -eq 1 ] || die "Action start, stop or restart needs to be provided as argument." | |||
for i in $(seq 1 $numInstances); | |||
do | |||
echo "Octoprint$i - $1" | |||
$OCTOPRINT_HOME/run --daemon $1 --port 500$i --pid /tmp/octoprint$i --basedir ~/.octoprint$i | |||
done | |||
'''Creating startup script:''' | |||
Edit /etc/init.d/octoprintInstances | |||
#! /bin/sh | |||
### BEGIN INIT INFO | |||
# Provides: octoprintInstances | |||
# Required-Start: $remote_fs $syslog | |||
# Required-Stop: $remote_fs $syslog | |||
# Default-Start: 2 3 4 5 | |||
# Default-Stop: | |||
# Short-Description: Octoprint multiple instances script | |||
### END INIT INFO | |||
case "$1" in | |||
start) | |||
echo "Starting instances:" | |||
su mumalab -c '/home/mumalab/octoprintInstances.sh start' | |||
;; | |||
restart|reload|force-reload) | |||
echo "Restarting instances:" | |||
su mumalab -c '/home/mumalab/octoprintInstances.sh restart' | |||
;; | |||
stop) | |||
echo "Stopping instances:" | |||
su mumalab -c '/home/mumalab/octoprintInstances.sh stop' | |||
;; | |||
*) | |||
echo "Usage: $0 start|stop" >&2 | |||
exit 1 | |||
;; | |||
esac | |||
exit 0 | |||
Adding to the startup | |||
cd /etc/rc2.d/ | |||
ln -s /etc/init.d/octoprintInstances S01octoprintInstances | |||
'''Creating customized dev entries for the printers:''' | |||
Foreach device connected do a | |||
dmesg | tail | |||
and check the port the device connected to and if the idVendor and idProduct can be seen right away. | |||
For the serial attribute, use: | |||
udevadm info -a -n /dev/ttyUSB0 | grep '{serial}' | |||
Next edit the /etc/udev/rules.d/10-local.rules and add something like the following. | |||
SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", ATTRS{serial}=="AE01DRVY", SYMLINK+="SolidDoodle" | |||
SUBSYSTEM=="tty", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="0483", ATTRS{serial}=="12345", SYMLINK+="Neo" | |||
SUBSYSTEM=="tty", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="0042", ATTRS{serial}=="55434343633351710270", SYMLINK+="Ultimaker1" | |||
Reboot so that the devices are available. | |||
'''Instances customization:''' | |||
Add the following to the /home/mumalab/.octoprint1/config.yaml | |||
serial: | |||
port: /dev/Ultimaker1 | |||
autoconnect: true | |||
additionalPorts: | |||
- /dev/Ultimaker1 | |||
baudrate: 250000 | |||
appearance: | |||
name: Ultimaker1 | |||
color: orange | |||
system: | |||
actions: | |||
- name: Restart instance | |||
command: /home/mumalab/OctoPrint/run --daemon restart --port 5001 --pid /tmp/octoprint1 --basedir ~/.octoprint1 | |||
action: restartInstance | |||
confirm: You are about to restart the instance. | |||
Add the following to the /home/mumalab/.octoprint2/config.yaml | |||
serial: | |||
port: /dev/Neo | |||
autoconnect: true | |||
additionalPorts: | |||
- /dev/Neo | |||
baudrate: 250000 | |||
appearance: | |||
name: Neo | |||
color: blue | |||
system: | |||
actions: | |||
- name: Restart instance | |||
command: /home/mumalab/OctoPrint/run --daemon restart --port 5002 --pid /tmp/octoprint2 --basedir ~/.octoprint2 | |||
action: restartInstance | |||
confirm: You are about to restart the instance. | |||
Add the following to the /home/mumalab/.octoprint3/config.yaml | |||
serial: | |||
port: /dev/SolidDoodle | |||
autoconnect: true | |||
additionalPorts: | |||
- /dev/SolidDoodle | |||
baudrate: 250000 | |||
appearance: | |||
name: SolidDoodle | |||
color: white | |||
system: | |||
actions: | |||
- action: restartInstance | |||
command: /home/mumalab/OctoPrint/run --daemon restart --port 5003 --pid /tmp/octoprint3 --basedir ~/.octoprint3 | |||
confirm: You are about to restart the instance. | |||
name: Restart instance | |||
== Issues == | == Issues == | ||
One of the capacitor from m1-atx was damaged and was causing weird issues on bootup of the system | One of the capacitor from m1-atx was damaged and was causing weird issues on bootup of the system | ||
--> Capacitor replaced and the system went back to normal. | --> Capacitor replaced and the system went back to normal. | ||
The initial installed cpu fan was too big leaving almost no space from the case ceiling, what was causing the cooling not to work properly | The initial installed cpu fan was too big leaving almost no space from the case ceiling, what was causing the cooling not to work properly | ||
--> Replaced with a smaller fan. | --> Replaced with a smaller fan. | ||
Ethernet card is not recognized and seems not to be working at all. | |||
Some errors regarding not shielded usb ports (causes the system to sometimes hang when connecting usb devices) | |||
. | |||
[[Category:Project]] | [[Category:Project]] |
Latest revision as of 16:13, 10 September 2022
PrinterBot Release status: obsolete [box doku] | |
---|---|
Description | 3d Printers multiple octoprint machine |
Author(s) | Ricardo Gomes (organom) |
Lab pc to run multiple instances of OctoPrint and connect to the 3d printers.
Hardware
VoomPC-2 Enclosure [1] Point of view nvidia ion mini-itx board - QuadCore Atom 1.6Ghz (from the free to use shelf) 2 x HP 2Gb ddr2 800 ECC M1-ATX [2] 19V 3.4A laptop charger (from the free to use shelf) 8gb SanDisk usb pen as main disk -- only class 4 device :(
Board detail:
Installing debian:
user: mumalab ip: 10.10.20.25
Installing Octopi:
sudo apt-get install python-pip python-dev git sudo apt-get install python-setuptools git clone https://github.com/foosel/OctoPrint.git cd OctoPrint sudo python setup.py install sudo usermod -a -G tty,dialout mumalab
Test Run:
mkdir ~/.octoprint ~/Octoprint/run
Open http://10.10.20.25:5000 to check if it works
Creating n-home folders for the octoprint instances:
numInstances=9 for ((i = 1; i<=$numInstances; i++)); do cp -rf .octoprint .octoprint$i; done rm -rf .octoprint
Creating script to boot the instances:
Edit /home/mumalab/octoprintInstances.sh
#!/bin/sh OCTOPRINT_HOME=/home/mumalab/OctoPrint numInstances=4 die () { echo >&2 "$@" exit 1 } [ "$#" -eq 1 ] || die "Action start, stop or restart needs to be provided as argument." for i in $(seq 1 $numInstances); do echo "Octoprint$i - $1" $OCTOPRINT_HOME/run --daemon $1 --port 500$i --pid /tmp/octoprint$i --basedir ~/.octoprint$i done
Creating startup script:
Edit /etc/init.d/octoprintInstances
#! /bin/sh ### BEGIN INIT INFO # Provides: octoprintInstances # Required-Start: $remote_fs $syslog # Required-Stop: $remote_fs $syslog # Default-Start: 2 3 4 5 # Default-Stop: # Short-Description: Octoprint multiple instances script ### END INIT INFO case "$1" in start) echo "Starting instances:" su mumalab -c '/home/mumalab/octoprintInstances.sh start' ;; restart|reload|force-reload) echo "Restarting instances:" su mumalab -c '/home/mumalab/octoprintInstances.sh restart' ;; stop) echo "Stopping instances:" su mumalab -c '/home/mumalab/octoprintInstances.sh stop' ;; *) echo "Usage: $0 start|stop" >&2 exit 1 ;; esac exit 0
Adding to the startup
cd /etc/rc2.d/ ln -s /etc/init.d/octoprintInstances S01octoprintInstances
Creating customized dev entries for the printers:
Foreach device connected do a
dmesg | tail
and check the port the device connected to and if the idVendor and idProduct can be seen right away.
For the serial attribute, use:
udevadm info -a -n /dev/ttyUSB0 | grep '{serial}'
Next edit the /etc/udev/rules.d/10-local.rules and add something like the following.
SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", ATTRS{serial}=="AE01DRVY", SYMLINK+="SolidDoodle" SUBSYSTEM=="tty", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="0483", ATTRS{serial}=="12345", SYMLINK+="Neo" SUBSYSTEM=="tty", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="0042", ATTRS{serial}=="55434343633351710270", SYMLINK+="Ultimaker1"
Reboot so that the devices are available.
Instances customization:
Add the following to the /home/mumalab/.octoprint1/config.yaml
serial: port: /dev/Ultimaker1 autoconnect: true additionalPorts: - /dev/Ultimaker1 baudrate: 250000 appearance: name: Ultimaker1 color: orange system: actions: - name: Restart instance command: /home/mumalab/OctoPrint/run --daemon restart --port 5001 --pid /tmp/octoprint1 --basedir ~/.octoprint1 action: restartInstance confirm: You are about to restart the instance.
Add the following to the /home/mumalab/.octoprint2/config.yaml
serial: port: /dev/Neo autoconnect: true additionalPorts: - /dev/Neo baudrate: 250000 appearance: name: Neo color: blue system: actions: - name: Restart instance command: /home/mumalab/OctoPrint/run --daemon restart --port 5002 --pid /tmp/octoprint2 --basedir ~/.octoprint2 action: restartInstance confirm: You are about to restart the instance.
Add the following to the /home/mumalab/.octoprint3/config.yaml
serial: port: /dev/SolidDoodle autoconnect: true additionalPorts: - /dev/SolidDoodle baudrate: 250000 appearance: name: SolidDoodle color: white system: actions: - action: restartInstance command: /home/mumalab/OctoPrint/run --daemon restart --port 5003 --pid /tmp/octoprint3 --basedir ~/.octoprint3 confirm: You are about to restart the instance. name: Restart instance
Issues
One of the capacitor from m1-atx was damaged and was causing weird issues on bootup of the system --> Capacitor replaced and the system went back to normal.
The initial installed cpu fan was too big leaving almost no space from the case ceiling, what was causing the cooling not to work properly --> Replaced with a smaller fan.
Ethernet card is not recognized and seems not to be working at all.
Some errors regarding not shielded usb ports (causes the system to sometimes hang when connecting usb devices)
.