Daikin Madoka BRC1H bluetooth custom component

That’s a great call. I’ll experiment. I just reset everything and set them to poll every 60 seconds rather than 30 seconds. Will see how that goes.

Any ideas? I have not been able to get this working. Is anyone able to get this to work in the US? I suspect maybe a difference in capabilities is preventing my Madoka from working with this integration.

What’s your config and is your Madoka the latest software version? I think 1.9.0 is the latest.

Any news on the merge of the Pull Request of the component? Is there something that we can do?

I am on version 1.00.01. Unfortunately the only way to install an update, according to their manual, is with the Madoka Assistant app which is not available in the US Google Play store. Any pointers?

Hi all,
I just found this topic, made some tests with my ESP32 and wowwww!, it works like a champ!
I finally managed to have my Madoka solidly in Home Assistant!
I couldn’t thank you more for your precious and effective work, count on me if I can be of any help.
Thanks again!

Sometimes, quite seldom so far actually, I get an error message in the log that reads “Another packet with the same chunk ID is already in the buffer” and the corresponding device goes kind of offline, even though I can still see its current temperature.
Does anybody know what might be causing this and what can be the right procedure to recover?
Thanks!

Turns out, they were all raspberry pi 5 firmware issues! All working now!

Replying myself: a simple device reboot fixes the problem. :slight_smile:

Hi,

what did you guys enter here? It is not showing text for some reason so I dont know how to configure…

Thanks!

edit: I see it is supposed to be thermostat MAC, is it the one showing on thermostat (6 digits), because it wont accept that one

edit2: Ok so I found the full MAC through the terminal, when I put it in, id did show on the termostat, I accepted it and it did not show as an entity afterwards.
Tried to add it again, but now is stuck with the circle loading. Please help

Hey guys and thanks a lot for your great work. @Petapton @blafois

I have been using it for an almost a year - very stable!
I was wondering if there is a way to get errors / malfunctions reported through esphome? I am using the Madokas guest-facing in a holiday home and recently had a false alarm from the gas leak sensor which triggers a super loud high pitched buzzer - would have loved to be notified by it to tell them what to do instead of them panicking :sweat_smile::rofl:

1 Like

@Petapton Love your work.
I’m trying enhance your YAML so that mac address needs to be input in a text box.

I’m struggling to get the data from the input box to “ble_client: -mac_address:”

What I have so far:

  - platform: template
    name: "Madoka MAC adress"
    optimistic: true
    min_length: 6
    max_length: 30
    mode: text
    restore_value: true
    initial_value: "XX.xx.XX.xx"
    id: madoka_mac_input

Hi all,

My working config for ESP32 with esp home on HA-
Make sure you disconnect any bluetooth devices already connected with your Madoka AC unit.

esphome:
  name: it-esp32-bluetooth
  friendly_name: IT ESP32 Bluetooth

esp32:
  board: esp32dev
  framework:
    type: arduino

# Enable logging
logger:

ota:
  - platform: esphome
    password: "b1899ac5932245014246696eb0e4d3b4"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "It-Esp32-Bluetooth"
    password: "dY3KbP5Y7X7F"

captive_portal:

bluetooth_proxy:
  active: true

api:
  encryption:
    key: "diSMCWBUGxXbYx5NEbyS1FJPdEAR9hf5QOf7gb+CTtc="

  services:
    - service: passkey_reply
      variables:
        passkey: int
      then:
        - logger.log: "Authenticating with passkey"
        - ble_client.passkey_reply:
            id: it_ac
            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
            accept: !lambda return accept;

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

esp32_ble:
  io_capability: keyboard_display

esp32_ble_tracker:

ble_client:
  - mac_address: 1C:41:90:D3:20:C4
    id: it_ac
    on_passkey_request:
      then:
        - logger.log: "Enter the passkey displayed on your BLE device"
        - 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: %06d"
            args: [ passkey ]
    on_numeric_comparison_request:
      then:
        - logger.log:
            format: "Compare this passkey with the one on your BLE device: %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"


climate:
  - platform: madoka
    name: "IT Room AC"
    ble_client_id: it_ac
    update_interval: 15s

sensor:
  - platform: ble_client
    type: rssi
    ble_client_id: it_ac
    name: "IT ac RSSI"
2 Likes

Yes, in theory there is a way, which is parsing error messages sent by the madoka controller. Unfortunately it is not implemented (and as far as I remember not even that part of the protocol has been reversed).

1 Like

What do you mean by text box? :thinking:
The yaml gets “compiled” into the firmware. You cannot edit that value at runtime unless you make important changes to the architecture of the madoka component.


Something like this.

I was thinking of a variable that saves the Mac address inputted by the text box and madoka looks at that variable for the Mac address.

Uh, wow, that looks cool. I mean, not that easy to implement, but still…
One issue here would be the pairing: it requires manual confirmation on the device.
Other than that, you should manage to disconnect and connect to another device whenever you get a new mac address.
But I’m curious about why you need it. What is your use case?

I’m trying to create a plug and play device for people that struggle or can’t code.

My yaml code skills are basic so still struggling bridging the template text to the ble_client - mac_address.

This is not achievable by simple yaml code. You should chenge quite a bit of the current implemented architecture, since now the MAC address gets compiled into the firmware and is not thought to be hot-swapped.

Okay thanks for the feedback.
I’ll bail that part of my project because it’s out of my league.

If someone would give you more (bluetooth sniffing) data, would you be able and willing to upgrade you repo with more functionalities, like other sensor readings, filter replacement notifications, etc?