Howdy 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.