You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 97bfbcc
Browse filesBrowse the repository at this point in the historyBrowse files
-**Creality printers now show up in the network scan** — *Add printer → Creality → Scan network* discovers Creality machines on your LAN (K-series, K2, and current-gen Enders running Klipper, e.g. the Ender-3 V4) and adds them in one click, just like Snapmaker and FlashForge. There's also a manual *Enter IP address* path and an inline *Add by IP* shortcut for printers the scan can't reach directly. The common Creality home subnets (192.168.1.x, 192.168.40.x) are always scanned, and any extra subnets you add now persist across a *Restart scan*. Verified live against an Ender-3 V4.
13
+
14
+
### Changed
15
+
16
+
-**Adding a Creality printer no longer requires a username/password** — the *Root* account and password fields are now optional. Most Creality printers expose their control channel without authentication, so you can add and connect to them without entering anything; only fill them in if your printer's firmware enforces a login.
17
+
-**A friend's inventory is cleaner in read-only mode** — when viewing a friend's inventory, the *+ Scan* and *Add* buttons are now hidden, since those actions can't apply to someone else's collection.
Copy file name to clipboardExpand all lines: ROADMAP.md
+29Lines changed: 29 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -367,6 +367,35 @@ A possible 7th driver later: `drivers/elegoo-mqtt.js` for Centauri — **researc
367
367
|**Generic Klipper / Wondermaker**| Moonraker WS (`:7125`) | mDNS varies; falls back to manual IP |`klipper-generic`| New driver — at this point we have 3 Klipper-class implementations (Snapmaker + Creality K + Generic) and the empirical common surface is clear, so this is the right moment to extract `_moonraker-base.js`. New brand entry "Klipper machine" with a manual-IP-only flow (auto-discovery is hit-or-miss across Klipper distros). |
368
368
| (Future) Prusa MK4 / MINI | PrusaLink HTTP (`:80`) | mDNS `_prusalink._tcp.local.`|`prusa-http`| Out of scope for first ship; add to the model JSON files later. |
369
369
370
+
#### 🔎 Multi-brand LAN discovery — unified "Scan network" *(can ship before the live drivers)* · **Effort: M** · **Risk: low**
371
+
372
+
Mirrors the mobile Flutter scanners on the desktop. Today **+ Add printer → Scan** only finds **Snapmaker** (mDNS `_snapmaker._tcp` + port-scan). Generalize it so a single scan surfaces printers of **every** brand on the LAN, each ready for one-click add — independent of whether that brand has a live driver yet (discovery → add → read-only card is already useful, and the live block lights up later as F2-F5 land).
373
+
374
+
**Per-brand discovery probe** — all already documented in `renderer/printers/<brand>/PROTOCOL.md` (those specs were derived from the Flutter scanners, e.g. `creality_scan_printers.dart`), so each one is a straight Dart→Node translation:
> ⚠️ Spec drift to resolve from the Flutter source: the per-brand status table above lists FlashForge discovery as "UDP broadcast `48899` magic byte", while flashforge PROTOCOL §2.6 says multicast `225.0.0.9:19000` "Hello World!". Confirm against the Flutter scanner before implementing.
385
+
386
+
**Where the code goes** — all probes run in the **main process** (the Chromium renderer can't open raw UDP/TCP sockets), exposed to the renderer over IPC, exactly like the Snapmaker scan + Bambu MQTT already do:
- mDNS: `bonjour-service` (already a dependency since v1.4.8).
390
+
391
+
♻️ **Reuses (existing, exploitable)**:
392
+
-`inventory.js` L8030-8226 — subnet enumeration + batched port-scan engine. Already brand-agnostic; feed it the union of brand ports and dispatch the matching probe per open port.
393
+
-`bonjour-service` mDNS in `main.js` — browse extra service types (`_bambu._tcp`, `_octoprint._tcp`, …) alongside `_snapmaker._tcp`.
394
+
-`snapAddDiscoveredPrinter()` (L8241-8633) — the one-click "write printer doc to Firestore + open detail" pattern; generalize to set `brand` from the matched probe.
395
+
- Scan UI panel (`openSnapmakerScan` & friends, L8410+) — rename to a brand-neutral "Scan network" panel grouping candidates by brand.
396
+
397
+
**Merge / dedupe**: key by serial number when the probe returns one (Bambu SSDP, FlashForge), else by IP. Run all probes in parallel; merge into one list with a per-candidate confidence score (mDNS/SSDP > raw port-open). Same logic as the Bambu §12 dedupe (serial-or-IP, keep highest score).
- Creality LAN discovery in the "Add printer → Scan" flow — mirrors the mobile Flutter scanner and the existing Snapmaker/FlashForge desktop flows. Choice modal (Scan vs Manual), live LAN scan panel with one-click add, and manual-IP probe. Two-stage probe: fast TCP `:9999` port-open filter in the main process, then a renderer WebSocket handshake (`get printerInfo`, heartbeat-aware frame accumulation, `isCrealityLike` validation) — unconfirmed hosts are dropped. Common Creality subnets (192.168.1, 192.168.40) always scanned; user extra subnets persisted in localStorage so they survive a Restart scan. Logs a clear error in the debug scan log when the IPC bridge isn't loaded (app needs a full relaunch). `cre:tcp-probe` IPC + `creTcpProbe` preload bridge — `main.js`, `preload.js`, `renderer/printers/creality/probe.js`, `renderer/printers/creality/add-flow.js`, `renderer/inventory.js`
4
5
5
6
## Changed
7
+
- Creality printer settings: `Root` account + password are now optional (were required). Most Creality printers — incl. the Ender-3 V4 — expose the WebSocket without auth and the live driver connects fine with empty credentials — `renderer/printers/creality/settings.js`
8
+
- Friend (read-only) view now hides the write-action buttons (`+ Scan` and `Add product` / `Add device`) — they can't act on a friend's docs — `renderer/inventory.js` (`renderFriendBanner`)
6
9
7
10
## Fixed
8
11
9
-
-**Bambu RTSP camera failed with "Option tls_verify not found" (no stream on bundled ffmpeg)** — `main.js`
10
-
- The RTSP launch passed `-tls_verify 0` before `-i`, applied to the rtsp demuxer. Older ffmpeg (the bundled ffmpeg-static 6.0) has no `tls_verify` on the rtsp demuxer → ffmpeg exits code 1 when it reaches the TLS stage of a reachable printer. Homebrew ffmpeg 8.x has it, which masked the bug in dev before ffmpeg-static was bundled. Removed the flag — the tls protocol defaults to `verify=0`, so the printer's self-signed cert is still accepted (works on ffmpeg 6.0 and 8.x). This was the real reason the P2S camera showed no stream on Windows (and on macOS once it switched to the bundled binary).
11
-
12
12
## Removed
13
13
14
14
## i18n
15
+
- Added: `creAddChoiceTitle`, `creScanEmpty` — 9 locales (all other scan UI strings reuse the shared `snap*` keys)
Copy file name to clipboardExpand all lines: renderer/CODEMAP.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -358,4 +358,5 @@ Most common navigation tasks → start here:
358
358
-`printers/creality/widget_camera.js` → `renderCreCamBanner`, `startCreCam`, `stopCreCam` — direct RTCPeerConnection + `<video>` (port 8000); `_activeIp` guard prevents restart on WS reconnect; CSS in `55-creality.css`
359
359
-`printers/flashforge/widget_camera.js` → `renderFfgCamBanner`, `renderFfgCamWallBanner`, `ffgRefreshCamBanner`, `ffgCamBaseUrl` — MJPEG sidecard/cam-wall banners (no src on `<img>` — mux provides frames)
360
360
-`printers/flashforge/cam_mux.js` → `ffgMuxStart`, `ffgMuxStop`, `ffgMuxStopAll`, `ffgMuxRestart`, `ffgMuxRegister`, `ffgMuxUnregister` — single `fetch()` MJPEG multiplexer; distributes JPEG blob URLs to all `<img>` consumers; auto-stops when last consumer unregisters
361
+
-**Per-brand LAN discovery** (Add Printer → Scan): Snapmaker, FlashForge and Creality each have a `probe.js` (pure network/data layer — no DOM) + `add-flow.js` (Scan/Manual choice modal, slide-in scan panel, manual-IP probe). `inventory.js` imports `openSnapAddFlow` / `openFfgAddFlow` / `openCreAddFlow` and dispatches by brand in `openPrinterBrandPicker` (~L10585). All three reuse the shared `snap*` scan-UI i18n keys + CSS (`snap-scan-*`, `snap-add-ip-*`, `snap-extra-subnets-*` in `40-printers.css`); only the brand title + empty-state strings are brand-specific. Raw socket probes run in the **main process** over IPC (`ffg:tcp-probe`, `cre:tcp-probe`, `net:get-local-subnets`, `snap:http-get`, `mdns:browse-snapmaker`) — the renderer can open WebSockets (Creality `:9999`, Snapmaker `:7125`) but not raw TCP/UDP. Creality probe is two-stage: main-process TCP `:9999` open check, then a renderer WebSocket `printerInfo` handshake validated with `isCrealityLike()`.
361
362
-**Line numbers will drift** as the file changes. If a range looks wrong, grep for the anchor function name rather than trusting the L-number.
0 commit comments