We have upgraded the community system as part of the upgrade a password reset is required for all users before login in.

Octoprint (3D print server) on Omega2+


  • administrators

    Hardware Setup

    First of all here is the result:

    0_1486487192393_IMG_20170206_133518.jpeg

    0_1486487073945_Screen Shot 2017-02-07 at 12.04.00 PM.png

    Connection Diagram

    0_1486496190266_3d Printer haredare setup (1).png

    Expand Omega Storage with SD card

    To install Octoprint on Omega2 you will have to first expand the storage on Omega2+
    plug a micro SD card into the Omega2+.

    it will show up as /dev/mmcblk0

    1. format the SD card to EXT4 (you can skip this if you already have you sd card in EXT4 format)
      install disk utilities:
    opkg update
    opkg install fdisk e2fsprogs block-mount
    
    • partition the SD card to Linux partition using fdisk
    • format SD card
    umount /dev/mmcblk0p1
    mkfs.ext4 /dev/mmcblk0p1
    
    1. mount SD card
      mount the SD card
    umount /dev/mmcblk0p1
    mkdir /mnt/SD
    mount /dev/mmcblk0p1 /mnt/SD
    
    1. Copy current /overlay directory
    tar -C /overlay -cvf - . | tar -C /mnt/SD/ -xf - 
    umount /mnt/SD
    
    1. Setting up the /overlay Directory to Automount on Startup
    block detect > /etc/config/fstab
    
    • edit /etc/config/fstab
      change option target '/mnt/mmcblk0p1' to option target '/overlay'
      and option enabled '0' to option enabled '1'
    reboot
    

    after reboot you can verify if you /overlay is mounted properly by running df
    you should see something like this:

    /dev/mmcblk0p1         7374776     33328   6947108   0% /overlay
    

    Build Octoprint

    1. install required packages
      edit /etc/opkg/distfeeds.conf
      uncomment
    src/gz reboot_packages http://downloads.lede-project.org/snapshots/packages/mipsel_24kc/packages
    
    opkg update
    opkg install python python-pip unzip
    pip install --upgrade setuptools
    
    1. expand /tmp folder on the Omega
    mkdir /overlay/tmp
    rm -rf /overlay/tmp/*
    cp -a /tmp/* /overlay/tmp/
    umount /tmp
    [ $? -ne 0 ] && {
    umount -l /tmp
    }
    mount /overlay/tmp/ /tmp
    
    1. download and build
    cd /root
    wget https://github.com/foosel/OctoPrint/archive/1.0.0.zip
    unzip 1.0.0.zip
    cd OctoPrint-1.0.0
    pip install -r requirements.txt
    

    Note: Currently I am only able to get Octoprint 1.0.0 to work

    1. Now we need to edit a few files to resolve some compatibility issues.
      TODO: edit the following file
    • Unicode is going to cause problem with Python on Omega2. we have to replace the unicode author name to ascii ( Sorry Gina Häußge 😛 )
    s/Häußge/H\./g
    sed -i 's/Häußge/H\./g' /root/OctoPrint-1.0.0/src/octoprint/util/comm.py
    sed -i 's/Häußge/H\./g' /root/OctoPrint-1.0.0/src/octoprint/util/virtual.py
    
    • Omega only have one user and that is root. Octoprint does not let you run as root so we have to suppress that
    sed -i 's/exit("You should not run OctoPrint as root!")/pass/g' /root/OctoPrint-1.0.0/src/octoprint/server/__init__.py
    
    1. test drive
    ./run
    

    open up a browser and

    Auto start Octoprint at startup

    • move OctoPrint to a proper location
    mv /root/OctoPrint-1.0.0 /usr/share/OctoPrint
    
    • make symlink to command
    ln -s /usr/share/OctoPrint/run /usr/bin/octoprint
    

    edit /etc/rc.local
    add the following before exit 0

    octoprint &
    


  • @Zheng-Han I was just thinking about this earlier today, seems like a good fit for such a task.



  • THats pretty sweet! Were you able to run the cura slicer also? Would be pretty cool to create a complete print server with the nice little OLED display and ditch my mess of wires on the PI!


  • administrators

    This makes the PrintrBot in the office so easy to use that it's almost always on and printing stuff. We had to move it to a different room to be less distracting!



  • @Zheng-Han said in Octoprint (3D print server) on Omega2+:

    1. expand /tmp folder on the Omega
    mkider /overlay/tmp
    rm -rf /overlay/tmp/*
    cp -a /tmp/* /overlay/tmp/
    umount /tmp
    [ $? -ne 0 ] && {
    umount -l /tmp
    }
    

    i think you meant

    mkdir /overlay/tmp
    

    could it be?



  • First, thank you for this step by step instruction.

    After finally getting everything done I am running octoprint but does not come up with an appropriate ip address!

    root@Omega-6255:~/OctoPrint-1.0.0# ./run
    2017-02-16 06:56:10,251 - octoprint.server - INFO - Listening on http://0.0.0.0:5000

    When I kill octoprint I get.

    ^C2017-02-16 06:57:04,868 - octoprint.server - CRITICAL - Now that is embarrassing... Something really really went wrong here. Please report this including the stacktrace below in OctoPrint's bugtracker. Thanks!
    2017-02-16 06:57:04,871 - octoprint.server - ERROR - Stacktrace follows:
    Traceback (most recent call last):
    File "/root/OctoPrint-1.0.0/src/octoprint/server/init.py", line 190, in run
    IOLoop.instance().start()
    File "/usr/lib/python2.7/site-packages/tornado/ioloop.py", line 627, in start
    event_pairs = self._impl.poll(poll_timeout)
    KeyboardInterrupt

    I conclude that I am missing something or it really is a bug either in my build or in the octoprint ( which I doubt due to others having theirs up and running.) Not sure where to go here. I've attempted to use my googlefu and rebooted 2 times. I have access to the Onion from local ip of 192...72 and though USB. I am also connected to the internet so I am totally confused here. Any help would be much appreciated



  • Well, looks like I should really look over here more often. I also started installing Octoprint but had no time to cross-compile a proper gcc (which is required for the current version) and stopped. With your description I got 1.0.0 running after a few minutes - great work! I use the non-+ with USB root.

    @Phil-Heuy said in Octoprint (3D print server) on Omega2+:

    After finally getting everything done I am running octoprint but does not come up with an appropriate ip address!
    ...
    2017-02-16 06:56:10,251 - octoprint.server - INFO - Listening on http://0.0.0.0:5000

    0.0.0.0 means it is listening on all IPs available on the Onion - just try to use your LAN-IP and port 5000, should work


  • administrators

    @Matthias-Nowak good catch, corrected it.

    thanks



  • @Florian-Knodt Yesterday I tried to use the given ip with the port and got nothing. Today, well today is another day. Plug her in and go directly to the octo-print front page. Thank you for the quick response.



  • @Lazar-Demin said in Octoprint (3D print server) on Omega2+:

    This makes the PrintrBot in the office so easy to use that it's almost always on and printing stuff. We had to move it to a different room to be less distracting!

    I read-though a couple times before attempting. I'm surprised there are so few comments. After a literal copy paste operation, I now have a webui for my 3d printer (Anet A8). Thanks guys, the Omega2+ is really shining here. I haven't made a single change to this any of he setup information above. After I connected my printer and powered up, I did need to adjust the serial port to "/dev/ttyUSB0" and set the Baud rate to 115200. It worked the first time. My little girl will have some new toys when she wakes up in the morning.



  • This looks really good, I am going to begin the implementation tonight. Did you manage to get a webcam working with the Omega2+/OctoPrint?
    I am using an Arduino + RAMPS and Marlin to run my printer. Are you aware that there is an Arduino dock for the Omega2+? I will post a picture when it has arrived.
    Great work. Thanks



  • So I have finally gotten around to putting my electronics into an enclosure and was attempting to connect to my RAMPS board though the USB+ and USB- on the expansion board due to space constraints as seen below.

    Onion
    Red => 5V
    Grey => GND
    blue =>USB-
    Green=>USB+

    Mega USB A
    Red => 5V
    Grey => GND
    blue=> pin 2 (USB -)
    Green=> pin 3 (USB +)

    I power everything up through the Green Terminal Block on the Ramps Shield.

    I am not able to connect to the Ramps board with this setup. The issue I have come across is that I cant seem to find any documentation on using the USB pins. Anyone have a resource I could read up on to get this working in this fashion?

    https://drive.google.com/open?id=18u8v2-7UK3iKGmlZZ8UeBE3zajbIXJrsrA

    Edit:

    After attempting to connect through the normal USB A to the ramps it seems that the Omega is seeing the serial port

    • [ 169.668429] usb 2-1: new full-speed USB device number 3 using ohci-platform
      [ 169.903385] cdc_acm 2-1:1.0: ttyACM0: USB ACM device

    but Octoprint is not when connected through the pins.

    So I am currently attempting to solve this issue in hopes that will also alleviate the above issue.

    The error I am getting in the Octoprint Terminal is:

    • Changing monitoring state from 'Offline' to 'Opening serial port'
      Connecting to: None
      Unexpected error while connecting to serial port: None SerialException: '[Errno 2] could not open port None: [Errno 2] No such file or directory: 'None'' @ comm.py:_openSerial:795
      Changing monitoring state from 'Opening serial port' to 'Error: Failed to open seria...'


  • @Phil-Heuy Your picture doesn't explain what the issue is. You just connect USB+ to the other devices USB+, USB to USB-, 5V to 5V and GND to GND.



  • @WereCatf I do have things set up as you stated. Thank you for letting me know I didnt really state my issue. I have corrected my original post and added my wiring configuration.



  • I was able to get Octoprint 1.3.1 installed with minimal effort. It requires python libs that require compiling with GCC so you need to install GCC.

    You will need more RAM for this to work. You can do this by creating a swap file. I put my swap file in the root (/) folder which resides on the SD card when following the instructions here. I also made my swap file 512 megabytes, 256 was not enough.

    Follow the instructions above and stop at step 3.

    Un-comment this line in the /etc/opkg/distfeeds.conf
    src/gz reboot_base http://downloads.lede-project.org/snapshots/packages/mipsel_24kc/base

    Run
    opkg update
    opkg install gcc python-dev --force-overwrite
    pip install --upgrade setuptools

    Replace step 3 with the following steps...
    cd /root
    wget https://github.com/foosel/OctoPrint/archive/1.3.1.zip
    unzip 1.3.1.zip
    cd OctoPrint-1.3.1
    pip install -r requirements.txt

    Follow the remaining steps but replace OctoPrint-1.0.0 with OctoPrint-1.3.1



  • Tried installing 1.3.1 with cache & gcc. Got stock on a netifaces error. Either upgrading pip or installing python-dev seemed to get past that.

    pip install --upgrade pip
    opkg install python-dev --force-overwrite
    pip install netifaces



  • İNDEX OF/CONSOLE ERROR
    When I make 192.168.3.1 it gives this error and it is not an IP conflict problem. Why do I get this error? How do we fix it? I'm waiting for your help

    link text

    alt text0_1489356373995_photoo1.png



  • @ayhan-uçar Stop spamming in every single thread you can find, you twat



  • @Jason-Allred I did forget to add the opkg install python-dev part. I'll run through everything else I did on a clean system to figure out what else I missed. I will point out that netifaces is where the hangup was. Whatever I am missing here got it to install.



  • @Jason-Allred Try running pip install --upgrade setuptools then netifaces should work.


Log in to reply
 

Looks like your connection to Community was lost, please wait while we try to reconnect.