Daikin Madoka BRC1H bluetooth custom component

Bonjour,
j’utilise un PI4,avec Home Assistant OS 2025.12.4 ,et mon PC est sous Linux.

J’ai suivi les instructions de la page suivante :

Tout se passe bien jusqu a l’etape 9 ,le PI reconnait Madoka avec les commandes du github.
Dans la partie config du serveur ,j’ai crée:
[adresse du serveur]/config/custom_components/(images,translations,climate.py ,…etc)

Une fois la connection effectué entre BRC1H et PI4 ,l’integration “Daikin Madoka” n’est pas reconnu dans la page “Appareil et service” de home assistant.

Une idée?

Merci pour votre travail.

First, and most importantly, thank you to everyone who has helped make this component a success. I have been a long-time HA user, and my AC is one of my last significant steps in this journey.

I have worked on this on and off for the last year or so, and made progress every time. After several days of frustration and reading this thread a dozen times, I thought I would ask for help.

My AC has two Daikin BRC1H63W controllers. For testing, I have been testing on a single controller. It is located centimetres away from the ESP to ensure there are no range or interference issues. I can compile the ESPHome yaml file, connect to the unit, and the debug messages seem happy. In the Home Assistant, the dashboard always shows the unit as off. In the debug messages, it does not reflect changes in state from the controller and all readings from the unit are reported as NaN, such as below:

[14:24:10.647][D][climate:426]: ‘Bedrooms 2 and 3 Madoka Device’ - Sending state:
[14:24:10.649][D][climate:429]: Mode: OFF
[14:24:10.655][D][climate:449]: Current Temperature: nan°C
[14:24:10.662][D][climate:453]: Target Temperature: Low: nan°C High: nan°C

I am not sure where to go from here. I hope I am missing some nuance while reading the various posts in this thread.

I have attached photos from what I believe is a successful pairing, the corresponding logs, and my YAML file. I am apparently only allowed to attach one image to a post as a new user, so I can attach additional photos or screenshots as needed.

Thank you in advance for your help. I am grateful and humbled by this fantastic community.

YAML:

esphome:
  name: "dfrobot-firebeetle32-dev-21778d"
  friendly_name: DFRobot FireBeetle32 Dev 21778d
  min_version: 2025.11.0
  name_add_mac_suffix: false

esp32:
  variant: esp32
  framework:
    type: esp-idf

logger:
  level: DEBUG

api:
  encryption:
    key: [redacted]

  services:
    - service: passkey_reply
      variables:
        passkey: int
      then:
        - logger.log: "Authenticating with passkey"
        - ble_client.passkey_reply:
            id: it_ac_1
            passkey: !lambda return passkey;
    - service: numeric_comparison_reply
      variables:
        accept: bool
      then:
        - logger.log: "Authenticating with numeric comparison"
        - ble_client.numeric_comparison_reply:
            id: it_ac_1
            accept: !lambda return accept;

ota:
- platform: esphome

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
  min_auth_mode: WPA2
  power_save_mode: none
  domain: [redacted]

web_server:
  port: 80

light:
  - platform: binary
    name: "Status LED"
    output: light_output

output:
  - id: light_output
    platform: gpio
    pin:
      number: GPIO2
      ignore_strapping_warning: true

external_components:
  - source: github://Petapton/esphome@madoka
    components: [ daikin_madoka ]

esp32_ble:
  io_capability: keyboard_display
  max_connections: 3

ble_client:
  - mac_address: E4:A6:34:4D:02:82
    id: it_ac_1
    on_passkey_request:
      then:
        - logger.log: "Enter the passkey displayed on your BLE device (Device 1)"
        - logger.log: "Go to https://my.home-assistant.io/redirect/developer_services/ and select passkey_reply"
    on_passkey_notification:
      then:
        - logger.log:
            format: "Enter this passkey on your BLE device (Device 1): %06d"
            args: [ passkey ]
    on_numeric_comparison_request:
      then:
        - logger.log:
            format: "Compare this passkey with the one on your BLE device (Device 1): %06d"
            args: [ passkey ]
        - logger.log: "Go to https://my.home-assistant.io/redirect/developer_services/ and select numeric_comparison_reply"
    on_connect:
      then:
        - logger.log: "Connected to Device 1"

climate:
  - platform: daikin_madoka
    name: "Bedrooms 2 and 3 Madoka Device"
    ble_client_id: it_ac_1
    update_interval: 15s

sensor:
  - platform: uptime
    name: Uptime Sensor
    id: uptime_sensor
  - platform: ble_client
    type: rssi
    ble_client_id: it_ac_1
    name: "Bedrooms 2 and 3 Madoka Device"
  - platform: wifi_signal
    name: "WiFi Signal"
    update_interval: 60s

Logs (none of the mode changes affected anything in HA or the controller):

INFO ESPHome 2025.12.2
INFO Reading configuration /config/esphome/dfrobot-firebeetle32-dev-21778d.yaml...
INFO Starting log output from /dev/ttyUSB0 with baud rate 115200
[14:20:13.513][D][daikin_madoka:201]: Got update request...
[14:20:20.374][W][ble_rssi_sensor:064]: [Bedrooms 2 and 3 Madoka Device] Cannot poll, not connected
[14:20:21.063][D][daikin_madoka:201]: Got update request...
[14:20:21.069][D][daikin_madoka:203]: ...but device is disconnected
[14:20:21.315][D][sensor:135]: 'WiFi Signal': Sending state -42.00000 dBm with 0 decimals of accuracy
[14:20:21.988][D][esp32_ble_client:193]: [0] [E4:A6:34:4D:02:82] Found device
[14:20:21.994][D][esp32_ble_tracker:662]: Found device E4:A6:34:4D:02:82 RSSI=-43
[14:20:22.000][D][esp32_ble_tracker:683]:   Address Type: PUBLIC
[14:20:22.005][D][esp32_ble_tracker:685]:   Name: 'Daikin'
[14:20:22.013][D][esp32_ble_tracker:135]: connecting: 0, discovered: 1, disconnecting: 0
[14:20:22.019][D][esp32_ble_tracker:813]: Stopping scan to make connection
[14:20:22.025][D][esp32_ble_tracker:821]: Promoting client to connect
[14:20:22.033][D][esp32_ble_tracker:857]: Setting coexistence to Bluetooth to make connection.
[14:20:22.039][I][esp32_ble_client:111]: [0] [E4:A6:34:4D:02:82] 0x00 Connecting
[14:20:22.047][D][esp32_ble_tracker:772]: Scan stop complete, set scanner state to IDLE.
[14:20:22.055][D][esp32_ble_tracker:135]: connecting: 1, discovered: 0, disconnecting: 0
[14:20:22.218][D][esp32_ble_client:197]: [0] [E4:A6:34:4D:02:82] ESP_GATTC_CONNECT_EVT
[14:20:22.226][D][esp32_ble_client:197]: [0] [E4:A6:34:4D:02:82] ESP_GATTC_OPEN_EVT
[14:20:22.233][I][esp32_ble_client:318]: [0] [E4:A6:34:4D:02:82] Connection open
[14:20:22.240][D][esp32_ble_client:193]: [0] [E4:A6:34:4D:02:82] Searching for services
[14:20:22.247][D][esp32_ble_tracker:135]: connecting: 0, discovered: 0, disconnecting: 0
[14:20:22.255][D][esp32_ble_tracker:861]: Setting coexistence preference to balanced.
[14:20:22.262][D][esp32_ble_tracker:214]: Starting scan, set scanner state to STARTING.
[14:20:23.789][D][esp32_ble_client:503]: [0] [E4:A6:34:4D:02:82] Event 46
[14:20:23.821][D][esp32_ble_client:197]: [0] [E4:A6:34:4D:02:82] ESP_GATTC_SEARCH_CMPL_EVT
[14:20:23.829][I][esp32_ble_client:422]: [0] [E4:A6:34:4D:02:82] Service discovery complete
[14:20:23.834][D][main:048]: Connected to Device 1
[14:20:23.840][D][esp32_ble_client:371]: [0] [E4:A6:34:4D:02:82] cfg_mtu status 0, mtu 146
[14:20:23.848][I][ble_rssi_sensor:052]: ESP_GAP_BLE_READ_RSSI_COMPLETE_EVT RSSI: -45
[14:20:23.853][W][component:373]: ble_client.sensor cleared Warning flag
[14:20:23.865][D][sensor:135]: 'Bedrooms 2 and 3 Madoka Device': Sending state -45.00000 dBm with 0 decimals of accuracy
[14:20:24.034][D][sensor:135]: 'Uptime Sensor': Sending state 1684.76697 s with 0 decimals of accuracy
[14:20:24.142][I][daikin_madoka:128]: ESP_GAP_BLE_NC_REQ_EVT, the passkey Notify number:557889
[14:20:24.150][D][main:069]: Compare this passkey with the one on your BLE device (Device 1): 557889
[14:20:24.164][D][main:072]: Go to https://my.home-assistant.io/redirect/developer_services/ and select numeric_comparison_reply
[14:20:28.915][W][esp32_ble:603][BTC_TASK]: Ignoring unexpected GAP event type: 9
[14:20:28.923][W][esp32_ble:603][BTC_TASK]: Ignoring unexpected GAP event type: 9
[14:20:28.932][W][esp32_ble:603][BTC_TASK]: Ignoring unexpected GAP event type: 9
[14:20:28.978][W][esp32_ble:603][BTC_TASK]: Ignoring unexpected GAP event type: 9
[14:20:29.017][I][esp32_ble_client:529]: [0] [E4:A6:34:4D:02:82] auth complete addr: e4a6344d0282
[14:20:29.025][D][esp32_ble_client:535]: [0] [E4:A6:34:4D:02:82] auth success type = 0 mode = 13
[14:20:29.033][D][esp32_ble_client:197]: [0] [E4:A6:34:4D:02:82] ESP_GATTC_REG_FOR_NOTIFY_EVT
[14:20:29.041][D][esp32_ble_client:489]: Wrote notify descriptor 1, properties=16
[14:20:30.315][D][esp32_ble_client:197]: [0] [E4:A6:34:4D:02:82] ESP_GATTC_WRITE_DESCR_EVT
[14:20:36.063][D][daikin_madoka:201]: Got update request...
[14:20:36.320][D][esp32_ble_client:197]: [0] [E4:A6:34:4D:02:82] ESP_GATTC_WRITE_CHAR_EVT
[14:20:36.328][D][esp32_ble_client:197]: [0] [E4:A6:34:4D:02:82] ESP_GATTC_WRITE_CHAR_EVT
[14:20:36.337][D][esp32_ble_client:197]: [0] [E4:A6:34:4D:02:82] ESP_GATTC_WRITE_CHAR_EVT
[14:20:36.343][D][esp32_ble_client:197]: [0] [E4:A6:34:4D:02:82] ESP_GATTC_WRITE_CHAR_EVT
[14:20:36.352][D][esp32_ble_client:197]: [0] [E4:A6:34:4D:02:82] ESP_GATTC_WRITE_CHAR_EVT
[14:20:51.067][D][daikin_madoka:201]: Got update request...
[14:20:51.325][D][esp32_ble_client:197]: [0] [E4:A6:34:4D:02:82] ESP_GATTC_WRITE_CHAR_EVT
[14:20:51.333][D][esp32_ble_client:197]: [0] [E4:A6:34:4D:02:82] ESP_GATTC_WRITE_CHAR_EVT
[14:20:51.341][D][esp32_ble_client:197]: [0] [E4:A6:34:4D:02:82] ESP_GATTC_WRITE_CHAR_EVT
[14:20:51.347][D][esp32_ble_client:197]: [0] [E4:A6:34:4D:02:82] ESP_GATTC_WRITE_CHAR_EVT
[14:20:51.357][D][esp32_ble_client:197]: [0] [E4:A6:34:4D:02:82] ESP_GATTC_WRITE_CHAR_EVT
[14:21:06.068][D][daikin_madoka:201]: Got update request...
[14:21:06.326][D][esp32_ble_client:197]: [0] [E4:A6:34:4D:02:82] ESP_GATTC_WRITE_CHAR_EVT
[14:21:06.334][D][esp32_ble_client:197]: [0] [E4:A6:34:4D:02:82] ESP_GATTC_WRITE_CHAR_EVT
[14:21:06.341][D][esp32_ble_client:197]: [0] [E4:A6:34:4D:02:82] ESP_GATTC_WRITE_CHAR_EVT
[14:21:06.349][D][esp32_ble_client:197]: [0] [E4:A6:34:4D:02:82] ESP_GATTC_WRITE_CHAR_EVT
[14:21:06.357][D][esp32_ble_client:197]: [0] [E4:A6:34:4D:02:82] ESP_GATTC_WRITE_CHAR_EVT
[14:21:07.071][D][climate:048]: 'Bedrooms 2 and 3 Madoka Device' - Setting
[14:21:07.075][D][climate:052]:   Mode: HEAT_COOL
[14:21:07.080][D][daikin_madoka:079]: status: 1, mode: 2
[14:21:07.874][D][daikin_madoka:201]: Got update request...
[14:21:08.131][D][esp32_ble_client:197]: [0] [E4:A6:34:4D:02:82] ESP_GATTC_WRITE_CHAR_EVT
[14:21:08.139][D][esp32_ble_client:197]: [0] [E4:A6:34:4D:02:82] ESP_GATTC_WRITE_CHAR_EVT
[14:21:08.148][D][esp32_ble_client:197]: [0] [E4:A6:34:4D:02:82] ESP_GATTC_WRITE_CHAR_EVT
[14:21:08.154][D][esp32_ble_client:197]: [0] [E4:A6:34:4D:02:82] ESP_GATTC_WRITE_CHAR_EVT
[14:21:08.162][D][esp32_ble_client:197]: [0] [E4:A6:34:4D:02:82] ESP_GATTC_WRITE_CHAR_EVT
[14:21:08.170][D][esp32_ble_client:197]: [0] [E4:A6:34:4D:02:82] ESP_GATTC_WRITE_CHAR_EVT
[14:21:08.177][D][esp32_ble_client:197]: [0] [E4:A6:34:4D:02:82] ESP_GATTC_WRITE_CHAR_EVT
[14:21:18.199][D][climate:048]: 'Bedrooms 2 and 3 Madoka Device' - Setting
[14:21:18.202][D][climate:052]:   Mode: COOL
[14:21:18.207][D][daikin_madoka:079]: status: 1, mode: 3
[14:21:19.002][D][daikin_madoka:201]: Got update request...
[14:21:19.258][D][esp32_ble_client:197]: [0] [E4:A6:34:4D:02:82] ESP_GATTC_WRITE_CHAR_EVT
[14:21:19.266][D][esp32_ble_client:197]: [0] [E4:A6:34:4D:02:82] ESP_GATTC_WRITE_CHAR_EVT
[14:21:19.274][D][esp32_ble_client:197]: [0] [E4:A6:34:4D:02:82] ESP_GATTC_WRITE_CHAR_EVT
[14:21:19.281][D][esp32_ble_client:197]: [0] [E4:A6:34:4D:02:82] ESP_GATTC_WRITE_CHAR_EVT
[14:21:19.289][D][esp32_ble_client:197]: [0] [E4:A6:34:4D:02:82] ESP_GATTC_WRITE_CHAR_EVT
[14:21:19.297][D][esp32_ble_client:197]: [0] [E4:A6:34:4D:02:82] ESP_GATTC_WRITE_CHAR_EVT
[14:21:19.305][D][esp32_ble_client:197]: [0] [E4:A6:34:4D:02:82] ESP_GATTC_WRITE_CHAR_EVT
[14:21:20.389][I][ble_rssi_sensor:052]: ESP_GAP_BLE_READ_RSSI_COMPLETE_EVT RSSI: -40
[14:21:20.399][D][sensor:135]: 'Bedrooms 2 and 3 Madoka Device': Sending state -40.00000 dBm with 0 decimals of accuracy
[14:21:21.071][D][daikin_madoka:201]: Got update request...
[14:21:21.329][D][esp32_ble_client:197]: [0] [E4:A6:34:4D:02:82] ESP_GATTC_WRITE_CHAR_EVT
[14:21:21.336][D][esp32_ble_client:197]: [0] [E4:A6:34:4D:02:82] ESP_GATTC_WRITE_CHAR_EVT
[14:21:21.344][D][esp32_ble_client:197]: [0] [E4:A6:34:4D:02:82] ESP_GATTC_WRITE_CHAR_EVT
[14:21:21.351][D][esp32_ble_client:197]: [0] [E4:A6:34:4D:02:82] ESP_GATTC_WRITE_CHAR_EVT
[14:21:21.358][D][esp32_ble_client:197]: [0] [E4:A6:34:4D:02:82] ESP_GATTC_WRITE_CHAR_EVT
[14:21:21.368][D][sensor:135]: 'WiFi Signal': Sending state -41.00000 dBm with 0 decimals of accuracy
[14:21:24.036][D][sensor:135]: 'Uptime Sensor': Sending state 1744.76904 s with 0 decimals of accuracy
[14:21:36.072][D][daikin_madoka:201]: Got update request...
[14:21:36.329][D][esp32_ble_client:197]: [0] [E4:A6:34:4D:02:82] ESP_GATTC_WRITE_CHAR_EVT
[14:21:36.337][D][esp32_ble_client:197]: [0] [E4:A6:34:4D:02:82] ESP_GATTC_WRITE_CHAR_EVT
[14:21:36.345][D][esp32_ble_client:197]: [0] [E4:A6:34:4D:02:82] ESP_GATTC_WRITE_CHAR_EVT
[14:21:36.352][D][esp32_ble_client:197]: [0] [E4:A6:34:4D:02:82] ESP_GATTC_WRITE_CHAR_EVT
[14:21:36.361][D][esp32_ble_client:197]: [0] [E4:A6:34:4D:02:82] ESP_GATTC_WRITE_CHAR_EVT
[14:21:51.073][D][daikin_madoka:201]: Got update request...
[14:21:51.330][D][esp32_ble_client:197]: [0] [E4:A6:34:4D:02:82] ESP_GATTC_WRITE_CHAR_EVT
[14:21:51.338][D][esp32_ble_client:197]: [0] [E4:A6:34:4D:02:82] ESP_GATTC_WRITE_CHAR_EVT
[14:21:51.346][D][esp32_ble_client:197]: [0] [E4:A6:34:4D:02:82] ESP_GATTC_WRITE_CHAR_EVT
[14:21:51.352][D][esp32_ble_client:197]: [0] [E4:A6:34:4D:02:82] ESP_GATTC_WRITE_CHAR_EVT
[14:21:51.362][D][esp32_ble_client:197]: [0] [E4:A6:34:4D:02:82] ESP_GATTC_WRITE_CHAR_EVT
[14:22:06.079][D][daikin_madoka:201]: Got update request...
[14:22:06.337][D][esp32_ble_client:197]: [0] [E4:A6:34:4D:02:82] ESP_GATTC_WRITE_CHAR_EVT
[14:22:06.344][D][esp32_ble_client:197]: [0] [E4:A6:34:4D:02:82] ESP_GATTC_WRITE_CHAR_EVT
[14:22:06.352][D][esp32_ble_client:197]: [0] [E4:A6:34:4D:02:82] ESP_GATTC_WRITE_CHAR_EVT
[14:22:06.359][D][esp32_ble_client:197]: [0] [E4:A6:34:4D:02:82] ESP_GATTC_WRITE_CHAR_EVT
[14:22:06.367][D][esp32_ble_client:197]: [0] [E4:A6:34:4D:02:82] ESP_GATTC_WRITE_CHAR_EVT
[14:22:20.391][I][ble_rssi_sensor:052]: ESP_GAP_BLE_READ_RSSI_COMPLETE_EVT RSSI: -36
[14:22:20.402][D][sensor:135]: 'Bedrooms 2 and 3 Madoka Device': Sending state -36.00000 dBm with 0 decimals of accuracy
[14:22:21.080][D][daikin_madoka:201]: Got update request...
[14:22:21.338][D][esp32_ble_client:197]: [0] [E4:A6:34:4D:02:82] ESP_GATTC_WRITE_CHAR_EVT
[14:22:21.346][D][esp32_ble_client:197]: [0] [E4:A6:34:4D:02:82] ESP_GATTC_WRITE_CHAR_EVT
[14:22:21.354][D][esp32_ble_client:197]: [0] [E4:A6:34:4D:02:82] ESP_GATTC_WRITE_CHAR_EVT
[14:22:21.360][D][esp32_ble_client:197]: [0] [E4:A6:34:4D:02:82] ESP_GATTC_WRITE_CHAR_EVT
[14:22:21.368][D][esp32_ble_client:197]: [0] [E4:A6:34:4D:02:82] ESP_GATTC_WRITE_CHAR_EVT
[14:22:21.378][D][sensor:135]: 'WiFi Signal': Sending state -41.00000 dBm with 0 decimals of accuracy
[14:22:24.038][D][sensor:135]: 'Uptime Sensor': Sending state 1804.77100 s with 0 decimals of accuracy
[14:22:36.085][D][daikin_madoka:201]: Got update request...
[14:22:36.342][D][esp32_ble_client:197]: [0] [E4:A6:34:4D:02:82] ESP_GATTC_WRITE_CHAR_EVT
[14:22:36.350][D][esp32_ble_client:197]: [0] [E4:A6:34:4D:02:82] ESP_GATTC_WRITE_CHAR_EVT
[14:22:36.358][D][esp32_ble_client:197]: [0] [E4:A6:34:4D:02:82] ESP_GATTC_WRITE_CHAR_EVT
[14:22:36.364][D][esp32_ble_client:197]: [0] [E4:A6:34:4D:02:82] ESP_GATTC_WRITE_CHAR_EVT
[14:22:36.374][D][esp32_ble_client:197]: [0] [E4:A6:34:4D:02:82] ESP_GATTC_WRITE_CHAR_EVT
[14:22:51.089][D][daikin_madoka:201]: Got update request...
[14:22:51.347][D][esp32_ble_client:197]: [0] [E4:A6:34:4D:02:82] ESP_GATTC_WRITE_CHAR_EVT
[14:22:51.355][D][esp32_ble_client:197]: [0] [E4:A6:34:4D:02:82] ESP_GATTC_WRITE_CHAR_EVT
[14:22:51.363][D][esp32_ble_client:197]: [0] [E4:A6:34:4D:02:82] ESP_GATTC_WRITE_CHAR_EVT
[14:22:51.369][D][esp32_ble_client:197]: [0] [E4:A6:34:4D:02:82] ESP_GATTC_WRITE_CHAR_EVT
[14:22:51.379][D][esp32_ble_client:197]: [0] [E4:A6:34:4D:02:82] ESP_GATTC_WRITE_CHAR_EVT
[14:23:06.089][D][daikin_madoka:201]: Got update request...
[14:23:06.347][D][esp32_ble_client:197]: [0] [E4:A6:34:4D:02:82] ESP_GATTC_WRITE_CHAR_EVT
[14:23:06.355][D][esp32_ble_client:197]: [0] [E4:A6:34:4D:02:82] ESP_GATTC_WRITE_CHAR_EVT
[14:23:06.363][D][esp32_ble_client:197]: [0] [E4:A6:34:4D:02:82] ESP_GATTC_WRITE_CHAR_EVT
[14:23:06.370][D][esp32_ble_client:197]: [0] [E4:A6:34:4D:02:82] ESP_GATTC_WRITE_CHAR_EVT
[14:23:06.378][D][esp32_ble_client:197]: [0] [E4:A6:34:4D:02:82] ESP_GATTC_WRITE_CHAR_EVT
[14:23:20.390][I][ble_rssi_sensor:052]: ESP_GAP_BLE_READ_RSSI_COMPLETE_EVT RSSI: -40
[14:23:20.401][D][sensor:135]: 'Bedrooms 2 and 3 Madoka Device': Sending state -40.00000 dBm with 0 decimals of accuracy
[14:23:21.094][D][daikin_madoka:201]: Got update request...
[14:23:21.352][D][esp32_ble_client:197]: [0] [E4:A6:34:4D:02:82] ESP_GATTC_WRITE_CHAR_EVT
[14:23:21.360][D][esp32_ble_client:197]: [0] [E4:A6:34:4D:02:82] ESP_GATTC_WRITE_CHAR_EVT
[14:23:21.368][D][esp32_ble_client:197]: [0] [E4:A6:34:4D:02:82] ESP_GATTC_WRITE_CHAR_EVT
[14:23:21.375][D][esp32_ble_client:197]: [0] [E4:A6:34:4D:02:82] ESP_GATTC_WRITE_CHAR_EVT
[14:23:21.383][D][esp32_ble_client:197]: [0] [E4:A6:34:4D:02:82] ESP_GATTC_WRITE_CHAR_EVT
[14:23:21.392][D][sensor:135]: 'WiFi Signal': Sending state -43.00000 dBm with 0 decimals of accuracy
[14:23:24.044][D][sensor:135]: 'Uptime Sensor': Sending state 1864.77698 s with 0 decimals of accuracy
[14:23:36.100][D][daikin_madoka:201]: Got update request...
[14:23:36.357][D][esp32_ble_client:197]: [0] [E4:A6:34:4D:02:82] ESP_GATTC_WRITE_CHAR_EVT
[14:23:36.365][D][esp32_ble_client:197]: [0] [E4:A6:34:4D:02:82] ESP_GATTC_WRITE_CHAR_EVT
[14:23:36.373][D][esp32_ble_client:197]: [0] [E4:A6:34:4D:02:82] ESP_GATTC_WRITE_CHAR_EVT
[14:23:36.379][D][esp32_ble_client:197]: [0] [E4:A6:34:4D:02:82] ESP_GATTC_WRITE_CHAR_EVT
[14:23:36.388][D][esp32_ble_client:197]: [0] [E4:A6:34:4D:02:82] ESP_GATTC_WRITE_CHAR_EVT
[14:23:51.099][D][daikin_madoka:201]: Got update request...
[14:23:51.356][D][esp32_ble_client:197]: [0] [E4:A6:34:4D:02:82] ESP_GATTC_WRITE_CHAR_EVT
[14:23:51.364][D][esp32_ble_client:197]: [0] [E4:A6:34:4D:02:82] ESP_GATTC_WRITE_CHAR_EVT
[14:23:51.373][D][esp32_ble_client:197]: [0] [E4:A6:34:4D:02:82] ESP_GATTC_WRITE_CHAR_EVT
[14:23:51.379][D][esp32_ble_client:197]: [0] [E4:A6:34:4D:02:82] ESP_GATTC_WRITE_CHAR_EVT
[14:23:51.402][D][esp32_ble_client:197]: [0] [E4:A6:34:4D:02:82] ESP_GATTC_WRITE_CHAR_EVT
[14:24:06.099][D][daikin_madoka:201]: Got update request...
[14:24:06.356][D][esp32_ble_client:197]: [0] [E4:A6:34:4D:02:82] ESP_GATTC_WRITE_CHAR_EVT
[14:24:06.364][D][esp32_ble_client:197]: [0] [E4:A6:34:4D:02:82] ESP_GATTC_WRITE_CHAR_EVT
[14:24:06.373][D][esp32_ble_client:197]: [0] [E4:A6:34:4D:02:82] ESP_GATTC_WRITE_CHAR_EVT
[14:24:06.379][D][esp32_ble_client:197]: [0] [E4:A6:34:4D:02:82] ESP_GATTC_WRITE_CHAR_EVT
[14:24:06.388][D][esp32_ble_client:197]: [0] [E4:A6:34:4D:02:82] ESP_GATTC_WRITE_CHAR_EVT
[14:24:10.640][D][esp32_ble_client:354]: [0] [E4:A6:34:4D:02:82] ESP_GATTC_DISCONNECT_EVT, reason 0x13

Hi @Petapton and the community,

I’m using your component from github://Petapton/esphome@madoka and experiencing a permanent connection loss roughly 2-3 hours after a successful pairing. Once it drops, it never reconnects until a full reboot of both the

ESP32

and the Madoka unit.

Symptoms:

  • Initially works perfectly for ~2 hours.
  • Logs begin flooding with Connection failed, status=133 and reason 62.
  • The Madoka display sometimes shows a Bluetooth icon as if it’s still connected, but the

ESP32

is in a loop of failed handshakes.

Environment:

  • Framework: esp-idf (ESPHome 2025.6.1)
  • Hardware: ESP32-WROOM
  • Signal: -64 dB (stable)

Is there a specific scan_parameters or ble_client configuration recommended to prevent the

ESP32

from losing its session? Has anyone found arduino framework to be more stable for long-term Madoka connections?

Thanks!

Some logs:

INFO ESPHome 2025.6.1
INFO Reading configuration /config/madoka-esp32.yaml...
INFO Updating https://github.com/Petapton/esphome.git@madoka
INFO Starting log output from 192.168.68.137 using esphome API
INFO Successfully resolved madoka-esp32 @ 192.168.68.137 in 0.000s
INFO Successfully connected to madoka-esp32 @ 192.168.68.137 in 0.128s
INFO Successful handshake with madoka-esp32 @ 192.168.68.137 in 0.987s
[16:13:17][I][app:100]: ESPHome version 2024.12.2 compiled on Jan 16 2025, 00:44:02
[16:13:17][C][wifi:600]: WiFi:
[16:13:17][C][wifi:428]:   Local MAC: 5C:01:3B:6A:10:44
[16:13:17][C][wifi:433]:   SSID: [redacted]
[16:13:17][C][wifi:436]:   IP Address: 192.168.68.137
[16:13:17][C][wifi:439]:   BSSID: [redacted]
[16:13:17][C][wifi:441]:   Hostname: 'madoka-esp32'
[16:13:17][C][wifi:443]:   Signal strength: -64 dB ▂▄▆█
[16:13:18][C][wifi:447]:   Channel: 5
[16:13:18][C][wifi:448]:   Subnet: 255.255.255.0
[16:13:18][C][wifi:449]:   Gateway: 192.168.68.1
[16:13:18][C][wifi:450]:   DNS1: 192.168.68.146
[16:13:18][C][wifi:451]:   DNS2: 4.4.4.4
[16:13:18][C][logger:185]: Logger:
[16:13:18][C][logger:186]:   Level: DEBUG
[16:13:18][C][logger:188]:   Log Baud Rate: 115200
[16:13:19][C][logger:189]:   Hardware UART: UART0
[16:13:19][C][ble_client:027]: BLE Client:
[16:13:19][C][esphome.ota:078]:   Password configured
[16:13:19][C][safe_mode:022]:   Remain in safe mode for 300 seconds
[16:13:19][D][esp-idf:000][BTU_TASK]: W (797622) BT_HCI: hcif disc complete: hdl 0x0, rsn 0x3e
[16:13:19][D][esp-idf:000][BTU_TASK]: W (797712) BT_HCI: hcif disc complete: hdl 0x0, rsn 0x3e
[16:13:19][D][esp-idf:000][BTU_TASK]: W (797938) BT_HCI: hcif disc complete: hdl 0x0, rsn 0x3e
[16:13:19][D][esp-idf:000][BTU_TASK]: W (798148) BT_APPL: gattc_conn_cb: if=3 st=0 id=3 rsn=0x3e
[16:13:20][D][esp-idf:000][BTU_TASK]: W (798152) BT_HCI: hcif disc complete: hdl 0x0, rsn 0x3e
[16:13:20][D][esp32_ble_client:171]: [0] [00:CC:3F:EF:69:F7] ESP_GATTC_DISCONNECT_EVT, reason 62
[16:13:20][D][climate:396]: 'Living airconditioner' - Sending state:
[16:13:20][D][esp32_ble_client:110]: [0] [00:CC:3F:EF:69:F7] Found device
[16:13:20][D][esp-idf:000][BTU_TASK]: W (798646) BT_HCI: hcif disc complete: hdl 0x0, rsn 0x3e
[16:13:20][D][esp-idf:000][BTU_TASK]: W (798853) BT_HCI: hcif disc complete: hdl 0x0, rsn 0x3e
[16:13:20][D][esp-idf:000][BTU_TASK]: W (799063) BT_HCI: hcif disc complete: hdl 0x0, rsn 0x3e
[16:13:20][D][esp-idf:000][BTU_TASK]: W (799273) BT_APPL: gattc_conn_cb: if=3 st=0 id=3 rsn=0x3e
[16:13:20][D][esp-idf:000][BTU_TASK]: W (799278) BT_HCI: hcif disc complete: hdl 0x0, rsn 0x3e
[16:13:21][D][esp32_ble_client:171]: [0] [00:CC:3F:EF:69:F7] ESP_GATTC_DISCONNECT_EVT, reason 62
[16:13:21][D][esp32_ble_client:110]: [0] [00:CC:3F:EF:69:F7] Found device
[16:13:21][D][esp-idf:000][BTU_TASK]: E (799617) BT_BTM: BTM_BleScan scan not active
[16:13:21]
[16:13:21][D][esp-idf:000][BTU_TASK]: W (800277) BT_HCI: hcif disc complete: hdl 0x0, rsn 0x3e
[16:13:21][D][esp-idf:000][BTU_TASK]: W (800608) BT_HCI: hcif disc complete: hdl 0x0, rsn 0x3e
[16:13:21][D][esp-idf:000][BTU_TASK]: W (800818) BT_HCI: hcif disc complete: hdl 0x0, rsn 0x3e
[16:13:21][D][esp-idf:000][BTU_TASK]: W (801103) BT_APPL: gattc_conn_cb: if=3 st=0 id=3 rsn=0x3e
[16:13:21][D][esp-idf:000][BTU_TASK]: W (801108) BT_HCI: hcif disc complete: hdl 0x0, rsn 0x3e
[16:13:22][D][esp32_ble_client:171]: [0] [00:CC:3F:EF:69:F7] ESP_GATTC_DISCONNECT_EVT, reason 62
[16:13:22][D][climate:396]: 'Living airconditioner' - Sending state:
[16:13:22][D][climate:399]:   Mode: OFF
[16:13:22][D][climate:419]:   Current Temperature: nan°C
[16:13:23][D][climate:422]:   Target Temperature: Low: nan°C High: nan°C
[16:13:23][D][esp32_ble_client:110]: [0] [00:CC:3F:EF:69:F7] ESP_GATTC_OPEN_EVT
[16:13:23][W][esp32_ble_client:142]: [0] [00:CC:3F:EF:69:F7] Connection failed, status=133