21

Having ordered my first 3D printer, I am giddy and preparing various things.

I have installed Octoprint on my home server as a Docker container, but when running it, it seems that it wants to have a serial connection to a printer. Octoprint expects to be running on a Raspberry that is connected via its serial interface.

What am I missing?

The printer I ordered (Prusa Mini) comes with a wifi dongle, so I guess there will be a way to reach it over the network. But that does not automagically mean Octoprint can work with it.

top 12 comments
sorted by: hot top controversial new old
[-] boothin@artemis.camp 17 points 1 year ago

Luckily the S in USB stands for serial, so I have 3 printers connected to my server via USB and each one has its own octoprint docker container

[-] PlutoniumAcid@lemmy.world 3 points 1 year ago

I thought Octoprint can have more than 1 printer? Why do you have 3 separate containers?

Also, let's say I connect my printer to my server with USB, how do I route that USB connection from the server into the container? How did you map that?

[-] boothin@artemis.camp 8 points 1 year ago

Octoprint can only connect to 1 printer at a time, so if you want to use 2 printers at the same time you need 2 separate instances of octoprint. I use portainer so passing through a device is just a matter of finding the device path on the host machine and plugging its path into the portainer config under the runtime & resources tab. In a docker compose you'd use the devices key, for example

devices:

  • /dev/ttyUSB1:/dev/ttyUSB1

You will likely need to create a separate alias for the host USB path though because devices can be found in a different order every reboot so the path will change. The USB device alias will be based on the device vendor and product id so it will be persistent. https://michaelgreenhill.net/persistent-addressing-for-usb-devices-in-linux/ is one site that explains the issue and how to deal with it

[-] nekusoul@lemmy.nekusoul.de 12 points 1 year ago

As you've already noticed, the default way to get Octoprint running is by running it on an RPi with OctoPi as its operating system and connecting that to your printer using a serial connection, which basically means connecting a USB cable in your case.

The docker container gets interesting if your home server is physically close enough to your printer that you can connect the printer directly. Then you can just mount the serial connection into the container and run Octoprint there, cutting out the need for a RPi.

As others already said, the Prusa Mini also has PrusaLink integrated into its , which is an alternative to Octoprint and only needs the printer connected to your network via Ethernet or Wi-Fi with the Wi-Fi upgrade.

[-] j4k3@lemmy.world 5 points 1 year ago

I'm getting mixed signals, (home server/seems like basics question). You just need to establish a TTY serial connection between the host and board. Linux is Linux regardless of the physical hardware.

[-] pwnna@lemmy.ca 3 points 1 year ago

Docker is just the new apt

[-] stalfoss@lemm.ee 3 points 1 year ago

Octoprint requires connecting printer to the computer running octoprint via a USB cable. It can be a raspberry pi but it doesn’t have to be.

The wifi dongle works with PrusaLink software which appears to be an alternative to Octoprint. So you’d use one or the other, not both together.

[-] lucullus@discuss.tchncs.de 3 points 1 year ago* (last edited 1 year ago)

I guess you have some kind of linux based system of your home server. The USB connection to the printer will create a Serial Interface in your system under /dev. How it is called depends on the USB chip used in your printer, but often this is something like ttyUSB0.

So when connecting the printer you get the device file /dev/ttyUSB0 (or similar) on your home server (yes, the Serial interface is just a special file on that level). You can now mount this device file into the docker container like any other hostfile via the volume option.

Like docker run -v /dev/ttyUSB0:/dev/ttyUSB0 octoprint or by using the volumes key for your octoprint service in the docker-compose file, providing the same string as in the docker run command.

I think that should work, though I haven't tested it.

[-] TDCN@feddit.dk 2 points 1 year ago

Besides what other people are mentioning it is also excellent to use docker if you want to run multiple instances for multiple printers. I currently run 3 printers on a single mini pc that is also running octofarm for having a single entry point for all my printers

[-] constantokra@lemmy.one 2 points 1 year ago

If you're only using your computer for octoprint and it's a pi, you should probably just install octopI on the thing as its os. I run octoprint on a couple orange pi zero's, so I run it in docker. It also lets you easily use the computer for multiple things, and you can easily move your services from server to server with docker. Basically, unless you have a single use computer or something that makes docker rather difficult to use, docker is the way to go for hosting most things these days.

[-] Dreadino@feddit.it 1 points 1 year ago

I used to use Octoprint to connect to an Ender 3, which didn't come with an internet connection. Now that I have an Ankermake M5, I don't use it anymore.

You could connect your desktop to the 3D printer, I don't think a Raspberry is required.

[-] Rodeo@lemmy.ca 1 points 1 year ago

This true actually, you can run octoprint directly on your desktop PC.

this post was submitted on 29 Aug 2023
21 points (95.7% liked)

3DPrinting

15519 readers
152 users here now

3DPrinting is a place where makers of all skill levels and walks of life can learn about and discuss 3D printing and development of 3D printed parts and devices.

The r/functionalprint community is now located at: !functionalprint@kbin.social or !functionalprint@fedia.io

There are CAD communities available at: !cad@lemmy.world or !freecad@lemmy.ml

Rules

If you need an easy way to host pictures, https://catbox.moe may be an option. Be ethical about what you post and donate if you are able or use this a lot. It is just an individual hosting content, not a company. The image embedding syntax for Lemmy is ![](URL)

Moderation policy: Light, mostly invisible

founded 1 year ago
MODERATORS