node-red-contrib-switchbot-api 0.1.4

A node to control SwitchBot devices via its web APIs

npm install node-red-contrib-switchbot-api

Getting Started

:warning: This is not an official package and is in no way related to SwitchBot.


  • Node.js v10.0+
  • Node-RED v1.0+


Install via Node-RED

Just search for node-red-contrib-switchbot-api in the Pallete section (under the Install tab)

Install via npm

  1. Navigate to your .node-red folder: cd ~/.node-red

  2. Install the package: npm install node-red-contrib-switchbot-api

  3. Restart node-red

Available Nodes

At the moment, send command is the only available node type, which allows you to control SwitchBot devices (and remotes) via their web APIs; authorization is done via an API token which you can generate using SwitchBot's official mobile app:

  1. Download the SwitchBot app from the App Store or Google Play Store.
  2. Register a SwitchBot account and login to your account.
  3. Generate an API token by going to Profile > Preference, tap 'App Version' 10 times, tap 'Developer Options' once it becomes visible and finally tap 'Get Token'.


API token

Your developer token which you just generated.

Device type

Type of the device, can either be a SwitchBot device or a virtual infrared remote.

Device name

The name of the device.


The command you would like to pass to the device/remote. Full list of commands can be found here (this will take you to SwitchBot's official API documentation page).


A custom parameter in case it is required by the command. Full list of commands along with their parameters can be found here (this will take you to SwitchBot's official API documentation page).

Node Info

Version: 0.1.4
Updated 1 year, 10 months ago
License: ISC
Rating: 4.0 1




14 in the last week


  • send-command
  • switchbot-authorization


  • node-red