The code was created by @Petapton, so many thanks to them.
This guide is for connecting to your Daikin Madoka HVAC via a ESPHome device and Bluetooth Proxy, if you’re planning to connect directly to your Home Assistant computer there is as custom component Daikin Madoka BRC1H bluetooth custom component
First you need an ESP device and the ESPHome add in.
I’ve used ESP32 C3 super mini in my installation, many other devices are available, it will need to be on your WiFi network and within Bluetooth range of your HVAC controller.
On your currently connected device, phone tablet etc. note down the MAC address of the HVAC, you’ll need it later.
The Daikin Madoka HVAC can only connect to 1 device, so delete the current Bluetooth connection, and forget the connection on phone/connected device.
In the ESPHome Builder, create a new device, use the wizard to connect to your WiFi and initial setup.
Add the following code, substituting your own details, MAC address and friendly name.
external_components:
- source: github://Petapton/esphome@madoka
components: [ madoka, esp32_ble ]
api:
encryption:
key: <your api_encryption created when you create a new ESPHome device>
services:
- service: passkey_reply
variables:
passkey: int
then:
- logger.log: "Authenticating with passkey"
- ble_client.passkey_reply:
id: madoka_climate
passkey: !lambda return passkey;
- service: numeric_comparison_reply
variables:
accept: bool
then:
- logger.log: "Authenticating with numeric comparison"
- ble_client.numeric_comparison_reply:
id: madoka_climate
accept: !lambda return accept;
esp32_ble_tracker:
max_connections: 4 #can only be changed from 3 if using esp-idf framework.
esp32_ble:
io_capability: display_yes_no
ble_client:
- mac_address: <HVAC MAC ADDR>
id: madoka_climate
climate:
- platform: madoka
name: "Your friendly name"
ble_client_id: madoka_climate
update_interval: 15s
bluetooth_proxy:
active: true
I add the following bits of code to my ESP devices, they give me the device uptime and a nice web page to visit.
web_server:
port: 80
text_sensor:
- platform: uptime
name: Uptime
I also recommend using the esp-idf
framework.
framework:
type: esp-idf
Save and upload your code to your ESP device.
Once it’s all up and running you will need to visit your Daikin control panel and accept the Bluetooth connection.
PS: You can verify your bluetooth passkey under developer tools:
Or type your passkey manually:
You should now have a new device in your Home assistant, and you can add the thermostat card to your dashboards
Note: You can use any esphome with BLE, so it will also work with f.e. a shelly (while still controlling the light)