Matrix 通道
OpenClaw 支持通过 Matrix 协议进行通信。
前提条件
- Matrix 账户
- homeserver 访问权限
配置步骤
1. 获取访问令牌
访问您的 Matrix homeserver 或使用 Element 获取访问令牌。
2. 配置 OpenClaw
bash
openclaw channels login matrix或手动配置:
json
{
"matrix": {
"enabled": true,
"homeserver": "https://matrix.example.com",
"username": "@yourname:matrix.example.com",
"password": "your_password"
}
}功能特性
- 端到端加密支持
- 房间管理
- 消息同步
- 多设备支持
使用示例
bash
# 发送消息到房间
openclaw message --channel matrix --to "!roomid:matrix.example.com" "Hello!"
# 列出可用房间
openclaw channels list matrix相关命令
- channels login - 登录通道
- message - 发送消息