Skip to content

feat: add support for xTool Apparel Printer, P2 CO2 Laser, and F1 Ultra - #9

Open
jmassardo wants to merge 1 commit into
thecodingdad:mainfrom
jmassardo:feat/multi-device-support
Open

feat: add support for xTool Apparel Printer, P2 CO2 Laser, and F1 Ultra#9
jmassardo wants to merge 1 commit into
thecodingdad:mainfrom
jmassardo:feat/multi-device-support

Conversation

@jmassardo

Copy link
Copy Markdown

Summary

Adds sensors, protocol fixes, and model corrections for three xTool devices not previously supported by the integration. Rebased on v2.6.5.

xTool Apparel Printer (DT001)

  • 11 new sensors: ink levels (C/K/M/W/Y), cleaning fluid, waste fluid, CPU temp, ambient temp, ambient humidity, heating status
  • 4 new binary sensors: heater connected, film buffer ready, film position ready, powder loop running
  • DT001-specific protocol subclass with ink/water bottle polling, push event parsing, and runtime-infos telemetry override
  • New has_inkjet_sensors capability flag gating DT001-only entities

P2 CO2 Laser (REST V1)

  • Fix V1 UDP discovery: accept mismatched requestId on unicast probes (P2 firmware 40.21.x returns requestId:0)
  • Parse laserType string/list from machineInfo (shows '55W CO2' instead of incorrect 'Diode')
  • Parse firmware from dict format and hardware board revision from machineInfo hardware dict

F1 Ultra

  • Protocol support and entity registration

Conflict resolution

  • Merged upstream M2 inkjet sensors (has_inkjet) alongside our Apparel Printer sensors (has_inkjet_sensors) — different device families, no overlap.

Adds sensors, fixes, and model corrections derived from live hardware
probing against three xTool devices not previously tested by this
integration.

xTool Apparel Printer (DT001):
- 11 new sensors: ink levels (C/K/M/W/Y), cleaning fluid, waste fluid,
  CPU temp, ambient temp, ambient humidity, heating status
- 4 new binary sensors: heater connected, film buffer ready,
  film position ready, powder loop running
- DT001-specific protocol subclass with ink/water bottle polling,
  push event parsing, and runtime-infos telemetry override
- New has_inkjet_sensors capability flag gating DT001-only entities

P2 CO2 Laser (REST V1):
- Fix V1 UDP discovery: accept mismatched requestId on unicast probes
  (P2 firmware 40.21.x returns requestId:0 instead of echoing)
- Parse laserType string/list from machineInfo (shows '55W CO2'
  instead of incorrect 'Diode')
- Parse firmware from dict format ({package_version:...})
- Parse hardware board revision from machineInfo hardware dict
- Fallback in REST coordinator when /gethardwaretype returns
  non-JSON 'Not Implement' text

F1 Ultra (WS V2 — GS002):
- Remove incorrect model flags (has_smoking_fan, has_uv_fire,
  has_display_screen, has_laser_head_position) that caused rejected
  peripheral queries
- Remove has_runtime_stats flag: GS002 firmware only returns session
  counts, not time-based stats — prevents 5 always-unknown sensors
- Cache /v1/device/configs GET as unsupported (returns code 1)

All V2 devices:
- Extract cpuTemp from runtime-infos in base protocol (ungated sensor
  entity available to all V2 models)
- Parse hardware board revision from machineInfo in V2 protocol
- Surface hw_version in Home Assistant device info panel
- Add _hardware_version attribute to base XtoolCoordinator

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 1c43386c-5811-4b49-b97a-78815a2fd1ca
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant