Cannot get WLED to recognise codes from IR remote

I’m trying to use an old IR remote I have with WLED.

I have got the raw codes from the remote using an Arduino:

Protocol=NEC Address=0xC031 Command=0x87 Raw-Data=0x7887C031 32 bits LSB first
Send with: IrSender.sendNEC(0xC031, 0x87, <numberOfRepeats>);

Protocol=NEC Address=0xC031 Command=0x87 Repeat gap=42100us

By comparing the codes generated for a standard 24 key remote and the official 24 key ir.json ChatGPT gave me a method of converting the raw data to usable codes.

Take the first 3 32 bit ‘words’:
0x78 0x87 0xC0
01111000 10000111 11000000

Reverse the bits:
00011110 11100001 00000011
0x1E 0xE1 0x03

Reverse the order of the ‘words’ to get the final code to enter in ir.json:
0x03E11E

I ‘confirmed’ this method works by comparing the codes received by my arduino for a working standard 24 key IR remote and generating the WLED codes using this method and they matched the ones used in the official 24 key ir.json.

So I applied this method to the target remote I want to use but WLED doesn’t seem to recognise the codes.

Can anyone help me debug this? Could there be something else about the remote I am using that means it won’t work with WLED. I am running WLED on a dig2go controller that is a little broken (some gpio pins aren’t working, am waitng for replacement) but seems to recognise the standard remote just fine.

monitor serial output using wled.

Can you do that with a dig2go controller? I’ve plugged it into my pc but have no idea what board to select in Arduino IDE.

Ok, I seemed to have solved it.

I had to select ESP-32 Dev Module as the board, but then I had to recompile a dig2go WLED build including -D WLED_DEBUG flag in the dig2go section of the platformio_overide.ini file to get the serial monitor to print anything interesting. Flashed that to the controller and then could read the ir codes in Arduino IDE.

Didn’t have to manipulate the codes at all to get them to work in the ir.json. Interesting how chatgpt came up with a clever bit manipulation to get the codes from my original ir code reading sketch to match the existing ones for the working controller, but it wasn’t actually the correct method.