@linchengyu-org/switchbot-channel 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -6
- package/openclaw.plugin.json +46 -0
- package/package.json +6 -2
- package/tsconfig.json +23 -0
package/README.md
CHANGED
|
@@ -16,13 +16,13 @@
|
|
|
16
16
|
|
|
17
17
|
## 📖 Project Overview
|
|
18
18
|
|
|
19
|
-
SwitchBot Channel is an official channel plugin for the OpenClaw platform that receives real-time SwitchBot device status changes via
|
|
19
|
+
SwitchBot Channel is an official channel plugin for the OpenClaw platform that receives real-time SwitchBot device status changes via MQTT protocol. Whether it's contact sensors, temperature/humidity meters, or smart plugs, you can monitor device status in real-time through OpenClaw and set up intelligent notifications.
|
|
20
20
|
|
|
21
21
|
## ✨ Features
|
|
22
22
|
|
|
23
|
-
- 🔄 **Real-time Sync**: Receive device status via
|
|
23
|
+
- 🔄 **Real-time Sync**: Receive device status via MQTT in real-time
|
|
24
24
|
- 🏠 **Device Compatibility**: Support for all mainstream SwitchBot devices
|
|
25
|
-
- 🔑 **Auto Authentication**: Intelligent
|
|
25
|
+
- 🔑 **Auto Authentication**: Intelligent credential management with auto-renewal
|
|
26
26
|
- 🚨 **Smart Notifications**: Send notifications only for important events to avoid interruptions
|
|
27
27
|
- 🔧 **Zero Configuration**: Out-of-the-box functionality with just SwitchBot Token and Secret
|
|
28
28
|
- 📊 **History Records**: Local storage of device status history
|
|
@@ -182,13 +182,13 @@ openclaw gateway start
|
|
|
182
182
|
|
|
183
183
|
## 📖 项目简介
|
|
184
184
|
|
|
185
|
-
SwitchBot Channel 是 OpenClaw 平台的官方渠道插件,通过
|
|
185
|
+
SwitchBot Channel 是 OpenClaw 平台的官方渠道插件,通过 MQTT 协议实时接收 SwitchBot 设备状态变化。无论是门窗传感器、温湿度计还是智能插座,您都可以在 OpenClaw 中实时了解设备状态,并设置智能通知。
|
|
186
186
|
|
|
187
187
|
## ✨ 功能特性
|
|
188
188
|
|
|
189
|
-
- 🔄 **实时同步**:通过
|
|
189
|
+
- 🔄 **实时同步**:通过 MQTT 实时接收设备状态
|
|
190
190
|
- 🏠 **设备兼容**:支持所有主流 SwitchBot 设备
|
|
191
|
-
- 🔑
|
|
191
|
+
- 🔑 **自动认证**:智能管理凭证,自动续期
|
|
192
192
|
- 🚨 **智能通知**:仅在重要事件时发送通知,避免打扰
|
|
193
193
|
- 🔧 **零配置**:开箱即用,只需 SwitchBot Token 和 Secret
|
|
194
194
|
- 📊 **历史记录**:本地存储设备状态历史
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "switchbot-channel",
|
|
3
|
+
"channels": ["switchbot"],
|
|
4
|
+
"name": "SwitchBot",
|
|
5
|
+
"version": "0.1.1",
|
|
6
|
+
"description": "SwitchBot channel plugin for OpenClaw — real-time device status",
|
|
7
|
+
"author": "SwitchBot Team",
|
|
8
|
+
"license": "MIT",
|
|
9
|
+
"main": "dist/index.js",
|
|
10
|
+
"types": "dist/index.d.ts",
|
|
11
|
+
"keywords": ["openclaw", "channel", "switchbot", "iot", "mqtt", "smart-home"],
|
|
12
|
+
"repository": {
|
|
13
|
+
"type": "git",
|
|
14
|
+
"url": "https://github.com/SwitchBot/openclaw-channel"
|
|
15
|
+
},
|
|
16
|
+
"engines": {
|
|
17
|
+
"node": ">=18.0.0",
|
|
18
|
+
"openclaw": ">=2026.1.0"
|
|
19
|
+
},
|
|
20
|
+
"dependencies": {
|
|
21
|
+
"mqtt": "5.10.3",
|
|
22
|
+
"zod": "3.24.2"
|
|
23
|
+
},
|
|
24
|
+
"peerDependencies": {
|
|
25
|
+
"openclaw": ">=2026.1.0"
|
|
26
|
+
},
|
|
27
|
+
"configSchema": {
|
|
28
|
+
"type": "object",
|
|
29
|
+
"properties": {
|
|
30
|
+
"token": {
|
|
31
|
+
"type": "string",
|
|
32
|
+
"description": "SwitchBot API token from developer settings"
|
|
33
|
+
},
|
|
34
|
+
"secret": {
|
|
35
|
+
"type": "string",
|
|
36
|
+
"description": "SwitchBot API secret from developer settings"
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"required": ["token", "secret"]
|
|
40
|
+
},
|
|
41
|
+
"uiHints": {
|
|
42
|
+
"token": { "label": "API Token", "placeholder": "从 SwitchBot App 开发者设置获取", "sensitive": true },
|
|
43
|
+
"secret": { "label": "API Secret", "placeholder": "从 SwitchBot App 开发者设置获取", "sensitive": true }
|
|
44
|
+
},
|
|
45
|
+
"tools": ["switchbot_status"]
|
|
46
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@linchengyu-org/switchbot-channel",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "SwitchBot channel plugin for OpenClaw — real-time device status via AWS IoT Core",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -63,7 +63,11 @@
|
|
|
63
63
|
"license": "MIT",
|
|
64
64
|
"files": [
|
|
65
65
|
"dist/",
|
|
66
|
-
"README.md"
|
|
66
|
+
"README.md",
|
|
67
|
+
"openclaw.plugin.json",
|
|
68
|
+
"package.json",
|
|
69
|
+
"package-lock.json",
|
|
70
|
+
"tsconfig.json"
|
|
67
71
|
],
|
|
68
72
|
"repository": {
|
|
69
73
|
"type": "git",
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2022",
|
|
4
|
+
"module": "CommonJS",
|
|
5
|
+
"moduleResolution": "node",
|
|
6
|
+
"outDir": "./dist",
|
|
7
|
+
"rootDir": ".",
|
|
8
|
+
"strict": false,
|
|
9
|
+
"esModuleInterop": true,
|
|
10
|
+
"allowSyntheticDefaultImports": true,
|
|
11
|
+
"skipLibCheck": true,
|
|
12
|
+
"declaration": true,
|
|
13
|
+
"declarationMap": true,
|
|
14
|
+
"sourceMap": true,
|
|
15
|
+
"baseUrl": ".",
|
|
16
|
+
"paths": {
|
|
17
|
+
"openclaw/plugin-sdk": ["./node_modules/openclaw/dist/plugin-sdk/index.d.ts"],
|
|
18
|
+
"openclaw/plugin-sdk/*": ["./node_modules/openclaw/dist/plugin-sdk/*"]
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"include": ["index.ts", "src/**/*"],
|
|
22
|
+
"exclude": ["node_modules", "dist", "src/index.ts.backup"]
|
|
23
|
+
}
|