Faking an IR remote control using ESPHome

Hmmm. No intention of repeating myself, so either here or there. I guess I will leave it here as the Guides section is open for anybody to edit and contribute.

Anyway, thanks for the valid suggestion @orange-assistant !

Great write-up! For what it’s worth, I just hooked a passive IR emitter (this one, actually) directly to a pin on an ESP32 and it works great, no level-shifting needed. Of course YMMV. Thanks!!

7 Likes

Thanks Brian, I added that information to the guide.

1 Like

Is it possible to make light component out of this in ESPHome?

Thanks for the great explanations.

I’ve managed to setup the receiver and transmitter and it works well with regular TV remote (i.e Sony)

However i have a swimming pool cover that is IR controlled and its remote only send RAW data. I’ve tried to grab one and send it with the transmitter but it doesn’t work. The code seems slightly different each time.

Is there a solution to make that work ?

Thanks

1 Like
2 Likes

The reason for that is explained in the guide: You record the “analog” data including noise.
If ESPHome does not recognize any encoding, I am afraid, you have no other option.

1 Like

Thanks for your clear answer.

I’m trying with another remote for an old device and I get pronto code.

Close button:

[19:56:02][D][remote.pronto:238]: Received Pronto: data=0000 006D 0002 0000 0011 0054 0012 06C3
[19:56:02][D][remote.pronto:238]: Received Pronto: data=0000 006D 0002 0000 0013 0055 0011 06C3
[19:56:02][D][remote.pronto:238]: Received Pronto: data=0000 006D 0002 0000 0011 0055 0011 06C3
[19:56:02][D][remote.pronto:238]: Received Pronto: data=0000 006D 0002 0000 0011 0055 0012 06C3
[19:56:05][D][remote.pronto:238]: Received Pronto: data=0000 006D 0002 0000 0011 0055 0011 06C3
[19:56:05][D][remote.pronto:238]: Received Pronto: data=0000 006D 0002 0000 0011 0055 0011 06C3
[19:56:05][D][remote.pronto:238]: Received Pronto: data=0000 006D 0002 0000 0012 0055 0011 06C3
[19:56:05][D][remote.pronto:238]: Received Pronto: data=0000 006D 0002 0000 0011 0055 0011 06C3
[19:56:05][D][remote.pronto:238]: Received Pronto: data=0000 006D 0002 0000 0011 0055 0012 06C3
[19:56:05][D][remote.pronto:238]: Received Pronto: data=0000 006D 0002 0000 0011 0055 0011 06C3
[19:56:05][D][remote.pronto:238]: Received Pronto: data=0000 006D 0002 0000 0011 0055 0011 06C3
[19:56:05][D][remote.pronto:238]: Received Pronto: data=0000 006D 0002 0000 0012 0054 0012 06C3
[19:56:05][D][remote.pronto:238]: Received Pronto: data=0000 006D 0002 0000 0011 0055 0011 06C3
[19:56:06][D][remote.pronto:238]: Received Pronto: data=0000 006D 0002 0000 0011 0055 0011 06C3
[19:56:06][D][remote.pronto:238]: Received Pronto: data=0000 006D 0002 0000 0012 0055 0011 06C3
[19:56:11][D][remote.pronto:238]: Received Pronto: data=0000 006D 0002 0000 0011 0055 0011 06C3
[19:56:12][D][remote.pronto:238]: Received Pronto: data=0000 006D 0002 0000 0012 0055 0011 06C3
[19:56:12][D][remote.pronto:238]: Received Pronto: data=0000 006D 0002 0000 0011 0055 0011 06C3
[19:56:12][D][remote.pronto:238]: Received Pronto: data=0000 006D 0002 0000 0011 0055 0012 06C3

Ope button:

[19:57:01][D][remote.pronto:238]: Received Pronto: data=0000 006D 0001 0000 0027 06C3
[19:57:01][D][remote.pronto:238]: Received Pronto: data=0000 006D 0001 0000 0026 06C3
[19:57:01][D][remote.pronto:238]: Received Pronto: data=0000 006D 0001 0000 0026 06C3
[19:57:01][D][remote.pronto:238]: Received Pronto: data=0000 006D 0001 0000 0026 06C3
[19:57:01][D][remote.pronto:238]: Received Pronto: data=0000 006D 0001 0000 0025 06C3
[19:57:01][D][remote.pronto:238]: Received Pronto: data=0000 006D 0001 0000 0025 06C3
[19:57:02][D][remote.pronto:238]: Received Pronto: data=0000 006D 0001 0000 0026 06C3
[19:57:02][D][remote.pronto:238]: Received Pronto: data=0000 006D 0001 0000 0025 06C3
[19:57:02][D][remote.pronto:238]: Received Pronto: data=0000 006D 0001 0000 0026 06C3
[19:57:02][D][remote.pronto:238]: Received Pronto: data=0000 006D 0001 0000 0025 06C3
[19:57:02][D][remote.pronto:238]: Received Pronto: data=0000 006D 0001 0000 0025 06C3
[19:57:02][D][remote.pronto:238]: Received Pronto: data=0000 006D 0001 0000 0026 06C3
[19:57:02][D][remote.pronto:238]: Received Pronto: data=0000 006D 0001 0000 0025 06C3
[19:57:02][D][remote.pronto:238]: Received Pronto: data=0000 006D 0001 0000 0026 06C3
[19:57:02][D][remote.pronto:238]: Received Pronto: data=0000 006D 0001 0000 0026 06C3
[19:57:03][D][remote.pronto:238]: Received Pronto: data=0000 006D 0001 0000 0025 06C3
[19:57:03][D][remote.pronto:238]: Received Pronto: data=0000 006D 0001 0000 0026 06C3
[19:57:03][D][remote.pronto:238]: Received Pronto: data=0000 006D 0001 0000 0025 06C3

I’ve been looking in ESPHome documentation and can’t figure out how to deal with Pronto code.

Thanks for your help

Sending Pronto is explained here:

BTW:
If your ESPhome can’t interpret your remote: Did you try to reverse the polarity as explained in the guide?

I have a use for this on a future project and recently found this ESP8285 based IR transmitter receiver module on Ali Express.

I still have to test it but it should do the job without any additional wiring.

ESP IR TxRx-2

1 Like

It’s the same one as I posted a link to just a few posts ago.

Missed that :grimacing:

Yep i tried reversing polarity but didn’t help.

Thanks for link about Pronto, sorry i missed it. I will try that later this week.

What I usually do if I get different codes like that is to create a large sample, say 20-30 or 40 presses.
Then copy it to Excel and find the code that is most frequent and use that as the code. It has worked every time.

2 Likes

Hello, instead of buttons in HA
I’d like to use physical remote (to emulate logitech harmony) that send ir signal to esphome and then it will toggle the predefined buttons.
Is there an example for remote receiver?

Yes:

:point_up_2: just check the docs behind the blue text for examples

2 Likes

Thanks, this is how I added to my yaml

#astro button presses 
binary_sensor:
  - platform: remote_receiver
    name: "astro numpad 1"
    rc6:
      address: 0x00
      command: 0x01
    on_state:
      - remote_transmitter.transmit_pronto:
          data: "0000 006D 001E 0000 0067 0022 0011 0012 0011 0012 0012 0022 0012 0022 0034 0022 0012 0012 0011 0011 0012 0012 0010 0012 0012 0011 0012 0012 0011 0011 0023 0023 0024 0023 0022 0012 0011 0023 0024 0022 0023 0023 0011 0013 0023 0011 0011 0012 0011 0023 0012 0012 0010 0012 0012 0012 0010 0013 0011 0011 0012 0011 0024 06C3 0000 006D 001E 0000 0068 0021 0011 0012 0011 0011 0010 0023 0011 0023 0034 0022 0011 0012 0012 0012 0011 0011 0011 0012 0012 0011 0012 0011 0012 0011 0023 0024 0023 0023 0022 0012 0012 0022 0024 0023 0022 0024 0010 0013 0023 0012 0011 0011 0011 0024 0011 0012 0011 0012 0010 0013 0011 0011 0011 0012 0012 0012 0022 06C3"

Didn’t get it working at first because I didn’t copy all the pronto codes

2 Likes

I’m dealing with the same “issue”.

I want to switch from Pilight to ESPHome.
With Pilight, my plugs work via MQTT with:

command_topic: "rf434/send/arctech_switch"    
  payload_on: '{"id":51819502,"unit":14,"on":1}'                       
  payload_off: '{"id":51819502,"unit":14,"off":1}' 

But with ESPHome I’m getting this:

[20:18:34][D][remote.pronto:238]: data=0000 006D 0054 0000 003D 0031 003D 001D 000D 002A 0022 0012 000E 0013 000C 0011 0011 0013 001A 000F 0010 0019 001B 0017 000B 0032 002C 000F 005E 002F 0011 000D 0012 000B 000B 000D 0013 002A 004E 0057 006B 000E 000A 000E 0030 000D
[20:18:34][D][remote.pronto:240]: 000C 000E 002F 000E 002F 000D 000B 000D 0030 000C 000C 000D 000C 000C 0030 000C 000C 000C 0031 000D 0030 000C 000C 000C 000C 000C 0031 000C 000C 000C 0031 000C 0031 000C 000C 000C 000C 000C 0030 000C 000C 000C 0030 000D 0030 000D 000C 000D 0030 000D 000C 000D 000C 000D 0030 000D 0030 000D 000B 000D 0030 000D 000B 000D 002F 000D 000B 000D 000B 000D 002F 000D 002F 000E 000B 000D 000B 000E 002F 000E 000B 000D 002F 000D 002F 000D 000B 000E 002F 000E 000B 000E 002F 000E 000B 00
[20:18:34][D][remote.pronto:238]: Received Pronto: data=0000 006D 0040 0000 007F 006B 000E 000A 000E 002F 000E 000A 000E 002F 000E 002F 000E 000A 000E 002F 0010 0021 000F 0021 001C 0046 000F 002E 000E 000A 000E 000B 000E 002F 000E 000A 000E 002F 000E 002F 000E 000A 000E 000A 000E 002F
[20:18:34][D][remote.pronto:240]: 000F 0009 000E 002F 000E 002F 000E 000B 000E 002F 000E 000A 000E 000A 000E 002F 000E 002F 000E 000A 000E 002F 000E 000B 000E 002F 000E 000A 000E 000B 000E 002F 000E 002F 000E 000A 000E 000B 000E 002F 000E 000B 000E 002F 000E 002F 000E 000A 000E 002F 000F 000A 000E 002F 000E 000B 000E 000A 000F 002E 000F 000A 000E 002F 000F 000A 000E 002E 000F 002E 000E 000B 000E 002F 000E 000A 000E 000A 000E 002F 000E 002F 000E 000A 000E 06C3
[20:18:34][D][remote.pronto:238]: Received Pronto: data=0000 006D 0041 0000 000E 006B 000E 000A 000E 002F 000E 000A 000E 002F 000E 002F 000E 000A 000E 001C 0011 001A 000E 000A 000F 000B 000B 0018 0010 0045 000E 002F 000E 000A 000E 000A 000E 002F 000E 000A 000E 002F 000E 002F 0010 0020
[20:18:34][D][remote.pronto:240]: 000F 002E 000E 000A 000E 002F 000E 002F 000E 000A 000E 002F 000E 000A 000E 000B 000E 002F 000E 002F 000E 000A 000E 002F 000E 000A 000E 002F 000E 000A 000E 000A 000E 002F 000E 002F 000E 000A 000E 000A 000E 002F 000E 000A 000E 002F 000E 002E 000E 000A 000F 002E 000F 0009 000E 002F 000F 0009 000F 000A 000E 002E 000E 000A 000F 002E 000E 000A 000E 002F 000E 002F 000E 000B 000E 002E 000E 000A 000E 000A 000E 002F 000E 002F 000E 000A 000E 06C3
[20:18:34][D][remote.pronto:238]: Received Pronto: data=0000 006D 0040 0000 000E 006B 000E 000A 000E 002F 000E 000A 000E 002F 000E 002F 000E 000A 000E 002F 0010 0021 000F 000F 0013 000C 0010 0046 000E 002F 000E 000A 000E 000A 000E 002F 000E 000A 000E 002F 000E 002F 000F 0009 0010 0046
[20:18:35][D][remote.pronto:240]: 000E 000A 000E 002F 000E 002F 000E 000A 000E 002F 000E 000A 000E 000A 000E 002F 000E 002F 000E 000A 000E 002F 000E 000A 000E 002F 000E 000A 000E 000A 000E 002F 000E 002F 0010 0009 000E 000A 000E 002F 000E 000A 000E 002F 000F 002D 000F 000A 000E 002F 000F 000A 000E 002E 000F 000A 000E 000A 000E 002F 000E 000B 000E 002F 000F 000A 000E 002E 000F 002E 000E 000A 000E 002F 000E 000A 000E 000A 000E 002F 000E 002F 000E 000A 000E 06C3
[20:18:35][D][remote.pronto:238]: Received Pronto: data=0000 006D 0040 0000 000E 006B 000E 000A 000E 002F 000E 000A 000E 002F 000E 002F 000E 000A 000E 0018 0011 001E 000E 000A 000F 000A 000E 000A 001D 0043 000E 002F 000E 000A 000E 000A 000E 002F 000E 000A 000E 002F 000E 002F 0011 001F
[20:18:35][D][remote.pronto:240]: 000F 002F 000E 000A 000E 002F 000E 002F 000E 000A 000E 002F 000E 000A 000E 000A 000E 002F 000E 002F 000E 000A 000E 002F 000E 000A 000E 002F 000E 000A 000E 000A 000E 002F 000E 002F 000E 000A 000E 000A 000E 002F 000E 000A 000E 002F 000E 002F 0010 0045 000E 000A 000E 002F 000E 000A 000E 000A 000E 002F 000E 000A 000F 002E 000E 000A 000E 002F 000E 002E 000F 000A 000E 002E 000E 000A 000E 000A 000E 002F 000E 002F 000E 000A 000E 06C3
[20:18:35][D][remote.pronto:238]: Received Pronto: data=0000 006D 0041 0000 000E 006B 000E 000A 000E 002F 000E 000A 000E 002F 000E 002F 000E 000A 000E 0015 0012 001F 000F 000A 0010 000D 000D 0013 000E 000A 000E 002F 000E 002F 000E 000A 000E 000A 000E 002F 000E 000A 000E 002F 000E 002F
[20:18:35][D][remote.pronto:240]: 0015 001C 000F 002E 000E 000A 000E 002F 000E 002F 000E 000A 000E 002F 000E 000A 000E 000A 000E 002F 000E 002F 000E 000A 000E 002F 000E 000A 000E 002F 000E 000A 000E 000A 000E 002F 000E 002F 000E 000A 000E 000A 000E 002F 000E 000A 000E 002F 000E 002E 0011 0044 000F 0009 000E 002F 000E 000A 000E 000A 000E 002F 000F 000A 000F 002D 000E 000A 000E 002E 000E 002E 000E 000A 000E 002F 000E 000A 000E 000A 000E 002F 000E 002F 000E 000A 000E 06C3
[20:18:35][D][remote.pronto:238]: Received Pronto: data=0000 006D 0041 0000 0069 006B 000E 000A 000E 0016 0027 000A 000E 002F 000E 002E 000E 000A 000E 002F 000E 000A 000F 0046 0017 0018 001C 000B 000E 002F 000E 000A 000E 000A 000E 002F 000E 000A 000E 002F 000E 002F 000E 000A 000E 000A
[20:18:35][D][remote.pronto:240]: 000E 0019 0014 001A 000E 002F 000E 002F 000E 000A 000E 002F 000E 000A 000E 000A 000E 002F 000E 002F 000E 000A 000E 002F 000E 000A 000E 002F 000E 000A 000E 000A 000E 002F 000E 002F 000E 000A 000E 000A 000E 002F 000E 000A 000E 002F 000E 002F 000E 000A 0010 002D 000F 000A 000F 002E 000F 000A 000E 000B 000E 002E 000F 000A 000F 002E 000E 000A 000E 002F 000E 002F 000E 000A 000E 002E 000E 000A 000E 000A 000E 002F 000E 002E 000E 000A 000E 06C3
[20:18:35][D][remote.pronto:238]: Received Pronto: data=0000 006D 0001 0000 06C3
[20:18:35][D][remote.pronto:238]: Received Pronto: data=0000 006D 0041 0000 006B 0015 0040 000E 000A 000E 002F 000E 002E 000E 000A 000E 0018 0012 001C 000E 000A 001C 0020 0032 0023 000E 002F 000E 000A 000E 000A 000E 002F 000E 000A 000E 002F 000E 002F 000E 000A 000E 000A 0010 0011 000D
[20:18:35][D][remote.pronto:240]: 0010 000E 000A 000E 002F 000E 002F 000E 000A 000E 002F 000E 000A 000E 000A 000E 002F 000E 002F 000E 000A 000E 002F 000E 000A 000E 002F 000E 000A 000E 000A 000E 002F 000E 002F 000E 000A 000E 000A 000E 002F 000E 000A 000E 002F 000F 002E 000E 000A 000E 0026 0018 000A 000F 002E 000E 000A 000E 000A 000E 002E 000E 000A 000F 002E 000E 000A 000E 002F 000F 002E 000E 000A 000E 002F 000E 000A 000E 000A 000E 002E 000E 002E 000E 000A 000E 06C3
[20:18:35][D][remote.pronto:238]: Received Pronto: data=0000 006D 0044 0000 0026 000D 000D 001B 000F 000E 0046 0056 0011 001C 0018 0025 000E 000A 000F 002E 000F 002E 000F 000A 000E 002E 000E 000A 000E 000A 000E 002F 000E 000A 000E 002E 000F 002E 000E 000A 0014 0041 000E 000A 000E 002F
[20:18:35][D][remote.pronto:240]: 000E 002F 000E 000A 000E 000A 000E 002F 000E 000A 0010 002D 000E 002E 000E 000A 000E 002E 000E 000A 000E 000A 000E 002F 000E 002E 000E 000A 000E 002F 000E 000A 000E 002F 000E 000A 000E 000A 000E 002F 000E 002F 000E 000A 000E 000A 000E 002F 000E 000A 000E 002E 000E 002F 000E 000A 000E 002E 000E 000A 000E 002F 000E 000A 000E 000A 000E 002F 000E 000A 000E 002F 000E 000A 000E 002F 000E 002F 000E 000A 000E 002E 000E 000A 000E 000A 000E 002E 000E 002F 000E 000A 000E 06C3
[20:18:35][D][remote.pronto:238]: Received Pronto: data=0000 006D 0003 0000 0015 001C 001F 0038 0015 06C3
[20:18:35][D][remote.pronto:238]: Received Pronto: data=0000 006D 0002 0000 0038 001A 0016 06C3

I tried to sort it out but with no luck.
Sadly there is no implementation for the “Arctech” protocol so I would be very thankful if someone could help me understand what to do.

I don’t understand your question. Pilight is based on RF in the 433MHz band. You cannot control it with infrared.

Of cause I’m using RF Hardware but both (RF and IR) uses the category “Remote-Receiver” in ESP Home.

The problem is that I don’t know how to use the data I’m receiving to transmit…