npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

homebridge-bambu-labs

v1.1.4

Published

Homebridge plugin for Bambu Labs 3D printers - printing sensor and chamber light control

Readme

Homebridge Bambu Labs

A Homebridge plugin that exposes Bambu Labs 3D printers to Apple HomeKit via MQTT.

Features

  • Print status sensor — an occupancy sensor that activates when the printer is printing (including paused/preparing states)
  • Chamber light control — a lightbulb accessory to toggle the chamber light on and off
  • Nozzle temperature sensor — reports the current hotend temperature
  • Bed temperature sensor — reports the current build plate temperature
  • Chamber temperature sensor — reports the current enclosure temperature
  • Camera streaming — view the printer camera feed in HomeKit (RTSP for X1/H2 series, JPEG for A1/P1 series)
  • LAN and Cloud modes — connect directly over your local network, or via Bambu Labs cloud for remote access
  • Auto-discovery — in cloud mode, printers are automatically discovered from your account

Temperature sensors can be individually disabled per-printer in the config.

Prerequisites

  • A Bambu Labs printer (X1, X1C, P1P, P1S, A1, etc.)
  • Homebridge v1.8+ or v2.0+
  • Node.js 20.18+ or 22.10+

For LAN mode:

  • Printer on your local network
  • The printer's LAN Access Code (found on the printer touchscreen under Settings > Network > LAN Mode)
  • The printer's serial number and IP address

For Cloud mode:

  • A Bambu Labs account with your printer(s) registered
  • Your account email/password, or an auth token

For camera streaming:

  • ffmpeg installed on the Homebridge host
  • The printer's IP address and LAN Access Code (even in cloud mode, camera streams are accessed directly over LAN)

Installation

Via Homebridge UI

Search for homebridge-bambu-labs in the Homebridge plugin search and click install.

Via npm

npm install -g homebridge-bambu-labs

Configuration

LAN Mode (default)

Connects directly to printers on your local network using the LAN Access Code.

{
  "platforms": [
    {
      "platform": "BambuLabs",
      "name": "Bambu Labs",
      "printers": [
        {
          "name": "My Printer",
          "ip": "192.168.1.100",
          "serial": "YOUR_SERIAL_NUMBER",
          "accessCode": "YOUR_ACCESS_CODE"
        }
      ]
    }
  ]
}

Cloud Mode

Connects to printers via the Bambu Labs cloud MQTT broker. This allows remote access without requiring the printer to be on the same network.

With email/password:

{
  "platforms": [
    {
      "platform": "BambuLabs",
      "name": "Bambu Labs",
      "cloudMode": true,
      "cloudEmail": "[email protected]",
      "cloudPassword": "your-password"
    }
  ]
}

When no printers array is provided in cloud mode, all printers linked to your account are auto-discovered.

With auth token:

If your account uses two-factor authentication (2FA) or email verification codes, you can provide an auth token directly instead of email/password. You can obtain the token from Bambu Studio or OrcaSlicer.

{
  "platforms": [
    {
      "platform": "BambuLabs",
      "name": "Bambu Labs",
      "cloudMode": true,
      "cloudToken": "YOUR_AUTH_TOKEN"
    }
  ]
}

With explicit printers:

You can optionally list specific printers (by serial number) in cloud mode to control which printers are exposed and to set per-printer options:

{
  "platforms": [
    {
      "platform": "BambuLabs",
      "name": "Bambu Labs",
      "cloudMode": true,
      "cloudEmail": "[email protected]",
      "cloudPassword": "your-password",
      "printers": [
        {
          "name": "Office Printer",
          "serial": "SERIAL_NUMBER_1",
          "enableChamberTemperature": false
        }
      ]
    }
  ]
}

Platform options

| Option | Required | Default | Description | |--------|----------|---------|-------------| | cloudMode | No | false | Enable cloud mode | | cloudEmail | Cloud | — | Bambu Labs account email | | cloudPassword | Cloud | — | Bambu Labs account password | | cloudToken | Cloud | — | Auth token (alternative to email/password) | | cloudRegion | No | global | Cloud region: global or china |

Printer options

| Option | Required | Default | Description | |--------|----------|---------|-------------| | name | Yes | — | Display name for the printer in HomeKit | | ip | LAN / Camera | — | Printer's local IP address | | serial | Yes | — | Printer serial number | | accessCode | LAN / Camera | — | 8-character LAN Access Code | | enableNozzleTemperature | No | true | Show nozzle temperature sensor | | enableBedTemperature | No | true | Show bed temperature sensor | | enableChamberTemperature | No | true | Show chamber temperature sensor | | enableCamera | No | false | Enable HomeKit camera streaming | | cameraType | No | rtsp | rtsp (X1/X1C/X1E/P2S/H2 series) or jpeg (A1/A1 Mini/P1P/P1S) | | ffmpegPath | No | ffmpeg | Custom path to ffmpeg binary |

Camera setup

To enable the camera, set enableCamera to true and choose the correct cameraType for your printer:

  • RTSP (rtsp): X1, X1C, X1E, P2S, H2C, H2D, H2D Pro, H2S — these printers stream via RTSP on port 322
  • JPEG (jpeg): A1, A1 Mini, P1P, P1S — these printers use a proprietary JPEG stream on port 6000

Camera streaming always requires the printer's local IP address and access code, even in cloud mode. The video stream is accessed directly over your LAN — it does not go through the Bambu cloud.

{
  "name": "My X1C",
  "ip": "192.168.1.100",
  "serial": "YOUR_SERIAL",
  "accessCode": "YOUR_CODE",
  "enableCamera": true,
  "cameraType": "rtsp"
}

Development

# Clone the repository
git clone https://github.com/alexjsp/homebridge-bambu-labs.git
cd homebridge-bambu-labs

# Install dependencies
npm install

# Build
npm run build

# Watch for changes during development
npm run watch

To test locally with Homebridge, link the plugin:

npm link
# Then in your Homebridge installation directory:
npm link homebridge-bambu-labs

How it works

The plugin connects to each configured printer over MQTT (port 8883, TLS). In LAN mode, it connects directly to the printer's IP using the LAN Access Code. In cloud mode, it authenticates with the Bambu Labs API and connects to the cloud MQTT broker (us.mqtt.bambulab.com or cn.mqtt.bambulab.com).

Both modes use the same MQTT topics and message formats — the plugin subscribes to status reports and pushes characteristic updates to HomeKit in real time. Light control commands are sent back to the printer over the same MQTT connection.