ESP32 IR Remote - Pronto - Inconsistent data, not sending

Howdy :slight_smile: First time poster here. Hope you’re all well and that this is the right section.

TL;DR: ESP32dev kit-based IR receiver and transmitter, works fine with the TV but not with the AC (both seemingly using the Pronto protocol). I am getting an “Inconsistent data, not sending” error that leads to no data being given to the transmitter function. Could be the data that’s wrong, mis-captured by a non-inverted IR receiver.

Full:
I put together an IR receiver and transmitter with an ESP32dev kit in the hopes of, well, controlling IR devices such as the AC and the TV.
AC: Mitsubishi Electric MS-GJ12VA
TV: Samsung 6 Series

I couldn’t use the mitsubishi “climate”/thermostat component as it didn’t seem to interface with the Mitsubishi Electric AC. I went down the route of capturing codes from the remote with my receiver to blast them out with my transmitter: from logs to yaml.

Receiver Configuration:

remote_receiver:
  pin: GPIO32
  #inverted: true
  dump: all

Logs: Capture of Power on button - AC remote:

[19:39:08][D][remote.pronto:238]: Received Pronto: data=0000 006D 0092 0000 0085 0040 0012 0030 0012 0030 0012 000F 0012 0010 0011 000F 0012 0030 0012 000F 0012 0010 0011 0030 0012 0030 0012 000F 0012 0031 0011 000F 0012 000F 0012 0030 0012 0030 0012 000F 0012 0030 0012 0030 0012 000F

[19:39:08][D][remote.pronto:240]: 0012 000F 0012 0030 0012 000F 0012 000F 0012 0030 0012 000F 0012 000F 0012 000F 0012 000F 0012 000F 0012 000F 0012 000F 0012 000F 0012 000F 0012 000F 0012 0010 0011 000F 0012 000F 0012 000F 0012 000F 0012 000F 0012 000F 0012 000F 0012 000F 0012 000F 0012 0031 0011 000F 0012 000F 0012 000F 0012 000F 0012 000F 0012 0030 0012 0030 0012 0030 0012 000F 0012 000F 0012 000F 0012 000F 0012 000F 0012 0030 0012 000F 0012 000F 0012 000F 0012 000F 0012 000F 0012 0010 0011 000F 0012 000F 

I found out both remotes (AC&TV) are being picked up by the system as using Pronto protocol.
So, all good I thought, simply need to pop those codes in my yaml config as found in HA documentation. I took both lines of data and pasted them in the yaml thereafter:

Transmitter Configuration - with AC power on codes as captured:

remote_transmitter:
  pin: GPIO13
  carrier_duty_percent: 50%
#Adding a switch button to Lovelace to trigger:
switch:
  - platform: template
    name: Raw Code Power Button
    turn_on_action:
      - remote_transmitter.transmit_pronto:
          data: "0000 006D 008F 0000 000E 000F 0012 0010 0011 000F 0012 0030 0012 0010 0011 000F 0012 0030 0012 0030 0012 000F 0012 0031 0011 000F 0012 000F 0012 0031 0011 0030 0012 000F 0012 0030 0012 0030 0012 000F 0012 000F 0012 0030 0012 000F 0012 000F 0012 0031 0011 000F 0012 0010 0011 0010 0011 000F 0012 0010 0011 0010 0011 000F 0012 000F 0012 000F 0012 000F 0012 000F 0012 000F 0012 000F 0012 000F 0012 000F 0012 000F 0012 000F 0012 0010 0011 000F 0012 000F 0012 0031 0011 000F 0012 000F 0012 000F 0012 000F 0012 000F 0012 0030 0012 0030 0012 000F 0012 000F 0012 000F 0012 0031 0011 0030 0012 0030 0012 0030 0012 000F 0012 000F 0012 000F 0012 0010 0011 000F 0012 0031 0011 0030 0012 000F 0012 0030 0012 0031 0011 000F"

Unfortunately, this happened.
Logs: misfire of transmit_pronto with the AC codes:

[19:20:33][E][remote.pronto:109]: Inconsistent data, not sending
[19:20:33][E][remote_transmitter:117]: Empty data

So I tried the same with the TV remote, not expecting much out of it. I just thought, at that stage, that I just butchered the data for powering on the AC. Here is the capture of action “volume down” on the TV remote:

[22:09:03][D][remote.pronto:238]: Received Pronto: data=0000 006D 0022 0000 00AC 00AD 0016 0041 0016 0041 0016 0041 0016 0017 0015 0016 0016 0016 0016 0016 0016 0016 0016 0041 0016 0041 0016 0041 0016 0016 0016 0016 0016 0016 0016 0016 0016 0016 0016 0042 0015 0041 0016 0017 0015 0042
[22:09:03][D][remote.pronto:240]: 0015 0016 0016 0016 0016 0016 0016 0017 0015 0016 0016 0016 0016 0041 0016 0017 0015 0041 0016 0041 0016 0041 0016 0041 0016 06C3

Popped it straight into the yaml:
Transmitter Configuration - with TV Volume Down codes as captured:

remote_transmitter:
  pin: GPIO13
  carrier_duty_percent: 50%
#Adding a switch button to Lovelace to trigger:
switch:
  - platform: template
    name: Raw Code Power Button
    turn_on_action:
      - remote_transmitter.transmit_pronto:
          data: "0000 006D 0022 0000 00AC 00AD 0016 0041 0016 0041 0016 0041 0016 0017 0015 0016 0016 0016 0016 0016 0016 0016 0016 0041 0016 0041 0016 0041 0016 0016 0016 0016 0016 0016 0016 0016 0016 0016 0016 0042 0015 0041 0016 0017 0015 0042 0015 0016 0016 0016 0016 0016 0016 0017 0015 0016 0016 0016 0016 0041 0016 0017 0015 0041 0016 0041 0016 0041 0016 0041 0016 06C3"

AND IT WORKS! … with the TV at least. I tried several other AC codes from the remote as well as from the internet, to no avail.

But… the plot thickens.
Here are what got captured in the logs by the receiver from the transmitter (both connected to the ESP):

Logs: successful firing of transmit_pronto with capture of firing as it happens:

INFO Reading configuration /config/esphome/esp32devkit.yaml...
INFO Starting log output from esp32devkit.local using esphome API
INFO Successfully connected to esp32devkit.local
[19:15:24][I][app:102]: ESPHome version 2022.11.5 compiled on Dec 18 2022, 15:04:30
[19:15:24][C][wifi:504]: WiFi:
[19:15:24][C][wifi:362]:   Local MAC: 
[19:15:24][C][wifi:363]:   SSID: [redacted]
[19:15:24][C][wifi:364]:   IP Address: 192.168.1.121
[19:15:24][C][wifi:366]:   BSSID: [redacted]
[19:15:24][C][wifi:367]:   Hostname: 'esp32devkit'
[19:15:24][C][wifi:369]:   Signal strength: -32 dB ▂▄▆█
[19:15:24][V][wifi:371]:   Priority: 0.0
[19:15:24][C][wifi:373]:   Channel: 6
[19:15:24][C][wifi:374]:   Subnet: 255.255.255.0
[19:15:24][C][wifi:375]:   Gateway: 192.168.1.1
[19:15:24][C][wifi:376]:   DNS1: 192.168.1.1
[19:15:24][C][wifi:377]:   DNS2: 0.0.0.0
[19:15:24][C][logger:293]: Logger:
[19:15:24][C][logger:294]:   Level: VERBOSE
[19:15:24][C][logger:295]:   Log Baud Rate: 115200
[19:15:24][C][logger:296]:   Hardware UART: UART0
[19:15:24][C][template.switch:058]: Template Switch 'Raw Code Power Button'
[19:15:24][C][template.switch:059]:   Restore State: NO
[19:15:24][C][template.switch:060]:   Optimistic: NO
[19:15:24][C][remote_transmitter:015]: Remote Transmitter...
[19:15:24][C][remote_transmitter:016]:   Channel: 0
[19:15:24][C][remote_transmitter:017]:   RMT memory blocks: 1
[19:15:24][C][remote_transmitter:018]:   Clock divider: 80
[19:15:24][C][remote_transmitter:019]:   Pin: GPIO13
[19:15:24][C][remote_transmitter:022]:     Carrier Duty: 50%
[19:15:24][C][remote_receiver.esp32:054]: Remote Receiver:
[19:15:24][C][remote_receiver.esp32:055]:   Pin: GPIO32
[19:15:24][W][remote_receiver.esp32:058]: Remote Receiver Signal starts with a HIGH value. Usually this means you have to invert the signal using 'inverted: True' in the pin schema!
[19:15:24][C][remote_receiver.esp32:060]:   Channel: 1
[19:15:24][C][remote_receiver.esp32:061]:   RMT memory blocks: 3
[19:15:24][C][remote_receiver.esp32:062]:   Clock divider: 80
[19:15:24][C][remote_receiver.esp32:063]:   Tolerance: 25%
[19:15:24][C][remote_receiver.esp32:064]:   Filter out pulses shorter than: 50 us
[19:15:24][C][remote_receiver.esp32:065]:   Signal is done after 10000 us of no changes
[19:15:24][C][captive_portal:088]: Captive Portal:
[19:15:24][C][mdns:103]: mDNS:
[19:15:24][C][mdns:104]:   Hostname: esp32devkit
[19:15:24][V][mdns:105]:   Services:
[19:15:24][V][mdns:107]:   - _esphomelib, _tcp, 6053
[19:15:24][V][mdns:109]:     TXT: version = 2022.11.5
[19:15:24][V][mdns:109]:     TXT: mac = c8f09e794e9c
[19:15:24][V][mdns:109]:     TXT: platform = ESP32
[19:15:24][V][mdns:109]:     TXT: board = esp32dev
[19:15:24][V][mdns:109]:     TXT: network = wifi
[19:15:24][C][ota:093]: Over-The-Air Updates:
[19:15:24][C][ota:094]:   Address: esp32devkit.local:3232
[19:15:24][C][ota:097]:   Using Password.
[19:15:24][C][api:138]: API Server:
[19:15:24][C][api:139]:   Address: esp32devkit.local:6053
[19:15:24][C][api:141]:   Using noise encryption: YES
[19:17:32][D][switch:013]: 'Raw Code Power Button' Turning ON.
[19:17:32][D][remote.pronto:101]: Send Pronto: frequency=38kHz
[19:17:32][D][remote.pronto:106]: Send Pronto: intros=68
[19:17:32][D][remote.pronto:107]: Send Pronto: repeats=0
[19:17:32][V][component:200]: Component api took a long time for an operation (0.12 s).
[19:17:32][V][component:201]: Components should block for at most 20-30ms.
[19:17:32][D][remote.pronto:238]: Received Pronto: data=0000 006D 0022 0000 00AB 00AD 0014 0043 0015 0043 0014 0042 0015 001B 0013 0016 0016 0017 0014 0018 0014 001A 0014 0044 0013 0042 0012 0045 0015 001C 0010 0018 0015 001B 0010 0019 0014 0018 0013 0045 0014 0042 0015 0018 0015 0043
[19:17:32][D][remote.pronto:240]: 0013 0019 0014 0018 0013 001A 0015 0018 0014 0018 0012 001A 0015 004A 000D 001D 000D 0044 0012 0046 0013 0045 0012 0045 0013 06C3

Focus is on the last two lines, of IR data measured:

[19:17:32][D][remote.pronto:238]: Received Pronto: data=0000 006D 0022 0000 00AB 00AD 0014 0043 0015 0043 0014 0042 0015 001B 0013 0016 0016 0017 0014 0018 0014 001A 0014 0044 0013 0042 0012 0045 0015 001C 0010 0018 0015 001B 0010 0019 0014 0018 0013 0045 0014 0042 0015 0018 0015 0043
[19:17:32][D][remote.pronto:240]: 0013 0019 0014 0018 0013 001A 0015 0018 0014 0018 0012 001A 0015 004A 000D 001D 000D 0044 0012 0046 0013 0045 0012 0045 0013 06C3

These codes the receiver read are different from the ones in the yaml file that the transmitter was requested to send out. Close, but different. Also:

[19:15:24][W][remote_receiver.esp32:058]: Remote Receiver Signal starts with a HIGH value. Usually this means you have to invert the signal using 'inverted: True' in the pin schema!

All this led me to believe the receiver does not capture data “precise enough” to the liking of the AC whereas the TV receiver is somewhat “looser” with input. I tried to add #inverted: true to the receiver config (as commented in the code at the beginning) hoping it would fix my captures but that just won’t compile. After spending close to two days investigating, I need some help.

- Am I misusing transmit_pronto?
- Am I mis-capturing codes from remotes due to a non-inverted IR receiver?
- What else am I missing?

Many many thanks.

3 Likes

Couple of comments:

  1. It’s normal for learned signals to vary. I usually capture say 10 and then pick a consistent one.
  2. Make sure you are using good quality power source, cables and boards (at least during debugging). This can really matter for remotes.
  3. Try raw protocol too if you have no luck with pronto.
  4. AC codes tend to be more complex than TVs. Get everything working smooth with the TV then move on to the AC. AC can have “composite codes” which are harder to learn and send. Probably start with AC power on/off.
2 Likes

@Mahko_Mahko Thanks! I’ll look into those :slight_smile:

Got a breakthrough, so I thought I’ll post here could it somehow help somebody else :blush:
I struggled a lot going raw. Like a lot. Then I read a lot about it, and when that breakthrough happened I felt incredibly lucky compared to people I’d read. I got it pretty easy in comparison. That moment the AC turned on, I was on cloud nine.
I def recommend this extensive thread: https://community.home-assistant.io/t/esphome-raw-infrared-with-ir-led/

Here’s what I did:

  1. Switched my receiver config to raw: dump: raw instead of dump: all which only gave me pronto
  2. Captured my first raw codes. Realized straight away that my receiver was indeed inverted as suggested in my first post, and found the correct way to set it.
  3. For each remote press, kept getting 2 raw codes (“couple codes”) I could not merge together as one ended with the same polarity as the second started. So I started tryna send both, one code after the other.
  4. Started capturing around 10-20 “power on” “couple” codes, each different from the last. I tried to send each “couple” code every 2sec using - delay: 2s (I was about to go and average each in excel as some other people did). My hope there was that one of those codes was captured close enough to what the AC would like to hear. That did not work. Matter of fact, it did not even fire.
  5. Found out about mode: INPUT_PULLUP for the receiver config.
  6. Found out about parameters to transmit_raw (repeat, times, wait_time, carrier_frequency). I added values as found in other people’s yamls to give it a shot.

All in all, my receiver config now looks like this:

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

No change on the transmitter. Now here is the switch, with all parameters and some codes:

switch:
  - platform: template
    name: Raw Code Power Button
    turn_on_action:
      - remote_transmitter.transmit_raw:
         code: [410, -466, 393, -413, 444, -2124, 448, -437, 421, -1269, 446, -1269, 448, -410, 447, -1268, 446, -412, 445, -410, 448, -1272, 443, -1273, 444, -410, 446, -1270, 445, -1268, 447, -412, 446, -441, 418, -1264, 449, -411, 448, -436, 421, -1294, 421, -413, 445, -436, 421, -410, 448, -411, 446, -413, 446, -412, 446, -411, 445, -437, 421, -411, 446, -412, 446, -411, 446, -413, 447, -412, 445, -411, 447, -435, 421, -412, 447, -435, 421, -411, 447, -412, 445, -414, 446, -1266, 447, -411, 447, -410, 447, -411, 447, -437, 421, -409, 448, -1269, 446, -1266, 450, -436, 421, -411, 447, -410, 447, -1294, 422, -1270, 446, -1266, 448, -1269, 446, -411, 446, -437, 421, -410, 448, -411, 446, -438, 421, -1267, 447, -1268, 448, -436, 421, -1271, 445, -1267, 447, -412, 446, -410, 448, -1269, 446, -436, 421, -411, 447, -1267, 448, -410, 447, -437, 421, -1269, 446, -412, 447, -410, 447, -412, 446, -437, 421, -410, 446, -410, 448, -411, 446, -413, 446, -409, 447, -412, 448, -410, 447, -411, 447, -409, 447, -410, 448, -410, 447, -411, 446, -437, 421, -412, 447, -410, 448, -435, 421, -412, 445, -437, 421, -437, 421, -436, 421, -411, 447, -412, 446, -411, 446, -412, 446, -411, 446, -437, 421, -437, 421, -410, 447, -413, 446, -410, 447, -410, 447, -411, 446, -413, 445, -411, 447, -410, 447, -412, 446, -413, 446, -409, 447, -411, 447, -411, 446, -410, 448, -411, 446, -412, 446, -411, 447, -412, 447, -435, 421, -412, 447, -411, 446, -412, 444, -413, 445, -437, 421, -438, 421, -435, 421, -1268, 447, -1268, 447, -411, 447, -1269, 447, -1268, 446, -412, 445, -1268, 448, -1270, 446]
         repeat:
            times: 5
            wait_time: 16ms
         carrier_frequency: 38kHz
      - remote_transmitter.transmit_raw:
         code: [3426, -1696, 445, -1268, 446, -1269, 446, -437, 421, -410, 447, -415, 445, -1266, 447, -437, 421, -437, 421, -1268, 447, -1268, 447, -411, 446, -1295, 420, -413, 445, -412, 446, -1270, 445, -1270, 447, -411, 446, -1268, 445, -1297, 421, 
                -409, 447, -436, 421, -1295, 421, -410, 447, -411, 446, -1295, 421, -412, 445, -437, 421, -412, 445, -412, 446, -411, 446, -412, 446, -411, 447, -411, 446, -414, 446, -411, 446, -411, 445, -412, 446, -410, 447, -438, 420, -412, 447, -437, 421, -412, 
                445, -411, 447, -409, 447, -412, 445, -1270, 446, -412, 445, -411, 447, -410, 447, -415, 444, -409, 448, -1270, 444, -1271, 446, -409, 447, -412, 446, -412, 446, -1270, 445, -1270, 445, -1270, 445, -1269, 446, -412, 446, -411, 447, -412, 447, -410, 
                446, -411, 446, -1272, 445, -1269, 444, -413, 445, -1270, 445, -1268, 448, -437, 421, -411, 446, -1269, 446, -413, 444, -412, 446, -1296, 421, -412, 445, -412, 446, -1268, 446, -412, 445, -412, 448, -411, 446, -437, 421, -409, 446, -412, 446, -437, 
                421, -412, 445, -413, 445, -415, 443, -414, 445, -411, 445, -413, 445, -412, 445, -412, 445, -413, 445, -413, 445, -414, 445, -435, 421, -412, 446, -412, 446, -413, 444, -412, 445, -413, 445, -411, 446, -412, 446, -411, 446, -413, 445, -413, 446, -411, 
                445, -413, 445, -412, 445, -411, 447, -412, 446, -413, 444, -412, 446, -412, 445, -412, 446, -412, 445, -413, 445, -413, 445, -413, 444, -439, 420, -413, 445, -411, 445, -412, 445, -413, 445, -414, 444, -412, 445, -414, 445, -413, 445, -412, 446, -435, 
                421, -437, 420, -413, 445, -412, 445, -438, 420, -1270, 445, -1273, 444, -414, 444, -1267, 446, -1269, 446, -413, 445, -1270, 445, -1271, 446]
         repeat:
            times: 5
            wait_time: 16ms
         carrier_frequency: 38kHz

And it started firing. We are shooting raw. Not only that, the AC turned on. :exploding_head:

Now why did it work? I haven’t looked in detail yet, I think I might be actually firing twice each time as I get double the beeps. I’ll have to look into it more but it is very promising as I was able to reuse the power off code I first captured and it worked on first try.

Couple of thoughts regarding hardware quality, as I had not reach that point yet (to look into swapping cables, using a separate power source for LEDs, etc… I will not claim to have top of the line equipment, I just started tinkering in the realm of ESP32 and those boards in general. This is my very first project.
In other threads, many seem to struggle with their IR LEDs especially with constant current as well as power. They would add diodes, resistors and a transistor to deal with those issues(Constant current infrared LED emitter circuit - AnalysIR Blog). @DeeBeeKay deals with those in the aforementioned post.
I also read about ESP not working as well as weemos boards for this application.

In my case, I am using an IT transmitter that’s comprised of one tiny led (which is useful to let you know if you’re firing without having to take out your phone camera every time) and more importantly of what I assume to be two diodes which should provide current stability. I could be dead wrong. Truth of the matter is, I can fire these from almost a meter away from the AC. Not huge some may say, but that’s well enough for now. The accept both 3.3v and 5v from the ESP32.

That really deviated from the original title & topic, but we got there :partying_face:

Now I guess it’s just a matter of registering all the power on cmbinations with modes and with temperatures… and don’t get me started with vane positions :laughing: but really glad I got it working!!

Thanks all yall!

8 Likes

Just wanna say thank you for your post. I was struggling to configure my IR sensor.
Two things that I changed after reading your post:
dump from all to raw - I was getting pronto protocol, which was not working at all.
carrier_frequency - just changing to raw didn’t fix the problem, the sensor started to work after I also changed the frequency to 38kHz.

Now everything is working flawless. Thank you so much!

Using this module. Cheap and reliable. Much better alternative than those Broadlink IR devices.
https://www.amazon.com/dp/B09KGXNZ2Q?psc=1&ref=ppx_yo2ov_dt_b_product_details

2 Likes

I’m trying to capture codes from a small humidifier remote but having some trouble. By default it picks up Pronto codes, I can get the RAW codes also, but my problem is that as soon as I put the remote close to my receiver (without pressing any buttons) it picks up all the static noise. So it’s hard to tell which data corresponds to the button press and which is static, is there anyway to filter this out? I’ve tried changing the tolerance and filter attributes, but with no luck. My ESPHome code is below (I get negative data if I use inverted: True)

remote_receiver:
  pin: 
    number: GPIO33
  dump:
    - raw

If I hold down a button and move it to the receiver, this is what I’ll see, differs each time

[14:52:54][D][remote.raw:041]: Received Raw: 1066, -1, 2, -1, 1, -1, 1, -2, 3, -3, 1, -42, 36
[14:52:54][D][remote.raw:041]: Received Raw: 4, -5, 10, -1, 1445, -5, 36
[14:52:54][D][remote.raw:041]: Received Raw: 3, -8, 1947, -1, 1, -1, 7, -1, 1
[14:52:54][D][remote.raw:041]: Received Raw: 2247, -1, 67, -1, 32, -15, 7
[14:52:54][D][remote.raw:041]: Received Raw: 4, -2, 2644, -1, 43, -203, 1
[14:52:54][D][remote.raw:041]: Received Raw: 1, -1, 6, -26, 5, -1, 4, -1, 17, -1, 2901, -1, 10, -1, 10, -1, 10, -1, 10, -1, 42, -1, 35, -1, 6, -1, 1, -1, 1, -2, 5, -1, 1, -1, 1, -5, 3, -40, 3, -1, 4
[14:52:54][D][remote.raw:041]: Received Raw: 5, -1, 9, -1, 3467, -1, 15, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 9
[14:52:54][D][remote.raw:041]: Received Raw: 3905
[14:52:54][D][remote.raw:041]: Received Raw: 1, -1, 3, -1, 4071, -1, 1, -1, 1
[14:52:54][D][remote.raw:041]: Received Raw: 4275, -1, 14, -1, 1, -1, 1, -1, 1, -3, 3
[14:52:54][D][remote.raw:041]: Received Raw: 4447
[14:52:55][D][remote.raw:041]: Received Raw: 4544
[14:52:55][D][remote.raw:041]: Received Raw: 1, -1, 4663, -5, 23
[14:52:55][D][remote.raw:041]: Received Raw: 4794
[14:52:55][D][remote.raw:041]: Received Raw: 4875
[14:52:55][D][remote.raw:041]: Received Raw: 4913
[14:52:55][D][remote.raw:041]: Received Raw: 4926
[14:52:55][D][remote.raw:041]: Received Raw: 1, -1, 1, -1, 3, -1, 4953
[14:52:55][D][remote.raw:041]: Received Raw: 4983, -29, 2
[14:52:55][D][remote.raw:041]: Received Raw: 5062
[14:52:55][D][remote.raw:041]: Received Raw: 1, -1, 1, -1, 2, -1, 5102
[14:52:55][D][remote.raw:041]: Received Raw: 5096
[14:52:55][D][remote.raw:041]: Received Raw: 1, -1, 4995
[14:52:55][D][remote.raw:041]: Received Raw: 4815, -1, 4, -1, 1, -21, 5
[14:52:55][D][remote.raw:041]: Received Raw: 4598
[14:52:55][D][remote.raw:041]: Received Raw: 1, -1, 2, -1, 4404, -1, 4, -1, 1
[14:52:55][D][remote.raw:041]: Received Raw: 4073
[14:52:55][D][remote.raw:041]: Received Raw: 1, -1, 1, -1, 4, -1, 3570, -1, 107, -2, 3
[14:52:55][D][remote.raw:041]: Received Raw: 2980, -1, 46, -10, 162, -1, 10, -1, 3, -1, 1, -1, 1, -1, 1, -2, 3, -1, 1, -6, 3
[14:52:55][D][remote.raw:041]: Received Raw: 2701, -1, 35
[14:52:55][D][remote.raw:041]: Received Raw: 1, -1, 1, -2, 3, -1, 1, -1, 1, -3, 4, -1, 1, -1, 1, -1, 2251, -1, 64
[14:52:55][D][remote.raw:041]: Received Raw: 2108, -1, 2
[14:52:55][D][remote.raw:041]: Received Raw: 1, -1, 7, -1, 1, -1, 1908, -2, 3
[14:52:55][D][remote.raw:041]: Received Raw: 1685, -1, 24, -1, 6, -1, 3, -1, 1, -1, 1, -1, 1
[14:52:55][D][remote.raw:041]: Received Raw: 1401, -1, 4
[14:52:55][D][remote.raw:041]: Received Raw: 76, -2, 1137
[14:52:55][D][remote.raw:041]: Received Raw: 193, -1, 102, -1, 4, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 225, -1, 37

Wanted to says thanks for this post. Finding about about dump: raw let me see that the received data was starting with a negative which led to trying inverted: true. With the receiver pin set to inverted: true the pronto codes I got actually worked.

2 Likes

Most welcome! Happy it helped.
Indeed my main drive was to avoid getting Broadlinks cause these are crazy expensive.
I must say tho, seeing the price at which you’re getting your transmitters, I’m lucky to be living next door to Shenzhen… I can get four IR transmitters for that price.

Did you manage to get these codes? I really have no idea how to deal with noise… I was not getting any at all.
You could also try “brand codes”, depending on your appliance’s. i haven’t had the best of luck with those but who knows.

So fast forward to now, I moved and started implementing such esp32 s for ACs and thermothingies. I gotta say, although with some appliances you better use raw, using the IR Remote Climate component is so much cleaner, when you can find a plateform name that works. I had to try a bunch of them even though they were for other different brands.
https://esphome.io/components/climate/climate_ir.html
Config wise, it’s easy as pie in ESPHome:

climate:
  - platform: heatpumpir
    protocol: panasonic_nke
    horizontal_default: middle
    vertical_default: middle
    max_temperature: 30.0
    min_temperature: 16.0
    name: "Living Room AC"
    transmitter_id: transm
    supports_heat: false

another example:

climate:
  - platform: mitsubishi
    name: "Bedroom AC"
    transmitter_id: transm
    supports_heat: false

Hi, I had similar issue using esp32-c3 for on a tuya remote for my ac (mitsubishi) on tasmota.
The irsend is inconsistent, and sometimes a few attempts is required until the ac received the commands.
Was wondering if you had this issue on tasmota?
I had to change the chip to esp8266, which works just fine with the same tuya remote.

@ferbulous Hi, I do not do anything with tasmota :confused: I do everything through esphome with “stock” appliances.

Had the same issue and found a solution.

TL;DR: Remove the lead out value.

Take this code for example:

Data: 0000    006D    0001    0001   0010 0181    0010 0181     06C3
        |       |       |       |     \_____/      \_____/        |
        |       |       |       |        |            |        Lead Out
      Start   Freq.     N       M      N Pairs      M Pairs    

The format is: [preamble = 4][burst 1 = N][burst 2 = M][lead out = 1].
The IR transmitter expects only the preamble and burst data fields, without the lead out (is calculated for you).

The total number of “words” should be: 4 + 2N + 2M. Knowing this, you can validate that the codes you captured are valid.

Meaning you should use

data: "0000 006D 0001 0001 0010 0181 0010 0181"

There are more details here on how to decode Pronto: RC: The Pronto's IR Code Format (2)

Source: ESPHome: /opt/build/esphome/esphome/components/remote_base/pronto_protocol.cpp Source File