How to Convert Infrared send/receive from Tasmota to ESPHome?

Hi,

I have been using Tasmota to send and receive IR signals successfully. I would like to use my Tasmota-captured IR codes with an ESPHome IR Sender.

However, I’m having trouble with the terminology. The code in question is this:

{“Protocol”:“NEC”,“Bits”:32,“Data”:“0xFF38C7”,“DataLSB”:“0xFF1CE3”,“Repeat”:0}

Looking at the ESPHome specification, for NEC it wants:

  • address (Required, int): The address to send, see dumper output for more details.
  • command (Required, int): The NEC command to send.

I presume it is a matter of masking off the right bit patterns. However, I cannot find a conversion guide from Tasmota format to ESPHome format.

Can anyone point me at the appropriate resource please?

Thanks!

B.

If anyone else is interested…

I gave up and built an ESPHome IR signal capture receiver .

It turns out that for

{“Protocol”:“NEC”,“Bits”:32,“Data”:“0xFF38C7”,“DataLSB”:“0xFF1CE3”,“Repeat”:0}

The equivalent ESPHome code is

Received NEC: address=0xFF00, command=0xE31C

which looks very much like taking the “DataLSB” value and reversing each pair of bytes, then taking the first 4 for address and the last 4 for command.

That is with a sample of 1, however.

1 Like