New binding for DAIKIN Madoka Controller (BLE)

As I’m not satisfied with existing bluetooth bindings, I am trying to implement a new Bluetooth bridge using DBUS and BlueZ

I was tempted to do that myself until I got tinyb working on my system. I would much prefer a dbus binding though so I fully support your efforts. :+1:

hi @hairdresser - I have recently moved into an office with these devices and I would like to access them over their BLE interface - is your underlying code available anywhere?

Hi @roastario - not yet - but I promise it will be soon !

OK - I wait with excitement! Thanks.

Hello @hairdresser, I’m watching your project with interest. In particular I would like to see a implementation that works with MQTT so that it can easily integrate with other home automation software such as Home Assistant. If your project is openhab specific, do you think it would be possible to use this (ESP32 BLE MQTT BI-DIRECTIONAL) project with some of your communication code?

Hi @rawframe

Thanks for information on this project! I actually love MQTT and was looking in this direction as well because bluetooth implementation in java is not super portable.
The way the protocol works is a serial port UART over BLE characteristics, using a write without response characteristic and a notify characteristic for responses. Are notify characteristics supported ?
I dont have ESP32 so I ll try to get one. That would actually make my life easier !!

May be add support to existing Daikin binding? I guess channels will be similar, just the protocol is different (bt instead of wifi)

Hum - this is very different and with different dependencies.
I am slowly progressing as I currently have problems with my Bluetooth setup (my adapter died!).
But I am happy to have help from experienced OpenHab developer :slight_smile:
Anyway, the Bluez/DBus library is working far better than TinyB !

IMHO from user’s point of view, it’s logical to expect Daikin binding to work with all Daikin devices.
OTOH, if they are really so different, existing Daikin could be renamed to DaikinWifi and the new one could be DaikinBLE

What Bluez/DBus library are your referring to? The 3rd party one?

I am coding a new Bluetooth binding, in addition to my module which is using this BT binding.
I am basing all my work on this library:


This is an awesome work from this developer, it works really well.

Guys,
Just to give you an update, it starts being working and I’m super happy so far! It was a bit hard because I was developing both the bridge and the binding - but here is the status as of now:

Will keep you updated, and I would love that a senior developer of OpenHAB help me integrating my work within the main branch.

Today I’ve ensure that the plugin is compatible with HomeKit with success:

Nobody interested helping me getting it into the main distrib ?

I can help, but your work would need to be separated into two separate projects:

  1. A new dbus bluetooth adapter for the official bluetooth plugin.
    It should be possible to use bluez-dbus library you are currently using to implement the bulk of it. The hardest part would be making sure to exclude most of the transient dependencies of that library since openHab has their own versions of a lot of them.
    If you want to get started with this you can use the bluez binding as a coding template of sorts, I’m sure there is quite a lot of overlap. But I would first wait until PR#7129 gets merged since it would simplify the amount of work you would need to do.
  2. The Daikin madoka controller BLE binding.
    Right now I assume you are using the bluez-dbus library directly, so you would need to change your code to use the official bluetooth plugin api instead.
    Also, I would suggest reaching out to the code owner of the official Diakin binding and see if it might be worthwhile to include your code as part of that binding depending on how much overlap there is.

Hi Conor,

Thanks for your reply.

I have started all my development with the 2 separate bindings already. One dbus-bluez that implements the existing interfaces of Bluetooth, and the daikin ble that uses the Bluetooth bridge binding.

I think there is no overlap at all with the existing daikin binding as the technology and hardware is different, as well as communication protocol. So beside of the « daikin » name, the 2 bindings don’t share anything.

As for dependencies, I don’t embed any library in my projects, I use osgi version of dbus-bluez as my only dependency.

I am very keen to help and give back to the community as I strongly believe that openhab is today the best home automation framework.

When you are ready, create a Pull Request in github and I can help you get the code merged.

As promised weeks ago… Protocol documentation !

It is not complete yet - but on its way.

I am also being implementing this binding with the use of an ESP32 and BLE2MQTT.

1 Like

From the protocol you’ve posted it looks like you can use the AM43 binding as a template for implementing your Daikin-BLE binding. They way that you interact with the AM43 is basically an emulated serial protocol over bluetooth, just like the Daikin. You should probably copy the AM43 communication framework which I found after and trial and error to deal with some of the more fragile aspects of the underlying bluez stack.

Edit: That and I built the framework to be as robust as possible.

Thanks Connor,

May I ask you to give you a quick look at what I did so far (before I heard about AM43) ?

Please forgive me for coding style! I’m not a developer :slight_smile:

BTW - @cpmeister - you can also take a look at the beta Bluez-Dbus Binding that I am currently developing and using in my setup ?