A Homebridge plugin for SwitchBot.
gatttool
needs to be installedInstall the npm package:
sudo npm install -g homebridge-switchbot
Find your SwitchBot's MAC address (BLE MAC) with the official iOS/Android app, and add an accessory definition to ~/.homebridge/config.json
:
{
"accessories": [
{
"accessory": "SwitchBot",
"name": "Wall Switch",
"macAddress": "01:23:45:67:89:AB"
}
]
}
Currently only SwitchBot's light switch mode (stateful switch with push/pull) is supported.
You can change the accessory type to light or fan in the Home app: