Clawdbot 節點

Clawdbot AI 助手節點用於分散式裝置控制。了解如何設定和管理音訊、圖像和遠端命令的節點。

Clawdbot 節點概述

Clawdbot 節點將您的 AI 助手擴展到物理裝置和遠端機器。節點可在您的網路上實現音訊播放、圖像顯示和命令執行。

什麼是節點?

節點是在裝置上運行的輕量級代理:

  • 音訊節點:播放 TTS 和音訊檔案
  • 圖像節點:在螢幕上顯示圖像
  • 命令節點:執行遠端命令

快速入門

安裝節點代理

# 在目標裝置上安裝
npm install -g @clawdbot/node-agent

# 啟動節點代理
clawdbot-node start --name "living-room"

註冊節點

# 在主 Clawdbot 實例上
clawdbot nodes add living-room --host 192.168.1.100 --port 3012

節點類型

音訊節點

透過裝置揚聲器播放音訊:

功能描述
TTS文字轉語音播放
音訊檔案支援 MP3、WAV、OGG
音量控制遠端音量調整
佇列音訊佇列管理

了解更多關於音訊節點

圖像節點

在連接的螢幕上顯示圖像:

功能描述
顯示在螢幕上顯示圖像
幻燈片自動輪播
疊加層文字和圖形疊加

了解更多關於圖像節點

配置

節點代理配置

{
  "node": {
    "name": "office-display",
    "type": ["audio", "image"],
    "port": 3012,
    "gateway": "ws://192.168.1.1:3010"
  }
}

閘道器節點配置

{
  "nodes": {
    "enabled": true,
    "devices": [
      {
        "name": "living-room",
        "host": "192.168.1.100",
        "port": 3012,
        "capabilities": ["audio", "image"]
      }
    ]
  }
}

節點命令

CLI

# 列出已註冊的節點
clawdbot nodes list

# 檢查節點狀態
clawdbot nodes status living-room

# 向節點發送命令
clawdbot nodes exec living-room --cmd "play audio.mp3"

# 移除節點
clawdbot nodes remove living-room

節點發現

mDNS 發現

{
  "nodes": {
    "discovery": {
      "mdns": true,
      "subnet": "192.168.1.0/24"
    }
  }
}

手動註冊

{
  "nodes": {
    "devices": [
      {
        "name": "bedroom",
        "host": "192.168.1.101",
        "port": 3012
      }
    ]
  }
}

安全性

身份驗證

{
  "node": {
    "auth": {
      "type": "token",
      "token": "node-secret-token"
    }
  }
}

TLS

{
  "node": {
    "tls": {
      "enabled": true,
      "cert": "/path/to/cert.pem",
      "key": "/path/to/key.pem"
    }
  }
}

使用案例

智慧家庭

  • 在整個房屋播放公告
  • 在螢幕上顯示家庭照片
  • 控制媒體播放

辦公室

  • 會議室顯示器
  • 音訊通知
  • 狀態看板

下一步