Climate IR driver for the Daikin BRCxxxx remotes?

Improved:

sudo mode2 -d /dev/lirc0 -m > off_daikin_new

Output (non-numeric removed):

 9845     9768     9843     9759     4634     2496
      359      344      389      937      364      939
      400      297      401      941      364      342
      387      344      390      345      346      404
      378      935      391      313      426      312
      383      941      359      342      387      345
      384      364      409      904      362      345
      376      356      385      947      359      344
      389      343      386      348      377      357
      385      345      390      343      389      343
      377      356      388      939      362      348
      388      345      387      347      400      334
      386      345      351      381      387      346
      385      940      369      342      425      289
      408      345      390      343      386      346
      383      349      386      345      386      950
      360      342      391      350      379      404
      329      940      363      952      340      351
      379      354      409      321      381      941
      360      368      362      360      380      362
      363      350      348      980      377      918
      354      953      330      967      366      942
      320      387      377    20296

      352      924      385      344      380      352
      417      317      381      339      394      908
      381      350      394      913      414      308
      388      351      383      350      399      335
      376      356      381      351      382      351
      350      385      380      353      381      353
      375      355      376      356      369      366
      342      389      376      357      348      387
      349      383      397      345      359      369
      381      352      368      364      372      360
      344      386      346      388      344      393
      337      388      343      398      338      382
      354      401      318      416      318      409
      321      414      314      419      316      412
      320      415      357      373      318      410
      320      414      316      415      316      419
      315      420      361      399      308      390
      346      385      319      405      314      415
      315      417      313      420      313      991
      310     1016      287      423      311     1017
      284      422      310      423      310      423
      310      438     4577   135115

./decode off_daikin_new off_daikin_new.decoded

Decoded output:

½»b01101000010010001001000000001000000010^A0000010001100010000111110(1000010100000000000000000000000000000000000000000000000011g1d000)]

Still wrapping my head a little around how the values interact, I get the math but not strong in C so figuring out what to tweak is difficult.

@hajak I’m at a standstill with this unfortunately. I can capture all the raw codes, starting from a standard baseline config from which I create one new file per button press for, but running the rounding program doesn’t convert to binary. I’d be willing to pay to help get this in at this point if you are interested.

if you get me the raw recordings with labels of the STATE for each one. Need to know what each setting is for each one, MODE, TEMP, FAN, ETC.

I will see what i can do. And not really into this for the money so dont worry about that.

Thanks! Do I need to run through all the iterations based on mode or can I just set it to one config i.e. “Cool, Fan low, 75, no swing, no eco” and then do each command/state per file from that baseline?

You just need a baseline to work from.
Cool, Fan Low, 75
Cool,Fan Med, 75
Heat, Fan Low, 75
etc.

Please provide 4 temperature ones.

I’ve gotten the first round of raw codes ready so we can see if they work for you.

Files ordered by change date, I started with “cool_75f_swing-off_fan-low_on-off” that is I had the remote at cool, 75f, no swing, low fan, no aux modes (powerful, quiet, eco, etc.) enabled and then pressed the on/off button and recorded it to the file.
I then created each new file based on a single button push, the change is in the file name i.e. dry_75f* means I used the base config above and set the mode to “dry”, and so on.

It’s a pretty tiny zip file - how do I get it to you? I don’t see a way to attach files here.

Your unit has “powerful, quiet, eco” modes? Is this a Daikin Ceiling Cassette unit? This sounds more like the wall units that use the standard Daikin module. Have you tested that module?

I have, that it didn’t work is what led me to discover your work on BRC remote support.

It’s a 17 series, indoor model FTXB12AVXJU Outdoor RXB12AXVJU. Operations manual: (pictured on 1st page): https://backend.daikincomfort.com/docs/default-source/product-documents/residential/manuals/operationmanuals/operation-manual_17series.pdf?sfvrsn=5d422a26_8

Hmm yeah this remote is much closer to the original remote. The ceiling cassettes that use the remote i built this for do not have those extra modes. I will look at it but it is probably not something i want to add to this module since it is probably a completely different protocol

Also Daikin really could use some unification in their product lines, good lord they seem to be all over the place. Also why I did not bother with their Wifi interface because it looked like a closed system and the IR I could atleast write some code to work with it.

I understand. Appreciate any guidance or insight from the files you can spare.

@hagak I’ve discovered a few interesting things:

The Daikin protocol used with these remotes is 128. I don’t believe that has been upstreamed to ESPHome but it is in the ESP8286 IRRemote library. You can see it referenced in here Starting line 552 you’ll find the correct frequency and bits for this protocol along with the supported modes. It is further broken out in the class reference: IRremoteESP8266: IRDaikin128 Class Reference

I’m fooling around with the library with custom components/libraries in ESPHome but I’m curious if the above is useful to you as well. I haven’t gotten it working yet but that may be more to my unfamiliarity with ESPHome config syntax.

Edit: Well, well. I’ve managed to get the unit to turn on and off. ATM when I try to change the temp. it turns the unit off instead but that’s just something in the code I hacked together. I’m just delighted that much worked, and also confirmed I’m getting enough range from my IR led. More to come :slight_smile:

I’ve got this working as a custom climate component using irRemoteESP8266. Dealing with the power toggling was a little tricky (The Daikin Series 17 don’t have discreet on/off so you have to toggle the state in code) but I eventually figured it out. Header file is here and the ESPHome yaml is here, in case they are useful to anyone stumbling across this later.

@hagak - can you give me any pointers on how you converted the ir codes for your project? The codes are broken out in ir_Daikin.h and ir_Daikin.cpp from the iRemoteESP8266 project (Daikin128) but translating that in to the format ESPHome needs isn’t obvious to me yet.

Ideally I’d create a custom component like you are doing for the other BRC remotes because there are some limitations to implementing Climate via Arduino libraries like I am doing here.

So from the irRemote they have my remote as having a 22 byte packet.

union Daikin176Protocol{
  uint8_t raw[kDaikin176StateLength];  ///< The state of the IR remote.
  struct {
    // Byte 0~2
    uint8_t      :8;
    uint8_t      :8;
    uint8_t      :8;
    // Byte 3
    uint8_t Id1  :1;
    uint8_t      :7;
    // Byte 4
    uint8_t      :8;
    // Byte 5
    uint8_t      :8;
    // Byte 6
    uint8_t Sum1 :8;
    // Byte 7-9
    uint8_t      :8;
    uint8_t      :8;
    uint8_t      :8;
    // Byte 10
    uint8_t Id2  :1;
    uint8_t      :7;
    // Byte 11
    uint8_t      :8;
    // Byte 12
    uint8_t         :4;
    uint8_t AltMode :3;
    uint8_t         :1;
    // Byte 13
    uint8_t ModeButton  :8;
    // Byte 14
    uint8_t Power :1;
    uint8_t       :3;
    uint8_t Mode  :3;
    uint8_t       :1;
    // Byte 15~16
    uint8_t pad2[2];
    // Byte 17
    uint8_t       :1;
    uint8_t Temp  :6;
    uint8_t       :1;
    // Byte 18
    uint8_t SwingH  :4;
    uint8_t Fan     :4;
    // Byte 19~20
    uint8_t pad3[2];
    // Byte 21
    uint8_t Sum2  :8;
  };
};

In my code i have it split into two parts with the first 7 bytes marked as the preamble cause that data is not going to change for most users (the channel id per unit will always be the same). So the data i care about is in the last 15 bytes. and they mark up exactly what each byte or nimble is used for (actually down to the bit in some cases)

If you want to get something working I recommend getting the receive part working first, easiest to simulate and test. Once that is working you now have a receiver you can use to test your transmit.

If you notice in my receive logic I am looking for the HEADER_MARK which denotes the start of the 15 bytes of the frame, again don’t care about the preamble on receive. Course I would if I used multiple channels but i don’t so I took the easy way out. On transmit the preamble is just a constant, again cause i don’t care about multiple channels. So after the preamble i start receiving data into an array until i have all the bits. Some logic in there to fail out if the frame header is invalid. Then I just parse the bytes into the different components. Once you have receive working getting transmit to work is not hard.

Thanks so much! I forgot to ask you which Daikin protocol you were using. Knowing it is 176 gives me a great reference point to modify for 128.

The tricky bit, again, is going to be the Power toggle because I believe the 176 has discrete on/off. I may need to dig around the ESPHome project because there has to be an already supported model that has the same issue right?

It has a Power bit and a Mode section, Mode probably has an Off Mode.

It does, that’s how I got it to work with the IR library e.g.

    void togglePowerOn() {
      if (this->mode == CLIMATE_MODE_OFF) {
         ac.setPowerToggle(true);
         } else {
           ac.setPowerToggle(false);
      }
    }

If I can work out how to duplicate that in ESPHome I’m good.

keep in mind every time you transmit to it you transmit EVERYTHING, so even if you tell it to be OFF you send the temperature, fan speed, etc.

So OFF is just another mode, nothing really special here compared to setting the other bits. Some modes do have special cases like FAN ONLY you need to set the temp. to a specific temp, at least that is what the remote does. You can see this in my code.

Hi there, I found this thread now as I was looking for a solution to control my Daikin AC that has also a BRC remote but different than the one supported in the daikin_brc component.

I already did some reverse engineering on my AC and have a solution working for a month now. See the story here: GitHub - BogdanDIA/Daikin_brc52A6x: Control of Daikin AC with ESPHome

The remote is BRC52A6x and the AC is R410A Split series Model FTXB50CV1B. The IR protocol is 8bytes.

Regards,
Bogdan