Request: will any user successfully using ESPhome as a remote IR transmitter please post their yaml

i am trying to figure out codes of my daikin216 ir remote.
i receiving following codes and i don’t know how to compile them.

[23:24:10][D][remote.raw:028]: Received Raw: 3492, -1709, 457, -1293, 461, -422, 456, -429, 454, -427, 457, -1296, 453, -427, 455, -428, 456, -427, 456, -426, 456, -1297, 454, -426, 429, -1321, 456, -1293, 457, -426, 456, -1297, 454, -1295, 452, -1296, 455, -1295, 455, -1294, 457,
[23:24:10][D][remote.raw:028]: -426, 457, -429, 454, -1293, 455, -428, 455, -428, 455, -428, 456, -427, 456, -425, 458, -426, 457, -1293, 456, -1294, 456, -1294, 455, -1296, 454, -429, 456, -426, 456, -427, 457, -426, 457, -429, 453, -427, 457, -426, 455, -430, 453, -428, 456, -426,
[23:24:10][D][remote.raw:041]: 456, -427, 455, -429, 454, -427, 456, -427, 455, -428, 455, -428, 457, -426, 428, -454, 457, -427, 456, -426, 457, -429, 478, -405, 453, -427, 457, -426, 455, -427, 456, -1295, 454, -428, 457, -426, 456, -427, 456, -426, 457, -427, 455, -427, 483
[23:24:10][D][remote.raw:028]: Received Raw: 3570, -1711, 456, -1294, 456, -427, 457, -426, 455, -428, 454, -1295, 458, -426, 456, -427, 456, -427, 454, -429, 455, -1294, 456, -427, 456, -1294, 455, -1295, 456, -427, 456, -1294, 454, -1294, 456, -1295, 457, -1294, 455, -1294, 455,
[23:24:10][D][remote.raw:028]: -427, 456, -427, 456, -1295, 454, -427, 456, -427, 456, -427, 456, -426, 455, -428, 455, -428, 455, -428, 455, -427, 456, -427, 455, -427, 455, -428, 455, -428, 455, -428, 454, -428, 456, -426, 481, -402, 456, -428, 456, -426, 456, -426, 456, -428,
[23:24:10][D][remote.raw:028]: 456, -426, 456, -426, 456, -1294, 455, -1295, 481, -402, 479, -402, 457, -427, 479, -403, 482, -1268, 455, -427, 455, -1295, 480, -1273, 453, -428, 455, -426, 485, -398, 460, -422, 457, -426, 480, -403, 455, -427, 457, -426, 481, -401, 482, -402, 481,
[23:24:10][D][remote.raw:028]: -401, 481, -402, 481, -401, 483, -400, 456, -1294, 480, -1269, 480, -1270, 480, -401, 458, -425, 480, -403, 481, -401, 481, -401, 458, -425, 481, -403, 481, -400, 457, -426, 455, -427, 481, -403, 483, -399, 482, -401, 481, -403, 479, -404, 481, -399,
[23:24:10][D][remote.raw:028]: 457, -427, 481, -402, 482, -400, 482, -400, 481, -401, 483, -401, 482, -400, 457, -425, 483, -401, 481, -401, 482, -401, 457, -425, 457, -426, 482, -401, 482, -401, 482, -400, 482, -400, 481, -402, 481, -401, 482, -401, 482, -401, 481, -401, 482, -400,
[23:24:10][D][remote.raw:028]: 481, -402, 481, -402, 482, -401, 481, -401, 480, -403, 480, -402, 481, -402, 482, -400, 482, -402, 456, -427, 480, -401, 483, -1267, 480, -403, 480, -403, 455, -427, 484, -398, 456, -1293, 455, -1295, 455, -427, 481, -404, 478, -403, 480, -402, 480,
[23:24:10][D][remote.raw:041]: -403, 480, -404, 480, -401, 482, -401, 454, -429, 454, -428, 480, -402, 481, -402, 455, -428, 484, -399, 479, -403, 458, -425, 480, -402, 480, -403, 481, -401, 481, -1269, 480, -403, 481, -1268, 481, -402, 479, -1270, 480
please help

This is my YAML file

esphome:
name: iremote
platform: ESP8266
board: d1_mini

wifi:
ssid: “xxxxx”
password: “xxxx”

Enable fallback hotspot (captive portal) in case wifi connection fails

ap:
ssid: “Iremote Fallback Hotspot”
password: “Tobq5gVAEUpx”

captive_portal:

Enable logging

logger:

Enable Home Assistant API

api:
password: “password”

ota:
password: “password”

remote_receiver:
pin:
number: D3
mode: INPUT_PULLUP
inverted: true
dump: raw

remote_transmitter:
pin: D2
carrier_duty_percent: 50%

Individual switches

switch:

  • platform: template
    name: “Daikin Off”
    turn_on_action:
    • remote_transmitter.transmit_raw:
      code: [3570, -1711, 456, -1294, 456, -427, 457, -426, 455, -428, 454, -1295, 458, -426, 456, -427, 456, -427, 454, -429, 455, -1294, 456, -427, 456, -1294, 455, -1295, 456, -427, 456, -1294, 454, -1294, 456, -1295, 457, -1294, 455, -1294, 455, -427, 456, -427, 456, -1295, 454, -427, 456, -427, 456, -427, 456, -426, 455, -428, 455, -428, 455, -428, 455, -427, 456, -427, 455, -427, 455, -428, 455, -428, 455, -428, 454, -428, 456, -426, 481, -402, 456, -428, 456, -426, 456, -426, 456, -428, 456, -426, 456, -426, 456, -1294, 455, -1295, 481, -402, 479, -402, 457, -427, 479, -403, 482, -1268, 455, -427, 455, -1295, 480, -1273, 453, -428, 455, -426, 485, -398, 460, -422, 457, -426, 480, -403, 455, -427, 457, -426, 481, -401, 482, -402, 481, -401, 481, -402, 481, -401, 483, -400, 456, -1294, 480, -1269, 480, -1270, 480, -401, 458, -425, 480, -403, 481, -401, 481, -401, 458, -425, 481, -403, 481, -400, 457, -426, 455, -427, 481, -403, 483, -399, 482, -401, 481, -403, 479, -404, 481, -399, 457, -427, 481, -402, 482, -400, 482, -400, 481, -401, 483, -401, 482, -400, 457, -425, 483, -401, 481, -401, 482, -401, 457, -425, 457, -426, 482, -401, 482, -401, 482, -400, 482, -400, 481, -402, 481, -401, 482, -401, 482, -401, 481, -401, 482, -400, 481, -402, 481, -402, 482, -401, 481, -401, 480, -403, 480, -402, 481, -402, 482, -400, 482, -402, 456, -427, 480, -401, 483, -1267, 480, -403, 480, -403, 455, -427, 484, -398, 456, -1293, 455, -1295, 455, -427, 481, -404, 478, -403, 480, -402, 480, -403, 480, -404, 480, -401, 482, -401, 454, -429, 454, -428, 480, -402, 481, -402, 455, -428, 484, -399, 479, -403, 458, -425, 480, -402, 480, -403, 481, -401, 481, -1269, 480, -403, 481, -1268, 481, -402, 479, -1270, 480]

mqtt:

I have the same problem with codes

what’s the range of the ir remote? the original remote can control for several meters, but mine is only about 1.5m

This works at about 7 m (both send and receive).

IR Controller Shield V1.0.0 for LOLIN D1 mini Infrared sensors 4x 940nm emitter 1x 38kHz receiver|Integrated Circuits| - AliExpress

Haven’t found regular IR blasters to work for more than 2 m.

I’m enjoying thread, it’s been very useful.

I’m having trouble with RAW codes, more so my understand of them.

Is it normal to receive different RAW codes each time the same button is pressed?

If so, how should I enter them into my ESP32 yaml file?

Below is the first example when pressing a button:

[14:47:51][D][remote.raw:041]: Received Raw: 2783, -1676, 572, -1690, 1155, -1540, 580, -466, 578, -1538, 582, -464, 580, -1536, 584, -462, 582, -1534, 586, -1505, 583
[14:47:51][D][remote.raw:041]: Received Raw: 788, -464, 580, -1536, 584
[14:47:51][D][remote.raw:041]: Received Raw: 790, -1534, 586, -1505, 583

Here is what I received by pressing the same button again:

[14:50:15][D][remote.raw:041]: Received Raw: 2779, -1679, 569, -1693, 1160, -462, 582, -1534, 586, -460, 584, -487, 589, -456, 577, -494, 582, -1509, 579, -492, 584

Any clues?

Hi @NeilsOnWheels, don’t worry that you’re getting what look like different codes. Basically your system is detecting pulses of IR light, on and off states. Some pulses are longer, some are shorter. For a given key, the same sequence is always being transmitted (eg long long short long short or whatever).

So you might capture the same button six times and get six different readings, but you will notice a general pattern of values within a range. What you are seeing is therefore normal, don’t stress about it.

If you want to see what a completed YAML looks like, I posted mine near the top of this thread, check it here. Basically you will need to copy and paste your captured codes into notepad or something and clean them up. Then you can use them in your YAML.

Unrelated, your username made me giggle.

1 Like

Thank you, that did the trick.

Hi, I’m trying to setup the esphome IR to work with my Hitachi AC. Before this, I have tried to setup the esphome IR to control my fan and everything is working. So I believe the hardware and my esphome configuration are OK.

When I tried to learn the Hitachi remote code, it has additional line as below,

[11:53:47](Message skipped because it was too big to fit in TCP buffer - This is only cosmetic)

Anyone knows what is this line means? Are the RAW code too long and get truncated?

Here are the complete RAW code,

[11:53:47][D][remote.raw:028]: Received Raw: 3366, -1646, 482, -1197, 482, -361, 478, -364, 479, -358, 477, -363, 479, -360, 480, -360, 479, -361, 479, -363, 478, -359, 479, -361, 479, -361, 477, -1199, 483, -360, 483, -356, 479, -361, 480, -360, 477, -363, 479, -360, 482, -358, 480, 
[11:53:47][D][remote.raw:028]:   -360, 479, -360, 479, -365, 478, -358, 479, -361, 479, -361, 479, -360, 480, -359, 479, -361, 480, -361, 480, -1197, 482, -358, 482, -1197, 482, -1197, 482, -1197, 484, -1197, 481, -1196, 485, -1195, 484, -358, 480, -1198, 482, -1198, 482, -1195, 482, 
[11:53:47][D][remote.raw:028]:   -1198, 484, -1195, 482, -1198, 481, -1199, 480, -1198, 483, -1197, 483, -360, 480, -362, 477, -360, 454, -385, 478, -362, 477, -362, 453, -387, 478, -362, 476, -363, 480, -360, 453, -1224, 480, -1200, 479, -363, 452, -387, 478, -1199, 480, -1201, 485, 
[11:53:47][D][remote.raw:028]:   -1195, 479, -1199, 480, -362, 477, -363, 478, -1198, 482, -1200, 479, -361, 476, -364, 452, -387, 452, -1226, 479, -362, 478, -362, 452, -1226, 478, -363, 452, -387, 478, -1200, 480, -1200, 455, -386, 466, -1212, 481, -1198, 454, -387, 462, -1216, 453, 
[11:53:47][D][remote.raw:028]:   -1226, 479, -362, 453, -1226, 458, -1220, 455, -387, 453, -387, 452, -1225, 454, -388, 478, -362, 451, -389, 451, -388, 452, -391, 449, -1225, 480, -1199, 453, -390, 452, -1225, 478, -1201, 479, -1201, 453, -389, 452, -387, 450, -1227, 455, -386, 453, 
[11:53:47][D][remote.raw:028]:   -1228, 451, -388, 454, -1222, 455, -388, 452, -1225, 455, -1224, 454, -389, 452, -1225, 452, -390, 454, -1222, 454, -388, 452, -1226, 453, -388, 452, -389, 450, -389, 451, -389, 450, -390, 450, -389, 450, -390, 449, -394, 446, -1227, 453, -1227, 453, 
[11:53:47][D][remote.raw:028]:   -1226, 453, -1227, 454, -1227, 451, -1227, 453, -1226, 452, -1228, 452, -391, 449, -389, 453, -387, 448, -392, 452, -386, 451, -390, 449, -390, 451, -389, 450, -1228, 452, -1228, 450, -1229, 454, -1226, 451, -1227, 452, -1227, 453, -1227, 453, -1226, 
[11:53:47][D][remote.raw:028]:   452, -390, 453, -387, 449, -390, 450, -390, 450, -390, 450, -389, 450, -390, 450, -390, 452, -1226, 452, -1226, 452, -1227, 453, -1229, 452, -1225, 453, -1228, 451, -1227, 454, -1226, 453, -389, 450, -389, 450, -392, 448, -390, 449, -390, 450, -390, 
[11:53:47][D][remote.raw:028]:   450, -390, 450, -389, 450, -1228, 452, -1226, 454, -1227, 453, -1227, 452, -1225, 453, -1227, 453, -1227, 452, -1227, 453, -389, 450, -389, 450, -391, 450, -389, 451, -389, 450, -390, 450, -389, 450, -390, 450, -1227, 454, -1227, 452, -1227, 452, 
[11:53:47](Message skipped because it was too big to fit in TCP buffer - This is only cosmetic)
[11:53:47][D][remote.raw:028]:   449, -391, 448, -394, 446, -391, 449, -1229, 450, -391, 450, -1227, 451, -1229, 452, -389, 448, -1229, 454, -1227, 449, -1230, 451, -390, 450, -1227, 451, -391, 450, -390, 448, -395, 445, -391, 449, -392, 451, -388, 448, -392, 448, -391, 448, -392, 
[11:53:47][D][remote.raw:028]:   448, -392, 448, -1229, 450, -1230, 451, -1228, 451, -1229, 452, -1227, 452, -1227, 452, -1232, 447, -1229, 450, -390, 450, -390, 450, -391, 448, -394, 445, -392, 448, -391, 451, -389, 448, -391, 450, -1228, 451, -1228, 451, -1228, 452, -1228, 451, 
[11:53:47][D][remote.raw:041]:   -1229, 451, -1228, 451, -1228, 451, -1228, 452

I tried to concatenate all the RAW code above and it doesn’t work because it has two positive number. One before the (Message skipped... and one after the (Message skipped....

Can someone please help me out on this? Also, I tried the Hitachi climate component in esphome library and it doesn’t work as well.

Thanks in advance.

Greetings… I noticed the person above me didn’t get a response, so my hopes are not high :slight_smile:

I have setup the IR transmitter and all is working using the code below which I obtained from this post

code: [414,-494,368,-496,368,-496,370,-494,368,-498,368,-25192,3540,-1678,450,-1282,424,-442,396,-468,424,-440,420,-1284,398,-466,424,-442,422,-442,422,-442,422,-1284,422,-442,424,-1282,424,-1282,422,-444,398,-1308,424,-1282,422,-1284,398,-1308,420,-1284,424,-442,422,-442,422,-1284,424,-440,424,-440,398,-466,424,-442,422,-442,424,-440,400,-464,424,-442,422,-442,424,-442,424,-1282,422,-446,420,-1284,424,-440,424,-442,422,-442,422,-1282,398,-1308,424,-442,424,-440,422,-444,424,-442,422,-442,422,-444,422,-440,400,-464,424,-442,398,-466,424,-442,422,-442,424,-442,420,-444,424,-442,422,-440,424,-1284,424,-1280,424,-1284,424,-440,422,-1284,424,-442,422,-1282,422,-1282,422,-34626,3486,-1758,368,-1340,366,-496,370,-496,368,-496,370,-1336,368,-496,368,-496,370,-496,366,-496,368,-1338,370,-496,366,-1338,366,-1340,368,-496,368,-1338,366,-1338,368,-1336,370,-1338,370,-1336,368,-496,368,-496,370,-1338,368,-496,366,-498,370,-496,368,-496,370,-496,366,-498,368,-496,368,-496,370,-496,368,-496,368,-498,368,-1338,368,-496,368,-498,368,-496,366,-496,370,-1336,368,-496,368,-496,370,-494,368,-496,370,-496,368,-496,368,-496,368,-496,366,-498,370,-496,368,-496,370,-496,366,-496,368,-496,368,-496,370,-496,368,-496,366,-496,370,-496,366,-1338,366,-498,368,-1336,368,-496,368,-1336,370,-496,368,-34680,3534,-1708,370,-1338,416,-448,416,-448,418,-448,366,-1338,418,-446,368,-496,368,-496,368,-496,366,-1340,366,-498,368,-1336,418,-1288,366,-496,418,-1290,416,-1288,416,-1290,368,-1338,418,-1288,418,-448,368,-496,418,-1288,368,-498,416,-452,364,-496,418,-446,366,-498,368,-498,366,-496,370,-496,414,-448,370,-494,368,-496,418,-448,418,-446,368,-496,418,-448,368,-496,368,-496,366,-498,420,-1286,370,-496,366,-498,418,-1286,418,-448,368,-1338,416,-1288,420,-446,416,-450,416,-1246,458,-448,366,-496,418,-1286,370,-1338,418,-446,368,-496,422,-446,366,-496,418,-448,416,-448,370,-496,368,-496,366,-498,418,-446,412,-452,418,-448,366,-498,418,-448,368,-1338,368,-1338,366,-1338,370,-496,416,-448,418,-446,368,-496,416,-448,418,-450,366,-496,420,-448,414,-448,420,-446,418,-446,368,-498,368,-498,366,-496,370,-496,368,-496,370,-496,418,-448,420,-1286,418,-1288,370,-496,366,-498,370,-496,414,-448,418,-448,368,-496,370,-496,368,-496,366,-496,370,-496,366,-1340,414,-1290,370,-496,416,-448,418,-446,368,-496,368,-496,368,-496,368,-496,368,-498,416,-446,418,-448,368,-496,366,-498,416,-448,416,-446,370,-498,366,-502,414,-446,368,-1338,368,-496,368,-498,366,-498,416,-448,416,-448,366,-1340,368,-1336,370,-496,366,-498,418,-448,366,-498,418,-446,418,-446,368,-496,370,-1336,368,-496,418,-446,368,-496,366,-498,368,-498,414,-448,418,-448,366,-500,366,-496,368,-498,366,-1338,368,-498,368,-496,418,-448,368,-1338,366,-1338,366]

This is the raw code I am getting from the IR receiver on the ESPHome unit… but no matter what I try I cannot get the raw code to trigger my AC unit?

[16:10:53][D][remote.raw:041]: Received Raw: -477, 391, -477, 390, -477, 391, -478, 390, -475, 392, -478
[16:10:53][D][remote.raw:028]: Received Raw: -3515, 1689, -480, 1256, -453, 415, -478, 390, -476, 391, -478, 1257, -477, 392, -477, 389, -464, 403, -479, 389, -477, 1258, -479, 389, -478, 1256, -477, 1258, -452, 416, -454, 1281, -476, 1258, -478, 1257, -479, 1257, -478, 1257, -477, 
[16:10:53][D][remote.raw:028]:   391, -476, 391, -452, 1283, -476, 392, -457, 410, -476, 392, -477, 390, -476, 392, -476, 391, -477, 390, -451, 417, -478, 389, -477, 392, -476, 1257, -452, 417, -477, 1257, -478, 390, -453, 415, -451, 416, -454, 1280, -478, 1258, -477, 390, -477, 392, 
[16:10:53][D][remote.raw:041]:   -475, 391, -477, 391, -478, 1257, -476, 391, -469, 399, -478, 390, -477, 390, -478, 390, -476, 391, -477, 391, -476, 390, -453, 415, -458, 409, -476, 392, -476, 1259, -452, 1283, -477, 1258, -475, 393, -477, 390, -477, 1258, -451, 1284, -477, 1258, -477
[16:10:54][D][remote.raw:028]: Received Raw: -3513, 1691, -477, 1259, -452, 415, -452, 416, -450, 418, -449, 1285, -477, 391, -475, 393, -476, 392, -457, 410, -450, 1284, -475, 393, -450, 1285, -476, 1259, -450, 417, -475, 1260, -475, 1260, -464, 1271, -450, 1285, -475, 1260, -476, 
[16:10:54][D][remote.raw:028]:   393, -449, 418, -450, 1284, -449, 419, -475, 392, -475, 393, -475, 393, -474, 393, -476, 392, -475, 392, -476, 392, -449, 418, -484, 383, -451, 417, -451, 1284, -450, 417, -466, 402, -476, 391, -476, 392, -453, 1281, -475, 393, -451, 1284, -476, 391, 
[16:10:54][D][remote.raw:028]:   -453, 1282, -476, 1260, -475, 393, -474, 393, -475, 1258, -453, 1284, -450, 1285, -474, 1260, -450, 419, -473, 1260, -451, 418, -450, 1284, -449, 420, -449, 418, -451, 416, -476, 392, -474, 1261, -476, 1258, -475, 393, -474, 393, -468, 1267, -476, 393, 
[16:10:54][D][remote.raw:041]:   -449, 
[16:10:54][D][remote.raw:028]: Received Raw: -3513, 1691, -478, 1258, -475, 393, -450, 418, -475, 392, -476, 1259, -474, 394, -450, 417, -450, 417, -477, 391, -450, 1284, -476, 392, -476, 1259, -474, 1261, -476, 393, -475, 1258, -477, 1258, -474, 1261, -476, 1259, -476, 1259, -476, 
[16:10:54][D][remote.raw:028]:   392, -450, 418, -476, 1258, -476, 392, -471, 397, -475, 392, -452, 416, -475, 393, -475, 392, -450, 417, -476, 391, -461, 407, -476, 392, -454, 413, -451, 417, -476, 391, -475, 393, -476, 393, -450, 416, -450, 418, -474, 392, -450, 1285, -477, 395, 
[16:10:54][D][remote.raw:028]:   -446, 417, -452, 1283, -476, 1258, -451, 1285, -476, 391, -475, 394, -451, 416, -476, 391, -451, 417, -477, 390, -459, 1276, -475, 1260, -451, 417, -476, 391, -452, 416, -476, 391, -450, 417, -451, 418, -474, 393, -476, 391, -450, 418, -476, 391, -468, 
[16:10:54][D][remote.raw:028]:   399, -477, 391, -476, 392, -451, 416, -476, 392, -477, 1257, -475, 393, -452, 1283, -477, 390, -475, 393, -476, 392, -475, 393, -474, 393, -475, 393, -474, 393, -450, 417, -475, 392, -476, 392, -475, 393, -475, 392, -476, 391, -450, 418, -477, 390, 
[16:10:54][D][remote.raw:028]:   -478, 390, -476, 391, -477, 1258, -475, 1260, -476, 392, -476, 391, -475, 393, -475, 392, -476, 392, -455, 412, -477, 391, -474, 393, -450, 418, -476, 391, -476, 1259, -475, 1260, -475, 393, -475, 392, -476, 392, -475, 392, -476, 392, -451, 416, -476, 
[16:10:54][D][remote.raw:028]:   391, -475, 393, -476, 391, -476, 392, -450, 418, -450, 417, -476, 392, -476, 391, -476, 392, -450, 417, -475, 393, -474, 1260, -475, 393, -474, 1260, -475, 393, -449, 419, -450, 417, -475, 1260, -477, 1258, -476, 392, -450, 417, -475, 393, -451, 416, 
[16:10:54][D][remote.raw:041]:   -451, 417, -449, 419, -449, 418, -475, 392, -475, 393, -449, 418, -475, 393, -450, 1285, -474, 392, -453, 416, -475, 392, -450, 418, -476, 391, -450, 1284, -475, 1260, -476, 1259, -476, 393, -450, 417, -474, 1260, -451, 418, -449

I have tried a number of approaches, including just lining up all the numbers in sequence, removing the spaces, and it doesn’t work? I then tried editing the numbers to try and get a pattern going, and that didn’t work?

What am I missing?

Hi @gregoinc, I haven’t tried controlling an AC unit, so I can’t really comment, but I seem to remember they might be a special case.

The only other thing that occurs to me is range: how far away is your transmitter from the AC unit? Because these little homebrew IR transmitters generally suck after more than 1m.

Hi There,

No issues transmitting or distance. When I send the code below it works fine…

code: [414,-494,368,-496,368,-496,370,-494,368,-498,368,-25192,3540,-1678,450,-1282,424,-442,396,-468,424,-440,420,-1284,398,-466,424,-442,422,-442,422,-442,422,-1284,422,-442,424,-1282,424,-1282,422,-444,398,-1308,424,-1282,422,-1284,398,-1308,420,-1284,424,-442,422,-442,422,-1284,424,-440,424,-440,398,-466,424,-442,422,-442,424,-440,400,-464,424,-442,422,-442,424,-442,424,-1282,422,-446,420,-1284,424,-440,424,-442,422,-442,422,-1282,398,-1308,424,-442,424,-440,422,-444,424,-442,422,-442,422,-444,422,-440,400,-464,424,-442,398,-466,424,-442,422,-442,424,-442,420,-444,424,-442,422,-440,424,-1284,424,-1280,424,-1284,424,-440,422,-1284,424,-442,422,-1282,422,-1282,422,-34626,3486,-1758,368,-1340,366,-496,370,-496,368,-496,370,-1336,368,-496,368,-496,370,-496,366,-496,368,-1338,370,-496,366,-1338,366,-1340,368,-496,368,-1338,366,-1338,368,-1336,370,-1338,370,-1336,368,-496,368,-496,370,-1338,368,-496,366,-498,370,-496,368,-496,370,-496,366,-498,368,-496,368,-496,370,-496,368,-496,368,-498,368,-1338,368,-496,368,-498,368,-496,366,-496,370,-1336,368,-496,368,-496,370,-494,368,-496,370,-496,368,-496,368,-496,368,-496,366,-498,370,-496,368,-496,370,-496,366,-496,368,-496,368,-496,370,-496,368,-496,366,-496,370,-496,366,-1338,366,-498,368,-1336,368,-496,368,-1336,370,-496,368,-34680,3534,-1708,370,-1338,416,-448,416,-448,418,-448,366,-1338,418,-446,368,-496,368,-496,368,-496,366,-1340,366,-498,368,-1336,418,-1288,366,-496,418,-1290,416,-1288,416,-1290,368,-1338,418,-1288,418,-448,368,-496,418,-1288,368,-498,416,-452,364,-496,418,-446,366,-498,368,-498,366,-496,370,-496,414,-448,370,-494,368,-496,418,-448,418,-446,368,-496,418,-448,368,-496,368,-496,366,-498,420,-1286,370,-496,366,-498,418,-1286,418,-448,368,-1338,416,-1288,420,-446,416,-450,416,-1246,458,-448,366,-496,418,-1286,370,-1338,418,-446,368,-496,422,-446,366,-496,418,-448,416,-448,370,-496,368,-496,366,-498,418,-446,412,-452,418,-448,366,-498,418,-448,368,-1338,368,-1338,366,-1338,370,-496,416,-448,418,-446,368,-496,416,-448,418,-450,366,-496,420,-448,414,-448,420,-446,418,-446,368,-498,368,-498,366,-496,370,-496,368,-496,370,-496,418,-448,420,-1286,418,-1288,370,-496,366,-498,370,-496,414,-448,418,-448,368,-496,370,-496,368,-496,366,-496,370,-496,366,-1340,414,-1290,370,-496,416,-448,418,-446,368,-496,368,-496,368,-496,368,-496,368,-498,416,-446,418,-448,368,-496,366,-498,416,-448,416,-446,370,-498,366,-502,414,-446,368,-1338,368,-496,368,-498,366,-498,416,-448,416,-448,366,-1340,368,-1336,370,-496,366,-498,418,-448,366,-498,418,-446,418,-446,368,-496,370,-1336,368,-496,418,-446,368,-496,366,-498,368,-498,414,-448,418,-448,366,-500,366,-496,368,-498,366,-1338,368,-498,368,-496,418,-448,368,-1338,366,-1338,366]

I may not have explained myself properly… I am wanting help on converting the code below into the same format as above. The raw code below came from the AC unit remote via the IR receiver on the ESPHome unit.

But no matter how I try editing and joining the data it doesn’t work. I figure since the code above works then all I need to do is take my raw data and format it somehow to trigger my AC unit?

[16:10:53][D][remote.raw:041]: Received Raw: -477, 391, -477, 390, -477, 391, -478, 390, -475, 392, -478
[16:10:53][D][remote.raw:028]: Received Raw: -3515, 1689, -480, 1256, -453, 415, -478, 390, -476, 391, -478, 1257, -477, 392, -477, 389, -464, 403, -479, 389, -477, 1258, -479, 389, -478, 1256, -477, 1258, -452, 416, -454, 1281, -476, 1258, -478, 1257, -479, 1257, -478, 1257, -477, 
[16:10:53][D][remote.raw:028]:   391, -476, 391, -452, 1283, -476, 392, -457, 410, -476, 392, -477, 390, -476, 392, -476, 391, -477, 390, -451, 417, -478, 389, -477, 392, -476, 1257, -452, 417, -477, 1257, -478, 390, -453, 415, -451, 416, -454, 1280, -478, 1258, -477, 390, -477, 392, 
[16:10:53][D][remote.raw:041]:   -475, 391, -477, 391, -478, 1257, -476, 391, -469, 399, -478, 390, -477, 390, -478, 390, -476, 391, -477, 391, -476, 390, -453, 415, -458, 409, -476, 392, -476, 1259, -452, 1283, -477, 1258, -475, 393, -477, 390, -477, 1258, -451, 1284, -477, 1258, -477
[16:10:54][D][remote.raw:028]: Received Raw: -3513, 1691, -477, 1259, -452, 415, -452, 416, -450, 418, -449, 1285, -477, 391, -475, 393, -476, 392, -457, 410, -450, 1284, -475, 393, -450, 1285, -476, 1259, -450, 417, -475, 1260, -475, 1260, -464, 1271, -450, 1285, -475, 1260, -476, 
[16:10:54][D][remote.raw:028]:   393, -449, 418, -450, 1284, -449, 419, -475, 392, -475, 393, -475, 393, -474, 393, -476, 392, -475, 392, -476, 392, -449, 418, -484, 383, -451, 417, -451, 1284, -450, 417, -466, 402, -476, 391, -476, 392, -453, 1281, -475, 393, -451, 1284, -476, 391, 
[16:10:54][D][remote.raw:028]:   -453, 1282, -476, 1260, -475, 393, -474, 393, -475, 1258, -453, 1284, -450, 1285, -474, 1260, -450, 419, -473, 1260, -451, 418, -450, 1284, -449, 420, -449, 418, -451, 416, -476, 392, -474, 1261, -476, 1258, -475, 393, -474, 393, -468, 1267, -476, 393, 
[16:10:54][D][remote.raw:041]:   -449, 
[16:10:54][D][remote.raw:028]: Received Raw: -3513, 1691, -478, 1258, -475, 393, -450, 418, -475, 392, -476, 1259, -474, 394, -450, 417, -450, 417, -477, 391, -450, 1284, -476, 392, -476, 1259, -474, 1261, -476, 393, -475, 1258, -477, 1258, -474, 1261, -476, 1259, -476, 1259, -476, 
[16:10:54][D][remote.raw:028]:   392, -450, 418, -476, 1258, -476, 392, -471, 397, -475, 392, -452, 416, -475, 393, -475, 392, -450, 417, -476, 391, -461, 407, -476, 392, -454, 413, -451, 417, -476, 391, -475, 393, -476, 393, -450, 416, -450, 418, -474, 392, -450, 1285, -477, 395, 
[16:10:54][D][remote.raw:028]:   -446, 417, -452, 1283, -476, 1258, -451, 1285, -476, 391, -475, 394, -451, 416, -476, 391, -451, 417, -477, 390, -459, 1276, -475, 1260, -451, 417, -476, 391, -452, 416, -476, 391, -450, 417, -451, 418, -474, 393, -476, 391, -450, 418, -476, 391, -468, 
[16:10:54][D][remote.raw:028]:   399, -477, 391, -476, 392, -451, 416, -476, 392, -477, 1257, -475, 393, -452, 1283, -477, 390, -475, 393, -476, 392, -475, 393, -474, 393, -475, 393, -474, 393, -450, 417, -475, 392, -476, 392, -475, 393, -475, 392, -476, 391, -450, 418, -477, 390, 
[16:10:54][D][remote.raw:028]:   -478, 390, -476, 391, -477, 1258, -475, 1260, -476, 392, -476, 391, -475, 393, -475, 392, -476, 392, -455, 412, -477, 391, -474, 393, -450, 418, -476, 391, -476, 1259, -475, 1260, -475, 393, -475, 392, -476, 392, -475, 392, -476, 392, -451, 416, -476, 
[16:10:54][D][remote.raw:028]:   391, -475, 393, -476, 391, -476, 392, -450, 418, -450, 417, -476, 392, -476, 391, -476, 392, -450, 417, -475, 393, -474, 1260, -475, 393, -474, 1260, -475, 393, -449, 419, -450, 417, -475, 1260, -477, 1258, -476, 392, -450, 417, -475, 393, -451, 416, 
[16:10:54][D][remote.raw:041]:   -451, 417, -449, 419, -449, 418, -475, 392, -475, 393, -449, 418, -475, 393, -450, 1285, -474, 392, -453, 416, -475, 392, -450, 418, -476, 391, -450, 1284, -475, 1260, -476, 1259, -476, 393, -450, 417, -474, 1260, -451, 418, -449

Thanks, Mark

I don’t know what to tell you. What I did was copy the raw code into a text editor and clean it up by hand until it looks like your first formatted code.

Could you look into the buffer size, especially if you’re using an ESP8266? The payload cannot start with a negative integer and I think it incorrectly splits the message (AC IR codes are much longer than TV codes as they include more info - temperature, fan speed, swing are all sent in the same message even if some of them are off - and there might be also some repeats so the payload could be longer than expected).

What brand is your AC unit? I think I still have AnalysIR and I could try later next week to look for the raw payload (I used it some time ago to get the raw payload for TCL112 before full support was added to IR Remote).

Hi Petrica,

Thank you for your advice. The info is the most helpful so far, I reallyappreciate the help. I can look at the buffer size, is there a size limit I should stay under?

The air conditioning system is a Daikin.

Thanks, Mark

I recalled there is Daikin climate ir build in library for esphome. Have you try that?

Quite of few has a success to use this to control Daikin AC. For my case, the Hitachi one didn’t work

Haven’t looked enough in the ESPHome config to pinpoint the location for the variable however my compile for TCL112 used 35KB of RAM so I’d guess that inside 10KB for the buffer would not harm it.

RAM:   [====      ]  43.1% (used 35288 bytes from 81920 bytes)
Flash: [====      ]  45.0% (used 469588 bytes from 1044464 bytes)

Should we understand that setting Daikin AC in the sketch, as Yeoh suggested, does not work?

Hi Yeoh,

I only need to turn the AC on and off, so a climate module will probably be too much. I did consider using climate, and if the raw approach is too much trouble I might look at climate.

Thanks, Mark

Thanks, I will look at how much memory I use and then set a buffer size, and see what happens.

See my explanation to Yeoh on why I am not using climate.

Although I barely used any other targets than 20 C and 22 C for the thermostat (thus I could only have setup a switch with on and off mapped to IR commands), it was much easier (and cleaner) for me to just setup the ESPHome climate. I have also used Tasmota IR custom component climate but wanted to standardize the maintenance and it is easier to use a single dashboard to update all NodeMCU devices.

Having the climate setup also allows you to easily activate some other components such as the dehumidifier or the heater function (if you don’t already have a gas furnace).

This is some RAW code I have tested and working on my ESP.
I also have the climate IR working Fujitsu.

switch:
  - platform: template
    name: "AC on 22"
    turn_on_action:
      - remote_transmitter.transmit_raw:
          carrier_frequency: 38.1kHz
          code: [+3280,-1221,+409,-409,+409,-409,+409,-1221,+409,-409,+409,-1221,+409,-409,+409,-409,+409,-409,+409,-1221,+409,-1221,+409,-409,+409,-409,+409,-409,+409,-1221,+409,-1221,+409,-409,+409,-409,+409,-409,+409,-409,+409,-409,+409,-409,+409,-409,+409,-409,+409,-409,+409,-409,+409,-409,+409,-409,+409,-409,+409,-1221,+409,-409,+409,-409,+409,-409,+409,-409,+409,-409,+409,-409,+409,-409,+409,-1221,+409,-409,+409,-409,+409,-409,+409,-409,+409,-1221,+409,-1221,+409,-1221,+409,-1221,+409,-1221,+409,-1221,+409,-1221,+409,-1221,+409,-409,+409,-409,+409,-1221,+409,-409,+409,-409,+409,-409,+409,-409,+409,-409,+409,-409,+409,-409,+409,-409,+409,-1221,+409,-1221,+409,-409,+409,-409,+409,-1221,+409,-409,+409,-409,+409,-409,+409,-409,+409,-1221,+409,-1221,+409,-409,+409,-1221,+409,-409,+409,-409,+409,-409,+409,-409,+409,-409,+409,-409,+409,-409,+409,-409,+409,-409,+409,-409,+409,-409,+409,-409,+409,-409,+409,-409,+409,-409,+409,-409,+409,-409,+409,-409,+409,-409,+409,-409,+409,-409,+409,-409,+409,-409,+409,-409,+409,-409,+409,-409,+409,-409,+409,-409,+409,-409,+409,-409,+409,-409,+409,-409,+409,-409,+409,-409,+409,-409,+409,-409,+409,-409,+409,-409,+409,-409,+409,-409,+409,-409,+409,-409,+409,-409,+409,-409,+409,-1221,+409,-409,+409,-409,+409,-409,+409,-1221,+409,-1221,+409,-1221,+409,-409,+409,-409,+409,-1221,+409,-409,+409,-128001]

  - platform: template
    name: "AC off"
    turn_on_action:
      - remote_transmitter.transmit_raw:
          carrier_frequency: 38.1kHz
          code: [+3280,-1230,+409,-409,+409,-409,+409,-1230,+409,-409,+409,-1230,+409,-409,+409,-409,+409,-409,+409,-1230,+409,-1230,+409,-409,+409,-409,+409,-409,+409,-1230,+409,-1230,+409,-409,+409,-409,+409,-409,+409,-409,+409,-409,+409,-409,+409,-409,+409,-409,+409,-409,+409,-409,+409,-409,+409,-409,+409,-409,+409,-1230,+409,-409,+409,-409,+409,-409,+409,-409,+409,-409,+409,-409,+409,-409,+409,-1230,+409,-409,+409,-409,+409,-409,+409,-409,+409,-1230,+409,-409,+409,-409,+409,-409,+409,-409,+409,-409,+409,-409,+409,-1230,+409,-409,+409,-1230,+409,-1230,+409,-1230,+409,-1230,+409,-1230,+409,-1230,+409,-128001]