Climate IR driver for the Daikin BRCxxxx remotes?

The refresh did the trick. Now getting correct values.

Awesome let me know if you have any other issues. I need to clean up that repo before I do a PR. Was not familiar with how esphome is tested and was do tons of small commits. Want to refactor into a single commit.

Thanks a lot! Itā€™s working really nice for ā€˜Coolā€™ now. I did notice however that for dry and fan mode the temperature sets to 45C. I donā€™t use dry and fan modes anyway and on my remote thereā€™s no temperature for those modes. Although the default temperature for those modes is 17C.

What actually bothers me most is that it should remember my temperature when I go back to Cool mode. Even though my remote uses 17C in dry and fan mode, it remembers the temperature for cool. Iā€™ll probably try to solve that in home assistant.

Yeah behind the scenes the system sets the temp to a preset temp when you change modes to DRY and FAN. The protocol requires you set the temp. fields so it should be 17C for you but I missed that when i made the changes. I will correct it but probably not until tomorrow.

Now then I do know about the issue with maintaining the last set value when changing modes and that is still an issue, not sure any of the climate ir modules handle this, but I would like to come up with a way to deal with it in the esp itself. Probably could have a an event on mode change store the current value and restore when the mode changes back. But would need to make sure you are not also setting the value when changing modes cause that would be annoying.

Just updated the FAN/DRY mode to properly set the C temp. to 17C.

Thanks, Iā€™ll update my IR devices tomorrow.

Note I just submitted a pull request for this change into esphome.

1 Like

Really appreciate this work! Hoping someone can help me troubleshoot: I have a newer Daikin mini-split with a BRC52B61 (or 62/63/64) remote and the external components from @hagak repo. Using esphome and an esp32 with a 940nm transmitter bulb, TSOP38238 receiver, and a dht11. I also installed a 2n2222 transistor to boost power to the bulb.

Iā€™ve verified it is transmitting - I have an older Pixel phone without an IR filter so I can see the bulb blink. My receiver also picks up the codes when I transmit which I can see in the logs. However the Daikin unit wonā€™t react to any command. Iā€™ve even held the bulb right next to the receiver on the indoor cassette with no change. Is it possible there are different codes for this model even though it is also a BRC? Anything I can provide to help troubleshoot?

First off is your unit on Channel 1? The BRC default to that and if you or the installer did not change it, i would expect it to be on that channel. The code I wrote only works on Ch 1 since that is all I have.

Also make sure the ESP32 is not rebooting due to a brown out. I ran into this issue due to trying to use a USB cable to power it that was long and getting a pretty hefty voltage drop that when the IR LEDs are activated it would cause the voltage to drop below spec for the ESP32 and it would reboot.

Lastly I have a BRC4C163 (US model) and I found one other person who had another model that worked in C. Discovered that the models are hard coded to work in either F or C and they actually change the temp. encoding based on this. Wonder if your model has some other encoding issue that is off. When you do received signals from your remote is the info printed out in the logs match with what you expect?

Itā€™s on channel 1, yes.

I donā€™t believe the ESP32 has a power problem as Iā€™m watching the logs in ESPHome while transmitting and thereā€™s no indication itā€™s gone offline or otherwise restarted but if thereā€™s something I should look for I will try it again.

When I use the BRC remote my receiver picks up Pronto-format codes that look similar but would it help if I collected some for you? Tell me what commands to try and Iā€™ll paste the output for both the remote and what I get when I use the ESPHome emitter.

@hagak Hereā€™s the log output, I canā€™t claim to know enough about IR hex to understand if it is a problem, but the output captured when I trigger the ESP (via Home Assistantā€™s climate/thermo) to turn the unit on/off or set to cool is different than the output my receiver picks up from the BRC remote. Anything useful here?

ESPHome-HA "Off" command sent: 
[12:00:45][D][climate:010]: 'Garage Mini-Split BRC' - Setting
[12:00:45][D][climate:014]:   Mode: OFF
[12:00:45][D][climate:385]: 'Garage Mini-Split BRC' - Sending state:
[12:00:45][D][climate:388]:   Mode: OFF
[12:00:45][D][climate:393]:   Fan Mode: LOW
[12:00:45][D][climate:405]:   Swing Mode: OFF
[12:00:45][D][climate:408]:   Current Temperature: 34.70Ā°C
[12:00:45][D][climate:414]:   Target Temperature: 23.89Ā°C
[12:00:45][D][remote.pronto:238]: Received Pronto: data=0000 006D 003A 0000 00C3 0053 0010 0042 000F 001A 0010 0019 0010 0019 0011 0042 000F 001B 000F 001B 000F 001B 000F 001A 000F 0044 000D 001C 000E 0046 000F 0042 0011 0019 0011 0042 000F 0045 000F 0044 000F 0042 0010 0043 000D 001C
[12:00:45][D][remote.pronto:240]: 000E 0046 000F 001A 000F 001B 000F 001A 0010 001A 000D 001C 000E 001B 000F 0045 000F 0042 0011 001A 000F 001A 0010 001A 0010 001A 0010 001B 000F 0042 0011 0019 0011 001A 0010 001A 0010 001A 0010 001A 000F 001A 0010 001A 000F 001A 000F 001A 000F 001A 0010 001A 000F 001A 000D 001D 000D 001C 000F 0045 000F 0042 0011 0042 000F 0045 000F 001A 000F 001A 000D 001D 000D 06C3
[12:00:45][D][climate:385]: 'Garage Mini-Split BRC' - Sending state:
[12:00:45][D][climate:388]:   Mode: OFF
[12:00:45][D][climate:393]:   Fan Mode: LOW
[12:00:45][D][climate:405]:   Swing Mode: OFF
[12:00:45][D][climate:408]:   Current Temperature: 24.70Ā°C
[12:00:45][D][climate:414]:   Target Temperature: 23.89Ā°C
[12:01:16][D][remote.pronto:238]: Received Pronto: data=0000 006D 0001 0000 0003 06C3


ESPHome-HA "Cool" command sent:
[11:59:33][D][climate:010]: 'Garage Mini-Split BRC' - Setting
[11:59:33][D][climate:014]:   Mode: COOL
[11:59:34][D][climate:385]: 'Garage Mini-Split BRC' - Sending state:
[11:59:34][D][climate:388]:   Mode: COOL
[11:59:34][D][climate:393]:   Fan Mode: LOW
[11:59:34][D][climate:405]:   Swing Mode: OFF
[11:59:34][D][climate:408]:   Current Temperature: 24.70Ā°C
[11:59:34][D][climate:414]:   Target Temperature: 23.89Ā°C
[11:59:34][D][remote.pronto:238]: Received Pronto: data=0000 006D 003A 0000 00C4 0051 0010 0044 000F 001A 0010 001A 0010 001A 0010 0042 0011 0019 0011 0019 0011 001A 0010 001A 000F 0042 0010 0019 0011 0043 000D 0046 000F 001A 000F 0043 0010 0042 000F 0045 000F 0044 000F 0042 0011 0019
[11:59:34][D][remote.pronto:240]: 0011 0043 000D 001C 000F 001B 000F 001B 000F 001B 0010 0019 0010 0019 0010 0043 000D 0046 000F 001A 000F 001A 000F 0018 0011 001A 000E 001C 000D 0046 000F 001A 000F 001A 0010 0019 000F 001A 000F 001A 0010 0019 000D 001D 000D 001D 000C 001C 000F 001B 0010 001A 0010 001A 0011 0018 0011 0018 0012 0042 000D 0046 0010 0041 0012 0041 0010 001A 0010 001A 0011 0019 0011 06C3
[11:59:34][D][climate:385]: 'Garage Mini-Split BRC' - Sending state:
[11:59:34][D][climate:388]:   Mode: COOL
[11:59:34][D][climate:393]:   Fan Mode: LOW
[11:59:34][D][climate:405]:   Swing Mode: OFF
[11:59:34][D][climate:408]:   Current Temperature: 24.70Ā°C
[11:59:34][D][climate:414]:   Target Temperature: 23.89Ā°C
[11:59:39][D][dht:048]: Got Temperature=1.6Ā°C Humidity=20.6%
[11:59:39][D][sensor:127]: 'Garage Temperature': Sending state 34.88000 Ā°F with 1 decimals of accuracy
[11:59:39][D][climate:385]: 'Garage Mini-Split BRC' - Sending state:
[11:59:39][D][climate:388]:   Mode: COOL
[11:59:39][D][climate:393]:   Fan Mode: LOW
[11:59:39][D][climate:405]:   Swing Mode: OFF
[11:59:39][D][climate:408]:   Current Temperature: 24.88Ā°C
[11:59:39][D][climate:414]:   Target Temperature: 23.89Ā°C

BRC Remote "off" command sent:

[12:10:09][D][remote.pronto:238]: Received Pronto: data=0000 006D 0001 0000 0006 06C3
[12:10:14][D][remote.pronto:238]: Received Pronto: data=0000 006D 0044 0000 017C 0177 017C 0177 00B4 005E 0010 000C 000F 0024 000E 0025 000E 000D 0010 0023 000F 000C 0010 000C 0010 000D 0010 000C 0010 0023 000F 000C 0010 0023 000F 0023 000F 000C 0010 000C 0010 000C 0010 000C 000F 000E
[12:10:14][D][remote.pronto:240]: 0010 000C 0010 000C 0010 0023 000F 000D 000F 000D 000F 000D 000F 000D 000F 0023 0010 000C 0010 000C 0010 0022 0010 000C 0010 000C 0010 000C 0010 000C 0010 000C 0010 000C 0010 000C 0010 0022 0010 000C 0010 000C 0010 000C 0010 000C 0010 000C 0010 000C 0010 000C 0010 0022 0010 000C 0010 000C 0010 000D 0010 0022 0010 0022 0010 000C 0010 000C 0010 000C 0010 0022 0010 000C 0010 000D 0010 000C 0010 0022 0010 0022 0010 0022 0010 0021 0011 0021 0011 000D 0010 0021 0011 06C3
[12:10:14][D][remote.pronto:238]: Received Pronto: data=0000 006D 0041 0000 0011 0021 0011 000D 0010 000C 0011 000B 0011 000C 0010 0022 0010 000C 0010 0023 0010 000C 0010 000D 0010 000D 0010 000D 0010 000D 0010 000D 0010 000D 0010 000D 0010 000D 0010 000D 0010 000D 000F 000D 000F 000D
[12:10:14][D][remote.pronto:240]: 000F 000D 000F 000D 000F 000D 000F 000D 000F 000D 000F 000D 000F 000D 000F 000D 000F 000D 000F 000D 000F 000D 000E 000E 000E 000E 000E 000E 000E 000F 000E 000E 000E 000E 000E 000E 000E 000E 000D 000F 000D 000F 000D 000F 000D 000F 000D 000F 000D 000F 000D 000F 000D 000F 000D 000F 000D 000F 000D 000F 000D 000F 000D 000F 000D 000F 000D 000F 000D 000F 000D 0025 000D 0025 000D 000F 000D 0025 000D 000F 000D 000F 000D 000F 000D 000F 00B0 06C3

BRC Remote "Cool" command sent:

[12:11:37][D][remote.pronto:238]: Received Pronto: data=0000 006D 0040 0000 000C 0026 000C 0010 000C 0010 000C 0010 000C 0010 000D 0026 000C 0010 000C 0027 000C 0011 000C 0011 000C 0012 000B 0010 000C 0011 000C 0010 000C 0011 000C 0012 000B 0010 000D 000F 000C 0010 000C 0010 0013 0009
[12:11:37][D][remote.pronto:240]: 000C 000F 0011 000A 002A 0011 000C 000D 000F 0011 000C 0011 000D 0010 000C 0010 000D 0010 000C 0011 000C 0010 000C 0010 000C 0011 000D 0010 000C 0011 000C 0011 000D 0010 000C 0011 000C 0010 000C 0010 000C 0011 000C 0010 000C 0010 000D 0010 000B 0010 000C 0011 000C 0011 000B 0010 000C 0010 000C 0011 000B 0012 000B 0011 000C 0011 000C 0011 000C 0026 000C 0026 000C 0011 000B 0026 000C 0010 000C 0010 000C 0010 000C 0010 00AF 06C3

Hereā€™s the relevant bits from my ESPHome config as well in case that is needed:

remote_transmitter:
  pin: GPIO4
  id: ir_transmitter
  carrier_duty_percent: 50%

remote_receiver:
  pin: 
    number: GPIO23
    inverted: True
    mode:
     input: True
     pullup: True
  dump: pronto
  id: ir_receiver
  tolerance: 55%

sensor:
  - platform: dht
    model: DHT11
    pin: GPIO2
    temperature:
      name: "Garage Temperature"
      id: "garagetemp"
      filters:
      - offset: -5.7
      - lambda: return x * (9.0/5.0) + 32.0;
      unit_of_measurement: "Ā°F"
    humidity:
      name: "Garage Humidity"
    update_interval: 15s

external_components:
  - source:
      type: git
      url: https://github.com/hagak/esphome
      ref: dev
    components: [ daikin_brc ]
    refresh: 0s

climate:
  - platform: daikin_brc
    name: "Garage Mini-Split BRC"
    use_fahrenheit: true
    transmitter_id: ir_transmitter
    receiver_id: ir_receiver
    sensor: garagetemp

The pronto codes are not all that useful for me.

BUT when you use the IR Remote and the Esphome receives the signal, does the output in the logs ā€œFan Speed, Target Temp, Modeā€ match what you send with the remote?

Ah, got it. No, what you see above is all I get when I use the BRC remote, the raw/pronto codes. The climate component doesnā€™t react.

you get the data, but does the data match what you send. I can not tell you because I do not know what you are pressing on the remote.

When I press the ā€œoffā€ button on the remote the only thing printed in the logs is this:

[12:10:09][D][remote.pronto:238]: Received Pronto: data=0000 006D 0001 0000 0006 06C3
[12:10:14][D][remote.pronto:238]: Received Pronto: data=0000 006D 0044 0000 017C 0177 017C 0177 00B4 005E 0010 000C 000F 0024 000E 0025 000E 000D 0010 0023 000F 000C 0010 000C 0010 000D 0010 000C 0010 0023 000F 000C 0010 0023 000F 0023 000F 000C 0010 000C 0010 000C 0010 000C 000F 000E
[12:10:14][D][remote.pronto:240]: 0010 000C 0010 000C 0010 0023 000F 000D 000F 000D 000F 000D 000F 000D 000F 0023 0010 000C 0010 000C 0010 0022 0010 000C 0010 000C 0010 000C 0010 000C 0010 000C 0010 000C 0010 000C 0010 0022 0010 000C 0010 000C 0010 000C 0010 000C 0010 000C 0010 000C 0010 000C 0010 0022 0010 000C 0010 000C 0010 000D 0010 0022 0010 0022 0010 000C 0010 000C 0010 000C 0010 0022 0010 000C 0010 000D 0010 000C 0010 0022 0010 0022 0010 0022 0010 0021 0011 0021 0011 000D 0010 0021 0011 06C3
[12:10:14][D][remote.pronto:238]: Received Pronto: data=0000 006D 0041 0000 0011 0021 0011 000D 0010 000C 0011 000B 0011 000C 0010 0022 0010 000C 0010 0023 0010 000C 0010 000D 0010 000D 0010 000D 0010 000D 0010 000D 0010 000D 0010 000D 0010 000D 0010 000D 0010 000D 000F 000D 000F 000D
[12:10:14][D][remote.pronto:240]: 000F 000D 000F 000D 000F 000D 000F 000D 000F 000D 000F 000D 000F 000D 000F 000D 000F 000D 000F 000D 000F 000D 000E 000E 000E 000E 000E 000E 000E 000F 000E 000E 000E 000E 000E 000E 000E 000E 000D 000F 000D 000F 000D 000F 000D 000F 000D 000F 000D 000F 000D 000F 000D 000F 000D 000F 000D 000F 000D 000F 000D 000F 000D 000F 000D 000F 000D 000F 000D 000F 000D 0025 000D 0025 000D 000F 000D 0025 000D 000F 000D 000F 000D 000F 000D 000F 00B0 06C3

No climate message sending state, etc.

Ok so it does not even understand the data coming in. So looks like the protocol is pretty different. Would be hard for me to debug/fix without the hardware.

Shoot. Are you in the US? Iā€™d be willing to send you my remote to test with if it by itself would be helpful?

If you have a rpi you could do the reverse eng. work.

If you can get that info I might be able to update the code base.

I will take a look, I have some Piā€™s and other related gear laying around. Are you looking for the output from decode.c?

yes the output of that. You have to keep ALL settings the same and have an output for each change with notes of what changed. I also need atleast 2 entires for temp. changes. And each of the fan speeds.