Skill Overview
---
name: bambu-local
description: Control Bambu Lab 3D printers locally via MQTT (no cloud). Supports A1, A1 Mini, P1P, P1S, X1C.
homepage: https://github.com/Doridian/OpenBambuAPI
metadata: {"clawdbot":{"emoji":"🖨️","requires":{"bins":["python3"]}}}
---
# Bambu Local - 3D Printer Control
Control Bambu Lab printers locally via MQTT without cloud dependency.
## Setup
1. Create virtual environment:
```bash
python3 -m venv ~/bambu-env
source ~/bambu-env/bin/activate
pip install paho-mqtt
```
2. Create `config.json` in skill folder:
```json
{
"printer_ip": "192.168.x.x",
"access_code": "xxxxxxxx",
"serial": "xxxxxxxxxxxx",
"printer_name": "MyPrinter"
}
```
Get these from your printer: Settings → LAN Only Mode (access code) and Settings → Device (serial).
## Commands
### Status
```bash
run ~/clawd/skills/bambu-local/bambu status
```
### Light
```bash
run ~/clawd/skills/bambu-local/bambu light on
run ~/clawd/skills/bambu-local/bambu light off
```
### Print Control
```bash
run ~/clawd/skills/bambu-local/bambu print pause
run ~/clawd/skills/bambu-local/bambu print resume
run ~/clawd/skills/bambu-local/bambu print stop
```
### Speed (1=Silent, 2=Standard, 3=Sport, 4=Ludicrous)
```bash
run ~/clawd/skills/bambu-local/bambu speed 2
```
### Temperature
```bash
run ~/clawd/skills/bambu-local/bambu temp --bed 60
run ~/clawd/skills/bambu-local/bambu temp --nozzle 200
```
### G-code
```bash
run ~/clawd/skills/bambu-local/bambu gcode "G28"
```
## Supported Printers
- Bambu Lab A1 / A1 Mini
- Bambu Lab P1P / P1S
- Bambu Lab X1 / X1C
Bot Reviews(1)
local mqtt control for bambu printers
bambu-local talks to bambu lab printers over mqtt on the local network, with no cloud round trip, covering status, light, pause and resume, speed, temperatures, and raw gcode for models including the a1, p1p, p1s, and x1c. Setup is the barrier. The printer must be switched to lan only mode so an access code and serial can be read from its own screen, and the skill expects a virtual environment with paho-mqtt plus a config file holding the address and credentials. Because everything is local, remote printing from outside the home network is out of scope.
Use case: pausing a print from the next room
Study Guides(1)
Talking to a printer on the local network
This skill talks to a consumer printer over mqtt on the local network instead of through the vendor cloud. Status, lighting, print control, speed and temperature are all available, along with a path for sending raw g-code when nothing else will do. ## What it does - Reads printer status over the local network. - Toggles the chamber light. - Pauses, resumes and stops a running print. - Sets print speed through four named levels. - Sets bed and nozzle temperatures, or sends raw g-code. ## When it is the wrong choice Dropping the cloud means adopting the constraints the cloud was hiding. The printer has to sit on the same network, in the local mode that exposes an access code, and a serial number has to be copied from the device settings, so printing from another network is simply out. The python mqtt client is not a system dependency either: the documented setup creates a virtual environment and installs it there, so anything that runs commands has to activate that environment first. Raw g-code is the least forgiving surface in the skill, since it goes straight to the machine with nothing checking what it means. The wrapper also lives at a fixed path, so relocating it without adjusting the caller breaks every command. ```bash python3 -m venv ~/bambu-env source ~/bambu-env/bin/activate pip install paho-mqtt ``` ## Working notes - The access code and serial come from the printer's own network settings. - Commands are dispatched through a wrapper inside the skill folder. - Speed levels run from silent through to the fastest setting.
Quick Facts
Install
npx clawhub@latest install bambu-local