Convert HEX IR code to format for Flipper Zero

Hello!

Please help me to convert IR hex code to format for Flipper Zero
Here is an example:

JVC HRS2901U VHS recorder
Power button
0000 006c 00bc 0000 0140 009f 0014 003c 0014 003c 0014 0014 0014 0014 0014 0014 0014 0014 0014 003c 0014 0014 0014 003c 0014 003c 0014 0014 0014 003c 0014 0014 0014 0014 0014 0014 0014 0014 0014 037b 0014 003c 0014 003c 0014 0014 0014 0014 0014 0014 0014 0014 0014 003c 0014 0014 0014 003c 0014 003c 0014 0014 0014 003c 0014 0014 0014 0014 0014 0014 0014 0014 0014 037b 0014 003c 0014 003c 0014 0014 0014 0014 0014 0014 0014 0014 0014 003c 0014 0014 0014 003c 0014 003c 0014 0014 0014 003c 0014 0014 0014 0014 0014 0014 0014 0014 0014 037b 0014 003c 0014 003c 0014 0014 0014 0014 0014 0014 0014 0014 0014 003c 0014 0014 0014 003c 0014 003c 0014 0014 0014 003c 0014 0014 0014 0014 0014 0014 0014 0014 0014 037b 0014 003c 0014 003c 0014 0014 0014 0014 0014 0014 0014 0014 0014 003c 0014 0014 0014 003c 0014 003c 0014 0014 0014 003c 0014 0014 0014 0014 0014 0014 0014 0014 0014 037b 0014 003c 0014 003c 0014 0014 0014 0014 0014 0014 0014 0014 0014 003c 0014 0014 0014 003c 0014 003c 0014 0014 0014 003c 0014 0014 0014 0014 0014 0014 0014 0014 0014 037b 0014 003c 0014 003c 0014 0014 0014 0014 0014 0014 0014 0014 0014 003c 0014 0014 0014 003c 0014 003c 0014 0014 0014 003c 0014 0014 0014 0014 0014 0014 0014 0014 0014 037b 0014 003c 0014 003c 0014 0014 0014 0014 0014 0014 0014 0014 0014 003c 0014 0014 0014 003c 0014 003c 0014 0014 0014 003c 0014 0014 0014 0014 0014 0014 0014 0014 0014 037b 0014 003c 0014 003c 0014 0014 0014 0014 0014 0014 0014 0014 0014 003c 0014 0014 0014 003c 0014 003c 0014 0014 0014 003c 0014 0014 0014 0014 0014 0014 0014 0014 0014 037b 0014 003c 0014 003c 0014 0014 0014 0014 0014 0014 0014 0014 0014 003c 0014 0014 0014 003c 0014 003c 0014 0014 0014 003c 0014 0014 0014 0014 0014 0014 0014 0014 0014 037b 0014 003c 0014 003c 0014 0014 0014 0014 0014 0014 0014 0014 0014 003c 0014 0014 0014 003c 0014 003c 0014 0014 0014 003c 0014 0014 0014 0014 0014 0014 0014 0014 0014 0014

See also RC: Infrared Hex Code Database: JVC HRS2901U Commands (Page 1)

I don’t think you’re getting lucky with this source. Even if it will be correct, it is very difficult to translate.

The JVC HRS2901U is a video recorder model, not the remote model. It seems to be very common to write about remotes with the name of the matching device, for me a little confusing.

When I google your VHS recorder, i get the following possible remotes: JVC HRS2901U TV/VCR Combo

At least one of it is already in the Lirc database: http://lirc.sourceforge.net/remotes/jvc/LP20878-009


Right now I’m about to compare
Source 1: https://github.com/logickworkshop/Flipper-IRDB/blob/main/Projectors/Epson/Epson.ir

name: Power
type: parsed
protocol: NECext
address: 83 55 00 00
command: 90 6F 00 00

Source 2: http://lirc.sourceforge.net/remotes/epson/12807990

KEY_POWER                0xC1AA09F6

We see, the address is different. But as a lot of Lirc sources have 2 instead of 4 octet, lets focus on 90 6F vs. 09F6. The values are twisted.

lupus@zoe:~$ echo "ibase=16;obase=2;906F"|bc
1001000001101111
lupus@zoe:~$ echo "ibase=16;obase=2;09F6"|bc
0000100111110110

I’ve added the first 0 in the second line. And the result is mirrored inverse. As Infrared is more or less just a switch 1 to 0, I can imagine the result is the same.


I really hope anybody can explain if I’m right with my assumptions, so far. Than it would be easy to write a converter from already existing Lirc files to flipper .ir files.

1 Like

Maybe someone is able to make sense of the following comparisons:

LIRC Database

KEY_0                    0x8877
KEY_1                    0x20DF
KEY_VOLUMEUP             0xE01F
KEY_VOLUMEDOWN           0xD02F

Samsung remote recorded with Flipper

# 
name: 0
type: parsed
protocol: Samsung32
address: 07 00 00 00
command: 11 00 00 00
# 
name: 1
type: parsed
protocol: Samsung32
address: 07 00 00 00
command: 04 00 00 00
# 
name: vol+
type: parsed
protocol: Samsung32
address: 07 00 00 00
command: 07 00 00 00
# 
name: vol-
type: parsed
protocol: Samsung32
address: 07 00 00 00
command: 0B 00 00 00

Flipper remote recorded with LIRC

KEY_0                    0xE0E08877 0xBEE5A1FC
KEY_1                    0xE0E020DF 0xBEE5A1FC
KEY_VOLUMEUP             0xE0E0E01F 0xBEE5A1FC
KEY_VOLUMEDOWN           0xE0E0D02F 0xBEE5A1FC