-
Notifications
You must be signed in to change notification settings - Fork 0
Smart Home
File ▸ Smart home… connects Bambu Studio to Home Assistant speakers, media players, and alert
lights, and can hand accessible printers to the companion
ha-bambulab fork.
The canonical implementation, security, failure-mode, and verification documentation remains in the repository:
The dialog offers two explicit, bounded paths:
- Token-free local discovery publishes a fresh five-minute mDNS offer. Home Assistant shows a confirmation flow, then performs one capability-protected local fetch. The sharing toggle is off by default, never survives a dialog or app restart, and sends a zero-TTL goodbye when stopped.
-
Authenticated Home Assistant service call sends the selected printers to
bambu_lab.add_printerover HTTPS. A bearer token is required. Plain remote HTTP, credentials in URLs, redirects, and oversized responses are rejected locally.
Printer access codes and pairing values are credentials. They are never written into repository fixtures, URLs, logs, screenshots, issues, Discussions, or Postman collections. Both paths cap active printers at 32 and report partial success without reflecting credential values.
- Entity fetches are single-flight and cancellable, query no more than four domains, accept at most 4 MiB, parse at most 512 backend entities, and render at most 256 matching rows.
- Saved speaker and light lists are capped at 32 active values. Persisted-list inspection is bounded to 256 segments, 64 KiB total, and 256 bytes per value.
- Home Assistant work uses bounded executors rather than detached request threads. Volume changes are debounced, repeated Connect actions coalesce, and light transactions are serialized and cancellation-safe.
- Discovery admission uses a bounded request queue, a token bucket, response caching, 50 ms mDNS pacing, and lifecycle serialization to limit CPU, memory, and LAN amplification.
The dialog is resizable with a declared 520×480 minimum. Its long body scrolls inside the available work area while the header and decision footer stay fixed. Labels wrap, actions reflow, entity names remain horizontally reachable, and labeled buttons retain their natural text width.
Native headless review found a real regression: a shared action helper combined a 44×44 minimum target with shrink permission, turning Previous, Play / Pause, Next, and Close into 44-pixel squares. The helper now disables shrinking for labeled actions. The repaired Release DLL was rebuilt and recaptured at 720×760 and 520×480; the focused native suite passes 29 cases / 261 assertions, all five Home Assistant CTest entries pass, static layout checks pass 21/21, and the browser matrix passes 156/156 width/zoom/language combinations.
The captures are stored under
docs/screenshots/smart-home/.
They are native English evidence. Native bilingual capture, a real Home Assistant confirmation
flow, and physical-printer verification remain separate open gates tracked in issue #16.