3D print failure detection: OctoPrint plugins and AI cameras

octoprint-1762703213482

Print failure detection is software or hardware that watches a print and alerts you, or pauses the job, when something goes wrong. The most common form is a camera feeding an AI model that recognizes spaghetti, the tangled filament left when a print detaches. The simpler form is a sensor that notices filament has stopped moving. On OctoPrint the usual choice is the Obico plugin, the successor to The Spaghetti Detective; on Klipper it is the same Obico service through Moonraker; and Bambu Lab’s X1 series has spaghetti detection built in.

None of these is foolproof, and the vendors say so. Obico’s documentation lists failures its standard model does not cover well, and Bambu’s wiki warns of false positives, especially with black or dark filament. This guide explains how camera detection works, compares the tools, covers the cheap non-AI layer (filament sensors and notifications), and ends with a short, sourced look at how industry uses monitoring and predictive maintenance. For the OctoPrint install itself, see OctoPrint setup on a Raspberry Pi.

Affiliate · Featured hardware Snapmaker U1 5X More Speed. 5X Less Waste.

The consumer toolchanger 3D printer: the SnapSwap 4-toolhead system swaps heads in 5 seconds for true multi-color and multi-material printing, with smart calibration and auto filament loading.

  • 4 toolheads · 5 s swap
  • Up to 500 mm/s · 20,000 mm/s²
  • 270 mm cube build volume
  • Multi-color & multi-material
See the Snapmaker U1 →
Snapmaker U1

Failure detection in 60 seconds

  1. Mount a camera on the frame, not on the print head, at a slightly elevated side angle, with diffuse light and no backlight.
  2. Pick a detector: Obico (OctoPrint, Klipper or Bambu printers), OctoEverywhere’s Gadget, PrintWatch for OctoPrint, or the printer’s built-in detector where it exists.
  3. Start at the default sensitivity. Lower it one step if false alarms are frequent.
  4. Choose the action: notify only, or notify and pause. Pausing is safer than cancelling.
  5. Add a filament runout or motion sensor for jams that a camera cannot see.
  6. Treat all of it as an extra layer, not a replacement for checking the first layer and for basic fire precautions.

How camera-based detection works

Obico’s explanation: the printer plugin captures a webcam frame at intervals, typically every 30 to 60 seconds and configurable. The frame goes to the AI engine, in the cloud or on your own hardware. The model returns a confidence score for how likely a failure is, and if the score passes your threshold Obico acts and logs the result for review. It describes the model as a convolutional neural network trained on hundreds of thousands of 3D printing images.

Bambu Lab’s X1 series does the same on the printer. Its wiki says a frame is taken every T seconds and fed to a detector running on the printer’s NPU, which returns a bounding box with a confidence value. The result of the latest 10 frames is accumulated, and a failure is declared only if enough positive candidates are spatially consistent. Sensitivity is low, medium or high, and the chamber light must be on; by default the printer switches it on when the first layer starts. Bambu notes the feature still works in LAN Only mode, using the model in the installed firmware, so keep firmware updated.

Illustration (AI-generated) of a tablet showing a print monitoring dashboard in front of a 3D printer

Failure detection tools compared

ToolWhere it runsWhat it targetsAction on detectionNotes
Obico for OctoPrintOctoPrint plugin; Obico Cloud or self-hosted serverSpaghetti, print detachment, layer shifts, nozzle blobsPhone notification and optional pauseFree plugin; AGPLv3; needs a webcam; tunnel needs no VPN or port forwarding per the plugin listing
Obico for Klippermoonraker-obico on the host, with Mainsail or FluiddSame modelNotification and optional pause via MoonrakerRequires Klipper, Moonraker and a working webcam first
OctoEverywhere GadgetOctoEverywhere serviceSpaghetti, bed adhesion, layer issues, per its siteAlert or pauseFree tier is listed on the site; accuracy figures are not published there
PrintWatchOctoPrint plugin using an OctoPrint-compatible cameraDefects in real time, per its listingEmail or SMS, pause or stop, extruder heat offNeeds an API key; some features are listed as beta
Bambu spaghetti detectionOn the X1 printer’s NPUSpaghettiPauses the print; sensitivity is low, medium or highNeeds chamber light; false positives, especially with dark filament

The old name still turns up in search results. The Spaghetti Detective plugin was replaced by Obico for OctoPrint, and Obico’s migration guide tells existing users to uninstall the old plugin with the plain Uninstall option, not “Uninstall & clean up data”, then install Obico from the Plugin Manager and log in with the same account.

What detection does not catch

Obico’s documentation is direct about the limits. Its standard model does not cover well: clogs and under-extrusion, minor quality issues such as stringing, very early failures, unusual geometries and first-layer problems. A side view catches layer shifts far more reliably than a top-down view, and small blobs are hard to tell from normal features. Obico also states that it does not publish a single accuracy figure, because results depend on the setup. Bambu’s wiki adds that detection “is not a foolproof method” and recommends the usual prevention, such as washing the plate and checking slicer settings.

That makes first-layer quality your best defense: most spaghetti starts with a part that never stuck, so see prints not sticking to the bed.

Cutting false alarms

Cause (from Obico’s list)Fix
Supports or infill resembling spaghettiLower sensitivity slightly
Backlighting, shadows or flickerUse consistent, diffuse lighting
Transparent or very light filamentImprove lighting and lower sensitivity
Camera vibration and blurUse a stable mount on the frame
Dark print on a dark bedAdd an LED ring light

Obico also suggests a slightly elevated side angle, a print that fills a reasonable part of the frame, and no harsh point light sources. Bambu says that if you will be away for a long time, such as overnight, set sensitivity to low so the printer pauses less often for small defects.

Installing detection on OctoPrint or Klipper

For OctoPrint, the plugin repository lists Obico for OctoPrint (OctoPrint 1.3.8 or later). Install it from the Plugin Manager’s Get More dialog, or from the command line with pip install "https://github.com/TheSpaghettiDetective/OctoPrint-Obico/archive/master.zip", then follow the setup wizard. You can use a free Obico Cloud account or host an Obico server yourself.

  1. On Klipper, make sure Klipper, Moonraker and Mainsail or Fluidd work and that a webcam is configured.
  2. SSH into the host and run git clone https://github.com/TheSpaghettiDetective/moonraker-obico.git, cd moonraker-obico, ./install.sh.
  3. Give the installer the path to moonraker.conf, the Moonraker address and port (7125 for HTTP, 7130 for HTTPS) and your Obico server.
  4. Link the printer with automatic discovery in the app or the one-time passcode shown in the terminal.
  5. Configure detection to pause the printer when a failure is found, or leave it on notify only while you tune sensitivity.

Cloud detection sends webcam frames to Obico’s servers; a self-hosted server runs the model locally and, per Obico, no images leave your network. Remote access options and the security trade-offs are in the guide to Klipper remote access.

The cheap layer: sensors and notifications

Not every failure needs AI, and a camera cannot see inside the extruder. Three low-cost options, all from project documentation:

  • Klipper filament sensors. [filament_switch_sensor] detects runout with a switch; pause_on_runout defaults to True, so a PAUSE runs when runout is detected. [filament_motion_sensor] uses an encoder that toggles a pin as filament moves, with detection_length defaulting to 7 mm.
  • OctoPrint filament sensors. The Smart Filament Sensor plugin works with sensors that toggle a digital signal during movement. It detects a jam or runout by a timeout (default 45 seconds), by M114 position, or by a movement threshold (default 7 mm), and the sensor must run on 3.3 V for Raspberry Pi GPIO.
  • Notifications. On OctoPrint, the Telegram plugin sends status messages with webcam snapshots. On Klipper, Moonraker’s [notifier] uses Apprise and can fire on started, complete, error, cancelled, paused and resumed events.

These tools tell you something stopped. They do not diagnose it, so pair them with a camera. If you run many machines, a dashboard is covered in print farm software.

Predictive maintenance and AI in industrial 3D printing

Industrial metal printers go further than a webcam. NIST’s real-time monitoring project describes in-situ sensors that watch the build so machine performance and part quality can be estimated during fabrication. It names two types: melt pool monitoring systems, which observe melt pool temperature, geometry or dynamics, and layer-wise monitoring systems that capture intermittent observations of the solid or powder layers. They are used on laser powder bed fusion and directed energy deposition machines. NIST says analytics such as AI or machine learning need large sets of comparable, well-controlled data, and cites a lack of standard protocols for application, calibration and characterization as a major barrier.

Predictive maintenance is a separate idea. The U.S. Department of Energy’s Operations and Maintenance Best Practices Guide says it “attempts to detect the onset of a degradation mechanism with the goal of correcting that degradation prior to significant deterioration in the component or equipment”. The technologies in its table include vibration monitoring, bearing temperature analysis, infrared thermography and motor current signature analysis, and the guide cautions that this equipment should not be bought without a serious commitment to implementation, training and repair.

For a hobbyist the practical takeaway is modest. The documented tools above work from camera frames and filament motion, not from machine-health data, and the sources we checked describe no plug-and-play predictive maintenance for desktop printers. If you are weighing monitoring for a production setting, see industrial printer ROI.

Common mistakes

  • Mounting the camera on the print head or straight above the bed, where layer shifts are hardest to see.
  • Leaving sensitivity high overnight, then waking to a paused print that was fine.
  • Assuming the AI covers clogs, under-extrusion or first-layer problems. Obico says its standard model does not.
  • Uploading webcam frames to a cloud service without reading where they go.
  • Relying on detection instead of basic safety. A pause does not turn off a faulty heater; see 3D printer fire safety.

Frequently asked questions

Does Obico work with any webcam?

Obico’s guidance is about placement rather than a model list: a slightly elevated side angle, a print that fills a reasonable part of the frame, and good diffuse light. For Klipper the webcam must be configured in Mainsail, Fluidd or Moonraker first. For PrintWatch, the listing asks for an OctoPrint-compatible camera.

Can failure detection run without sending video to the cloud?

Yes, in some cases. Obico says a self-hosted server runs the model locally and no webcam images leave your network, and Bambu’s X1 detection runs on the printer and still works in LAN Only mode. Obico Cloud and similar services do send frames to their servers.

Why does my detector keep pausing good prints?

Common causes are supports or infill that look like spaghetti, backlight or shadows, transparent or light filament, camera vibration, and a dark print on a dark bed. Improve lighting, stabilize the camera, and lower sensitivity one step; Obico and Bambu both describe sensitivity as a trade-off with missed failures.

Is The Spaghetti Detective still available?

The old OctoPrint plugin was replaced by Obico for OctoPrint. Obico’s migration guide explains how to move to it with your existing account.

Sources