This is a custom integration for Home Assistant that connects and monitors xTool laser engravers such as P2, F1, M1, and Apparel.
β οΈ This integration is an independent community project.
I am not affiliated with xTool or its employees β but Iβd love to collaborate with the xTool team for further testing π.
- Native Home Assistant integration (no YAML required)
- Multiple devices supported β each xTool appears as its own device
- Automatic entity creation per device:
binary_sensor.<name>_<device_type>_powerβ shows if the machine is reachable/onsensor.<name>_<device_type>_statusβ shows the current working state- M1 adds extra sensors:
sensor.<name>_m1_cpu_tempsensor.<name>_m1_water_tempsensor.<name>_m1_purifier
- Typical status values:
Running,Done,Idle,Sleep,Ready,Unavailable,Unknown
- Add this repository as a Custom Repository in HACS.
- Search for βXToolβ and install.
- Restart Home Assistant.
- Download or clone this repository.
- Copy the folder
xtoolinto yourconfig/custom_components/directory. - Restart Home Assistant.
- Go to Settings β Devices & Services β Add Integration.
- Search for βXToolβ.
- Enter:
- Name β freely chosen (e.g.
Laser1) - IP Address β IP of your xTool device
- Device Type β choose between
P2,F1,M1, orApparel
- Name β freely chosen (e.g.
- Confirm β done β
Each device automatically creates the appropriate entities in Home Assistant based on its name and device_type.
Entity IDs are automatically generated using the Name and Device Type you provide during setup:
| Example | Entities Created |
|---|---|
Name: Laser1, Type: F1 |
binary_sensor.laser1_f1_powersensor.laser1_f1_status |
Name: Laser2, Type: P2 |
binary_sensor.laser2_p2_powersensor.laser2_p2_status |
Name: Studio, Type: M1 |
sensor.studio_m1_statussensor.studio_m1_cpu_tempsensor.studio_m1_water_tempsensor.studio_m1_purifier |
| Status | Meaning |
|---|---|
Running |
The laser is currently engraving |
Done |
The engraving job is finished |
Idle |
The machine is idle |
Sleep |
The device is in sleep mode |
Ready |
(M1 only) machine ready for work |
Unavailable |
Device offline or unreachable |
Unknown |
Unknown or invalid response |
alias: Laser1 β Exhaust Fan
description: Turn on the exhaust fan when Laser1 (F1) starts engraving
triggers:
- trigger: state
entity_id: sensor.laser1_f1_status
actions:
- choose:
- conditions:
- condition: state
entity_id: sensor.laser1_f1_status
state: Running
sequence:
- service: switch.turn_on
target:
entity_id: switch.exhaust_fan
default:
- service: switch.turn_off
target:
entity_id: switch.exhaust_fan
mode: singlealias: Laser1 β Job Finished
description: Send a mobile notification when the engraving is done
triggers:
- trigger: state
entity_id: sensor.laser1_f1_status
to: Done
actions:
- service: notify.mobile_app_my_phone
data:
title: "xTool Laser1 β Job Completed"
message: "Your engraving on the F1 is done β
"
mode: singlealias: Blinds β Safe Close with Laser2 Check
description: Prevent blinds from closing if Laser2 (P2) is powered on
trigger:
- platform: state
entity_id: cover.living_room_blinds
to: closing
condition:
- condition: state
entity_id: binary_sensor.laser2_p2_power
state: "on"
action:
- service: cover.stop_cover
target:
entity_id: cover.living_room_blinds
- service: notify.mobile_app_my_phone
data:
message: "β οΈ Blinds closing blocked: Laser2 (P2) is currently powered ON."
mode: singlealias: Laser1 β Audio Notification
description: Play a short audio clip when Laser1 (F1) completes a job
triggers:
- trigger: state
entity_id: sensor.laser1_f1_status
to: Done
actions:
- service: media_player.play_media
target:
entity_id: media_player.living_room_speaker
data:
media_content_id: "https://example.com/sounds/job_done.mp3"
media_content_type: "music"
mode: singleIf you enjoy my projects or find them useful, consider supporting me on Ko-fi!
If you work at xTool or are part of the development team β Iβd love to collaborate for extended testing, new model support, or official API insights π Just reach out!