Connect your SwitchBot smart home devices to OpenClaw platform for real-time device status monitoring
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.
- 🔄 Real-time Sync: Receive device status via MQTT in real-time
- 🏠 Device Compatibility: Support for all mainstream SwitchBot devices
- 🔑 Auto Authentication: Intelligent credential management with auto-renewal
- 🚨 Smart Notifications: Send notifications only for important events to avoid interruptions
- 🔧 Zero Configuration: Out-of-the-box functionality with just SwitchBot Token and Secret
- 📊 History Records: Local storage of device status history
- 🛡️ High Availability: Auto-reconnection with automatic recovery after network interruptions
- OpenClaw: >= 2026.1.0
- Node.js: >= 20.0.0
- SwitchBot App: Latest version
Before installing the plugin, ensure your OpenClaw environment has the required dependencies:
# Install pnpm if not already installed
npm install -g pnpm
# Install dependencies in your OpenClaw installation
pnpm install# Install plugin from npm
openclaw plugins install @switchbot/openclaw-channel-switchbot
# Verify installation
openclaw plugins list-
Open SwitchBot App
-
Enter Developer Options:
- Tap "Settings" in bottom right
- Find and tap "Developer Options"
- If this option doesn't exist, ensure the App is updated to the latest version
-
Get Credentials:
- Record the Token (64-character string)
- Record the Secret (32-character string)
⚠️ Important: Keep your Token and Secret secure and don't share them with others
Edit OpenClaw configuration file ~/.openclaw/openclaw.json:
{
"plugins": {
"entries": {
"openclaw-channel-switchbot": {
"enabled": true
}
}
},
"channels": {
"switchbot": {
"enabled": true,
"token": "your_switchbot_token_here",
"secret": "your_switchbot_secret_here"
}
}
}# Restart OpenClaw Gateway
openclaw gateway restart
# Check plugin status
openclaw status{
"channels": {
"switchbot": {
"enabled": true,
"token": "xxxx",
"secret": "xxxx"
}
}
}After the plugin starts, it will automatically receive status changes from all devices. You can view them using:
# View device status
openclaw devices list switchbot
# View specific device
openclaw devices show <device_id>A: Check configuration
# Check configuration syntax
openclaw config validate
# View detailed errors
openclaw gateway logs --followEnable detailed logging for troubleshooting:
{
"logging": {
"level": "debug",
"channels": {
"switchbot": "debug"
}
}
}View logs:
# View real-time logs
tail -f ~/.openclaw/logs/gateway.log | grep "SwitchBot"
# View error logs
openclaw gateway logs --level errorIf you encounter serious issues, you can reset the plugin:
# Stop service
openclaw gateway stop
# Clear plugin cache
rm -rf ~/.openclaw/cache/plugins/switchbot
# Restart
openclaw gateway startMade with ❤️ by the SwitchBot Team