Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Python command line tool to blast IR commands via LIRC
Fetching latest commit…
Cannot retrieve the latest commit at this time.
|Failed to load latest commit information.|
# lirc-blaster Python command line tool to blast IR commands via LIRC THIS WILL NOT WORK WITH ANY SERVICE BASED APPLIATION. TRANSMIT.EXE USES THE CLIPBOARD TO PASS COMMANDS TO WINLIRC, AND THAT DOESN'T WORK WITH SERVICES. IF YOU'RE USING NPVR THIS PROGRAM WILL DEFINITELY NOT WORK FOR YOU. Prerequisites: LIRC must be installed, configured, and working. Python 2.7.x must be installed (Python 3.x may work but has not been tested). To install download and unzip in any directory. Copy settings-example.py to settings.py and make any needed changes. (See preference file for description of options). Usage: execute.py [-h] [-c CHANNEL | -m 'CMDS'] [-n 'POSTCHANNEL'] [-r 'REMOTENAME'] [-b 'PRECMD'] [-e 'POSTCMD'] [-w WAIT] [-a] [-o] Optional arguments: -h, --help show this help message and exit -c CHANNEL, --channel CHANNEL the channel number -m 'CMDS', --cmds 'CMDS' arbitrary string of commands -n 'POSTCHANNEL', --postchannel 'POSTCHANNEL' the command to send after the channel number -r 'REMOTENAME', --remotename 'REMOTENAME' the remote name LIRC should target -b 'PRECMD', --precmd 'PRECMD' the string of commands (separated by pipe) to send before any other commands -e 'POSTCMD', --postcmd 'POSTCMD' the string of commands (separated by pipe) to send after any other commands -w WAIT, --wait WAIT the amount of time (in seconds) to wait between commands -a, --forcepre force pre commands to run no matter what -o, --forcepost force post commands to run no matter what Notes: If you use a pipe in any command string, you must surround the string with single quotes. An empty pipe in a command string is interpreted as an extra wait. -c and -m CANNOT be used together. You will get a command line error if you try. -n is ignored if you don't use -c There are some additional setting options in the settings file to run a custom command separate from LIRC. lirc-blaster triggers the external options if a key starts with the string defined in custom_pre (by default CUSTOM_). There are series of other options to set in the settings file. Please see settings-example.py for more information on what they are. When fully configured, the custom command will be structured like this: custom_exe[SPACE]custom_cmd_pre[NO SPACE]PATHTOFILESINcustom_files[NOSPACE]COMMAND[NOSPACE]custom_cmd_post I don't except (or really recommend) that anyone actually use this, but I needed this because I had one remote command I wanted to send that isn't in any standard LIRC config, and I couldn't get WinLIRC to learn any commands from my remotes. So I used this to call igclient.exe from IguanaWorks to send a set of pulses via the blaster I have.