Let's talk Octoprint

#1
Octoprint is a gcode sender similar to pronterface. The advantage of octoprint is that it is designed to interface over a network, with a webcam. It can even power up and power down the printer. Which is very cool and adds to the already futuristic feel of 3D printing. Octoprint can run on many systems but we will be discussing using Octoprint on a raspberry pi with the Octopi image.

Fortunately there already exist good tutorials for setting up Octoprint. Rather than re-invent the wheel, I am going to send you to the various sources I used in the installation and use of octopi. Reading over the many questions people have posted I have noticed that for some installation is very quick and easy while for others it is a cause for grey hair and neck pain. I have started this discussion to see if anyone else has had trouble with octoprint and for any suggestions/input you may have.

What you need to set up:

• Raspberry Pi, Model B+ is recommended as it can achieve a 250,000 baud rate which works well with the Arduino Mega.
• SD card for models A and B. Or a micro SD and micro SD adapter for model B+.
• USB micro power cord capable of at least 1 AMP. More than 1 AMP is OK.
• A USB webcam or a raspberry pi cam
• Powered USB hub. You need this to power the USB camera and your printer’s Arduino.
• Keyboard and Mouse for setup. I had to plug these into the pi. Did not work on the USB hub.
• HDMI monitor for setup (you can use just about any monitor but you may need an adapter)
• SD card reader. Check to see if your computer already has this.
• Wireless adapter, if you need a wireless connection to your network.
You probably have most of this stuff laying around your computer desk. I imagine having to buy all of this stuff would make the project prohibitively expensive.

The first YouTube video I am going to point you towards is Thomas Sanladerer’s guide “Getting Started with OctoPrint on Raspberry Pi”.https://www.youtube.com/watch?v=EHzN_MwunmE This is an obvious choice as it is the video you will find on http://www.octoprint.org

This video will get you up and running with Octoprint over your network. I ran into several problems while replicating the steps of this video.
1. My “wireless adapter” was actually an unlabeled Bluetooth adapter. This will not work and may drive you crazy trying to find the problem.
2. Octopi.local did not work.

Turns out if you are using Windows, instead of going to octopi.local you will have to type in the IP address of your raspberry pi into the web browser. Or install Bonjour Printer. Which I have no idea how to use.

How do you find the IP address?
1. Open the LX terminal in your Raspberry Pi’s desktop.
2. Type the command: Sudo ifconfig
If you’re using a wireless connection, the IP address will be on the second line of wlan0 following inet address:
If you’re using a wired connection, the IP address will be on the second line of Eth0 following inet address:
https://learn.adafruit.com/adafruits-raspberry-pi-lesson-3-network-setup/finding-your-pis-ip-address

Controlling the gMax over your network is great…If you’re a lazy person. But if you are like me, you would like to 3D print while out on a date, or kayaking :lol: . This is where I am stuck. My knowledge of this subject is very slim. Apparently In order to control your printer over a web browser you have to disable your firewall. Leaving your network and printer very vulnerable to malicious intent (which can start fires). There are services that will help keep this interaction secure. I am trying to set up with yaler.net. Which costs about 10 bucks for a relay domain. Let me know if you know of others.

Other topics to be discussed:
Adjusting camera settings in raspberry pi to send very high quality pictures instead of low res video.
Time-lapse photography.
Using with a smartphone.
Setting up the printer to be powered up and shut down with octoprint.

And another great source: https://github.com/foosel/OctoPrint/wiki/FAQ

My focus this week will be to get an understanding of all this to assist you and make a comprehensive write up about setting up and using octoprint with octopi. Any and all input is greatly appreciated.
 
#2
Great write up Kyle! I'll add a few additional tips to expand on a few things you touched on.

- There are some great free tools available that let you scan your network for devices and their IP's. For windows, Advanced IP Scanner is a great free tool (http://www.advanced-ip-scanner.com). For Mac's, LanScan is a great free tool (http://www.iwaxx.com/lanscan/). Either of these will help you discover the IP of your OctoPi without having to connect to it using a keyboard/mouse/display.

- The octopi.local only works if you have Bonjour installed on your computer. This is native on a Mac, but to get it on Windows you would need to have iTunes installed as it's an Apple protocol.

- To access your OctoPi outside of your network (for a typical residential setup) you need two things:
You touched on the the first; a type of Dynamic DNS service to provide you with an outside URL you can access that is mapped to your service providers external dynamic IP. DynDNS and NoIP.com are two of the most frequently used services for this. A Dynamic DNS service typically requires that have run a software app on a computer on your network to update your providers IP to the service. Many Linksys and common household Routers even have this functionality built in.

The second thing you need to do is setup port forwarding in your router to expose the internal website on the OctoPi to the outside world. The setup on this obviously varies from router to router so you would need to consult your manuals for help with that.
 
#3
I have been successful with yaler.net. It is a relay domain (I have a very grey understanding of it). I have a 30 day trial with them and it only costs 10.50 to own it.

To set up with them just create an account. Follow their tutorial for raspberry pi.

I have sent 2 prints over the web from 5 miles away. The video streaming is about 1 minute behind real time. The g-code commands work almost instantly.

As of this morning I cannot communicate with octoprint through a web browser and I will be going through the whole set up again to see if I can get it to work.
 
#4
Kyle, PM me with the make/model of your router at home. There may be an easier way to set this up without the relay that will save you a few bucks and give you faster performance.
 
#6
gCreate_Kyle said:
Octoprint is a gcode sender similar to pronterface. The advantage of octoprint is that it is designed to interface over a network, with a webcam. It can even power up and power down the printer. Which is very cool and adds to the already futuristic feel of 3D printing. Octoprint can run on many systems but we will be discussing using Octoprint on a raspberry pi with the Octopi image.

Fortunately there already exist good tutorials for setting up Octoprint. Rather than re-invent the wheel, I am going to send you to the various sources I used in the installation and use of octopi. Reading over the many questions people have posted I have noticed that for some installation is very quick and easy while for others it is a cause for grey hair and neck pain. I have started this discussion to see if anyone else has had trouble with octoprint and for any suggestions/input you may have.

What you need to set up:

• Raspberry Pi, Model B+ is recommended as it can achieve a 250,000 baud rate which works well with the Arduino Mega.
• SD card for models A and B. Or a micro SD and micro SD adapter for model B+.
• USB micro power cord capable of at least 1 AMP. More than 1 AMP is OK.
• A USB webcam or a raspberry pi cam
• Powered USB hub. You need this to power the USB camera and your printer’s Arduino.
• Keyboard and Mouse for setup. I had to plug these into the pi. Did not work on the USB hub.
• HDMI monitor for setup (you can use just about any monitor but you may need an adapter)
• SD card reader. Check to see if your computer already has this.
• Wireless adapter, if you need a wireless connection to your network.
You probably have most of this stuff laying around your computer desk. I imagine having to buy all of this stuff would make the project prohibitively expensive.

The first YouTube video I am going to point you towards is Thomas Sanladerer’s guide “Getting Started with OctoPrint on Raspberry Pi”.https://www.youtube.com/watch?v=EHzN_MwunmE This is an obvious choice as it is the video you will find on http://www.octoprint.org

This video will get you up and running with Octoprint over your network. I ran into several problems while replicating the steps of this video.
1. My “wireless adapter” was actually an unlabeled Bluetooth adapter. This will not work and may drive you crazy trying to find the problem.
2. Octopi.local did not work.

Turns out if you are using Windows, instead of going to octopi.local you will have to type in the IP address of your raspberry pi into the web browser. Or install Bonjour Printer. Which I have no idea how to use.

How do you find the IP address?
1. Open the LX terminal in your Raspberry Pi’s desktop.
2. Type the command: Sudo ifconfig
If you’re using a wireless connection, the IP address will be on the second line of wlan0 following inet address:
If you’re using a wired connection, the IP address will be on the second line of Eth0 following inet address:
https://learn.adafruit.com/adafruits-raspberry-pi-lesson-3-network-setup/finding-your-pis-ip-address

Controlling the gMax over your network is great…If you’re a lazy person. But if you are like me, you would like to 3D print while out on a date, or kayaking :lol: . This is where I am stuck. My knowledge of this subject is very slim. Apparently In order to control your printer over a web browser you have to disable your firewall. Leaving your network and printer very vulnerable to malicious intent (which can start fires). There are services that will help keep this interaction secure. I am trying to set up with yaler.net. Which costs about 10 bucks for a relay domain. Let me know if you know of others.

Other topics to be discussed:
Adjusting camera settings in raspberry pi to send very high quality pictures instead of low res video.
Time-lapse photography.
Using with a smartphone.
Setting up the printer to be powered up and shut down with octoprint.

And another great source: https://github.com/foosel/OctoPrint/wiki/FAQ

My focus this week will be to get an understanding of all this to assist you and make a comprehensive write up about setting up and using octoprint with octopi. Any and all input is greatly appreciated.

Hey Kyle, hoping you can help. I am getting spotty connection with Octoprint. I am able to connect over our business network and see Octoprint and video coming from the camera from a laptop on the network but when I try and connect to the printer it connects sometimes but will not take a command. Its like its connected but will not home or jog. We have a dedicated IP address for Octoprint and appears to connect OK. I am accessing Octoprint from a laptop attached to the network. I have 2 of these setups at home and it works great but for the life of me I cannot get this up and running here reliably. Any help would be appreciated.

Thanks,

Dennis
 
#7
Sounds like you Laptop is talking to the Rpi3 over your network well. Is the Raspberry pi connecting with your gMax?

It should connect to /dev/ttyACM0 at 250000 Baud. If you need to connect at 112500 baud (depends on the RPI), you need to configure the printers firmware to communicate at that speed.

I have been running Octoprint on Windows 10 lately. Things are setup differently for me.

The guide I wrote for this discussion is very out of date.
 
#9
I installed Octoprint for my 1.5XT 2 weeks ago and have random issues with it losing communications mid print. Ive wasted many hours of printing because of it. Anyone every have this issue, its like it loses the serial connection randomly and just stops. Ive attached the last page of the Serial.log file if that helps anyone.
 
#11
Not yet, I was using the supplied USB cable that came with the Gmax. I researched and read that a lot of people were having similar problems until the upgraded to a powered USB hub to supply the RPi and printer power. Sometimes the power supply's that you get for the RPi arent enough and will drop the connection. I just purchased a Belkin USB powered hub which is on the compatibility list, ill try that along with a new USB cable and report back. Hopefully its just something that simple.
 
#12
Good luck. For what it's worth, I have not had to use a powered hub on any of the 5 octoprint servers I have running on raspberry pi hardware. One pi is a B+, three are Pi2 Bs and one is a Pi3 B.
 
#13
jmckeone, I am experiencing similar issues with my octopi and gMax 1.5+ losing connection a few hours into the print. Did you ever resolve this? If so, what was the fix?

Thanks!
 
#14
Digging more into this, I think it may be a power issue. I do not think the usb power cable that I was using to power the pi could handle 2A. Will be changing this out and retesting. Will re-post if this was the fix.
 
#15
So my Octopi is now working 100% with no connectivity issues. I re-flashed my SD card, changed the power supply cable ensuring it was 2A capable, and changed the usb port that connected the gMax to the Octopi to the printer. One of these three seemed to be the fix.
 
#16
One last note, for best stability, I lowered the baud to 115200. This change was made in Octoprint and the firmware configuration.h file. Since this change I have never had any issue on either of my gMax printers. 115200 is plenty of speed for gcode commands.