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

@switchbot/openclaw-channel-switchbot

v0.1.4

Published

SwitchBot channel plugin for OpenClaw — real-time device status

Readme

SwitchBot Channel for OpenClaw

Connect your SwitchBot smart home devices to OpenClaw platform for real-time device status monitoring

📖 Project Overview

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.

✨ Features

  • 🔄 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

🚀 Quick Start

System Requirements

  • OpenClaw: >= 2026.1.0
  • Node.js: >= 20.0.0
  • SwitchBot App: Latest version

Step 1: Install Plugin

Prerequisites

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

Installation

# Install plugin from npm
openclaw plugins install @switchbot/openclaw-channel-switchbot

# Verify installation
openclaw plugins list

Step 2: Get SwitchBot Credentials

  1. Open SwitchBot App

  2. 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
  3. 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

Step 3: Configure OpenClaw

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"
    }
  }
}

Step 4: Start Service

# Restart OpenClaw Gateway
openclaw gateway restart

# Check plugin status
openclaw status

⚙️ Configuration Details

Basic Configuration

{
  "channels": {
    "switchbot": {
      "enabled": true,
      "token": "xxxx",
      "secret": "xxxx"
    }
  }
}

📱 Usage Guide

Device Status Monitoring

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>

🔍 Troubleshooting

Common Issues

Q: Plugin fails to start

A: Check configuration

# Check configuration syntax
openclaw config validate

# View detailed errors
openclaw gateway logs --follow

Debug Mode

Enable 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 error

Reset Plugin

If 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 start

Made with ❤️ by the SwitchBot Team