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-lab

v1.0.1

Published

Homebridge plugin to control one or more Bambu Lab printers over local MQTT.

Readme

npm npm License verified-by-homebridge Buy Me A Coffee

Homebridge Bambu Lab

Homebridge dynamic platform plugin for controlling one or more Bambu Lab printers over the local MQTT interface. With support for HKSV to view and record printer camera streams, local motion detection, print state monitoring, and print control.

This project started when I was too lazy to open the Bambu app to turn off the chamber light and wanted to just say "Hey Siri, turn off the printer light." And like any good developer, I decided to timesink 15 hours into a Homebridge plugin to save myself 15 seconds.

Features

  • Supports multiple Bambu printers from a single Homebridge platform instance.
  • Uses the Homebridge settings UI with a custom multi-printer configuration screen.
  • Lets you assign a custom name and selected model to each printer.
  • Subscribes to device/<serial>/report for printer state updates.
  • Exposes HomeKit accessories per printer:
    • Lightbulb: chamber light on/off.
    • Switch: pause/resume active print.
    • Optional Fan: print speed override slider.
    • Optional Camera: HomeKit camera accessory for the printer stream.
  • Publishes commands to device/<serial>/request.
  • Handles MQTT disconnects and reconnects automatically per printer.

Configuration

Use the Homebridge UI to add printers, choose each model, and edit printer names.

Manual config.json example:

{
  "platform": "Homebridge Bambu Plugin",
  "name": "Homebridge Bambu Plugin",
  "printers": [
    {
      "name": "Office Printer",
      "model": "X1 Carbon",
      "ipAddress": "192.168.1.50",
      "serialNumber": "01S00C123456789",
      "lanAccessCode": "12345678",
      "mqttPort": 8883,
      "mqttUsername": "bblp",
      "rejectUnauthorized": false,
      "enableSpeedControl": true,
      "enableCamera": true,
      "cameraName": "Office Printer Camera",
      "cameraRtspUrl": "rtsps://bblp:[email protected]:322/streaming/live/1",
      "ffmpegPath": "ffmpeg",
      "cameraVideoCodec": "h264_videotoolbox",
      "enableHksv": false,
      "enableLocalMotionDetection": false,
      "motionSensitivity": 40,
      "hksvPrebufferLengthMs": 4000,
      "hksvFragmentLengthMs": 4000,
      "hksvMaxRecordingSeconds": 20
    },
    {
      "name": "Workshop Printer",
      "model": "P1S",
      "ipAddress": "192.168.1.51",
      "serialNumber": "03W00C987654321",
      "lanAccessCode": "87654321",
      "enableCamera": false
    }
  ]
}

Camera Notes

  • If cameraRtspUrl is omitted, the plugin auto-builds: rtsps://<mqttUsername>:<lanAccessCode>@<ipAddress>:322/streaming/live/1.
  • ffmpeg must be installed and available in PATH, or configured with ffmpegPath per printer.
  • enableHksv turns on HomeKit Secure Video recording services.
  • enableLocalMotionDetection runs a local frame-difference detector and updates a Motion Sensor characteristic.
  • HKSV uses a rolling fragmented-MP4 prebuffer and starts streams with init segment + buffered fragments before live fragments.
  • Recording streams are motion-event bounded with a short post-event tail and graceful isLast packet closeout.

Development

npm install
npm run build

Then link and run Homebridge in debug mode:

npm link
homebridge -D