Skip to content

Commit ebdf213

Browse files
committed
feat: Add test scripts for Q10 VacuumTrait functionality
1 parent 91d3492 commit ebdf213

File tree

3 files changed

+82
-0
lines changed

3 files changed

+82
-0
lines changed

examples/Q10/README.md

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
# Q10 VacuumTrait Test Scripts
2+
3+
This directory contains test scripts for the Q10 VacuumTrait functionality added in [PR #754](https://github.com/Python-roborock/python-roborock/pull/754).
4+
5+
## Scripts
6+
7+
### test_q10_simple.py
8+
Interactive test script with detailed debug information. This script:
9+
- Shows comprehensive device information
10+
- Lists all available property APIs
11+
- Provides an interactive menu to test vacuum commands
12+
- Includes error handling and detailed output
13+
14+
**Use this script when:**
15+
- You want to verify your device supports Q10 properties
16+
- You need to debug connection or API issues
17+
- You want detailed information about what's happening
18+
19+
### test_q10_vacuum.py
20+
Basic test script for Q10 vacuum commands. A simpler version focused on testing the vacuum trait.
21+
22+
## Requirements
23+
24+
Install the package in development mode:
25+
```bash
26+
python3 -m venv venv
27+
source venv/bin/activate
28+
pip install -e .
29+
```
30+
31+
## Usage
32+
33+
1. Run the test script:
34+
```bash
35+
python examples/Q10/test_q10_simple.py
36+
```
37+
38+
2. On first run, you'll be prompted to log in:
39+
- Enter your Roborock account email
40+
- A code will be sent to your email
41+
- Enter the code to complete authentication
42+
- Credentials are cached for future runs
43+
44+
3. The script will:
45+
- List all your devices
46+
- Show available APIs for each device
47+
- Present an interactive menu if Q10 properties are found
48+
49+
## Available Commands
50+
51+
The VacuumTrait provides these commands:
52+
53+
- **Start cleaning** - Initiates a full cleaning cycle
54+
- **Pause cleaning** - Pauses the current cleaning operation
55+
- **Resume cleaning** - Resumes a paused cleaning operation
56+
- **Stop cleaning** - Stops the cleaning operation completely
57+
- **Return to dock** - Sends the robot back to its charging dock
58+
59+
## Supported Devices
60+
61+
These scripts are designed for Roborock Q10 devices that support the B01 Q10 protocol. The script will automatically detect if your device has the required `b01_q10_properties` API.
62+
63+
## Troubleshooting
64+
65+
**"This device doesn't have Q10 properties"**
66+
- Your device may not be a Q10 model
67+
- Check the device model shown in the output
68+
- The device might use a different API (v1_properties, b01_q7_properties, etc.)
69+
70+
**Authentication errors**
71+
- Delete cached credentials: `rm ~/.cache/roborock-user-params.pkl`
72+
- Try logging in again
73+
74+
**Connection issues**
75+
- Ensure your device is online and connected to the internet
76+
- Check that your account has access to the device
77+
78+
## Related Documentation
79+
80+
- [PR #754: Add VacuumTrait to q10 devices](https://github.com/Python-roborock/python-roborock/pull/754)
81+
- [Main example script](../example.py)
82+
- [Supported Features](../../SUPPORTED_FEATURES.md)

0 commit comments

Comments
 (0)