npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

aios-mqtt-channel

v0.0.1

Published

MQTT channel plugin for OpenClaw - bidirectional messaging via MQTT brokers, part of the AIOS suite.

Downloads

139

Readme

aios-mqtt-channel

License: MIT

aios-mqtt-channel 鏄潰鍚?OpenClaw 鐨?MQTT 鍙屽悜閫氶亾鎻掍欢锛屽彲閫氳繃 MQTT Broker 涓?IoT銆佸搴嚜鍔ㄥ寲銆佽繍缁村憡璀︾郴缁熶簰閫氭秷鎭€? 璇存槑锛?

  • 鎻掍欢鍖呭悕銆佹彃浠跺悕涓?channel id 宸茬粺涓€涓?aios-mqtt-channel銆?- OpenClaw 鐨勬彃浠跺畨瑁呫€佹彃浠剁鐞嗐€乣channels閰嶇疆閿兘浣跨敤aios-mqtt-channel銆? 褰撳墠鐗堟湰闈㈠悜 OpenClaw 2026.5.x` 閫氶亾 SDK锛屽寘鍚柊鐗?channel/setup 鍏ュ彛鍙?configured-state 鍏冩暟鎹€?

鍔熻兘鐗规€?

  • 鍙屽悜娑堟伅鏀跺彂锛氳闃?MQTT Topic锛屽苟灏?OpenClaw 鍥炲鍥炲啓鍒版寚瀹?Topic銆?- 澶氳处鍙锋敮鎸侊細涓€涓?OpenClaw 瀹炰緥鍙悓鏃惰繛鎺ュ涓?MQTT 璐﹀彿閰嶇疆銆?- 鑷姩閲嶈繛锛欱roker 閲嶅惎鎴栫綉缁滄姈鍔ㄥ悗鍙嚜鍔ㄦ仮澶嶃€?- TLS 鏀寔锛氭敮鎸?mqtts:// 瀹夊叏杩炴帴銆?- QoS 鍙厤缃細鏀寔 0 / 1 / 2 涓夌鎶曢€掍繚闅滅瓑绾с€?

瀹夎

openclaw plugins install aios-mqtt-channel

濡傛灉 OpenClaw 褰撳墠浼樺厛鍔犺浇鐨勬槸鏈湴鏈墭绠$洰褰?~/.openclaw/extensions/aios-mqtt-channel锛屽畠浼氳鐩栧叏灞€ npm 瀹夎銆傚彲閫氳繃浠ヤ笅鍛戒护纭瀹為檯鍔犺浇鏉ユ簮锛?

openclaw plugins info aios-mqtt-channel

濡傛灉杈撳嚭鏄剧ず褰撳墠鏉ユ簮鏄?~/.openclaw/extensions/aios-mqtt-channel/dist/index.js锛屽彲浠ユ墽琛岋細

openclaw plugins update aios-mqtt-channel

濡傛灉 plugins info 鏄剧ず鐨勬槸鏃х殑鏈湴澶囦唤鐩綍鑰屼笉鏄凡瀹夎鎻掍欢璁板綍锛?

  1. 灏?~/.openclaw/extensions/ 涓嬫棫鐨?aios-mqtt-channel 澶囦唤鐩綍绉昏蛋銆?2. 閲嶆柊鎵ц openclaw plugins install aios-mqtt-channel銆?3. 閲嶅惎 OpenClaw 缃戝叧銆? 涓嶈鎶?aios-mqtt-channel.bak-* 涔嬬被鐨勫浠界洰褰曠暀鍦?~/.openclaw/extensions/ 涓嬶紝鍚﹀垯 OpenClaw 鍙兘璇嗗埆鍒伴噸澶嶆彃浠躲€?

閰嶇疆

灏嗕互涓嬪唴瀹瑰姞鍏?~/.openclaw/openclaw.json锛?

{
  "channels": {
    "aios-mqtt-channel": {
      "accounts": {
        "admin": {
          "brokerUrl": "mqtts://your-server:8883",
          "username": "your-name",
          "password": "your-password",
          "topics": {
            "inbound": "openclaw/inbound-admin",
            "outbound": "openclaw/outbound-admin"
          },
          "qos": 1,
          "disableBlockStreaming": false
        },
        "lowcode": {
          "brokerUrl": "mqtts://your-server:8883",
          "username": "your-name",
          "password": "your-password",
          "topics": {
            "inbound": "openclaw/inbound-lowcode",
            "outbound": "openclaw/outbound-lowcode"
          },
          "qos": 1,
          "disableBlockStreaming": false
        }
      }
    }
  },
  "plugins": {
    "allow": [
      "aios-mqtt-channel"
    ],
    "entries": {
      "aios-mqtt-channel": {
        "enabled": true
      }
    }
  }
}

璇存槑锛?

  • channels["aios-mqtt-channel"] 鏄€氶亾閰嶇疆閿€?- plugins.allow 涓?plugins.entries 涓簲濉啓鎻掍欢鍚?aios-mqtt-channel銆?- accounts 涓嬫瘡涓敭閮芥槸涓€涓?OpenClaw 璐﹀彿 ID锛屾彃浠朵細涓烘瘡涓处鍙峰惎鍔ㄧ嫭绔?MQTT 瀹㈡埛绔€?- 鏃х増鍗曡处鍙峰啓娉曚粛鐒跺吋瀹癸紝骞朵細琚涓?default 璐﹀彿锛涙柊閮ㄧ讲寤鸿缁熶竴浣跨敤 accounts銆? 閰嶇疆瀹屾垚鍚庨噸鍚綉鍏宠繘绋嬶細
systemctl restart openclaw

鐢ㄦ硶

Session ID 璇存槑

  • 璺敱渚濇嵁鏄?MQTT 璐﹀彿 ID 鍔犱笂鍏ョ珯娑堟伅涓殑 senderId銆傛彃浠朵細鍏堣В鏋?OpenClaw route锛屽叾涓?peer.id = senderId锛岄殢鍚庣敱 OpenClaw 鏍规嵁 bindings 涓?session 閰嶇疆璁$畻鏈€缁堢殑 agentId 鍜?sessionKey銆?- sessionId 鍙槸璇锋眰绾у瓧娈点€傚鏋滃叆绔?JSON 涓惡甯?sessionId锛屾彃浠朵細鍦ㄥ嚭绔?JSON 涓師鏍峰洖鏄撅紝渚夸簬瀹㈡埛绔叧鑱旇姹備笌鍥炲銆?- sessionId 涓嶄細鍒涘缓鏂颁細璇濓紝涔熶笉浼氱洿鎺ユ敼鍙樿蹇嗕笂涓嬫枃銆? 濡傛灉甯屾湜涓嶅悓瀵硅瘽褰兼闅旂锛屽簲浣跨敤涓嶅悓鐨?senderId銆?

鎺ユ敹鍏ョ珯娑堟伅

鍙戝竷鍒版煇涓处鍙?inbound Topic 鐨勬秷鎭細琚?OpenClaw 澶勭悊銆傛敮鎸佺函鏂囨湰鍜?JSON锛屾帹鑽?JSON锛?

# 绾枃鏈紙admin 璐﹀彿锛?mosquitto_pub -t "openclaw/inbound-admin" -m "Alert: Service down on playground"

# JSON锛堟帹鑽愶紝lowcode 璐﹀彿锛?mosquitto_pub -t "openclaw/inbound-lowcode" -m "{\"senderId\":\"pg-cli\",\"text\":\"hello\",\"sessionId\":\"abc-123\"}"

鍏ョ珯 JSON 绀轰緥锛?

{"senderId":"conn-test2","text":"What is your agent name?","sessionId":"conn-test2"}

鎸夋秷鎭鐩?disableBlockStreaming 鐨勭ず渚嬶細

{"senderId":"conn-test2","text":"Give me the final answer only","sessionId":"conn-test2","disableBlockStreaming":true}

璇存槑锛?

  • disableBlockStreaming 浠呭奖鍝嶅綋鍓嶈繖鏉?MQTT 璇锋眰銆?- 濡傛灉娑堟伅閲屼笉浼犺瀛楁锛屽垯缁ф壙璐﹀彿绾ч厤缃腑鐨?disableBlockStreaming銆?- true 浼氬己鍒跺綋鍓嶈姹傝蛋闈?block-streaming 璺緞锛屼互渚?OpenClaw 杈撳嚭 final 鍥炲銆?- false 浼氭樉寮忓厑璁稿綋鍓嶈姹備娇鐢?block streaming锛屽嵆浣胯处鍙烽粯璁ゅ叧闂簡瀹冦€?

鎺ユ敹鍑虹珯鍥炲

Agent 鍥炲浼氫互 JSON 褰㈠紡鍙戝竷鍒拌璐﹀彿瀵瑰簲鐨?outbound Topic锛?

{"senderId":"openclaw","text":"...","kind":"final","sessionId":"conn-test2","ts":1700000000000}

濡傛灉鍏ョ珯 JSON 鎼哄甫浜?sessionId锛屽嚭绔欏洖澶嶄腑浼氬師鏍峰洖鏄捐瀛楁锛屽寘鎷粡鐢?OpenClaw 閫氱敤鍑虹珯璺緞鍙戦€佺殑缂撳啿鎴栧欢杩熷洖澶嶃€? 璁㈤槄绀轰緥锛?

mosquitto_sub -t "openclaw/outbound-lowcode" -v

棰勬湡鍥炲缁撴瀯锛?

{"senderId":"openclaw","text":"...","kind":"final","ts":1700000000000,"sessionId":"abc-123"}

璇存槑锛?

  • 鎻掍欢浼氬師鏍烽€忎紶 OpenClaw 鐨勫嚭绔?kind锛屼笉浼氭妸 block 鏀瑰啓鎴?final锛屼篃涓嶄細鍙嶅悜鏀瑰啓銆?- 寮€鍚?block streaming 鏃讹紝kind 鍙兘鏄?block锛涙渶缁堝洖澶嶉€氬父鏄?final銆?- 濡傛灉鍏ョ珯娑堟伅璁剧疆浜?disableBlockStreaming: true锛岃璇锋眰浼氳姹?OpenClaw 灏介噺閬垮厤 block streaming锛屼粠鑰屼紭鍏堣緭鍑?final銆?- 濡傛灉鍏ョ珯娑堟伅娌℃湁璁剧疆 disableBlockStreaming锛屽垯鍑虹珯 kind 鍙楄处鍙风骇閰嶇疆褰卞搷銆?- 鍙湁鍦ㄥ叆绔?JSON 鍚湁 sessionId 鏃讹紝鍑虹珯 JSON 鎵嶄細鍥炴樉璇ュ瓧娈点€?- 鏁板瓧绫诲瀷鐨勫叆绔?sessionId 浼氬湪鍑虹珯 JSON 涓鑼冨寲涓哄瓧绗︿覆銆?- outbound.sendText() 浣跨敤鐩稿悓 JSON 鍖呰鏍煎紡锛涘鏋?OpenClaw 鎻愪緵浜?threadId锛屾彃浠朵細灏嗗叾浣滀负 sessionId 鍐欏洖锛屽惁鍒欓粯璁ゅ啓鍏?-1銆?

鏁呴殰鎺掓煡

妫€鏌?OpenClaw 褰撳墠瀹為檯鍔犺浇鐨勬槸鍝竴浠芥彃浠讹細

openclaw plugins info aios-mqtt-channel

甯哥敤瀹炴椂鏃ュ織锛?

journalctl -u openclaw -f | grep -E "MQTT channel ready|MQTT route resolved|Inbound MQTT message|sent reply"

澶氳处鍙峰満鏅笅锛屾甯稿惎鍔ㄦ椂搴旂湅鍒版瘡涓处鍙峰悇鑷畬鎴愯闃咃紝渚嬪锛?

[admin] MQTT channel ready, subscribed to openclaw/inbound-admin
[lowcode] MQTT channel ready, subscribed to openclaw/inbound-lowcode

姣忔潯鍏ョ珯娑堟伅杩樹細杈撳嚭瑙f瀽鍚庣殑璺敱鏃ュ織锛?

MQTT route resolved topic=openclaw/inbound-lowcode inboundAccount=lowcode routeAccount=lowcode agent=lowcode session=...

濡傛灉杩欓噷鏄剧ず agent=main锛岃鏄?MQTT Topic 宸插懡涓彃浠讹紝浣?OpenClaw 浠嶆牴鎹綋鍓?bindings 鎶婅姹傝矾鐢卞埌浜嗕富 agent銆?

瀹夊叏璇存槑

閲嶈锛氫换浣曡兘澶熷悜鍏ョ珯 Topic 鍙戝竷娑堟伅鐨勫鎴风锛岄兘绛夊悓浜庢嫢鏈?OpenClaw Agent 鐨勫畬鏁磋闂兘鍔涖€傝浠呭湪鍙俊鐜涓毚闇?MQTT 閫氶亾锛屼緥濡傦細

  • 鍙楁帶 Broker
  • 寮€鍚璇?- 绉佹湁缃戠粶
  • 涓婃父澧炲姞棰濆閴存潈鎴栨牎楠屽眰

濡傛灉闇€瑕佹帴鍏ヤ笉鍙俊瀹㈡埛绔紝寤鸿鍏堝湪鍙戝竷鍒?openclaw/inbound 涔嬪墠澧炲姞鐙珛楠岃瘉灞傘€?

寮€鍙?

# 鍏嬮殕浠撳簱锛堝皢 <host> 鏇挎崲涓哄疄闄呭湴鍧€锛?git clone ssh://<host>/opt/git/openclaw-mqtt.git
cd openclaw-mqtt

# 瀹夎渚濊禆
npm install

# 杩愯娴嬭瘯
npm test

# 绫诲瀷妫€鏌?npm run typecheck

# 鏋勫缓
npm run build

鏋舵瀯

MQTT Broker (Mosquitto/EMQX)
     |
     +--> inbound topic ---> OpenClaw Gateway ---> Agent
     |
     +<-- outbound topic <-- OpenClaw Gateway <--- Agent

璁稿彲璇?

MIT

鐩稿叧椤圭洰