
The Xiaomi Mijia 1T (STYTJ02ZHM) is a robot vacuum-mop manufactured by Dreame and sold under the Xiaomi brand. This template requires Valetudo — an open-source firmware that replaces the manufacturer’s cloud dependency with a local HTTP API. Once Valetudo is installed on the robot, TapHome communicates directly with the Valetudo REST API v2 on the local network. No cloud connection or authentication is required.
The template provides battery monitoring, a multi-value status indicator, and push-button controls for starting, pausing, stopping, and docking the vacuum. A locate function triggers an audible beep to help find the robot.
Valetudo must be installed on the robot before this template can be used. The template communicates with the Valetudo HTTP API, not with Xiaomi’s cloud services. Rooting the Xiaomi 1T requires a 3.3 V USB-to-UART adapter and a Dreame Breakout PCB — see the Valetudo supported robots page for detailed instructions.
Configuration
During template import, enter the robot’s IP address on the local network (the default placeholder is 192.168.0.1). The Valetudo REST API listens on port 80 with no authentication.
Since Valetudo does not expose an mDNS hostname, assign a static IP address or a DHCP reservation to the robot to prevent the address from changing after a network restart.
Open
http://<robot-ip>/swagger/in a browser to explore all available Valetudo API endpoints interactively. This is useful for verifying connectivity and inspecting the robot’s current state.
Device capabilities
Battery level
The template reads the battery state of charge from the /api/v2/robot/state/attributes response. It parses BatteryStateAttribute.level (reported as 0–100) and divides by 100 to produce a 0.0–1.0 range for TapHome. The value updates every 2.5 seconds.
Vacuum status
A multi-value switch displays the current operating state of the robot. The template parses StatusStateAttribute.value from the state attributes response and maps it to an integer index:
| Status | Value | Description |
|---|---|---|
| Docked | 0 | Robot is on the charging dock |
| Cleaning | 1 | Active cleaning cycle |
| Returning | 2 | Navigating back to the dock |
| Paused | 3 | Cleaning paused |
| Idle | 4 | Not cleaning, not docked |
| Unknown | 9 | Unrecognized status |
The Valetudo API can also report error, manual_control, and moving statuses — these are not individually mapped and will display as “Unknown” (value 9).
Vacuum controls
Four push-button devices control the vacuum through the BasicControlCapability endpoint:
- Start — begins a full cleaning cycle
- Pause — pauses the current cleaning operation
- Stop — stops the current cleaning operation
- Home — sends the robot back to the charging dock
Each button sends a PUT request to /api/v2/robot/capabilities/BasicControlCapability with the corresponding action.
Locate
The Locate button triggers an audible sound on the robot via the LocateCapability endpoint. This is useful for finding the robot when it is stuck or in an unexpected location.
Additional capabilities
The Valetudo API exposes several capabilities not currently implemented in the template: fan speed control (suction power presets), water usage control (mopping intensity), zone cleaning, go-to-location, map snapshots, consumable monitoring (filter, brushes, sensors), speaker volume, do-not-disturb scheduling, charging status, and WiFi signal strength. These can be added in a future template update.
Troubleshooting
Device not responding
- Verify the robot is powered on, connected to Wi-Fi, and has a valid IP address
- Open
http://<robot-ip>/in a browser — if the Valetudo web interface loads, the API is reachable - Check that TapHome and the robot are on the same network or VLAN
- Confirm that Valetudo is running — if the robot was factory-reset, Valetudo may need to be reinstalled
Status shows “Unknown” (???)
The template maps five statuses (docked, cleaning, returning, paused, idle). If the robot reports error, manual_control, or moving, the status will show as “Unknown” (value 9). This is expected behavior — the unmapped statuses occur during edge cases such as manual RC control or error recovery.
Battery level reads zero
- Confirm Valetudo is running and the API responds at
/api/v2/robot/state/attributes - Check that the response contains a
BatteryStateAttributeentry with a non-zerolevelvalue - If the robot was recently rebooted, wait for the first state poll to complete