3D Printing

Local-first Bambu P1S monitoring with Home Assistant, Hermes, and Discord

A project writeup on keeping Bambu P1S monitoring local-first with Home Assistant LAN mode, a mobile dashboard, Hermes automation, and Discord print alerts.

5 min readSeries: Home Automation
Blue-toned workspace representing a local-first 3D printer monitoring dashboard

I wanted a better way to monitor and control a Bambu P1S without making Bambu Cloud the center of the workflow.

The goal was straightforward:

  • keep day-to-day printer monitoring local
  • use Home Assistant as the control surface
  • make the dashboard usable from a phone
  • get useful Discord alerts when prints start, finish, or fail
  • capture occasional camera snapshots without leaving the live stream on all the time
  • package the result so other people can adapt it for their own printer

The result is now available here:

https://github.com/xoff00/bambu-p1s-ha-local-first

Why local-first?

Cloud services are convenient, but a 3D printer is a device sitting on the local network. For normal monitoring and control, I wanted the local network to be enough.

This setup uses Home Assistant plus the Bambu Lab LAN-mode integration. The printer talks locally, Home Assistant exposes the state and controls, and Hermes can add automation and Discord delivery on top.

No port-forwarding Home Assistant. No public raw access to the dashboard. If remote access is needed, the intended path is a private VPN or tunnel such as Tailscale, WireGuard, or a secured zero-trust tunnel.

What the project includes

The repo contains sanitized templates and scripts, not my private deployment values.

It includes:

  • a Home Assistant Lovelace dashboard template
  • Home Assistant notification automation templates
  • a Hermes Home Assistant platform config template
  • a Discord notifier/snapshot script
  • a template renderer
  • setup and security notes
  • .env.example with key names only

The key point is that friends should not have to copy my printer serial, entity names, phone notification service, or local network details. They render the templates with their own Home Assistant entity prefix.

python3 scripts/render_templates.py \
  --printer-prefix p1s_yourprinterprefix \
  --notify-service notify.mobile_app_your_phone

The mobile dashboard

The dashboard ended up being the most important part of the project.

The mobile layout is ordered around what I actually want when checking a print:

  1. video and controls
  2. progress
  3. status
  4. temperatures and fans
  5. AMS and filament

The top card controls the camera stream. If the camera stream is disabled, the dashboard shows a clear β€œtap to enable” button instead of a dead camera frame.

Print controls are intentionally separated from camera controls. Pause, Resume, and Stop sit below the quick actions card, with visual labels:

  • 🟑 Pause
  • 🟑 Resume
  • πŸ”΄ Stop

Stop keeps a confirmation prompt. The controls use service-only Home Assistant button cards with state hidden, because momentary printer buttons can otherwise display confusing states such as Unknown or Unavailable.

Human-readable status

A lot of Home Assistant entities are technically correct but not always human-friendly.

For example, a binary problem sensor might render as:

Print error: OK
HMS errors: OK

That is accurate, but not how I want to read the dashboard.

The dashboard instead uses a small markdown/template card:

Print errors: No errors
HMS errors: No errors
AMS: Active
Local control: Available

The AMS humidity index is also shown as an out-of-five value, such as 2/5, rather than a bare integer.

Discord alerts and snapshots

Home Assistant mobile notifications are useful, but I also wanted Discord messages in a channel where I already keep operational updates.

The repo includes an optional Hermes-side script:

scripts/p1s-discord-notifier.py

It reads Home Assistant state through the local Home Assistant API and posts Discord messages for:

  • print active/started
  • print finished
  • print failed
  • filament runout
  • print error
  • HMS error

It also uploads static camera snapshots during active prints. The snapshot cadence is calculated as 20% of the estimated print time, so a one-hour print uploads about every twelve minutes.

One small detail mattered: if the dashboard camera switch is off, Home Assistant may not expose a usable camera image. The script handles that by briefly enabling the camera switch when a snapshot is due, waiting for a still image, uploading it, and then restoring the switch off.

That keeps the normal dashboard quiet while still giving Discord periodic visual updates.

Keeping secrets out

The public repo is intentionally sanitized.

It does not include:

  • Home Assistant tokens
  • Discord bot tokens
  • Bambu LAN access codes
  • Home Assistant credentials
  • printer serial numbers from my deployment
  • local IP addresses
  • cached camera images
  • runtime state

The repo includes .env.example only so users know which environment variables are needed.

The architecture

At a high level, the flow looks like this:

Bambu P1S in LAN mode
        β”‚
        β–Ό
Home Assistant + Bambu Lab integration
        β”‚
        β”œβ”€β”€ mobile-friendly printer dashboard
        β”œβ”€β”€ local notification automations
        └── local API state/services
                 β”‚
                 β–Ό
        Hermes-side Discord notifier
                 β”‚
                 β”œβ”€β”€ print lifecycle alerts
                 └── periodic camera snapshots

Everything important stays local-first. Discord is used only as an outbound notification target.

What I learned

The main lesson was that the β€œlast mile” of dashboard polish matters.

The initial integration gives you entities. The usable system comes from choosing which entities matter, hiding the noisy ones, using human names, and treating destructive controls differently from passive camera controls.

The second lesson was that templates are worth the extra step. Home Assistant entity IDs usually include a generated printer prefix, so the repo is much more shareable if it uses placeholders and a renderer instead of hardcoding one installation.

Try it

The project is here:

https://github.com/xoff00/bambu-p1s-ha-local-first

If you already have a Bambu printer in Home Assistant, the quickest path is:

  1. find your printer entity prefix
  2. render the templates
  3. import the dashboard
  4. optionally configure Discord alerts

The setup stays local-first, avoids public Home Assistant exposure, and gives you a dashboard that is actually usable from a phone while a print is running.