Scott Conway

Information Security Researcher

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:

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.