yeelight-home 0.1.8 → 0.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CONFIG.md +41 -0
- package/README.md +50 -0
- package/package.json +1 -1
package/CONFIG.md
CHANGED
|
@@ -111,6 +111,47 @@ yeelight-home home select --profile family --house-id <house-id> --region cn
|
|
|
111
111
|
`home select` writes the selected home id into profile metadata. A process can temporarily override it with `--house-id` or `YEELIGHT_HOME_HOUSE_ID`.
|
|
112
112
|
The selected home is a default context, not an authentication requirement. Account-level commands such as `auth status`, `doctor`, `api smoke`, `home list`, home summary/search, and account info work with token-only profiles. Device, room, area, group, scene, automation, gateway, favorite, lighting, and other house-scoped operations require `houseId` at the request, environment, or profile layer.
|
|
113
113
|
|
|
114
|
+
## Resource Commands
|
|
115
|
+
|
|
116
|
+
Resource commands are the human-friendly command surface. They follow the common CLI shape `yeelight-home <resource> <action> [flags]` and use the same Runtime intent engine as `invoke --stdin`.
|
|
117
|
+
|
|
118
|
+
```sh
|
|
119
|
+
yeelight-home help device
|
|
120
|
+
yeelight-home help device list
|
|
121
|
+
yeelight-home device list --json
|
|
122
|
+
yeelight-home room search --name 客厅 --json
|
|
123
|
+
yeelight-home scene execute --scene-id <scene-id> --json
|
|
124
|
+
yeelight-home light on --device-id <device-id> --json
|
|
125
|
+
yeelight-home light brightness --device-id <device-id> --brightness 60 --json
|
|
126
|
+
yeelight-home automation enable --automation-id <automation-id> --json
|
|
127
|
+
yeelight-home plan commit --plan-id <plan-id> --json
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
Resource groups exposed by the CLI:
|
|
131
|
+
|
|
132
|
+
| Group | Examples |
|
|
133
|
+
| --- | --- |
|
|
134
|
+
| Account and setup | `account info`, `home list`, `home select`, `profile use`, `config set` |
|
|
135
|
+
| Home organization | `home summary`, `home detail`, `home sort`, `home sort-configure`, `favorite add`, `favorite batch-delete` |
|
|
136
|
+
| Space and entities | `room list`, `room batch-create`, `area update`, `group structure`, `entity list`, `entity rename-batch` |
|
|
137
|
+
| Devices and gateways | `device detail`, `device attrs`, `device move-room-batch`, `gateway thread`, `gateway stats`, `meshgroup detail` |
|
|
138
|
+
| Scenes and automations | `scene execute`, `scene batch-delete`, `automation supported-v2`, `automation enable`, `schedule jobs` |
|
|
139
|
+
| Lighting and controls | `light on`, `light brightness-adjust`, `lighting plan`, `lighting apply`, `behavior execute` |
|
|
140
|
+
| Panels and sensors | `panel screen-controls`, `panel button-event-update`, `knob configure`, `sensor events`, `screen controls` |
|
|
141
|
+
| Knowledge and maintenance | `thing products`, `thing schema-get`, `thing faqs`, `upgrade files`, `progress get`, `message list` |
|
|
142
|
+
| Local intelligence | `memory remember`, `memory list`, `recommendation feedback`, `ai-voice products` |
|
|
143
|
+
|
|
144
|
+
For less common intent fields, use `--params-json` or `--set key=value`:
|
|
145
|
+
|
|
146
|
+
```sh
|
|
147
|
+
yeelight-home scene create --params-json '{"name":"回家灯光","details":[{"typeId":2,"resId":"50018330","params":{"set":{"p":true}}}]}' --json
|
|
148
|
+
yeelight-home favorite add --set typeId=2,resId=50018330,rank=1 --json
|
|
149
|
+
yeelight-home thing product-info --product-ids 133121,198660 --json
|
|
150
|
+
yeelight-home panel button-event-update --button-event-id <id> --params-json '<json>' --json
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
`invoke --stdin` remains the stable machine interface for Skills and generated apps. Resource commands are for humans and support scripts that prefer ordinary flags.
|
|
154
|
+
|
|
114
155
|
## Config Commands
|
|
115
156
|
|
|
116
157
|
```sh
|
package/README.md
CHANGED
|
@@ -61,6 +61,10 @@ yeelight-home auth login --qr
|
|
|
61
61
|
yeelight-home home list --json
|
|
62
62
|
# Optional: choose a default home before house-scoped device, room, scene, or automation operations.
|
|
63
63
|
yeelight-home home select --house-id <house-id>
|
|
64
|
+
yeelight-home device list --json
|
|
65
|
+
yeelight-home scene execute --scene-id <scene-id> --json
|
|
66
|
+
yeelight-home light on --device-id <device-id> --json
|
|
67
|
+
yeelight-home automation enable --automation-id <automation-id> --json
|
|
64
68
|
```
|
|
65
69
|
|
|
66
70
|
The default region is `cn`. Pass `--region sg`, `--region us`, or `--region eu` when your Yeelight account belongs to another cloud region.
|
|
@@ -107,6 +111,50 @@ See [CONFIG.md](CONFIG.md) for full command and precedence details.
|
|
|
107
111
|
|
|
108
112
|
## Command Reference
|
|
109
113
|
|
|
114
|
+
### Human Commands Versus `invoke`
|
|
115
|
+
|
|
116
|
+
`invoke --stdin` is the stable machine contract for Skills, generated apps, and automation hosts. It accepts one SkillRequest JSON object and returns one SkillResponse JSON object.
|
|
117
|
+
|
|
118
|
+
Human operators should usually use resource commands:
|
|
119
|
+
|
|
120
|
+
```sh
|
|
121
|
+
yeelight-home device list --json
|
|
122
|
+
yeelight-home room list --json
|
|
123
|
+
yeelight-home scene execute --scene-id <scene-id> --json
|
|
124
|
+
yeelight-home light brightness --device-id <device-id> --brightness 60 --json
|
|
125
|
+
yeelight-home automation enable --automation-id <automation-id> --json
|
|
126
|
+
yeelight-home plan commit --plan-id <plan-id> --json
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
The resource commands are thin wrappers around Runtime intents. They keep the same profile, region, credential, redaction, preflight, pending-plan, and verification rules as `invoke`.
|
|
130
|
+
|
|
131
|
+
The command shape is intentionally conventional:
|
|
132
|
+
|
|
133
|
+
```text
|
|
134
|
+
yeelight-home <resource> <action> [--json] [--profile <name>] [--region <region>] [--house-id <id>] [resource flags]
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
Common resources include `home`, `room`, `area`, `device`, `entity`, `gateway`, `group`, `scene`, `automation`, `light`, `lighting`, `favorite`, `panel`, `knob`, `sensor`, `thing`, `upgrade`, `memory`, `recommendation`, `account`, and `plan`. Run `yeelight-home --help` for the full resource list.
|
|
138
|
+
|
|
139
|
+
Use `yeelight-home help <resource>` to list actions, and `yeelight-home help <resource> <action>` for action-specific flags. Examples:
|
|
140
|
+
|
|
141
|
+
```sh
|
|
142
|
+
yeelight-home help device
|
|
143
|
+
yeelight-home help scene execute
|
|
144
|
+
yeelight-home help light brightness
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
For uncommon fields, pass advanced parameters without dropping to raw stdin:
|
|
148
|
+
|
|
149
|
+
```sh
|
|
150
|
+
yeelight-home room search --name 客厅 --json
|
|
151
|
+
yeelight-home scene create --params-json '{"name":"回家灯光","details":[{"typeId":2,"resId":"50018330","params":{"set":{"p":true}}}]}' --json
|
|
152
|
+
yeelight-home favorite add --set typeId=2,resId=50018330,rank=1 --json
|
|
153
|
+
yeelight-home thing schema-get --schema-id <schema-id> --json
|
|
154
|
+
yeelight-home upgrade files --json
|
|
155
|
+
yeelight-home panel button-configure --device-id <panel-id> --params-json '<json>' --json
|
|
156
|
+
```
|
|
157
|
+
|
|
110
158
|
### `doctor`
|
|
111
159
|
|
|
112
160
|
```sh
|
|
@@ -208,6 +256,8 @@ yeelight-home invoke --stdin
|
|
|
208
256
|
|
|
209
257
|
Reads a SkillRequest JSON object from stdin and writes a SkillResponse JSON object to stdout. This is the only command Skills should call for smart-home operations.
|
|
210
258
|
|
|
259
|
+
Interactive users do not need to hand-write SkillRequest JSON for common operations. Prefer resource commands such as `device list`, `scene execute`, `light on`, `room create`, `automation enable`, and `plan commit`.
|
|
260
|
+
|
|
211
261
|
### `api smoke`
|
|
212
262
|
|
|
213
263
|
```sh
|
package/package.json
CHANGED