1
0
Fork 0
mirror of https://github.com/maziggy/bambuddy.git synced 2026-05-09 08:25:54 +02:00

[PR #989] [CLOSED] feat(printer): add X2D printer support #1149

Closed
opened 2026-05-07 00:16:17 +02:00 by BreizhHardware · 0 comments

📋 Pull Request Information

Original PR: https://github.com/maziggy/bambuddy/pull/989
Author: @legend813
Created: 4/15/2026
Status: Closed

Base: devHead: feat/x2d-printer-support


📝 Commits (1)

  • 8858142 feat(printer): add X2D printer support (fixes #988)

📊 Changes

10 files changed (+69 additions, -6 deletions)

View changed files

📝 backend/app/core/database.py (+1 -0)
📝 backend/app/services/camera.py (+5 -4)
📝 backend/app/services/firmware_check.py (+4 -0)
📝 backend/app/services/printer_manager.py (+2 -0)
📝 backend/app/services/virtual_printer/manager.py (+4 -0)
📝 backend/app/services/virtual_printer/mqtt_server.py (+1 -0)
📝 backend/app/utils/printer_models.py (+7 -0)
📝 backend/tests/unit/test_printer_models.py (+40 -1)
📝 frontend/src/pages/PrintersPage.tsx (+3 -0)
📝 frontend/src/pages/spoolbuddy/SpoolBuddyAmsPage.tsx (+2 -1)

📄 Description

Summary

Fixes #988 — Bambu Lab X2D camera not working.

Root cause: The X2D identifies itself as internal model code N6 via SSDP/MQTT. Since N6 was unknown to Bambuddy, the camera service fell back to the chamber-image protocol on port 6000 instead of RTSP on port 322, resulting in a failed connection.

  • Diagnosed from the support logs attached to issue #988: Chamber image: failed to connect to [IP]:6000 and Unknown printer model: N6
  • The X2D was launched April 14, 2026; both reporters' support-info files confirm model: N6, firmware 01.01.00.00, dual-nozzle

Changes

File What changed
printer_models.py N6 → X2D mapping; add to CARBON_ROD_MODELS and ETHERNET_MODELS
camera.py supports_rtsp() now returns True for X2 prefix and N6 code → port 322
printer_manager.py Add X2D/N6 to CHAMBER_TEMP_SUPPORTED_MODELS
firmware_check.py Register x2d API key, dev model N6, and wiki path
virtual_printer/manager.py Add N6 → X2D to model and serial prefix maps
virtual_printer/mqtt_server.py Add N6 → X2D to MODEL_PRODUCT_NAMES
database.py Add X2D → N6 to VP migration fix dict
PrintersPage.tsx Add N6 → X2D to mapModelCode()
SpoolBuddyAmsPage.tsx Add N6 → X2D to mapModelCode()
test_printer_models.py New TestX2DModel class — 9 tests, all passing

Test plan

  • All existing unit tests pass (pytest backend/tests/unit/test_printer_models.py — 39/39)
  • New TestX2DModel tests verify: rod type, model ID map, model name map, ethernet, RTSP support, camera port
  • X2D printer connects and camera stream uses RTSP on port 322
  • Firmware check no longer logs Unknown printer model: N6

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/maziggy/bambuddy/pull/989 **Author:** [@legend813](https://github.com/legend813) **Created:** 4/15/2026 **Status:** ❌ Closed **Base:** `dev` ← **Head:** `feat/x2d-printer-support` --- ### 📝 Commits (1) - [`8858142`](https://github.com/maziggy/bambuddy/commit/885814287c1fd2f6606d2812801fa50471e56942) feat(printer): add X2D printer support (fixes #988) ### 📊 Changes **10 files changed** (+69 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `backend/app/core/database.py` (+1 -0) 📝 `backend/app/services/camera.py` (+5 -4) 📝 `backend/app/services/firmware_check.py` (+4 -0) 📝 `backend/app/services/printer_manager.py` (+2 -0) 📝 `backend/app/services/virtual_printer/manager.py` (+4 -0) 📝 `backend/app/services/virtual_printer/mqtt_server.py` (+1 -0) 📝 `backend/app/utils/printer_models.py` (+7 -0) 📝 `backend/tests/unit/test_printer_models.py` (+40 -1) 📝 `frontend/src/pages/PrintersPage.tsx` (+3 -0) 📝 `frontend/src/pages/spoolbuddy/SpoolBuddyAmsPage.tsx` (+2 -1) </details> ### 📄 Description ## Summary Fixes #988 — Bambu Lab X2D camera not working. **Root cause:** The X2D identifies itself as internal model code `N6` via SSDP/MQTT. Since `N6` was unknown to Bambuddy, the camera service fell back to the chamber-image protocol on port 6000 instead of RTSP on port 322, resulting in a failed connection. - Diagnosed from the support logs attached to issue #988: `Chamber image: failed to connect to [IP]:6000` and `Unknown printer model: N6` - The X2D was launched April 14, 2026; both reporters' support-info files confirm `model: N6`, firmware `01.01.00.00`, dual-nozzle ## Changes | File | What changed | |------|-------------| | `printer_models.py` | `N6 → X2D` mapping; add to `CARBON_ROD_MODELS` and `ETHERNET_MODELS` | | `camera.py` | `supports_rtsp()` now returns `True` for `X2` prefix and `N6` code → port 322 | | `printer_manager.py` | Add `X2D`/`N6` to `CHAMBER_TEMP_SUPPORTED_MODELS` | | `firmware_check.py` | Register `x2d` API key, dev model `N6`, and wiki path | | `virtual_printer/manager.py` | Add `N6 → X2D` to model and serial prefix maps | | `virtual_printer/mqtt_server.py` | Add `N6 → X2D` to `MODEL_PRODUCT_NAMES` | | `database.py` | Add `X2D → N6` to VP migration fix dict | | `PrintersPage.tsx` | Add `N6 → X2D` to `mapModelCode()` | | `SpoolBuddyAmsPage.tsx` | Add `N6 → X2D` to `mapModelCode()` | | `test_printer_models.py` | New `TestX2DModel` class — 9 tests, all passing | ## Test plan - [x] All existing unit tests pass (`pytest backend/tests/unit/test_printer_models.py` — 39/39) - [x] New `TestX2DModel` tests verify: rod type, model ID map, model name map, ethernet, RTSP support, camera port - [ ] X2D printer connects and camera stream uses RTSP on port 322 - [ ] Firmware check no longer logs `Unknown printer model: N6` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
BreizhHardware 2026-05-07 00:16:17 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/bambuddy-maziggy-1#1149
No description provided.