Octoprint (3D print server) on Omega2+
-
Is it ok if I power my omega2+ via the USB A port? In other words, it's getting its power form the 3D printer's USB connection. It's working just fine, I'm just wondering if I am setting myself up for problems later on. It certainly makes for a cleaner install.
I originally had it powered via the microUSB from my laptop but then I went to power the omega2+ from a USB power adapter plugged into the power bar. I noticed that when I unplugged the microUSB power cable, it stayed on.My printer is the Kodama Trinus3D which is running a proprietary variant of Marlin (I think).
-
@Jason-Taylor: It seems you have a non-standard USB port on your 3D printer. Usually an USB client port does not feed back power to the host. Assuming your 3d printer can provide enough current, you can totally run you Omega2 off the printer power without an extra power supply.
-
@Jeff-Karney Like @Ben-Murphy from a month ago, I'm having issues installing OctoPrint 1.3.1 - first when doing the
pip install --upgrade setuptools
, and then when when runningpip install netifaces
. I've just updated to b160, on an Omega2+. Any ideas as to what's going wrong?
-
@Jason-Taylor I have finally soldered up an adapter board so I can use my Omega2+ as a OctoPrint server, and since the Omega2+ consumes around 180-250ma, and the Kodama Trinus is a bit naught and backfeeds down the USB line (have they not heard of a diode?), I decided to have it power from the Trinus's USB, since I was connecting to it to control the printer. Seems to be coping just fine! Now I just have to work out how to upgrade OctoPrint, as I'm current stuck with the v1.0.0 as the alternate instructions for 1.3.1 didn't work for me.
-
Hi,
I also have the problem with netifaces installing OctoPrint 1.3.1or OctoPrint 1.3.2.
There's a solution?
-
This post is deleted!
-
See if this fixes the compile problem.
ln -s /usr/bin/gcc /usr/bin/ccache_cc
-
This is amazing!! Can't wait to try it out!
-
@Alan-Brand Well, I ran that command, but I'm not sure yet. I was initally getting out of memory errors, so I added a 256MB swap file, and then kept going, and now I'm getting a "IOError: [Errno 28] No space left on device"??? Hello... there's only 13.3G of free space on the micoSD?
Edit: Monkey behind the keyboard then realises that he had stupidly and willfully skipped instructions from earlier, and said error message was a result of not enough space in /tmp. Error message could have pointed that out though!
Later Edit: I can now confirm that after a) adding some swap memory b) following the instructions properly and possibly c) doing the
ln -s /usr/bin/gcc /usr/bin/ccache_cc
suggested by @Alan-Brand that I have OctoPrint 1.3.1 installed and running. I see 1.3.2 is now out and about, but I haven't tried it out just yet.Even Later Edit: Ok, decided to download and roll out OctoPrint 1.3.2 since I'm fiddling around with stuff. Configured without a hickup, and is now running happily. Instead of the root user patch, you are better off using the bypass option that is present now in OctoPrint... so instead of adding
octoprint &
to/etc/rc.local
you want to addoctoprint serve --iknowwhatimdoing &
The same would apply to 1.3.1, and as far back as whenever that option was introduced.root@OctoPrint:~/OctoPrint-1.3.1# pip install -r requirements.txt Processing /root/OctoPrint-1.3.1 Requirement already satisfied: flask<0.11,>=0.9 in /usr/lib/python2.7/site-packages (from OctoPrint==1.3.1->-r requirements.txt (line 10)) Collecting Jinja2<2.9,>=2.8 (from OctoPrint==1.3.1->-r requirements.txt (line 10)) Using cached Jinja2-2.8.1-py2.py3-none-any.whl Requirement already satisfied: werkzeug<0.9,>=0.8.3 in /usr/lib/python2.7/site-packages (from OctoPrint==1.3.1->-r requirements.txt (line 10)) Collecting tornado==4.0.2 (from OctoPrint==1.3.1->-r requirements.txt (line 10)) Using cached tornado-4.0.2.tar.gz Requirement already satisfied: sockjs-tornado<1.1,>=1.0.2 in /usr/lib/python2.7/site-packages (from OctoPrint==1.3.1->-requirements.txt (line 10)) Requirement already satisfied: PyYAML<3.11,>=3.10 in /usr/lib/python2.7/site-packages (from OctoPrint==1.3.1->-r requirements.txt (line 10)) Requirement already satisfied: Flask-Login<0.3,>=0.2.2 in /usr/lib/python2.7/site-packages (from OctoPrint==1.3.1->-r requirements.txt (line 10)) Requirement already satisfied: Flask-Principal<0.4,>=0.3.5 in /usr/lib/python2.7/site-packages (from OctoPrint==1.3.1->-r requirements.txt (line 10)) Collecting Flask-Babel<0.10,>=0.9 (from OctoPrint==1.3.1->-r requirements.txt (line 10)) Using cached Flask-Babel-0.9.tar.gz Collecting Flask-Assets<0.11,>=0.10 (from OctoPrint==1.3.1->-r requirements.txt (line 10)) Using cached Flask-Assets-0.10.tar.gz Collecting markdown<2.7,>=2.6.4 (from OctoPrint==1.3.1->-r requirements.txt (line 10)) Using cached Markdown-2.6.8.tar.gz Collecting pyserial<2.8,>=2.7 (from OctoPrint==1.3.1->-r requirements.txt (line 10)) Using cached pyserial-2.7.tar.gz Requirement already satisfied: netaddr<0.8,>=0.7.17 in /usr/lib/python2.7/site-packages (from OctoPrint==1.3.1->-r requirements.txt (line 10)) Collecting watchdog<0.9,>=0.8.3 (from OctoPrint==1.3.1->-r requirements.txt (line 10)) Using cached watchdog-0.8.3.tar.gz Collecting sarge<0.2,>=0.1.4 (from OctoPrint==1.3.1->-r requirements.txt (line 10)) Using cached sarge-0.1.4.tar.gz Collecting netifaces<0.11,>=0.10 (from OctoPrint==1.3.1->-r requirements.txt (line 10)) Using cached netifaces-0.10.5.tar.gz Collecting pylru<1.1,>=1.0.9 (from OctoPrint==1.3.1->-r requirements.txt (line 10)) Using cached pylru-1.0.9.tar.gz Collecting rsa<3.3,>=3.2 (from OctoPrint==1.3.1->-r requirements.txt (line 10)) Using cached rsa-3.2.3-py2.py3-none-any.whl Collecting pkginfo<1.3,>=1.2.1 (from OctoPrint==1.3.1->-r requirements.txt (line 10)) Using cached pkginfo-1.2.1.tar.gz Collecting requests<2.8,>=2.7 (from OctoPrint==1.3.1->-r requirements.txt (line 10)) Using cached requests-2.7.0-py2.py3-none-any.whl Collecting semantic_version<2.5,>=2.4.2 (from OctoPrint==1.3.1->-r requirements.txt (line 10)) Using cached semantic_version-2.4.2.tar.gz Collecting psutil<3.3,>=3.2.1 (from OctoPrint==1.3.1->-r requirements.txt (line 10)) Using cached psutil-3.2.2.tar.gz Collecting Click<6.3,>=6.2 (from OctoPrint==1.3.1->-r requirements.txt (line 10)) Using cached click-6.2-py2.py3-none-any.whl Collecting awesome-slugify<1.7,>=1.6.5 (from OctoPrint==1.3.1->-r requirements.txt (line 10)) Using cached awesome-slugify-1.6.5.tar.gz Collecting feedparser<5.3,>=5.2.1 (from OctoPrint==1.3.1->-r requirements.txt (line 10)) Using cached feedparser-5.2.1.zip Collecting chainmap<1.1,>=1.0.2 (from OctoPrint==1.3.1->-r requirements.txt (line 10)) Using cached chainmap-1.0.2-py2.py3-none-any.whl Collecting future<0.16,>=0.15 (from OctoPrint==1.3.1->-r requirements.txt (line 10)) Using cached future-0.15.2.tar.gz Exception: Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/pip/basecommand.py", line 215, in main status = self.run(options, args) File "/usr/lib/python2.7/site-packages/pip/commands/install.py", line 324, in run requirement_set.prepare_files(finder) File "/usr/lib/python2.7/site-packages/pip/req/req_set.py", line 380, in prepare_files ignore_dependencies=self.ignore_dependencies)) File "/usr/lib/python2.7/site-packages/pip/req/req_set.py", line 620, in _prepare_file session=self.session, hashes=hashes) File "/usr/lib/python2.7/site-packages/pip/download.py", line 821, in unpack_url hashes=hashes File "/usr/lib/python2.7/site-packages/pip/download.py", line 663, in unpack_http_url unpack_file(from_path, location, content_type, link) File "/usr/lib/python2.7/site-packages/pip/utils/__init__.py", line 605, in unpack_file untar_file(filename, location) File "/usr/lib/python2.7/site-packages/pip/utils/__init__.py", line 578, in untar_file shutil.copyfileobj(fp, destfp) File "/usr/lib/python2.7/shutil.py", line 52, in copyfileobj IOError: [Errno 28] No space left on device root@OctoPrint:~/OctoPrint-1.3.1# free total used free shared buffers cached Mem: 125748 35696 90052 7392 660 15984 -/+ buffers/cache: 19052 106696 Swap: 262140 15060 247080 root@OctoPrint:~/OctoPrint-1.3.1# df -h Filesystem Size Used Available Use% Mounted on /dev/root 5.5M 5.5M 0 100% /rom tmpfs 61.4M 21.1M 40.3M 34% /tmp /dev/mmcblk0p1 14.5G 510.7M 13.3G 4% /overlay overlayfs:/overlay 14.5G 510.7M 13.3G 4% / tmpfs 512.0K 0 512.0K 0% /dev
-
I gave up using o2+ for octoprint.
A person at a local hackerspace ported octoprint to another board he is testing which has a mega and a chip running some sort of lede. His github is herehttps://github.com/robinjanssens/OctoPrint-for-MiCaBoard
Maybe there is something you guys can also use for the O2+, I am going to see if I can get one of these boards and make my life easier.
-
I am able to run 1.3.4.
mount -o remount,size=200M /tmp ==> To increase /tmp
ln -s /usr/bin/gcc /usr/bin/ccache_cc ==> to install
sed -i 's/Häußge/H./g' /root/OctoPrint-1.3.4/src/octoprint/util/comm.py
sed -i 's/exit("You should not run OctoPrint as root!")/pass/g' /root/OctoPrint-1.3.4/src/octoprint/server/init.pyAlso, swap I did it in USB. Creating a swap file in SD card (ext4 format) was not working for me.
-
I seem to be having a memory issue on the "pip install -r requirements.txt" step.
https://pastebin.com/xS4i0a2C
ANy ideas how to combat this?
-
Got 1.3.5 to run, together with Cura.
There are quite some hacks, but hope this is useful for you. Start from the comment of Jeff Karney (11 Mar 2017) - and do create the swap file of 512MB !
Continue Octoprint Installation
Replace step 3 with the following steps...
cd /root wget https://github.com/foosel/OctoPrint/archive/1.3.5.zip unzip 1.3.5.zip
Make sure everything can compile
ln -s /usr/bin/gcc /usr/bin/ccache_cc
Install all dependencies
cd OctoPrint-1.3.5 pip install -r requirements.txt
Fix unicode we can't deal with in the code
sed -i 's/Häußge/H\./g' /root/OctoPrint-1.3.5/src/octoprint/util/comm.py sed -i 's/Häußge/H\./g' /root/OctoPrint-1.3.5/src/octoprint/plugins/virtual_printer/virtual.py
Start octoprint from command line (see article on how to auto-restart it on boot)
octoprint serve --iknowwhatimdoing &
Install Cura
Install prerequisites
opkg install make
Download Cura legacy
cd /root wget https://github.com/Ultimaker/CuraEngine/archive/legacy.zip unzip legacy.zip
Here's a hack I found-out I needed since make failed (forgot how)
echo "#undef LIBC_HAS_BACKTRACE_FUNC" > /usr/include/execinfo.h
Then we can build Cura (it's long on the Omega2+)
cd CuraEngine-legacy make
For some reason ld can't find the static libraries for c and stdc++ and the build fails. I couldn't fix this directly, but what I did was to remove the
--static
from the last build line and this works.so if your build fails with:
/usr/bin/ld: cannot find -lstdc++ /usr/bin/ld: cannot find -lc collect2: error: ld returned 1 exit status
then run this (or remove the--static
from the last output of make):g++ build/bridge.o build/comb.o build/gcodeExport.o build/infill.o build/inset.o build /layerPart.o build/main.o build/optimizedModel.o build/pathOrderOptimizer.o build/polygonOptimizer.o build/raft.o build/set tings.o build/skin.o build/skirt.o build/slicer.o build/support.o build/timeEstimate.o build/modelFile/modelFile.o build/ut ils/gettime.o build/utils/logoutput.o build/utils/socket.o -o build/CuraEngine -Lbuild/ -lclipper -flto
Give Octoprint the path to Cura
Run the Octoprint wizard: open
http://omega-xxxx.local:5000
where xxxx are the 4 last digits of your Omega2+ mac address
In the Cura Configuration step input the Octoprint setup Wizard CuraEngine:
Path to CuraEngine:/root/CuraEngine-legacy/build/CuraEngine
-
@Theodore-Marescaux and @Jeff-Karney - thanks so much for the updated script. I've got Octoprint 1.3.5 working on my Omega 2+.
However, I can't seem to connect to the 3d Printer. I've tried all the manual settings and baud rates but I get a 'Timeout while trying to connect to the printer' message.
----- Terminal Log -----
Connecting to: /dev/ttyACM0
Changing monitoring state from 'Offline' to 'Opening serial port'
Connected to: Serial<id=0x232abc0, open=True>(port='/dev/ttyACM0', baudrate=115200, bytesize=8, parity='N', stopbits=1, timeout=10.0, xonxoff=False, rtscts=False, dsrdtr=False), starting monitor
Changing monitoring state from 'Opening serial port' to 'Connecting'
Send: N0 M110 N0*125
Recv: ?
There was a timeout while trying to connect to the printer
Changing monitoring state from 'Connecting' to 'Offline'
Connection closed, closing down monitor----- Close Terminal Log -----
Any ideas?
-
I know the last reply to this topic is from nearly a year ago, but just wanted to report that I just installed OctoPrint v1.3.9 on my Omega2+ with the latest 0.2.1 (b199) firmware (had 0.2 or the last of the 0.1 line and OctoPrint 1.0.0 when I used it last), and it seems to be working fine with my Kodama Trinus printer just fine... Thanks to all the posters who suggested the swap memory, python-dev/gcc and octoprint serve --iknowwhatimdoing workarounds / updates to the instructions... after some fumbling around I was able get it all working!
-
First thank all contributor
1.Change the package repository
vi /etc/opkg/distfeeds.conf
uncomment below line
src/gz reboot_base src/gz reboot_packages
2.Setting SD Card As a expanding storage ( I use 2GB mini SDcard , Because out of space error)
opkg update opkg install fdisk e2fsprogs block-mount
after install
umount /dev/mmcblk0p1 mkfs.ext4 /dev/mmcblk0p1 umount /dev/mmcblk0p1 mkdir /mnt/SD mount /dev/mmcblk0p1 /mnt/SD
(will get some error like : can’t umount just ignore it)
tar -C /overlay -cvf - . | tar -C /mnt/SD/ -xf - umount /mnt/SD block detect > /etc/config/fstab
Auto Load on system boot
vi /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
mkdir /overlay/tmp rm -rf /overlay/tmp/* cp -a /tmp/* /overlay/tmp/ umount /tmp [ $? -ne 0 ] && { umount -l /tmp } mount /overlay/tmp/ /tmp
after reboot expand /tmp folder on the Omega , will get some error like : can’t umount just ignore it)
3.Install C++ Lib & Python
opkg update opkg install gcc make opkg install python python-pip unzip opkg install python-dev --force-overwrite
4.Setting Swap memory (Because When install will get out of memory errors)
https://docs.onion.io/omega2-docs/extending-omega-memory.html
First insert your usbdisk
opkg install swap-utils
after install create swapfile on usb
dd if=/dev/zero of=/tmp/mounts/USB-A1/swap.page bs=1M count=512
Need Waiting a while
mkswap /tmp/mounts/USB-A1/swap.page swapon /tmp/mounts/USB-A1/swap.page
Use free to check if success get swap
5. Install Octoprint
pip install --upgrade setuptools
show some information to upgrade pip
pip install --upgrade pip pip install --upgrade setuptools
Download octoprint & install
You can get all version here
https://github.com/foosel/OctoPrint/releasesPrepare Install
cd /root wget https://github.com/foosel/OctoPrint/archive/1.3.9.zip unzip 1.3.9.zip cd OctoPrint-1.3.9 ln -s /usr/bin/gcc /usr/bin/ccache_cc
Start Install
pip install -r requirements.txt
Some Unicode Fixed / User Role Fixed
sed -i 's/Häußge/H\./g' /root/OctoPrint-1.3.9/src/octoprint/util/comm.py sed -i 's/Häußge/H\./g' /root/OctoPrint-1.3.9/src/octoprint/util/virtual.py sed -i 's/Häußge/H\./g' /root/OctoPrint-1.3.9/src/octoprint/plugins/virtual_printer/virtual.py sed -i 's/exit("You should not run OctoPrint as root!")/pass/g' /root/OctoPrint-1.3.9/src/octoprint/server/__init__.py
If has no error.
Congratulation !
Almost Success!6.Server Start
octoprint serve --iknowwhatimdoing &
Need Waiting Server to Start / console will show some infor & some warning information / Just Ignore
Use browser to connect
http://omega-[your id].local:5000If connect Ok.
Now You can remove usb disk and connect to 3d printer.
Success!!Print the case
https://www.thingiverse.com/thing:2068124!Sometimes Factory Reset Clean All to Install Will Help , if you get some stange error
https://docs.onion.io/omega2-docs/factory-reset.html
THANKS ALL
-
This post is deleted!
-
I got Octoprint 1.5.1 to work with my Omega2+. Instructions are basically the same as @Ming-Chou-Cheng wrote, but I had to change some minor things. I'll post details if anyone is interested, let me know.
-
@dude8604 please post the details so new players can benefit from your experience.
-
@crispyoz I created a new thread https://community.onion.io/topic/4349/octoprint-1-5-2-3d-print-server-on-omega2