irrecord -a <file>
irrecord --help | --version
If file is not specified it defaults to "irrecord.lircd.conf"
If file already exists and contains a valid config irrecord will use the protocol description found there and will only try to record the buttons.
- -a --analyse
- Analyse a raw_codes config file, trying to convert it to a regular configuration.
- -u --update
- Add new buttons to an existing config file. No protocol information is updated.
- -f --force
- Force raw mode. Use this if recording fails otherwise. This creates a raw codes configuration file which can be used as-is or converted using the -a option.
- -n --disable-namespace
- Disable namespace checks.
- -l --list-namespace
- List valid button names.
- -H --driver=driver
- Use given driver. -H help lists available drivers.
- -d --device=device
- Read from given device. Use mode2(1) --list-devices to list available devices for a driver.
- -U --plugindir=directory
- Load drivers from directory. See DRIVER LOADING.
- -k --keep-root
- Don't drop root privileges after opening device. See RUNNING AS ROOT.
- -A, --driver-options key:value[|key:value...]
- Set one or more options for the driver. The argument is a list of key:value pairs delimited by '|'. The key can not contain spaces, but such are allowed in the value part. Certain characters including '#' and ';' are used as comment markers in the config file and are not allowed anywhere.
- -D --loglevel=level
- Determine the amount of logging information. [level] can be a symbolic syslog level: 'error','warning, 'info', 'notice' or 'debug'. lirc also defines three additional levels 'trace', 'trace1' and 'trace2' which gives even more messages ('trace2' bringing the most). However, in the log these messages are marked as 'debug'. The level can also be an integer in the range 3 (almost no messages) to 10.
- -O, --options-file <path>
- File containing default values for all options. A relative path is interpreted from current directory. See [FILES] below.
- -h --help
- Display this message.
- -v --version
- Display version.
When driver and device is known it saves some work to update lirc_options.conf with the new values. irrecord uses the [lircd] section as a fallback, so with a proper lirc_options.conf irrecord could be run without command line options.
Using an existing file as a template can sometimes be required for irrecord to work. If using one of the generic templates it can also provide better timing. See PROTOCOL PARAMETERS AND TEMPLATES.
If the program fails to recognize the protocol of the remote control you could use the --force option to at least create a config file in raw mode.
Using the config file, start lircd and irw. Keeping a button pressed down, you should see something like:<
0000000000f40bf0 00 KEY_1 ANIMAX 0000000000f40bf0 01 KEY_1 ANIMAX 0000000000f40bf0 02 KEY_1 ANIMAX 0000000000f40bf0 03 KEY_1 ANIMAX 0000000000f40bf0 04 KEY_1 ANIMAX 0000000000f40bf0 05 KEY_1 ANIMAX
Note how the second field gets incremented. This must work for correct operation.
One reason to use a template is when irrecord fails to recognize the protocol in the beginning. In such cases, try to find an existing configuration from the same vendor using something like:
$ irdb-get find motorola # lots of remotes listed... $ irdb-get download motorola/VIP_1200.lircd.conf # Pick any $ cp VIP_1200.lircd.conf my_remote.lircd.conf $ irrecord my_remote.lircd.conf
Invoking irrecord this way re-uses the existing protocol which usually works (vendors seldom changes protocol parameters).
Another reason to use an existing file is to get more exact timing, important when planning to also transmit (blast). In such cases, using a generic template found using irdb-get find generic has advantages since the timing values here are hand-crafted from specifications. To use these, you need to know which protocol your remote uses, though.
If decoding of IR commands does not work reliably you can try to modify the eps and aeps values in the lircd config file to adjust the tolerance of signal lengths. aeps is an absolute value while eps is a relative value expressed in percent. See lircd.conf(5)
sudo sh -c "echo 'lirc' > /sys/class/rc/rc0/protocol" cat /sys/class/rc/rc0/protocol
The path used for this is determined by (falling priority):
- The --plugindir option.
- The 'plugindir' entry in the [lircd] section of the lirc_options.conf file.
- The environment variable LIRC_PLUGINDIR.
- A hardcoded default (/usr/lib/lirc/plugins).
In order to cope with this, irrecord by default drops root privileges after opening the input device. This support is based on that root permissions are accquired using sudo(1) e. g., using
$ sudo irrecord --device /dev/lirc0 --driver defaultIf not using sudo, the same behaviour could be accomplished using the SUDO_USER environment variable e. g.,
# SUDO_USER=$LOGNAME irrecord --device /dev/lirc0 --driver defaultThe --keep-root option will make irrecord to keep root privileges for the complete run.
- The options file holding default values for command line options in the [irrecord] section. For some values including debug, plugindir, driver and device irrecord falls back to the [lircd] section if not found in [irrecord].
- The location of this file can be changed using the -O/--options-file command-line option or using the environment variable LIRC_OPTIONS_PATH.
- Debug output. Setting the XDG_CACHE_HOME environment variable relocates this file to $XDG_CACHE_HOME/irrecord.log
|Last change: May 2017||irrecord 0.10.1|