New IR RAW code RX/TX support
Posted: 25 Sep 2018, 11:19
Greetings,
I've added support into P016 (IR RX aka TSOP4838) and P035 (IR TX) for reading and printing out RAW IR codes, and submitting for trasmit. It uses a new format that is short enough to be sent as a command, but also allows easy inspections and modifications after the code is constructed. I called it 'RAW2'. It functions independently of GusPS's RAW format, which has implemented a B32 compressed format. The new RAW2 support prints out a line to the log (Info level) similar to the following:
Which can then be used as a command, either in a rule, an MQTT or HTTP.
The RAW2 format is as follows:
Hope this helps anyone...
Cheers,
Gilad
I've added support into P016 (IR RX aka TSOP4838) and P035 (IR TX) for reading and printing out RAW IR codes, and submitting for trasmit. It uses a new format that is short enough to be sent as a command, but also allows easy inspections and modifications after the code is constructed. I called it 'RAW2'. It functions independently of GusPS's RAW format, which has implemented a B32 compressed format. The new RAW2 support prints out a line to the log (Info level) similar to the following:
Code: Select all
IRSEND,RAW2,191C1E1^30161H15151716*2151,38,267,134
The RAW2 format is as follows:
- IRSEND,RAW2,<code>,<frequency in KHz>,<pulse multiplier>,<blank multiplier>
- Every pulse or blank timing is converted into a multiplier to be multiplied by the corresponding pulse or blank multiplier.
- The multiplier is then encoded in the code as a single B32 Hex digit (0-9A-V).
- If the multiplier is greater than 31, it is encoded as two B32 digits with a '^' sign prepended.
- If 2 multipliers repeat, for example: 454545, they are replaced by '*' and a single times digit, and then the two multipliers. For eaxmple: *345.
Hope this helps anyone...
Cheers,
Gilad