← 返回 Skills 市场
fengseven777

openclaw-smartpi-setup

作者 seven · GitHub ↗ · v1.0.1 · MIT-0
cross-platform ⚠ pending
112
总下载
0
收藏
0
当前安装
2
版本数
在 OpenClaw 中安装
/install smartpi-plugin-setup
功能描述
openclaw-smartpi 插件完整安装、配置与故障排查指南。当用户需要安装 openclaw-smartpi 插件、通过微信扫码绑定 SmartPi 设备、处理 SmartPi 连接问题(特别是错误码 9002)、管理 SmartPi 设备(查看/删除)、或设置语音与 OpenClaw 交互时触发此 sk...
使用说明 (SKILL.md)

openclaw-smartpi-setup

概述

openclaw-smartpi 插件允许用户通过 SmartPi 语音设备与 OpenClaw 交互。用户说话后音频通过 WebSocket 传到 OpenClaw,AI 回复后通过同一连接返回,SmartPi 设备播报语音回复。

安装流程

第一步:安装插件并重启

openclaw plugins install openclaw-smartpi
openclaw gateway restart

重启后插件加载,可通过 openclaw plugins list 确认 openclaw-smartpi 状态为 enabled

第二步:扫码绑定设备

openclaw smartpi accounts bind

执行后:

  1. 调用云端接口生成 bindingId(有效期 30 分钟)
  2. 终端打印 QR 码(ASCII 格式,不可直接扫描
  3. 从输出中提取 绑定ID: 后面的 bindingId,生成 QR 图片(见下方)
  4. 将 QR 图片发送给用户,用微信扫描
  5. 扫码后终端显示 绑定成功,自动建立 WebSocket 长连接

设备信息保存在:

~/.xxclaw/openclaw-smartpi/accounts/\x3CdeviceKey>.json

生成可扫描的 QR 图片

终端打印的 QR 码为 ASCII 格式,无法直接扫描。需从命令输出中提取 绑定ID: 后面的 bindingId,生成 PNG 图片供微信扫码。

方法(Python qrcode 库):

import qrcode
binding_id = "6b20121312b600a96a75e636d5222079"  # 替换为实际 bindingId
img = qrcode.make(binding_id)
img.save("C:/Users/15352/.qclaw/workspace/smartpi_qr.png")
print("Done")

方法(Node.js qrcode 包):

npm install -g qrcode
node -e "const QR = require('qrcode'); QR.toFile('C:/Users/15352/.qclaw/workspace/smartpi_qr.png', '绑定ID', {type: 'png'}, (err) => { if(err) console.error(err); else console.log('Done'); });"

生成后,将 smartpi_qr.png 发送给用户扫描。

第三步:验证设备状态

openclaw smartpi accounts list

正常输出:

SmartPi 设备列表:
- JL_17T_xxxx

同时检查 Gateway 日志中是否有 WebSocket connected: \x3CdeviceKey>

第四步:开始使用

确保 Gateway 正在运行:

openclaw gateway status

对着 SmartPi 设备说话,QClaw 会处理输入并以语音回复。

故障排查

错误码 9002:该功能暂不可用

可能原因:

  1. OpenClaw Gateway 未正常处理消息 — AI 模型未配置或响应失败,导致 SmartPi 服务端收不到有效回复
  2. WebSocket 连接已断开 — 设备连接已断开,SmartPi 服务端转发请求时失败
  3. 插件未正确加载openclaw-smartpi 插件安装后未重启 Gateway,或插件加载失败
  4. 设备绑定凭证异常bindIdtoken 未正确保存,导致后续消息验证失败

排查步骤:

# 1. 确认插件已加载
openclaw plugins list
# 确认 openclaw-smartpi 状态为 enabled

# 2. 确认设备已绑定且连接正常
openclaw smartpi accounts list
# 检查网关日志:openclaw gateway status
# 日志中应有:[gateway] WebSocket connected: \x3CdeviceKey>

# 3. 确认 AI 模型已配置(能正常回复消息)
test: 直接向 OpenClaw 发一条消息,确认 AI 能正常回复

# 4. 重启 Gateway 重刷连接
openclaw gateway restart
# 重启后再次检查设备连接状态

若以上都正常,查看 OpenClaw 日志中是否有错误信息:~/.openclaw/logs/openclaw-YYYY-MM-DD.log

设备无法连接

  1. 重新绑定:openclaw smartpi accounts bind
  2. 查看设备列表:openclaw smartpi accounts list
  3. 查看日志中的连接错误信息

连接频繁断开

插件内置指数退避重连(1s → 2s → 4s... 最大 60s),一般会自动恢复。若频繁断开:

  1. 检查网络稳定性
  2. 查看日志中的重连记录

设备管理命令

查看已绑定设备:

openclaw smartpi accounts list

删除设备:

openclaw smartpi accounts remove \x3CdeviceKey>

卸载流程

卸载插件前,请先移除已绑定的设备账户(否则残留账户文件可能导致重新安装后行为异常)。

# 1. 查看当前绑定的设备
openclaw smartpi accounts list

# 2. 逐一删除所有设备账户
openclaw smartpi accounts remove \x3CdeviceKey>
# (如有多个设备,重复此命令逐一删除)

# 3. 确认账户目录已清空
openclaw smartpi accounts list
# 应输出空列表

# 4. 卸载插件
openclaw plugins uninstall openclaw-smartpi

# 5. 重启 Gateway
openclaw gateway restart

如需彻底清理,可手动删除残留文件:

Remove-Item -Recurse -Force "$env:USERPROFILE\.xxclaw\openclaw-smartpi"

配置文件位置

文件 路径
账号数据 ~/.xxclaw/openclaw-smartpi/accounts/\x3CdeviceKey>.json
账号索引 ~/.xxclaw/openclaw-smartpi/accounts.json
日志 ~/.xxclaw/logs/openclaw-YYYY-MM-DD.log

注意事项

  • sendText 未实现:SmartPi 是被动接收模式(设备说话 → OpenClaw 回复),不支持主动发送文本
  • 心跳间隔:30 秒(ping/pong)
  • 绑定 ID 有效期:30 分钟
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install smartpi-plugin-setup
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /smartpi-plugin-setup 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.1
- 新增 _meta.json 元数据文件,提升插件描述与结构规范性 - SKILL.md 细化扫码绑定流程,明确需从终端输出提取 bindingId 生成可扫码二维码图片 - 新增“卸载流程”说明,详细列出账户移除和插件彻底清除步骤 - 说明二维码 ASCII 输出不可直接扫描,强调正确的绑定 ID 提取方式 - 优化格式与指引,提升用户操作的清晰度
v1.0.0
openclaw-smartpi-setup 1.0.0 – Initial release - Provides a complete guide for installing, configuring, and troubleshooting the openclaw-smartpi plugin. - Includes step-by-step installation and device binding instructions, with QR code generation tips. - Details common issues (such as error code 9002) and outlines troubleshooting steps. - Lists device management commands and file locations for configurations and logs. - Notes limitations such as passive receive-only mode and outlines connection details.
元数据
Slug smartpi-plugin-setup
版本 1.0.1
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 2
常见问题

openclaw-smartpi-setup 是什么?

openclaw-smartpi 插件完整安装、配置与故障排查指南。当用户需要安装 openclaw-smartpi 插件、通过微信扫码绑定 SmartPi 设备、处理 SmartPi 连接问题(特别是错误码 9002)、管理 SmartPi 设备(查看/删除)、或设置语音与 OpenClaw 交互时触发此 sk... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 112 次。

如何安装 openclaw-smartpi-setup?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install smartpi-plugin-setup」即可一键安装,无需额外配置。

openclaw-smartpi-setup 是免费的吗?

是的,openclaw-smartpi-setup 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

openclaw-smartpi-setup 支持哪些平台?

openclaw-smartpi-setup 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 openclaw-smartpi-setup?

由 seven(@fengseven777)开发并维护,当前版本 v1.0.1。

💬 留言讨论