LIRCD.CONF(5)

πŸ“¦
version 0.10.2 Β· 3 versions
, in alpine 3.24, debian trixie, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– LIRCD.CONF πŸ’–

okay bestie, so this is lircd.conf β€” the main configuration file for lirc. it's a file formats manual page, and yes it's giving ancient-ritual energy, but we're gonna get through it together 🫢


✨ NAME ✨

lircd.conf β€” the lirc main configuration file. that's it, that's the name, slay.


🌸 DESCRIPTION 🌸

so this file has two whole jobs, and honestly? multitasking queen:

  • it hands timing info to the driver so the driver can decode the incoming data into button presses
  • it provides a mapping from those button presses to the key symbols that lircd(8) actually uses

the basic structure is just a list of remote blocks. whitespace and line breaks are the delimiters β€” that's how it knows where one thing ends and the next begins.

and if the comment character (#) shows up as the first character on a line, the rest of that line is ignored. gone. not invited. πŸ’…


πŸŽ€ REMOTE BLOCKS πŸŽ€

remote blocks come in two flavors: normal and raw.

Normal remote blocks begin with begin remote and end with end remote. the first part of the block describes the basic properties of the remote β€” that's the REMOTE DESCRIPTION SECTION, more on her below. after that comes a codes section, which is delimited by begin codes and end codes.

each line in a codes section has the name of a button on the remote, followed by a hexadecimal data value matching the data part of the IR frame (again, see REMOTE DESCRIPTION SECTION). ⚠️ and heads up: you may not assign the same name to two buttons in the same remote section. no duplicate names, periodt.

Raw remote blocks are literally identical to normal blocks except the codes section, which instead is a list of button descriptions enclosed by begin raw_codes and end raw_codes.

a raw button description begins with the parameter name followed by the name of the button. the button description ends with the next button description, or the end of the raw_codes block. the lines in between are a list of decimal numbers describing the signal that button sends. here's the tea:

  • the first number is the duration of the first pulse, in microseconds
  • the second number is the duration of the space that follows it
  • pulse and space durations alternate for as long as is necessary
  • the last duration should represent a pulse 🩷

πŸ¦‹ REMOTE DESCRIPTION SECTION πŸ¦‹

each line in this section has a parameter, followed by the value (or values) that should be assigned to that parameter. parameters are optional unless otherwise stated.

all values are decimal integers that are either dimensionless or have units of microseconds, unless otherwise stated. hexadecimal numbers should be prefixed by 0x. if the remote doesn't have a particular "feature," then the line may just be omitted β€” no pressure. and btw, the button code is sent just after the pre signal and just before the post signal. iykyk.

some parameters describe the bits in the IR protocol. the frame is normally defined like this:

|header|plead|pre data|pre|data|post|post data|ptrail|foot|gap|

where most parameters default to 0. some parameters change the overall frame layout, e. g. the repeat parameter. main character behavior honestly.


🌈 the parameters (all of them, no skips) 🌈

  • include "<path>" β€” include the given path using normal include semantics. if the path is relative, it's interpreted relative to the main lircd.conf file. <path> must be enclosed in double quotes. it can contain a glob(3) pattern, in which case all matching files get included. ✨
  • manual_sort <1|0> β€” normally, lircd tries to sort multiple remotes so the one that decodes fastest gets used first. setting manual_sort to 1 in any remote disables that and uses the remotes in the order they're listed in lircd.conf, or as the alphanumerically sorted filenames in lircd.conf.d. you're in charge now, bestie πŸ‘‘
  • name <remote name> β€” the unique name assigned to the remote control (may not contain whitespace). within a single file, all names must be unique. this parameter is mandatory. no name, no service.
  • suppress_repeat <repeats> β€” suppress a given number of repeats for all buttons in this remote. defaults to 0, which means no repeats are suppressed. note that lircrc has a corresponding repeat parameter which can suppress repeats for specific button/client combinations instead.
  • flags <flag1><|flag2>... β€” flags are special text strings describing various properties of the remote, and they determine the semantics of some of the following fields. multiple flags should be separated by the pipe (|) symbol. see FLAGS below 🚩
  • driver <driver name> β€” for lirccode drivers that don't have timing information, this optional driver attribute names the driver which is required to use this remote.
  • bits <number of data bits> β€” the number of data bits in the hexadecimal codes which describe each button (decimal integer).
  • eps <relative error tolerance> β€” the relative error tolerance for received signals, in percent. by default, irrecord sets this to 30 (i. e., 30%).
  • aeps <absolute error tolerance> β€” the absolute error tolerance for received signals (microseconds). the default is the hardcoded driver dependent resolution value. by default irrecord sets this to 100.
  • header <phead> <shead> β€” the initial pulse and space sent (microseconds).
  • three <pthree> <sthree> β€” only used by RC-MM remotes.
  • two <ptwo> <stwo> β€” only used by RC-MM remotes.
  • one <pone> <sone> β€” the pulse and space lengths representing a one.
  • zero <pzero> <szero> β€” the pulse and space lengths representing a zero.
  • ptrail <trailing pulse> β€” a trailing pulse, immediately following the post_data.
  • plead <leading pulse> β€” a leading pulse, immediately after the header.
  • foot <pfoot> <sfoot> β€” a pulse and space, immediately following the trailing pulse.
  • repeat <prepeat> <srepeat> β€” a pulse and space that replaces everything between the leading pulse and the trailing pulse, whenever a signal is repeated. the foot is not sent, and the header is not sent unless the REPEAT_HEADER flag is present.
  • pre_data_bits <number of pre_data_bits> β€” the number of bits in the pre_data code.
  • pre_data <hexadecimal number> β€” hexadecimal code indicating the sequence of ones and zeros immediately following the leading pulse.
  • post_data_bits <number of post data bits> β€” the number of bits in the post_data code.
  • post_data <hexadecimal number> β€” hexadecimal code indicating the sequence of ones and zeros immediately following the post signal.
  • pre <ppre> <spre> β€” a pulse and space immediately following the pre_data, used as a delimiter between pre data and data.
  • post <ppost> <spost> β€” a pulse and space immediately following the button code.
  • gap <gap length> β€” a (typically long) space which follows the trailing pulse.
  • repeat_gap <repeat_gap length> β€” a gap immediately following the trailing pulse, and preceding a repetition of the same code that's due to the same press of the button.
  • min_repeat <minimum number of repetitions> β€” the minimum number of times a signal is repeated when sent. note that 0 means the signal is sent only once. not used when receiving.
  • toggle_bit <bit to toggle> β€” a bit of the pre_data, code, or post_data that is toggled between one and zero each time a button is pressed. this parameter is obsoleted by toggle_bit_mask and should be used in new configs. πŸ’€
  • toggle_bit_mask <hexadecimal mask> β€” bits which are toggled between one and zero each time a button is pressed. the mask is applied to the concatenated value of pre data - data - post_data.
  • repeat_mask <mask> β€” mask defines which bits are inverted for repeats.
  • frequency <hertz> β€” remote carrier frequency, defaults to 38000.
  • duty_cycle <on time> β€” the percentage of time during a pulse that infrared light is being sent. this is an integer between 1-100 inclusive. default is 50.

πŸ’… FLAGS πŸ’…

flags are the values you set in the flags parameter. here's the whole roster:

  • RC5 β€” the remote uses the RC5 protocol.
  • RC6 β€” the remote uses the RC6 protocol.
  • RCMM β€” the remote uses the RC-MM protocol.
  • SHIFT_ENC β€” obsolete flag, now a synonym for RC5. the position of the pulse (before or after the space) determines whether the bit is a one or a zero.
  • SPACE_ENC β€” a one and a zero can be distinguished by the length of the spaces, used by the NEC protocol and others.
  • REVERSE β€” reverses the bit order of the pre_data, the post_data and the codes (e.g., 0x123 becomes 0xC48). if this flag is present, the least significant bit is sent first.
  • NO_HEAD_REP β€” the header is not sent when a signal is repeated (the button is held down) even though there is no special repeat code.
  • NO_FOOT_REP β€” the foot is not sent when a signal is repeated (the button is held down) even though there is no special repeat code.
  • CONST_LENGTH β€” the total signal length is always constant. the gap length now represents the length of the entire signal, and the actual gap at the end of the signal is adjusted accordingly.
  • RAW_CODES β€” the codes are in raw format.
  • REPEAT_HEADER β€” send the header when the signal is repeated even though the remote has a special repeat code.

😭 DISCLAIMER 😭

okay this part is important so listen up.

LIRC was designed to collect IR data and save it in a private, compact, yet human readable format, with the purpose of being able to re-transmit (or re-recognize) these signals. it was not designed with the goal of providing a well documented and tested configuration file format that could be used e.g. to generate arbitrary IR signals or to convert them to other formats. so the configuration file should thus not be considered a public interface to LIRC.

this manpage should be understood with this in mind. it was authored by reading the code of LIRC, and does not constitute an authoritative specification of the behavior of LIRC and its configuration file. also, some less commonly used flags and parameters are not documented. πŸ™ˆ

🌟 SEE ALSO 🌟


and that's the whole page, bestie πŸŽ€ this was lircd.conf version 0.10.2, with the last change back in Feb 2018 (she's vintage, she's iconic, she's been through things). go forth and configure your remotes, you absolute legend πŸ’–βœ¨πŸŒˆ