@tonytongx/harmony-channel
v1.0.34
Published
OpenClaw Channel plugin for HarmonyOS PC - WebSocket bridge
Downloads
2,565
Maintainers
Readme
@tonytongx/harmony-channel
OpenClaw Channel plugin for HarmonyOS PC - WebSocket bridge for AI chat integration.
Features
- 🔌 Pure WebSocket - Single connection for all communication
- 🔒 Token Auth - Secure device authentication
- 📱 HarmonyOS Ready - Designed for 2in1 PC devices
- ⚡ Real-time - Instant message delivery
Installation
openclaw plugins install @tonytongx/harmony-channelOr install from source:
openclaw plugins install -l ./openclaw-harmony-channel-v2Configuration
Add to your ~/.openclaw/openclaw.json:
{
"channels": {
"harmony": {
"enabled": true,
"wsPort": 18790,
"token": "your-secure-token",
"dmPolicy": "open"
}
}
}Or use the wizard:
openclaw channels configure harmonyHarmonyOS Connection
const ws = new WebSocket(
'ws://your-server:18790?deviceId=my-device&token=your-token'
);
// Send message
ws.send(JSON.stringify({
type: 'session.send',
id: 'req-1',
sessionKey: 'main',
payload: { message: 'Hello!' }
}));Protocol
Connection URL
ws://host:port?deviceId=<id>&token=<token>Message Types
| Type | Direction | Description |
|------|-----------|-------------|
| connected | S→C | Connection established |
| session.list | C↔S | List sessions |
| session.history | C↔S | Get history |
| session.send | C→S | Send message |
| session.send.ack | S→C | Message received |
| message | S→C | AI response |
| ping/pong | C↔S | Keep-alive |
Development
npm install
npm run build
npm run devLicense
MIT
