Using the SwitchBot Blind Tilt with Home Assistant
I’m not going to go in depth regarding my Home Assistant setup at this time, but I’m generally a fan of home automation (when said automation actually makes sense and adds value). With that, I recently heard about the SwitchBot Blind Tilt. I checked its compatibility with Home Assistant and soon decided to purchase one. It was delivered a few days ago, but the setup process for Home Assistant wasn’t quite straight-forward (to me, at least). So without further ado, here’s what I had to do to set it up:
- Physically install the device on the blinds to be automated, following SwitchBot’s instructions
- Install SwitchBot’s app for Android or iOS, and calibrate the device
- The Android app requires Google Play Services for login (and of course you need an account) -
I couldn’t get it to work with microG - If you don’t calibrate the device before connecting it to Home Assistant, the device’s controls will be shown, but no actions will be taken if they’re triggered. Ask me how I know this!
- The Android app requires Google Play Services for login (and of course you need an account) -
- Connect the Blind Tilt to Home Assistant via Bluetooth
- In my case (and likely yours), the Home Assistant server won’t be in Bluetooth range of the device, if your server even has Bluetooth. To remedy this, you’ll need a Bluetooth proxy device. The easiest proxy to set up (in my opinion), is none other than ESPHome
Setting up an ESPHome Bluetooth Proxy
First, acquire an ESP-32 device if you don’t already have one. Get a few for good measure - they’re extremely useful. Although the ESP-32 is overkill for this task when compared to an ESP-8266, I have only tested with an ESP-32. At the time of writing, this seems like a particularly good deal (3x ESP-32 for $14 USD).
Using a browser that supports WebSerial (eg. chromium), head over to https://web.esphome.io/ with your ESP board connected to your computer. Follow the guidance for “prepare for first use”, including connecting it to your WiFi network.
Once it’s on your network, you’ll need to provision it as a Bluetooth proxy. That, in turn, requires that you have an ESPHome Dashboard instance running somewhere on your network. For that, follow the instructions on this page.
With the dashboard set up and the ESP device provisioned (but not connected to your dashboard), you’ll now have to prepare the config for a Bluetooth forwarder. On your ESPHome dashboard instance, create a new device, adding the following to the stock config:
dashboard_import:
package_import_url: github://esphome/bluetooth-proxies/esp32-generic.yaml@main
esp32_ble_tracker:
scan_parameters:
# We currently use the defaults to ensure Bluetooth
# can co-exist with WiFi In the future we may be able to
# enable the built-in coexistence logic in ESP-IDF
active: true
bluetooth_proxy:
active: true
Then, click on the device’s menu, followed by Install -> Manual Download -> Modern Format
to download the binary to be flashed on the device. With that, go to your device’s HTTP server and apply the binary as an OTA update.
Once your Bluetooth proxy has been programmed, you can add it in Home Assistant. Simply add the ESPHome integration and input the IP/hostname of the device. Home Assistant will then ask you for the device’s encryption key, which can be found in its YAML configuration file.
At this point, your SwitchBot Blind Tilt should be automatically detected. You should be able to add the device through the SwitchBot integration in Home Assistant and start controlling your device.