Contents

Monitor 3D Printer with Home Assistant Integration

Yes, you can watch and control your 3D printer from anywhere. Just connect OctoPrint or Moonraker to Home Assistant . Both print servers expose APIs that Home Assistant can poll for live data: print progress, temperatures, camera feeds, and error states. From there you can build dashboards, fire phone alerts when a print ends, spot failures with AI camera checks, and cut power to a runaway printer through a smart plug. Setup takes about an hour once your print server runs on a Raspberry Pi. The result: a 3D printer that acts like any other smart device.

This guide covers the full path: pick a print server, build dashboards, set up automations. It uses Home Assistant 2026.4 with OctoPrint 1.11.7 and the Moonraker custom integration.

OctoPrint vs. Moonraker: Picking Your Print Server

Before you connect anything to Home Assistant, you need a print server. It runs on a small computer (often a Raspberry Pi) wired to your printer. There are two solid options. The pick depends on your printer’s firmware.

OctoPrint is the broad option. It talks over USB serial to nearly any FDM printer running stock Marlin firmware. That covers the Creality Ender 3 series, Prusa MK3/MK4 (in Marlin mode), Anycubic, Elegoo Neptune, and most other USB-port printers. OctoPrint runs a REST API on port 5000 and has over 2,000 community plugins. The current stable build (1.11.7, released February 2026) runs fine on a Raspberry Pi 4 with 2GB of RAM. A Pi Zero 2W can run it too, but it’ll stutter on heavy G-code streaming for detailed prints.

OctoPrint temperature monitoring tab showing real-time hotend and bed temperature graphs
OctoPrint's temperature tab with live temperature tracking
Image: OctoPrint

Moonraker is the API server for Klipper firmware. If you’ve flashed Klipper onto your printer (common with Voron builds, Ender 3 V3 KE, and Prusa MK4 with custom firmware), Moonraker exposes the printer’s state over a JSON-RPC and REST API on port 7125. You can’t use Moonraker without Klipper. It’s not a standalone print server like OctoPrint. A Raspberry Pi 4 or 5 is best for running Klipper and Moonraker, since the Pi runs all the motion planning math.

FeatureOctoPrintMoonraker (Klipper)
Firmware requiredStock Marlin (any)Klipper only
API port5000 (REST)7125 (JSON-RPC + REST)
AuthenticationAPI key from settingsAPI key or trusted client
HA integrationNative (built-in)Custom via HACS
Plugin ecosystem2,000+ pluginsKlipper macros + extensions
Minimum hardwarePi 4 2GB (Pi Zero 2W possible)Pi 4 2GB+ recommended
Webcam supportmjpg-streamer / crowsnestcrowsnest (standard)

Both options expose webcam feeds that Home Assistant reads as camera entities. If you already run Klipper, use Moonraker. If you want plug-and-play with stock firmware, pick OctoPrint. The HA integration quality is on par for both.

Setting Up the Home Assistant Integrations

OctoPrint (Native Integration)

The OctoPrint integration is built into Home Assistant. No HACS required. To set it up:

  1. In Home Assistant, go to Settings > Devices & Services > Add Integration and search for “OctoPrint”
  2. Enter the IP address of your Raspberry Pi (e.g., 192.168.1.50), port 5000, and a username
  3. Generate an API key in OctoPrint’s web UI under Settings > API > Global API Key and paste it in
  4. Make sure the Discovery Plugin is enabled in OctoPrint (it is by default)

Home Assistant may also auto-discover OctoPrint on your network. That skips the manual IP step.

Once connected, the integration creates these entities:

  • Sensors: sensor.octoprint_current_state (Printing, Operational, Error), sensor.octoprint_print_progress (0-100%), sensor.octoprint_print_time_left, sensor.octoprint_bed_temperature, sensor.octoprint_tool_0_temperature
  • Camera: camera.octoprint for the live webcam feed
  • Buttons: Pause Job, Resume Job, Stop Job
  • Number: Target bed and tool temperatures (writable: you can preheat from Home Assistant)

Moonraker (HACS Custom Integration)

The Moonraker integration is a custom part built by marcolivierarsenault on GitHub . Install it through HACS:

  1. In HACS, go to Integrations > Explore & Download and search for “Moonraker”
  2. Install the integration and restart Home Assistant
  3. Go to Settings > Devices & Services > Add Integration and search for “Moonraker”
  4. Enter the Moonraker IP and port 7125. If you set an API key in Moonraker, paste it. Otherwise, trusted client auth works for same-network setups

Moonraker entities include:

  • Sensors: sensor.moonraker_print_state, sensor.moonraker_progress, sensor.moonraker_filename, sensor.moonraker_estimated_time, sensor.moonraker_filament_used, sensor.moonraker_extruder_temperature, sensor.moonraker_heater_bed_temperature
  • Camera: Live webcam feed and thumbnail preview of the current print
  • Controls: Emergency stop button and macro trigger buttons

Moonraker Home Assistant integration showing printer sensor entities with temperature, progress, and status data
Moonraker sensor entities in Home Assistant
Image: moonraker-home-assistant

Polling Interval

Both integrations poll every 30 seconds by default. For snappier dashboards, drop the scan interval to 10 seconds in the config. It won’t tax the API on a Pi 4. Temp graphs and progress updates feel much smoother.

Security Considerations

If your printer sits on a different VLAN or you want to watch prints away from home, don’t port-forward OctoPrint or Moonraker. Neither is built to face the open internet. Instead, use Home Assistant’s remote access (Nabu Casa), a WireGuard VPN tunnel, or a reverse proxy with proper auth. HA handles the remote access part well. You just need to get the data into HA safely on the LAN.

Building a 3D Printer Dashboard

Raw sensor entities work fine for automations. A purpose-built Lovelace dashboard makes remote monitoring practical. Here’s a layout that works well:

Camera Feed and Print Status

Start with a Picture Glance card. Use the printer camera entity as the background. Overlay the print progress, printer state, and current filename as entities. You get a single card showing the print, how far along it is, and what’s printing.

For a deeper view, add a Gauge card for print progress (min 0, max 100) and an Entity card for time left. Wrap both in a Conditional card that only shows when the printer state is “Printing”. That way you don’t see empty gauges when the printer is idle.

Temperature Graphs

Use a History Graph card. Plot sensor.octoprint_tool_0_temperature and sensor.octoprint_bed_temperature (or the Moonraker peers) over the last 2 hours. This graph earns its place. You can catch heat fails, thermal runaway, or a heat block losing its grip before it ruins a 12-hour print. Watch for sudden drops during a print. Those point to a loose thermistor or a dead heater cartridge.

Filament Usage

On Moonraker, the filament_used sensor reports the mm used in the current print. For OctoPrint, the count comes from G-code parsing. Pair it with a helper entity (more on that below) to see how much spool you have left.

Mobile Layout

If you watch prints from your phone while away from home, install the layout-card custom card from HACS. Build a single-column layout. Stack the camera card on top, then the status cards, then temperatures. On a phone screen, horizontal layouts squeeze too tight to read.

Failure Detection and Safety Automations

Watching gauges is fine. The real reason to put a 3D printer in Home Assistant is auto responses to events. A failed print that nobody spots burns hours of time and spool. Thermal runaway is a fire risk.

The simplest automation: when sensor.octoprint_current_state changes from Printing to Operational (or Moonraker’s state changes to standby), fire a push alert through the Home Assistant Companion app . Include the filename and total print time so you know what finished.

automation:
  - alias: "3D Print Complete"
    trigger:
      - platform: state
        entity_id: sensor.octoprint_current_state
        from: "Printing"
        to: "Operational"
    action:
      - service: notify.mobile_app_your_phone
        data:
          title: "Print Complete"
          message: >
            {{ state_attr('sensor.octoprint_job_percentage', 'friendly_name') }}
            finished after {{ states('sensor.octoprint_print_time') }}.

AI-Powered Failure Detection with Obico

Obico (once called The Spaghetti Detective) uses vision AI to watch your webcam feed and spot print failures live. It catches spaghetti strands, layer shifts, bed adhesion fails, and other faults. It was trained on hundreds of thousands of 3D print images. It rates fail odds on every frame.

Obico runs as a plugin for both OctoPrint and Moonraker/Klipper. You can use their cloud or run the Obico server on your own box. When it spots a fail, it can auto-pause the print and send alerts.

Obico AI failure detection monitoring a 3D print in progress with real-time analysis
Obico watching a print for failures in real-time
Image: Obico

For Home Assistant, the Obico ML HA integration turns any HA camera entity into a source for Obico’s AI detection. It gives you:

  • A camera entity that overlays spotted errors on the image
  • A binary sensor that flips to on when errors show up
  • A sensor that reports failure confidence as a percent

You can trigger automations on that binary sensor. When spaghetti is spotted with high confidence, pause the print through OctoPrint’s API and send a critical alert with a camera snapshot attached.

Remote Power Control

Wire your printer through a smart plug with energy monitoring. A Shelly Plug S or a Zigbee plug like the Sonoff S31 works well. You get two powers:

First, auto power-off after prints. Build an automation that waits 5 minutes after a print ends (so it can cool), then flips the smart plug off. The printer won’t sit on all night after an unattended print.

Second, an emergency cut. If the bed goes past 120C or the extruder past 260C while idle, kill power at the smart plug and send a critical alert. This acts as a last-resort safety net under the printer’s own thermal runaway guard.

Thermal Runaway Rate-of-Change Monitor

Most modern printers ship with thermal runaway guards in firmware. You can add a second layer with a Home Assistant template sensor that watches how fast temps change:

template:
  - sensor:
      - name: "Extruder Temp Rate of Change"
        unit_of_measurement: "°C/min"
        state: >
          {% set current = states('sensor.octoprint_tool_0_temperature') | float %}
          {% set old = state_attr('sensor.extruder_temp_rate_of_change', 'previous') | float(current) %}
          {{ ((current - old) * 2) | round(1) }}
        attributes:
          previous: "{{ states('sensor.octoprint_tool_0_temperature') }}"

If the extruder drops more than 15 degrees in 30 seconds during a print, the heater cartridge has likely failed or the thermistor has come loose. Fire an automation that sends an emergency stop (M112) through the OctoPrint API and kills power at the smart plug.

Filament Inventory and Print History Tracking

Home Assistant can also track filament inventory and print history over time. Two paths work here, based on how much fuss you want.

Manual Spool Tracking with Helper Entities

Make input_number helpers for each spool you own. Set the start value to the spool weight (often 1000g for a standard spool). Build an automation that subtracts used spool after each print ends. You’ll need to turn the length from OctoPrint/Moonraker into weight. Multiply by the spool cross-section and the material density (about 1.24 g/cm3 for PLA).

Add an alert that fires when any spool helper drops below 100g. Include the spool name and a rough count of prints left, based on your usual use.

This path is manual. You switch the “active spool” helper when you load a new roll. But it works with no extra software.

Spoolman for Serious Filament Management

For a sturdier setup, Spoolman is a filament stock manager. It plugs into Moonraker/Klipper and has a Home Assistant integration via HACS . Spoolman runs as a small web server. It can live on the same Pi as your print server, or in a Docker box. It tracks every spool you own: type, color, weight left, and use history.

The HA part makes a device for each spool. You get sensors for weight left, length left, and limits for low-spool warnings. Each spool also gets a location field. Handy if you run more than one printer. Spoolman talks to Moonraker, so spool use logs on its own. No manual math.

Spoolman Home Assistant integration dashboard showing filament spools with remaining weight and color indicators
Spoolman filament tracking integrated into Home Assistant
Image: spoolman-homeassistant

Energy Cost Tracking

If your smart plug has energy monitoring (the Shelly Plug S does), Home Assistant can log power use per print. The sensor.3d_printer_energy entity feeds the utility meter system. Add it as an individual device in the Home Assistant Energy Dashboard and the printer shows up in the per-device consumption breakdown. From there you can work out the real power cost of each print. A typical FDM printer draws 200 to 350W. A 10-hour print costs about $0.30 to $0.50 USD, depending on your rate. Not a big expense. But useful if you sell prints or want to track total running costs.

Create a counter helper that ticks up on each finished print. Pair it with a utility meter entity for weekly and monthly print counts. For longer-term stats, set up Home Assistant’s InfluxDB or MariaDB long-term stats integration. Export print data to a Grafana dashboard: success rates, average print times, filament use trends. You’ll see months of printing at a glance.

Multi-Printer Setup

If you run more than one printer (and many makers do), copy the dashboard and automations for each. Use per-device entity prefixes to keep them apart. To polish the look past the defaults, see the guide on professional Home Assistant dashboard layouts . Use a tabbed-card from HACS to fit several printers in one view, one tab per printer. Each printer gets its own camera feed, temp graphs, progress tracking, and automation set.

What This Guide Doesn’t Cover

This post is about the Home Assistant layer, not the print server setup. You’ll need a working OctoPrint or Klipper/Moonraker install first. If you need help with that part: for OctoPrint, flash the OctoPi image to an SD card and boot your Pi. The first-run wizard does the rest. For Klipper, KIAUH (Klipper Installation And Update Helper) is the easiest way to install Klipper, Moonraker, and a web UI like Mainsail or Fluidd.

We also skipped YAML samples for every automation above. The print-done alert and thermal runaway snippets give you a pattern to build from. Home Assistant’s visual editor can handle most of these without YAML at all.

For multi-camera setups (top-down for time-lapses, side profile for watching), both OctoPrint and crowsnest support more than one USB cam. Just set each as its own MJPEG stream and add the camera entities in Home Assistant.

A print server, Home Assistant, and a few smart plugs turn a 3D printer from a thing you babysit into a thing you start and walk away from. The cost: a Raspberry Pi you likely have on a shelf, plus an hour of setup.