Installing Octopi for a Printrbot Simple
Last updated: April 2, 2015 @ 10:36
The above quote has been my experience getting my OctoPi, OctoPrint server up and running and I’m excited to share with you the details. Part of the reason why is because I’m rather new to the Linux world so if you’re like me, you have that hurdle to jump as well. Hopefully by the end of this tutorial, you will have the following:
- A 3D printer that is controllable through your web browser within your local home network.
- Only invested about ~1 hour of your time to get your 3D printer server up and running (and not several like I did, Google searching to find answers to questions like, “how do I connect my Raspberry Pi to my WiFi network?”).
- If you opted-in to buying the Raspberry Pi camera, make a timelapse video (here’s My first Octoprint Timelapse) (also just noticing they have a Night Vision Raspberry Pi camera which sounds exciting for night prints while I’m sleeping 🙂
REQUIRED EQUIPMENT LIST (per 3D Printer you want to add to your network):
- Raspberry Pi – (you can get from Adafruit.com or Newegg.com). You can also purchase locally in your RadioShack – Make: Raspberry Pi Kit.
- USB WiFi Dongle – (recommended WiFi dongles) – [Dongle I purchased not knowing, Belkin N-150 Mini, also bought from Maker Faire San Mateo (Comfast), super cheap ~$17. Makershed.com has them cheap]
- HDMI enabled monitor / screen – (technically you can SSH into your device but you have to know you’re connected first. I bought a 20″ monitor at Best Buy for $100–for running “headless” as they call it, TightVNCServer was the VNC of choice but I spent all day trying to figure that out, so that will be for an entirely different post–Update: I still haven’t tried this)
- USB Keyboard – (wireless is OK…buy AAA batteries too, any USB keyboard should work). I’d recommend a wired connection as the wireless was buggy and you’re already in a world you’re likely not that familiar with.
- Good USB Power Source – (You want at least 1A, 2+ is better. Your Samsung Galaxy 3 or 4 chargers should work OK as they support up to 2.3A)
- Another computer – (for connecting to internet, Google Searching or for simple debugging)
- 8mb SD Card – Class 4 – (apparently the quality and class type for SD cards is important). I believe you can also do this with a larger card but some of these microcomputers do have limitations (which I don’t at the moment–do you know why? Let me know…chris at you3dit dot com).
- Raspberry Pi camera unit (for Timelapses and checking the status of your printbed – actually very cool). It also allows you to see the printer from your computer, whether or not you’re recording a timelapse, which is good for safety / monitoring when far away from your bot.
- Raspberry Pi case (several are downloadable on Thingiverse.com). I bought mine from Adafruit and got another one in my Makershed Kit purchased at Radio Shack (Make Raspberry Pi Starter Kit).
Now before I get into the details…
The key steps to installing Octoprint Server on your Raspberry Pi is as follows:
- Image an SD card so that you have a clean install of Octopi installed
- Get connected to your local WiFi or Internet Router in your home
- Setup Octopi
- Control your printer via a web browser
What this article will do for you will is:
- Provide references to other useful blog posts that will help you get your Raspberry Pi and your SD card ready for Octoprint / Octopi.
- If you do buy the camera, you’ll soon realize it’s tricky to mount and target your camera + Raspberry Pi towards your bot. Consider buying a BuddyGripper3D – which is technically a tripod mount for your smartphone, but it works if you have a smooth plastic enclosure for your Raspberry Pi.
- Tell you the problems I had during each step and ideally help you avoid those problems or at least get you through them faster.
Now onto the details…
Reference Articles on how to get setup
There have been many good articles describing the basics so what I’ll do in this post is really explain my setup so if you have a similar setup, maybe you can learn something from the problems I encountered and solved. These articles are referenced throughout and at the end of this post. If they helped you get started, please go back and say thanks!
- Bash Shell Command to Find or Get IP Address (you’ll want to know if your Raspberry Pi is connected to the internet and you’ll need to know its IP address so you can access it from your browser–http://octopi.local doesn’t always work). Once you have your IP address for your Raspberry Pi–> Write it down. You’ll need them to access your Octopi Server(s). Or you can access it at http://octopi.local (but I’m not sure how this domain works when you have more than one Octopi server installed on your home network).
- WiFi Configuration Instructions from Adafruit – this configuration worked right out of the box. I don’t think editing the /etc/wpa-supplicant/supplicant.conf needs to be edited.
- Installing the Edimax WiFi adapter (Since the internet didn’t have tutorials for the WiFi dongle I bought, I leveraged tutorials on other similar products)
- Other useful WiFi setup links (because not all WiFi adapters are created equal)
- Network/Interfaces setup: from Raspberry Pi.org: Issue with known working WiFi
- The General How-to Setup an Octopi server on Github – good starting place.
- How to Setup Octoprint with your Printrbot / Printrboard (fairly detailed tutorial, could be leveraged for any other printer for that matter)
- The GitHub Foosel Configuration for Octoprint Page (you’ll want this to get into the various printer server options)
- Here’s the official documentation written by Gina
- A list of all the supported printers for Octoprint (Nice to hear someone has set Octoprint on the Bot you’ve purchased)
The problems I had during normal installation were:
- Getting the USB WiFi Dongle to actually connect to my home network.
- Helpful commands:
- sudo nano /etc/network/interfaces –> allows you to config your WiFi Network Settings
- ifconfig wlan0 –> gives you the details on your WiFi connect + IP
- sudo ifdown -a –> releases the network connections w/out having to reboot the Raspberry Pi
- sudo ifup -a –> renews the network connections so you can see if you’ve set up your WiFi correctly
- Helpful commands:
- Resetting the Admin role on Octoprint
- Getting the camera working and at the right angle
1. Getting the USB WiFi Dongle to actually connect to my home network
This was a silly headache which involves your logging into your Raspberry Pi and modifying two files:
These are basically configuration files the Raspberry Pi operating system calls upon to configure your WiFi dongle. Between the various articles above, I determined:
- That when they give you a command like “sudo vi /etc/network/interfaces” the “vi” component is the operating system software used to edit the file. “vi” is common but cryptic to navigate (this where it helps to be a Linux person). A much more friendly and slightly more intuitive program is called “nano” and so your command to edit that file would be “sudo nano /etc/network/interfaces” and it would open and give you ctrl+ commands to navigate saving and exiting the editor.
- Auto eth0 can be commented out (using a #) (unless of course you connect with an ethernet cable directly to your router)
- That your network ID and password needs to go in both files.
- And you can use: iwconfig to determine if you’re connected to the internet (as you will have a “inet address” that is an internal IP address. If you have a Mac router, it will be 10.0.1.XX, if you have a Cisco router, it will likely be something like 192.1.0.XX)
If you want a copy/pasted text of what my exact config files are, let me know. I just haven’t been using my Raspberry Pis for blog posting so I’m not in easy access to copy / paste.
[UPDATE: 2 APRIL 2015]
I’ve since commented out the wpa_supplicant file and just use the sudo nano /etc/network/interfaces command and put in my “wpa-ssid” and “wpa-psk” directly into that file. My guess is that prevents you from easily connecting to multiple networks (which would be very handy if you move your printers around for demos like I do).
My current challenges are:
- How to speed up the latency on the Octopi servers
- How to easily move them around from one local network to another
- Ensuring that GCode commands are actually being read into the printer via Octoprint
If anyone can help with those, please do reach out: chris at you3dit dot com.
2. Resetting the Admin Role on Octoprint
This was due to the fact that I literally made an admin password and then promptly forgot it and could not login to my Octopi server–rendering me unable to print anything using the server. Not a hard problem to fix, but not intuitively easy either.
Here’s some pages relevant to this specific problem
- Admin Configuration Page from GitHub
It boils down to:
- finding the file which stores user account information (.octoprint/users.yaml)
- opening it up
- deleting the usernames and the encrypted passwords
- telling the Octopi distribution to “run the initial setup page” and then (config.yaml)
- Reboot your server
- Access the server from its IP address
- Hopefully you see the “initial setup screen”
- create another admin username + password and this time DON’T FORGET your password! 🙂
3. Getting the camera angle right
I was in a pinch to get the darn Octopi working so I didn’t spend too much time making a great camera holder for the ribbon-cable attached camera board. Thus I simply used my BuddyGripper, a tripod and an old MakerFaire lanyard all-access badge and taped it to my Arduino Case.
First, original setup: http://t.co/mjqrrR15bu
Here’s the full setup using my Printrbot Simple Metal:
I’d definitely love to see what other solutions people have come up with. If you haven’t designed something already, I’d love for some help designing it. Just e-mail me at chris at you3dit dot com. I also want to mount my print server to the base platform of my Printrbot Simple so that my timelapse camera is fixed relative to the part being printed so that the timelapses turn out much better…like this one:
So hopefully, you’ve been able to use this article to help you get your Octopi Print Server up and running. Now you can enjoy a sunset and know that your 3D printer is printing correctly from anywhere, check the progress of the print and download a timelapse…simply by checking your browser. Enjoy my first successful Timelapse from my Octoprint experience!
Did you find this tutorial helpful? Please tweet it out and tag us @you3dit! Thanks!
And as always, add your questions / comments below!!