![BT Home Controller in Bluetooth menu](screenshots/75c3eb86-5541-4c01-93ed-b0988b43bef0.png) ![BT Home Controller app UI](screenshots/f311fb4e-8450-4b78-95a0-c938be21250f.png) This application turns the Flipper Zero into a [BTHome](https://bthome.io) beacon, and can be used to integrate the Flipper with home automation systems that support BTHome, such as Home Assistant. [BTHome](https://bthome.io) is an open standard for broadcasting sensor data over Bluetooth Low Energy (BLE). It allows devices to transmit sensor readings (temperature, humidity, battery level, button events, etc.) without requiring pairing or an active connection. Pressing any direction on the Flipper Zero D-pad (Up, Down, Left, Right, OK) sends a BTHome button event. Each direction maps to a separate BTHome button object, so Home Assistant sees them as `button`, `button_2`, `button_3`, `button_4`, and `button_5` (OK, Up, Down, Left, Right respectively). Short and long presses are both supported. The Flipper's battery percentage is also included in each beacon. ### Building Install [ufbt](https://github.com/flipperdevices/ufbt) into a virtual environment: ```bash python3 -m venv .venv .venv/bin/pip install ufbt ``` Then build from the project root: ```bash .venv/bin/ufbt ``` The first run downloads the Flipper SDK and compiler toolchain automatically. The finished app is written to: ``` dist/bt_home_controller.fap ``` ### Installing on the Flipper Open [qFlipper](https://flipperzero.one/update), connect your Flipper via USB, and use the file manager to copy `dist/bt_home_controller.fap` to: ``` SD:/apps/Bluetooth/ ``` The app will then appear in **Apps → Bluetooth → BT Home Controller** on the Flipper. ### Home Assistant setup The first step is setting up the [BTHome](https://www.home-assistant.io/integrations/bthome/) integration in Home Assistant. Once setup, the Flipper should be automatically discovered after pressing any D-pad button once: ![home assistant discovered](screenshots/home_assistant_discovered.png) The device's page will then show the current battery status and its events: ![home assistant paired](screenshots/home_assistant_paired.png)