Hi, to you find a solution?
I am not using any of these devices, but my IR issues were solved by just using raw codes only.
Choosing a protol was causing strange issues with the IR codes.
I bought a couple of Moes UFO R6 IR - Tuya WiFi IR Remote. They use a Tuya WB3S chip.
See Digiblur’s article and videos on the following:
I used Libertiny Cloudcutter and ESPhome.
ltchiptool Moes Universal IR profile
Working ESPhome YAML (Pronto only) follows:
esphome:
name: moes-ir-ufo-r6-uni-rc
friendly_name: moes-ir-lr
bk72xx:
board: wb3s
# Enable logging
logger:
level: DEBUG
# Enable Home Assistant API
api:
services:
- service: send_ir
variables:
protocol: string
code: string
then:
- lambda: 'ESP_LOGD("main", "Protocol: %s - Code:", protocol.c_str(), code.c_str() ); '
- if:
condition: # --=[ *** PRONTO *** ]=--
lambda: 'return protocol == "PRONTO";'
then:
- logger.log: "Sending PRONTO data...!"
- remote_transmitter.transmit_pronto:
data: !lambda |-
return code.c_str();
ota:
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
domain: !secret wifi_domain
# Enable fallback hotspot in case wifi connection fails
ap:
ssid: "Moes-Ir-Lr Fallback Hotspot"
password: ..................
button:
- platform: restart
name: Restart
debug:
update_interval: 30s
text_sensor:
- platform: debug
reset_reason:
name: Reset Reason
- platform: libretiny
version:
name: LibreTiny Version
status_led:
pin: P9
web_server:
captive_portal:
mdns:
remote_receiver:
pin:
number: 8
inverted: true
mode:
input: true
pullup: true
dump: all
remote_transmitter:
pin: 26
carrier_duty_percent: 50%
I don’t mind a little diy, but for an ir blaster that needs to sit in my living room I like it to look nice, so I bought the athom one (15€ on ahtom.tech) looks nice and works great. Comes preloaded with tasmota but flashing it with esphome was easy
There weren’t many ‘full examples’ I could find myself but I got it working so if anyone’s interested here’s mine (redacted some ‘double’ entries for brevity)
esphome:
name: athom-ir-remote
friendly_name: Athom_IR_Remote
esp8266:
board: esp01_1m
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: "yourownencryptionkey="
ota:
password: "yourownotapassword"
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Athom-Ir-Remote Fallback Hotspot"
password: "somepassword"
captive_portal:
web_server:
port: 80
sensor:
- platform: wifi_signal
name: "athom-ir-remote WiFi Signal"
update_interval: 300s
- platform: uptime
name: "athom-ir-remote Uptime"
#text_sensor:
# - platform: wifi_info
# ip_address:
# name: "athom-ir-remote IP Address"
# disabled_by_default: true
# ssid:
# name: "athom-ir-remote SSID"
# bssid:
# name: "athom-ir-remote BSSID"
# mac_address:
# name: "athom-ir-remote Mac Wifi Address"
# scan_results:
# name: "athom-ir-remote Latest Scan Results"
switch:
- platform: restart
name: "athom-ir-remote restart"
# Transmitter send data
#defaults nbits is 32 for samsung, 28 for lg
# Neufunk
- platform: template
name: NeuFunk_TV_ON
turn_on_action:
- remote_transmitter.transmit_lg:
data: 0x04FB4AB5
nbits: 32
# Samsung
- platform: template
name: Samsung_TV_ON
turn_on_action:
- remote_transmitter.transmit_samsung:
data: 0xE0E040BF
#nbits: 32
# Onkyo stereo receiver
- platform: template
name: Onkyo_Stereo_on
turn_on_action:
- remote_transmitter.transmit_lg:
data: 0x4B36D32C
nbits: 32
#-binary sensor >> status + all codes to receive from the old dyon remote
binary_sensor:
- platform: status
name: "athom-ir-remote IR Status"
- platform: gpio
pin: GPIO0
id: physical_button
# Dyon Remote ----------------Off
- platform: remote_receiver
name: 'Remote_Off'
lg:
data: 0x807C708F
nbits: 32
# Dyon Remote ----------------Numbers
- platform: remote_receiver
name: 'Remote_1'
lg:
data: 0x807C708F
nbits: 32
#redacted 2-0
# Dyon Remote ----------------Colors
- platform: remote_receiver
name: 'Remote_Red'
lg:
data: 0x807CD22D
nbits: 32
#redacted colours
status_led:
pin: GPIO13
remote_transmitter:
pin:
number: GPIO4
carrier_duty_percent: 50%
remote_receiver:
pin:
number: GPIO5
inverted: true
dump:
- lg
- samsung
Hope someone will find it usefull
Hi all
Whilst this discussion seems to be focused on IR signals, I’m trying to set up a RF transmitter. I’m using an ESP32 with a MX-05V. At hte moment I’m just trying to receive the codes which I hope to transmit later. I have two problems. First though, here’s my configuration:
esphome:
name: remote-for-433mhz
friendly_name: Remote for 433MHz
esp32:
board: esp32dev
framework:
type: arduino
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: "***"
ota:
password: "***"
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Remote-For-433Mhz"
password: "***"
captive_portal:
switch:
- platform: gpio
pin: GPIO2
name: "Built in LED"
remote_receiver:
pin:
number: GPIO4
inverted: true
mode:
input: true
pullup: true
dump: raw
The first problem I have is that, without me doing anything, the log shows that codes are being received. Here’s the log soon after boot:
INFO ESPHome 2023.10.1
INFO Reading configuration /config/esphome/remote-for-433mhz.yaml...
WARNING GPIO2 is a Strapping PIN and should be avoided.
Attaching external pullup/down resistors to strapping pins can cause unexpected failures.
See https://esphome.io/guides/faq.html#why-am-i-getting-a-warning-about-strapping-pins
INFO Starting log output from remote-for-433mhz.local using esphome API
INFO Successfully connected to remote-for-433mhz.local
[09:36:03][I][app:102]: ESPHome version 2023.10.1 compiled on Oct 21 2023, 16:24:19
[09:36:03][C][wifi:546]: WiFi:
[09:36:03][C][wifi:382]: Local MAC: [redacted]
[09:36:03][C][wifi:383]: SSID: [redacted]
[09:36:03][C][wifi:384]: IP Address: 192.168.0.135
[09:36:03][C][wifi:386]: BSSID: [redacted]
[09:36:03][C][wifi:387]: Hostname: 'remote-for-433mhz'
[09:36:03][C][wifi:389]: Signal strength: -52 dB ▂▄▆█
[09:36:03][C][wifi:393]: Channel: 11
[09:36:03][C][wifi:394]: Subnet: 255.255.255.0
[09:36:03][C][wifi:395]: Gateway: 192.168.0.1
[09:36:03][C][wifi:396]: DNS1: 192.168.0.1
[09:36:03][C][wifi:397]: DNS2: 0.0.0.0
[09:36:03][I][remote.raw:041]: Received Raw: -667, 847, -1603, 832, -148, 787, -1002, 353, -2578, 225, -893, 161, -2388, 229, -5453, 174, -7231, 256, -2192, 239, -2963, 431, -4218, 275, -4464, 239, -84, 189
[09:36:03][C][logger:361]: Logger:
[09:36:03][C][logger:362]: Level: DEBUG
[09:36:03][C][logger:363]: Log Baud Rate: 115200
[09:36:03][C][logger:365]: Hardware UART: UART0
[09:36:03][I][remote.raw:041]: Received Raw: 270, -4285, 450, -784, 269, -1694, 220
[09:36:03][I][remote.raw:041]: Received Raw: 343
[09:36:03][C][switch.gpio:068]: GPIO Switch 'Built in LED'
[09:36:03][C][switch.gpio:091]: Restore Mode: always OFF
[09:36:03][C][switch.gpio:031]: Pin: GPIO2
[09:36:03][I][remote.raw:041]: Received Raw: 312, -4081, 317, -2441, 280, -659, 345, -1821, 830, -104, 788, -523, 1324, -16, 736, -533, 115, -803, 720, -690, 206, -3422, 182, -3726, 116
[09:36:03][C][remote_receiver.esp32:054]: Remote Receiver:
[09:36:03][C][remote_receiver.esp32:055]: Pin: GPIO4
[09:36:03][C][remote_receiver.esp32:060]: Channel: 0
[09:36:03][C][remote_receiver.esp32:061]: RMT memory blocks: 3
[09:36:03][C][remote_receiver.esp32:062]: Clock divider: 80
[09:36:03][C][remote_receiver.esp32:063]: Tolerance: 25%
[09:36:03][C][remote_receiver.esp32:064]: Filter out pulses shorter than: 50 us
[09:36:03][C][remote_receiver.esp32:065]: Signal is done after 10000 us of no changes
[09:36:03][I][remote.raw:041]: Received Raw: 198, -3040, 139
[09:36:03][I][remote.raw:041]: Received Raw: 211, -2534, 231, -2765, 250, -33, 168
[09:36:03][C][captive_portal:088]: Captive Portal:
[09:36:03][I][remote.raw:041]: Received Raw: 313, -3450, 210
[09:36:03][C][mdns:115]: mDNS:
[09:36:03][C][mdns:116]: Hostname: remote-for-433mhz
[09:36:03][I][remote.raw:041]: Received Raw: 288, -1553, 2179, -1431, 766, -1053, 287, -2071, 191, -576, 127
[09:36:03][C][ota:097]: Over-The-Air Updates:
[09:36:03][C][ota:098]: Address: remote-for-433mhz.local:3232
[09:36:03][C][ota:101]: Using Password.
[09:36:03][I][remote.raw:041]: Received Raw: 214, -2370, 200, -127, 145, -2749, 208, -4185, 152, -9953, 243, -3654, 215, -2822, 183
[09:36:03][C][api:138]: API Server:
[09:36:03][C][api:139]: Address: remote-for-433mhz.local:6053
[09:36:03][C][api:141]: Using noise encryption: YES
[09:36:03][I][remote.raw:041]: Received Raw: 281
[09:36:03][I][remote.raw:041]: Received Raw: 323, -2615, 462, -6279, 188, -6918, 1555, -57
[09:36:03][I][remote.raw:041]: Received Raw: -855
[09:36:17][I][remote.raw:041]: Received Raw: -4250, 419
[09:36:17][I][remote.raw:041]: Received Raw: 295
[09:36:17][I][remote.raw:041]: Received Raw: 258, -7311, 348, -7987, 291
[09:36:17][I][remote.raw:041]: Received Raw: 560, -26, 3145, -6181, 5634, -50
The other problem is that, when I do press buttons on my remote, I do receive codes but, there doesn’t seem to be any consistency in the codes received.
I hope someone can help.
Thanks
instead of dump raw, set it to dump all, or a select number of protocols:
remote_receiver:
pin:
number: GPIO5
inverted: true
dump:
- lg
- samsung
- nec
Honestly you don’t want to use raw unless you really need to. I started using lg default cause the’re easiest to work with, but some devices you can’t send lg to, and you need to work with samsung or nec
below example of the codes I send, as you can see I need to send in 3 different protocols (that’s why I dump those three):
# Neufunk
- platform: template
name: NeuFunk_TV_ON
turn_on_action:
- remote_transmitter.transmit_lg:
data: 0x04FB4AB5
nbits: 32
# Samsung
- platform: template
name: Samsung_TV_ON
turn_on_action:
- remote_transmitter.transmit_samsung:
data: 0xE0E040BF
#nbits: 32
# Onkyo stereo receiver
- platform: template
name: Onkyo_Stereo_vol-up
turn_on_action:
- remote_transmitter.transmit_nec:
address: 0x6DD2
command: 0xFD02
Thanks @kurtj
I tried with this config:
remote_receiver:
pin:
number: GPIO4
inverted: true
dump:
- drayton
- rc_switch
- nexa
- lg
- samsung
- nec
I added all the RF protocals in addition to the protocals you suggested. I did this because the fan uses RF.
With this configuration I don’t receive any codes, no matter which buttons I press.
I’ll happily receive further suggestions.
Thanks anyway.
if you set it to dump: all
you will get all the protocols, including raw.
What remote (brand/applicance/type) are you trying to capture/send btw?
Hi @kurtj
Using all
I just get steady stream of Pronto codes. When I press buttons on the remote I can’t see anything that stands out from the stream of pronto codes.
How do I stop the status LED being on once it has reached a steady state?
I tried inverting the LED, but what I tried wasn’t allowed.
Has anyone successfully configured to use RCCM protocol with esphome? I have a STB from a vendor called as Airtel here. It looks the IR remote is using RCCM/Nokia32 as the protocol.
In my esphome based IR transmitter, I configured it as dump: raw. I am getting the raw codes something similar to the one given below. These values are for same key “Digit 1” on my remote. If I configure any other protocol like nec or rc6, I am not getting any log in my esphome IR receiver log page. So using alternative protocal like NEC, Pioneer is ruled out.
Digit 1:
Received Raw: 352, -247, 187, -282, 191, -596, 181, -438, 218, -563, 187, -284, 185, -281, 188, -250, 187, -281, 195, -587, 219, -562, 187, -438, 187, -785, 215, -219, 219, -250, 194, -274, 219, -406, 219
Received Raw: 343, -215, 251, -225, 181, -625, 218, -407, 187, -613, 200, -218, 219, -250, 188, -281, 187, -285, 184, -594, 218, -563, 220, -412, 180, -782, 218, -219, 191, -278, 219, -218, 219, -438, 218
I tried to send the value multiple times using repeated signal, as given below, But still the codes are not getting detected by my device.
Meanwhile to confirm the protocol that are sent by the remote, I tried to decode the signals using Ubuntu. I used the intel NUC with IR receiver running with Ubuntu. When I used linux commands to collect the output, I am getting the protocol received is lirc protocol (rc-mm-32).
I checked esphome IR transmitter documents section, I could not find rcmm or Philips available there.
- platform: template
name: "Num1"
id: Num1
turn_on_action:
- remote_transmitter.transmit_raw:
repeat:
times: 15
wait_time: 16 ms
carrier_frequency: 36kHz
code: [ 349, -222, 253, -211, 189, -625, 219, -406, 219, -562, 219, -219, 225, -212, 219, -281, 226, -212, 187, -625, 219, -563, 239, -386, 190, -788, 209, -188, 256, -215, 219, -247, 219, -406, 219 ]
- remote_transmitter.transmit_raw:
repeat:
times: 15
wait_time: 16 ms
carrier_frequency: 36kHz
code: [ 344, -218, 219, -250, 188, -625, 219, -406, 219, -576, 205, -219, 187, -281, 188, -281, 235, -203, 187, -282, 187, -594, 219, -409, 184, -782, 218, -219, 188, -281, 187, -282, 187, -438, 218 ]
Below given are with multiple lines as input with repeat and wait options.
- remote_transmitter.transmit_raw:
repeat:
times: 15
wait_time: 16 ms
carrier_frequency: 38kHz
code: [ 337, -250, 225, -212, 219, -594, 218, -407, 187, -613, 200, -219, 218, -250, 188, -281, 197, -272, 188, -250, 187, -625, 219, -418, 175, -750, 219, -219, 219, -259, 178, -282, 187, -438, 218 ]
- remote_transmitter.transmit_raw:
repeat:
times: 15
wait_time: 16 ms
carrier_frequency: 38kHz
code: [ 352, -249, 231, -209, 216, -594, 218, -406, 241, -571, 219, -187, 250, -219, 219, -249, 231, -208, 217, -625, 187, -615, 198, -405, 188, -749, 219, -237, 207, -282, 211, -187, 219, -437, 219 ]
Have someone who successfully configured this protocol to work with esphome, share your suggestions please? I am trying from past few week but I could not get it working.
One point I forget to mention. This IR transmitter/blaster is based on cb3s chipset. I have configured my LG TV and another IR remote based ceiling fan using LG and NEC protocols. When I press respective remote of these devices, the log is showing lg and nec as the protocol. They are working fine without any issue as well for the commands initiated from esphome web page of respective IR device. so the IR receiver and Transmitter is working as expected. Only the STB remote in question is stubborn.
Meanwhile I continued to work on this and figured out the options to control my STB as well using RAW format of codes successfully. The codes I have received didn’t work but using IrScrutinizer I got the working RAW codes. I have tested 3 of the buttons. Configuring the YAML with other buttons. I will post my solution once its ready which may be helpful for someone using the same STB provider.
Hi,
I have a Freenove ESP32 Wroom board.
I can receive ir codes from my air heat pumps remote in the following formats to my board without any problem:
Coolix, Pronto, RAW, Samsung, Toshiba AC
remote_receiver:
pin:
number: GPIO32
inverted: true
dump: all
The problem is sending the different remote codes via remote_transmitter
remote_transmitter:
pin:
number: GPIO19
carrier_duty_percent: 50%
I started with trying to send Coolix but that gave me nothing in the logs so i moved on to try to send the rest of the codes to test.
I have the following for testning the different codes i my .yaml
button:
- platform: template
name: "Toshiba AC"
id: toshiba_id
on_press:
- remote_transmitter.transmit_toshiba_ac:
rc_code_1: 0xB24DBF4040BF
- logger.log: "My Log: Toshiba AC"
- platform: template
name: "Samsung"
id: samsung_id
on_press:
- remote_transmitter.transmit_samsung:
data: 0xB946F50A09F6
nbits: 48
- logger.log: "My Log: Samsung"
- platform: template
name: "Pronto"
id: pronto_id
on_press:
- remote_transmitter.transmit_pronto:
data: "0000 006D 0010 0000 0008 0020 0008 0046 000A 0020 0008 0020 0008 001E 000A 001E 000A 0046 000A 001E 0008 0020 0008 0020 0008 0046 000A 0046 000A 0046 000A 001E 000A 001E 0008 06C3"
- logger.log: "My Log: Pronto"
- platform: template
name: "RAW"
id: raw_id
on_press:
- remote_transmitter.transmit_raw:
code: [2000,-1000, 400,-1000, 400, -400,1000,-1000, 400,-1000, 400, -400,1000,-1000, 400,-1000, 400, -400,2000,-5600,
2000,-1000, 400,-1000, 400, -400,1000,-1000, 400,-1000, 400, -400,1000,-1000, 400,-1000, 400, -400,2000,-5600,
2000,-1000, 400,-1000, 400, -400,1000,-1000, 400,-1000, 400, -400,1000,-1000, 400,-1000, 400, -400,2000,-5600]
carrier_frequency: 38kHz
repeat:
times: 5
wait_time: 16ms
- logger.log: "My Log: RAW"
This is what i get in the logs for the respective codes:
Pronto
[19:20:06][D][button:010]: ‘Pronto’ Pressed.
[19:20:06][D][remote.pronto:101]: Send Pronto: frequency=38kHz
[19:20:06][D][remote.pronto:106]: Send Pronto: intros=32
[19:20:06][D][remote.pronto:107]: Send Pronto: repeats=0
[19:20:06][D][main:459]: My Log: Pronto
RAW
[19:20:15][D][button:010]: ‘RAW’ Pressed.
[19:20:15][D][main:561]: My Log: RAW
Samsung
[19:20:16][D][button:010]: ‘Samsung’ Pressed.
[19:20:16][D][main:424]: My Log: Samsung
Toshiba AC
[19:20:17][D][button:010]: ‘Toshiba AC’ Pressed.
[19:20:17][D][main:389]: My Log: Toshiba AC
If i try my code on a different board from another manufacturer i get the same results…
But if i use NEC it for some reason seam to work.
button:
- platform: template
name: "NEC"
id: nec_id
on_press:
- remote_transmitter.transmit_nec:
address: 0x1234
command: 0x78AB
command_repeats: 1
- logger.log: "My Log: Nec"
[20:02:11][D][button:010]: ‘NEC’ Pressed.
[20:02:11][D][remote.nec:017]: Sending NEC: address=0x1234, command=0x78AB command_repeats=1
[20:02:11][D][main:576]: My Log: Nec
Can someone point me in the right direction of what I’m doing wrong or what the problem could be?
What is working when you use NEC? Its being transmitted and you can verify it from the logs? Or is it actually transmitting a command to the device?. Are you transmitting and receiving from the same esp32? Do you have them both set up and configured at the same time?
I was recently capturing IR codes for a fan i have recently. I noticed it would show in the logs that it received JVC one time and the next time maybe Panasonic or RC and this is all for a single button, it wouldnt be the same code and manufacturer/code type consistently.
I just had to go through and try each one untill I found out which was correct and which ones were wrong. The other thing I noticed atleast on mine is once you push the button on remote, I had to do it very fast(push/release) and doing that I would have better chances of it decoding/reading the correct code wheras with a normal(0.5s) button push the remote keeps transmitting the code repeatedly, very fast and that seemed to be what was causing the IR receiver to detect the wrong codes/manufacturer in the logs.
Do 1 button on your remote at a time. Push it once then copy/paste the code from the log into a text file. Repeat that another 4 times and see if 1 code is coming through consistently. If it is, try transmitting that code. If it doesnt work then try one of the other codes that came up in your 5 tests. Mine for example. I would get JVC codes a lot and figured that was the right one and it wasnt. Mine was RC_Switch and sometimes id have to push the button/transmit and it would take 6-8 try’s before the log would show me that it received the correct RC_Switch code instead of JVC or RAW.
It just takes patience and knowing the first decoded signal in the logs may not be the right one.
Hi @Fallingaway24,
What is working when you use NEC? Its being transmitted and you can verify it from the logs?
Yes, working (should have used another word for it) in the sense that remote.nec is being called and shows up in the logs.
As you see in my post Raw, Samsung and Toshiba gives nothing.
But i guess the real problem is that something like this is not showing up at all in the logs for my ESP32
[D][remote_transmitter:075]: Sending remote code…
Remembered that I hade a Tuya IR Remote Control blaster lying around, so i flashed it with ESPHome and it is working (in the real sense). I can send commands and my air heat pump reacts as it should to the codes.
[19:07:35][D][remote_transmitter:075]: Sending remote code…
The difference is that its a
esp8266:
board: esp01_1m
Ya, those IR receivers are finicky, like i said some buttons it took 7-8 tries before the right RC_Switch code was decoded but it was still telling me it received JVC and other codes which were errors actually.
An esp01 is fine for doing IR functions.