Archive:PrinterBot: Difference between revisions

From The Munich Maker Lab's Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 109: Line 109:
   ln -s /etc/init.d/octoprintInstances S01octoprintInstances
   ln -s /etc/init.d/octoprintInstances S01octoprintInstances


Creating customized dev entries for the printers:
Edit /etc/udev/rules.d/10-local.rules
  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
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.


Creating customized dev entries for the printers:
Add the following to the /home/mumalab/.octoprint2/config.yaml
   TODO
  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.


Instances costumization:
Add the following to the /home/mumalab/.octoprint3/config.yaml
   TODO
  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 ==

Revision as of 21:16, 8 April 2015

 
PrinterBot

Release status: Beta [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
 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:

PrinterBot-0.jpg


Installing debian:

PrinterBot-1.jpg

 user: mumalab
 ip: 192.168.0.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://192.168.0.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=9
 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: Edit /etc/udev/rules.d/10-local.rules

 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

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)

.