homebridge-switchbot-bluetooth-platform
v1.2.6
Published
A Homebridge platform Plugin for controlling SwitchBot bots using BLE (Bluetooth Low Energry)
Downloads
96
Maintainers
Readme
Homebridge SwitchBot Bluetooth Platform
Why do I need (yet another) SwitchBot plugin?
Supported Devices
Supported Devices:
To Be Supported Soon:
Installation
Installing from Homebridge Plugins Page:
- Search for "switchbot bluetooth"
- Find
homebridge-switchbot-bluetooth-platform
- NOTE: Check noble prerequisites for your operating system. this is used for the bluetooth communcation.
- Install the plugin
Installing Directly:
- Open Terminal
- run command
npm install -g homebridge-switchbot-bluetooth-platform
- NOTE: Check noble prerequisites for your operating system. this is used for the bluetooth communcation.
Configuration
Add a new platform to your homebridge config.json
file
"platforms": [
{
"platform": "SwitchBotBluetoothPlatform",
"name": "SwitchBotBluetoothPlatform"
}
]
under the new platform, add devices
field
"platforms": [
{
"platform": "SwitchBotBluetoothPlatform",
"name": "SwitchBotBluetoothPlatform",
"devices": [
{
"type": "bot",
"name": "Bedroom Bot",
"address": "a4:ee:45:10:fa:5d"
},
{
"type": "bot",
"name": "Living Room Bot",
"address": "c1:fe:61:33:sd:4f",
"scanDuration": 2000,
"scanRetries": 7,
"scanRetryCooldown:": 1000,
}
]
}
]
Device Configuration Properties
Upon defining a device in the devices
list, the following properties are available:
Mandatory Properties
name
- Device name. Must be unique (no duplications).type
- Type of device. (currently onlybot
is supported).address
- MAC Address of the SwitchBot device. Learn how to find MAC Address.
Optional Properties
scanDuration
- Time for scanning bluetooth devices (in miliseconds). A longer time will increase chance of successfuly detecting new devices, but reduce response time. Default is5000
(5000 miliseconds)scanRetries
- The Number of times that the plugin should attempt scanning for SwitchBot device, before failing. Default is5
(5 attempts)scanRetryCooldown
- Time for waiting between attempts of scanning / connecting to SwitchBot device. Default is1000
(1000 miliseconds)autoTurnOffInPressMode
- Automatically Sets button back to OFF state when bot is configured to be in 'Press' mode (Enabled by default for bots that are set to 'Press' mode) Default istrue
(enabled)
Finding your SwitchBot MAC Address
- Download SwitchBot App - iOS App Store / Google Play Store
- Register / or Login into your SwitchBot account
- Open the device that you want to add to this platform
- Click
Device Info
- Copy the
BLE MAC
address - Add the address to the
address
property of the device in theconfig.json
file (Your configuration)
Contact Me
For any questions, assistance or feedback feel free to contact me here
Buy Me a Coffee
If you want to buy me a coffee, you can do so here: https://paypal.me/galzo1 ♥️