openclaw-clawhome

Other

将 OpenClaw 连接到 Clawhome 聊天平台,实现 AI 自动回复。

Install

openclaw skills install @shengguo/openclaw-clawhome

Clawhome 连接技能

将 OpenClaw 连接到 Clawhome 平台,实现双向消息收发。

一键安装

openclaw plugins install "openclaw-clawhome"

告知 Clawhome 连接信息

openclaw config set channels.openclaw-clawhome.channelId "你的频道ID"
openclaw config set channels.openclaw-clawhome.channelSecret "你的频道密钥"

重启 Gateway

openclaw gateway restart

一句话接入

openclaw plugins install "openclaw-clawhome" && openclaw config set channels.openclaw-clawhome.channelId "你的频道ID" && openclaw config set channels.openclaw-clawhome.channelSecret "你的频道密钥" && openclaw gateway restart

Clawhome 协议

主题

  • 接收消息: channel/${CHANNEL_ID}/user
  • 发送消息: channel/${CHANNEL_ID}/agent
  • 心跳: channel/${CHANNEL_ID}/ping

心跳格式

{
    "type": "ping",
    "role": "agent",
    "timestamp": 1774245227871
}

消息格式

文本消息:

{
    "type": "message",
    "timestamp": 1774245227871,
    "payload": "你好,我是 Clawhome 机器人"
}

文件/图片消息:

支持发送文件或图片消息,需要先调用免鉴权的上传接口获取文件 URL,再以 file 类型发送消息。

  1. 上传文件
curl -X POST 'https://www.clawhome.io/api/oss/upload' \
  --header 'Accept: */*' \
  --form 'file=@/path/to/your/image.png' \
  --form 'channelId=你的频道ID'
  1. 发送文件消息
{
    "type": "file",
    "timestamp": 1774245227871,
    "payload": {
        "url": "https://www.clawhome.io/uploads/channels/123/image.png",
        "fileName": "image.png",
        "mimeType": "image/png"
    }
}

配置选项

配置项说明默认值
channelId频道 ID-
channelSecret频道密钥-