dyson-cli

TotalClaw 作者 totalclaw

通过本地 MQTT 控制戴森空气净化器、风扇和加热器。当需要控制戴森设备、调节风扇速度、设置温度/热量、启用振荡或检查室温/湿度时使用。需要与设备位于同一 WiFi 网络上。

安装 / 下载方式

TotalClaw CLI推荐
totalclaw install totalclaw:totalclaw~tmustier-dyson-cli
cURL直接下载,无需登录
curl -fsSL https://skills.taituai.com/api/skills/totalclaw%3Atotalclaw~tmustier-dyson-cli/file -o tmustier-dyson-cli.md
# Dyson CLI

## Prerequisites

1. CLI installed at `~/dyson-cli` with venv
2. **Must be on same WiFi as the Dyson** - local MQTT only, won't work remotely

**Quick check:**
```bash
cd ~/dyson-cli && source .venv/bin/activate && dyson list --check
```

## Commands

### Power
```bash
dyson on                      # Turn on
dyson off                     # Turn off
```

### Fan Control
```bash
dyson fan speed 5             # Speed 1-10
dyson fan speed auto          # Auto mode
dyson fan oscillate on        # Enable oscillation
dyson fan oscillate on -a 90  # 90° sweep (45/90/180/350)
dyson fan oscillate off       # Disable oscillation
```

### Heat Control (Hot+Cool models)
```bash
dyson heat on                 # Enable heating
dyson heat off                # Disable heating
dyson heat target 22          # Set target temp (°C)
```

### Other
```bash
dyson night on                # Night mode on
dyson night off               # Night mode off
dyson status                  # Show current state
dyson status --json           # JSON output
```

### Multiple Devices

Use `-d <name>` to target a specific device:
```bash
dyson on -d "Bedroom"
dyson fan speed auto -d "Office"
```

## Common Patterns

```bash
# "Turn on the Dyson and set to auto"
dyson on && dyson fan speed auto

# "Heat to 23 degrees"
dyson heat on && dyson heat target 23

# "Turn on with gentle oscillation"
dyson on && dyson fan speed 3 && dyson fan oscillate on -a 45

# "What's the current temperature?"
dyson status --json | python3 -c "import sys,json; d=json.load(sys.stdin); print(f\"Temp: {d['temperature']-273:.1f}°C, Humidity: {d['humidity']}%\")"
```

## Troubleshooting

If commands fail:
1. Check device is online: `dyson list --check`
2. Ensure on same WiFi network as the Dyson
3. Re-run setup if credentials expired: `dyson setup`

For installation, device setup, and full documentation, see [README.md](README.md).

---

## 中文说明

# Dyson CLI

## 前提条件

1. CLI 已安装在 `~/dyson-cli` 并配有 venv 虚拟环境
2. **必须与戴森设备处于同一 WiFi 网络** —— 仅支持本地 MQTT,无法远程使用

**快速检查:**
```bash
cd ~/dyson-cli && source .venv/bin/activate && dyson list --check
```

## 命令

### 电源
```bash
dyson on                      # Turn on
dyson off                     # Turn off
```

### 风扇控制
```bash
dyson fan speed 5             # Speed 1-10
dyson fan speed auto          # Auto mode
dyson fan oscillate on        # Enable oscillation
dyson fan oscillate on -a 90  # 90° sweep (45/90/180/350)
dyson fan oscillate off       # Disable oscillation
```

### 加热控制(Hot+Cool 型号)
```bash
dyson heat on                 # Enable heating
dyson heat off                # Disable heating
dyson heat target 22          # Set target temp (°C)
```

### 其他
```bash
dyson night on                # Night mode on
dyson night off               # Night mode off
dyson status                  # Show current state
dyson status --json           # JSON output
```

### 多设备

使用 `-d <name>` 指定目标设备:
```bash
dyson on -d "Bedroom"
dyson fan speed auto -d "Office"
```

## 常见用法

```bash
# "Turn on the Dyson and set to auto"
dyson on && dyson fan speed auto

# "Heat to 23 degrees"
dyson heat on && dyson heat target 23

# "Turn on with gentle oscillation"
dyson on && dyson fan speed 3 && dyson fan oscillate on -a 45

# "What's the current temperature?"
dyson status --json | python3 -c "import sys,json; d=json.load(sys.stdin); print(f\"Temp: {d['temperature']-273:.1f}°C, Humidity: {d['humidity']}%\")"
```

## 故障排查

如果命令执行失败:
1. 检查设备是否在线:`dyson list --check`
2. 确保与戴森设备处于同一 WiFi 网络
3. 如果凭据已过期,重新运行设置:`dyson setup`

有关安装、设备设置和完整文档,请参阅 [README.md](README.md)。