Introduction
Hey everyone!
Sharing my custom integration and ESPHome component for controlling Daikin Madoka BRC1H thermostats from Home Assistant via Bluetooth.
The Madoka BRC1H is a sleek wall-mounted thermostat by Daikin, controllable only via the Daikin mobile app (Bluetooth). No Wi-Fi, no usable cloud API. This project brings full control directly into HA.
Two approaches available:
- HA Custom Integration — direct Bluetooth connection from HA server
- ESPHome Component — ESP32 acts as a Bluetooth proxy (place it anywhere)
GitHub: GitHub - dasimon135/daikin_madoka: Home Assistant custom component integration for the BRC1H thermostat (madoka) (branch madoka)
Features
- Full HVAC control: mode (heat, cool, auto, fan, dry), target temperature, fan speed
- Indoor temperature sensor reading
- Fan modes: Auto, Low, Mid, High
- Temperature range: 16°C - 32°C (61°F - 90°F)
- Automatic BLE reconnection
- Compatible with ESP32 and ESP32-S3 (M5Stack Atom Lite / Atom S3 Lite)
Option 1: HA Custom Integration (Direct Bluetooth)
Requirements
- Home Assistant with Bluetooth access (USB BLE adapter if needed)
- If HA runs in Docker: DBUS access required (see below)
- Thermostat must be within Bluetooth range (~10m / ~30ft)
Installation
- Download from GitHub
- Copy to
custom_components/daikin_madoka/in your HA config - Restart Home Assistant
Bluetooth Pairing (mandatory)
This is the critical step. The BRC1H requires secure pairing:
# 1. Disconnect the thermostat from any other device (Madoka BT menu → Forget)
# 2. On the HA server (or the machine with the BT adapter):
bluetoothctl
agent KeyboardDisplay
remove <BRC1H_MAC> # Remove any previous pairing
scan on # Wait for BRC1H to appear
scan off
pair <BRC1H_MAC> # Accept the prompt + confirm on thermostat
Confirm quickly on the thermostat after
pair, otherwise the pairing times out.
HA Configuration
Go to Settings → Integrations → Add → Daikin Madoka and provide:
- Bluetooth MAC address of the BRC1H
- Bluetooth adapter name (usually
hci0)
Two entities are created:
- Climate: full control (mode, temperature, fan)
- Sensor: measured indoor temperature
Docker / VM: DBUS Configuration
If HA runs in Docker, DBUS must be accessible:
# docker-compose.yml
volumes:
- /var/run/dbus/system_bus_socket:/var/run/dbus/system_bus_socket
privileged: true
To verify it works:
docker exec -ti <container_id> /bin/bash
bleak-lescan -i hci0
Option 2: ESP32 Proxy via ESPHome (recommended)
This is what I use daily. An M5Stack Atom Lite (or any ESP32) placed near the thermostat acts as a Bluetooth proxy.
Why this approach?
- No need for the HA server to be within Bluetooth range
- Works flawlessly in Docker/VM without DBUS hassle
- Single ESP32 can handle multiple thermostats
- Excellent reliability with automatic reconnection
Tested Hardware
| Platform | Chip | Framework | Status |
|---|---|---|---|
| M5Stack Atom Lite | ESP32 | ESP-IDF | |
| M5Stack Atom S3 Lite | ESP32-S3 | ESP-IDF 5.x | |
| Generic ESP32 DevKit | ESP32 | ESP-IDF / Arduino |
Component Installation
external_components:
# From GitHub directly:
- source: github://dasimon135/daikin_madoka@madoka
components: [ madoka, ble_client ]
# OR locally (copy esphome_components/ to your ESPHome config):
# - source:
# type: local
# path: esphome_components
# components: [ madoka, ble_client ]
The included
ble_clientis a patched version compatible with ESPHome 2025.10.0+ (fixesconsume_connection_slotsremoval).
Full Config (M5Stack Atom Lite)
substitutions:
name: madoka-proxy
friendly_name: "Madoka BLE Proxy"
esphome:
name: ${name}
friendly_name: ${friendly_name}
esp32:
board: m5stack-atom
framework:
type: esp-idf
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
logger:
level: DEBUG
api:
encryption:
key: !secret api_key
ota:
external_components:
- source: github://dasimon135/daikin_madoka@madoka
components: [ madoka, ble_client ]
esp32_ble_tracker:
max_connections: 2
# IMPORTANT: disable classic BT proxy
bluetooth_proxy:
active: false
ble_client:
- mac_address: "F0:B3:1E:87:AF:FE" # ← Your Madoka MAC
id: madoka_living
on_disconnect:
then:
- ble_client.connect: madoka_living
climate:
- platform: madoka
name: "Madoka Living Room"
ble_client_id: madoka_living
update_interval: 15s
ESP32-S3 Config (M5Stack Atom S3 Lite)
For ESP32-S3, add the BLE security configuration:
esp32:
board: m5stack-atoms3
variant: esp32s3
framework:
type: esp-idf
version: recommended
sdkconfig_options:
CONFIG_BT_BLE_50_FEATURES_SUPPORTED: y
CONFIG_BT_BLE_42_FEATURES_SUPPORTED: y
# REQUIRED for Madoka pairing on ESP32-S3
esp32_ble:
io_capability: display_yes_no
Pairing Process (ESP32)
- Flash the config and open ESPHome logs
- The ESP32 connects to the Madoka and initiates pairing
- A 6-digit code appears in the logs:
╔══════════════════════════════════════════════════════════╗
║ PAIRING CODE: 790440 ║
║ Check that this code matches the one on the Madoka ║
║ and CONFIRM on the thermostat! ║
╚══════════════════════════════════════════════════════════╝
- The same code appears on the thermostat screen
- Confirm on the thermostat (press OK) — the ESP32 auto-confirms on its side
- Subsequent connections are automatic (bonding is saved)
Multiple Thermostats
A single ESP32 can handle 2 thermostats simultaneously (max_connections: 2). Add a second ble_client + climate:
ble_client:
- mac_address: "F0:B3:1E:87:AF:FE"
id: madoka_living
on_disconnect:
then:
- ble_client.connect: madoka_living
- mac_address: "1C:54:9E:90:E3:0E"
id: madoka_bedroom
on_disconnect:
then:
- ble_client.connect: madoka_bedroom
climate:
- platform: madoka
name: "Madoka Living Room"
ble_client_id: madoka_living
update_interval: 15s
- platform: madoka
name: "Madoka Bedroom"
ble_client_id: madoka_bedroom
update_interval: 15s
Troubleshooting
| Issue | Solution |
|---|---|
| “device not found” in HA integration | Thermostat is connected to another device (mobile app). Forget it first. |
| “cannot connect” | DBUS not available (Docker) or BT adapter missing |
| Pairing fails (error 0x52) | On ESP32-S3: ensure esp32_ble: io_capability: display_yes_no is set |
| 2nd thermostat won’t connect | Normal — they connect one at a time. Wait for the 1st to pair. |
AttributeError: consume_connection_slots |
Use the patched ble_client included in this repo |
Credits
- Original HA integration: @mduran80 / pymadoka
- ESPHome madoka component: Petapton/esphome
- ESPHome 2025.10+ compatibility fixes & ESP32-S3 support: this repo
GitHub: GitHub - dasimon135/daikin_madoka: Home Assistant custom component integration for the BRC1H thermostat (madoka) (branch madoka)
If you have Madoka thermostats at home, give it a try and let me know how it goes! ![]()
