Skip to content

Instantly share code, notes, and snippets.

@Aptimex
Created February 9, 2025 21:54
Show Gist options
  • Save Aptimex/02c8eee38cf1722da3bf429d79e0d642 to your computer and use it in GitHub Desktop.
Save Aptimex/02c8eee38cf1722da3bf429d79e0d642 to your computer and use it in GitHub Desktop.
Flipper Zero RAW IR file to ESPHome Remote Transmitter

Example Zlipper Zero RAW IR file:

Filetype: IR signals file
Version: 1
# 
name: RAW_155
type: raw
frequency: 38000
duty_cycle: 0.330000
data: 3975 4024 485 1997 484 1996 485 ...

Simplified explanations:

  • The frequency: represents the signal's carrier frequency in Hz. 38000 (38kHz) is very common.
  • The data_cycle: kind of represents how "bright" the LED was; a value of 1 is full brightness. This value usually doesn't matter here.
  • Each number in the data: section indicates the duration (in microseconds) of an alternating digital HIGH and digital LOW signal, as recorded by the Flipper's IR receiver. The first number is always a HIGH value.

ESPHome's Remote Transmitter component includes a transmit_raw action that can be used to replicate this captured signal. But unlike the Flipper file, it requires the data values to be explicitely marked as HIGH or LOW.

  • HIGH is represented by positive values
  • LOW is represented by negative values

To convert to ESPHome's raw data format, just make every other data value negative, separate each value with a comma, and enclose the entire list in square brackets. So the above data would become:

- remote_transmitter.transmit_raw:
  carrier_frequency: 38kHz
  code: [3975, -4024, 485, -1997, 484, -1996, 485, ...]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment