Skip to content

Releases: tribixbite/beambam

v1.4.0 — Phase 5e bridge split complete

22 May 07:26

Choose a tag to compare

Phase 5e bridge split closed. x2d_bridge.py is now a 255-LoC pure
back-compat re-export shim; every handler lives under its canonical
beambam.* home.

LoC drained from the monolith in v1.4.0: 3,470 → 255 (−93 %).

See CHANGELOG.md for the full per-batch ledger.

No breaking changes — every from x2d_bridge import X continues to
work via the re-export shim.

v1.2.0 — 12 new commands + bridge split phase 2

21 May 05:23

Choose a tag to compare

12 new beambam subcommands across pull/push/inspect/health surfaces, plus the second phase of the x2d_bridge.py decomposition into beambam.* modules.

See CHANGELOG.md for the full diff.

Install

pip install --upgrade beambam
beambam --version

New commands

  • beambam download <remote> [local] — pull files via FTPS
  • beambam ams {status,info,load,unload,dry} — pretty AMS state + control
  • beambam cam {watch,snap} — terminal camera viewer (kitty / iTerm2 / blocks)
  • beambam slice <stl> — standalone STL slice
  • beambam find [--add NAME] — LAN SSDP discovery + credentials writeback
  • beambam cloud-fetch --info <design_id> — MakerWorld + Bambu Cloud queries
  • beambam history + beambam whoami — cloud print history + user identity
  • beambam config {list,show,add,rm,rename} — credentials editor
  • beambam mqtt {sub,pub} — raw signed-MQTT debug
  • beambam queue {list,add,rm,cancel,clear,path} — print queue editor
  • beambam doctor — full health diagnostic with semantic exit codes

Library API

from beambam import Printer, Creds                       # canonical home
from beambam.config import Creds                         # new in v1.2.0
from beambam.mqtt import sign_payload, BAMBU_CERT_ID     # new in v1.2.0
from beambam.ftps import upload_file, download_file       # re-exports
from beambam.state_hub import StateHub                    # pub/sub primitive

Test suite

108 → 284 tests (+176) green on Python 3.10/3.11/3.12/3.13 across Ubuntu + macOS. Live tests skipped without printer creds.

No breaking changes from v1.1.0.

v1.1.0 — Package rename + PyPI debut

21 May 04:24

Choose a tag to compare

First pip install beambam release. Rebrand from x2d since the bridge supports every Bambu Lab printer (X1/P1/A1/H2/X2D), not just X2D.

See CHANGELOG.md for the full diff.

Install

pip install beambam                # core bridge + CLI
pip install beambam[all]           # + HA, MCP, web UI, AI assistant
beambam --version

New commands

  • beambam analyze <file.3mf> — print-plan dissector (filaments / flushes / AMS / hints)
  • beambam simulate <subcmd> — dry-run signed MQTT payload preview
  • beambam cloud-fetch --info <design_id> — MakerWorld design metadata
  • beambam frame --preset mira --out mira.stl — frame-STL with name presets

Library API

from beambam import Printer, Creds
with Printer(Creds(ip='...', code='...', serial='...')) as p:
    s = p.state()
    p.start_print('model.gcode.3mf', ams=[1, 5])

v1.0.0 — feature-complete LAN-first stack

27 Apr 11:19

Choose a tag to compare

x2d v1.0.0 — Feature-complete LAN-first stack

86 commits since v0.1.0. 62 ledger items closed. Six new daemon
surfaces, full Home Assistant integration, MCP server for Claude
Desktop, mobile web UI, multi-printer queue, auto-timelapses, AI
assistant, real-time AMS color sync.

What's new since v0.1.0

  • Six-surface daemon built on top of the bridge:
    REST + Server-Sent Events, Prometheus /metrics, structured
    JSON access log with rotation, Home Assistant MQTT
    auto-discovery, WebRTC chamber-camera streaming (~100 ms
    latency), MCP stdio server for Claude Desktop / Cursor /
    Continue, and a mobile-friendly web UI at / (~17 KB total
    static assets, no framework).
  • Multi-printer everywhere — daemon, web UI, queue, HA
    publisher, MCP server. One [printer:NAME] section per printer
    in ~/.x2d/credentials and every surface auto-discovers them.
    Failures are isolated per-printer.
  • Native Home Assistant integration with 32 entities + 1
    Device per printer
    , including AMS-color → Bambu-profile
    auto-resolve via the official filaments_color_codes.json
    (~7000 entries). Live-tested against real Home Assistant Core
    2025.1.4.
  • Print queue with HTML5 native drag-and-drop reorder,
    cross-printer move, file-backed FIFO at ~/.x2d/queue.json,
    crash-safe (running → pending demotion on reload). Web UI
    Queue card.
  • Auto-timelapses: per-printer state-driven JPEG capture
    every 30 s during prints, one-click ffmpeg stitch into MP4,
    inline <video> playback in the web UI.
  • AI assistant in the web UI that calls the same MCP toolset
    Claude Desktop sees. Three providers: pure-Python local
    router (no API key), anthropic (with the canonical MCP tool
    loop), and auto.
  • WebRTC streaming at sub-second latency vs HLS's 6-8 s.
    Browser viewer at /cam.webrtc.html. Built on aiortc + aiohttp.

Full per-feature breakdown in CHANGELOG.md.

Quick install

bash <(curl -fsSL https://raw.githubusercontent.com/tribixbite/x2d/main/install.sh)

# Configure
cat >~/.x2d/credentials <<'EOF'
[printer]
ip     = 192.168.1.42
code   = 12345678
serial = 03ABC0001234567
EOF

# Run
x2d_bridge.py daemon --http 0.0.0.0:8765 \
    --queue --timelapse \
    --auth-token "$(openssl rand -hex 32)"

# Open the web UI
xdg-open http://localhost:8765/

Per-platform notes

Termux (Android, aarch64) — primary target

The full stack runs natively. WebRTC needs libsrtp built from
source (covered in docs/WEBRTC.md);
install.sh does this automatically. aiortc==1.10.1 and
av==13.1.0 are pinned because newer versions need PyAV 14
features that don't build on Termux's stock Cython.

The BambuStudio Termux GUI port is in this tarball as
bin/bambu-studio (77 MB stripped) — same six source patches
plus the LD_PRELOAD shim.

Linux (x86_64 / aarch64 desktop)

x2d_bridge.py daemon + python -m mcp_x2d + runtime/ha/publisher.py
all work as-is. WebRTC stack installs cleanly via the standard
pip install aiortc (no source-build of libsrtp needed). The
BambuStudio binary is Termux-specific — on desktop Linux, install
upstream BambuStudio v02.06.00.51 normally and point its Network
Plugin at the bridge daemon via the LAN-mode "physical printer"
config flow.

macOS

Same as Linux. MCP integration with Claude Desktop is documented
in docs/MCP.md.
The claude_desktop_config.json example block is at
docs/claude_desktop_config.example.json.

Windows

The bridge daemon runs under WSL2 or native Python 3.12. WebRTC
is supported. The BambuStudio binary is Linux-only — use upstream
Windows BambuStudio + the bridge in WSL2 / a homelab VM.

Documentation

Topic Doc
Quick start docs/QUICKSTART.md
Web UI docs/WEB_UI.md
MCP server docs/MCP.md
WebRTC streaming docs/WEBRTC.md
Home Assistant docs/HA.md
HA vs ha-bambulab docs/HA_VS_BAMBULAB.md
Multi-printer setup docs/MULTI_PRINTER.md
Print queue docs/QUEUE.md
Timelapse browser docs/TIMELAPSE.md
AI assistant docs/ASSISTANT.md
AMS color sync docs/COLORSYNC.md

Demo media

Five short MP4s in docs/demos/
walking through the CLI, GUI, MCP, web UI, and HA dashboard flows.
Total ~3.2 minutes. Reproducible via
runtime/demos/render.py.

What's deferred to v1.1

Two items intentionally past this release because they require
physical-print-time + an attached ADB device:

  • #35 Final Phase 0 ADB verification — manual zero-papercut
    walkthrough on a fresh ~/.config/BambuStudioInternal/.
  • #41 Print the rumi frame end-to-end via the GUI — full
    slice-and-print run from BambuStudio. The underlying
    start_print C-ABI is already exercised by
    runtime/network_shim/tests/test_shim_e2e.py against the real
    X2D, so the code path is proven; only the GUI walkthrough is
    pending.

Verifying the tarball

sha256sum -c bambustudio-x2d-termux-aarch64.tar.xz.sha256

Expected SHA-256 is in the attached .sha256 asset.

Thanks

Built and tested on a Samsung S25 Ultra (Termux, aarch64) against
a real Bambu Lab X2D running Jan-2025+ firmware (RSA-SHA256 signed
MQTT).

v0.1.0 — BambuStudio v02.06.00.51 + signed-MQTT LAN bridge

25 Apr 13:53

Choose a tag to compare

First public build. Prebuilt aarch64 Termux binary plus signed-MQTT LAN bridge.

Note: a pre-release tarball was up briefly (~15 min) that still contained printer-specific argparse defaults left over from development. Those have been scrubbed. The current release tarball SHA-256 is da7ded76b88880e0b6755442c40ef596c7975039e40461fe7bf8a0fc628e2860. Always verify against the .sha256 asset.

What's in the tarball

  • bin/bambu-studio — patched BambuStudio v02.06.00.51 (~77 MB stripped) with all seven Termux/touchscreen patches (touch-drift fix in 4 custom Button widgets + BBLTopbar maximize fallback + MainFrame initial-size clamp).
  • runtime/libpreloadgtk.so + source — LD_PRELOAD shim for GTK pre-init / locale fixes / wxLocale ICU bypass / wx 3.3 assert silencer.
  • helpers/x2d_bridge.py + helpers/bambu_cert.py — pure-Python signed-MQTT LAN client that replaces what the (aarch64-unavailable) Bambu Network Plug-in would do.
  • helpers/{lan_upload,lan_print,resolve_profile,inject_thumbnails,make_frame,test_signed_mqtt}.py — slicing + LAN-print pipeline that works without the GUI.
  • resources/ — pruned BambuStudio resources (web/profiles/icons/i18n/fonts/shaders); HMS/calib/model dropped to save ~170 MB.
  • profile-template/BambuStudio.conf — pre-seeded AppConfig that selects X2D + PLA Silk so first launch lands in MainFrame.
  • run_gui.sh — launcher with all the right env vars (auto-resolves its own path; no hardcoded developer paths).
  • patch_bambu_skip_wizard.py — re-applies the binary patch over GUI_App::config_wizard_startup if you ever rebuild.
  • README.md — full docs including pkg-install list.

Quick start

tar -xJf bambustudio-x2d-termux-aarch64.tar.xz
cd bambustudio-x2d-termux-aarch64
mkdir -p ~/.config/BambuStudio && cp profile-template/BambuStudio.conf ~/.config/BambuStudio/
DISPLAY=:1 ./run_gui.sh

LAN bridge:

mkdir -p ~/.x2d && chmod 700 ~/.x2d
cat > ~/.x2d/credentials <<EOF2
[printer]
ip = 192.168.x.y
code = <8-char access code>
serial = <printer serial>
EOF2
chmod 600 ~/.x2d/credentials
python3 helpers/x2d_bridge.py status
python3 helpers/x2d_bridge.py print myfile.gcode.3mf --slot 3 --bed-type textured_plate

Required Termux packages and build instructions are in README.md.

SHA256: see attached .sha256 file.