Midea Cloud Control
This is a pure-text publishable skill for ClawHub.
The uploaded skill folder contains only Markdown/text files. When the skill is first used, OpenClaw should write local helper scripts from the code blocks stored in references/generated-config-store.md and references/generated-midea-skill-cli.md, then execute those local scripts.
Use this skill only for the minimum verified workflow:
- - connect a user's Midea cloud account
- read and cache device information locally
- power a named device on or off
Do not promise features that are not yet verified, including:
- - temperature control
- real-time state reads
- indoor temperature reads
- mode switching
Bootstrap step (first use only)
Before handling connect/list/toggle requests, ensure the following two local files exist in a local working directory, for example skills_runtime/midea-cloud-control/ under the workspace:
If they do not exist:
- 1. Read INLINECODE5
- Extract the Python code block and write it locally as INLINECODE6
- Read INLINECODE7
- Extract the Python code block and write it locally as INLINECODE8
- Then run commands against the local generated INLINECODE9
Suggested local runtime directory:
CODEBLOCK0
Conversation workflow
Intent A: connect Midea account
When the user says things like:
- - 我想连接美的设备
- 帮我配置美的账号
- 连接我的美的空调
Do this:
- 1. Tell the user credentials will be saved locally at
~/.openclaw/midea-cloud-control/config.json. - Ask for account and password if they have not provided them yet.
- Ensure the bootstrap step above has been completed.
- Run:
CODEBLOCK1
- 5. If success, summarize devices as:
- device name
- device id
- model
- home
- 6. If failure, show the returned failure reason clearly.
Intent B: list connected devices
When the user asks to list devices:
- 1. Ensure the bootstrap step above has been completed.
- Run:
CODEBLOCK2
If config is missing, tell the user to connect account first.
Intent C: power on/off by device name
When the user says things like:
Do this:
- 1. Ensure the bootstrap step above has been completed.
- Run one of:
CODEBLOCK3
Then:
- 1. Report that the cloud command was sent.
- Do not claim physical success unless the user confirms the device reacted.
- If the device name is missing from cache, tell the user to reconnect or list devices first.
Safety and privacy
- - Always warn before first-time credential storage.
- Do not echo passwords back in normal chat responses.
- Keep the response focused on success/failure and device summary.
Resources
references/
- -
references/api-notes.md — validated scope and limitations - INLINECODE12 — source code to generate local INLINECODE13
- INLINECODE14 — source code to generate local INLINECODE15
Midea Cloud Control
这是一个用于ClawHub的纯文本可发布技能。
上传的技能文件夹仅包含Markdown/文本文件。首次使用该技能时,OpenClaw应从references/generated-config-store.md和references/generated-midea-skill-cli.md中存储的代码块写入本地辅助脚本,然后执行这些本地脚本。
仅将此技能用于最小验证工作流:
- - 连接用户的美的云账户
- 在本地读取并缓存设备信息
- 按名称打开或关闭设备
不要承诺尚未验证的功能,包括:
引导步骤(仅首次使用)
在处理连接/列表/开关请求之前,请确保本地工作目录中存在以下两个本地文件,例如工作区下的skills_runtime/midea-cloud-control/:
- - configstore.py
- mideaskill_cli.py
如果它们不存在:
- 1. 读取references/generated-config-store.md
- 提取Python代码块并将其本地写入为configstore.py
- 读取references/generated-midea-skill-cli.md
- 提取Python代码块并将其本地写入为mideaskillcli.py
- 然后针对本地生成的mideaskill_cli.py运行命令
建议的本地运行时目录:
text
skills_runtime/midea-cloud-control/
对话工作流
意图A:连接美的账户
当用户说类似:
- - 我想连接美的设备
- 帮我配置美的账号
- 连接我的美的空调
请执行以下操作:
- 1. 告知用户凭证将保存在本地的~/.openclaw/midea-cloud-control/config.json。
- 如果用户尚未提供账号和密码,请询问。
- 确保上述引导步骤已完成。
- 运行:
powershell
uv run python skillsruntime/midea-cloud-control/mideaskill_cli.py connect --account --password
- 5. 如果成功,汇总设备信息为:
- 设备名称
- 设备ID
- 型号
- 家庭
- 6. 如果失败,清晰显示返回的失败原因。
意图B:列出已连接的设备
当用户要求列出设备时:
- 1. 确保上述引导步骤已完成。
- 运行:
powershell
uv run python skillsruntime/midea-cloud-control/mideaskill_cli.py list
如果配置缺失,告知用户先连接账户。
意图C:按设备名称打开/关闭电源
当用户说类似:
请执行以下操作:
- 1. 确保上述引导步骤已完成。
- 运行以下之一:
powershell
uv run python skillsruntime/midea-cloud-control/mideaskill_cli.py toggle --device-name 儿童房空调 --power on
uv run python skillsruntime/midea-cloud-control/mideaskill_cli.py toggle --device-name 儿童房空调 --power off
然后:
- 1. 报告已发送云命令。
- 不要声称物理操作成功,除非用户确认设备已响应。
- 如果缓存中缺少设备名称,告知用户先重新连接或列出设备。
安全与隐私
- - 首次存储凭证前务必发出警告。
- 不要在正常聊天回复中回显密码。
- 回复应聚焦于成功/失败和设备摘要。
资源
references/
- - references/api-notes.md — 已验证的范围和限制
- references/generated-config-store.md — 用于生成本地configstore.py的源代码
- references/generated-midea-skill-cli.md — 用于生成本地mideaskill_cli.py的源代码