Wircmd Command Reference

 

Send IR data via a Global Caché® networked IR blaster. A typical command looks like this:

user@boxen:~/Wire$ ./wircmd -s "POWER,4,5"

This would turn the power on and change the channel to 45 on the connected TV. This assumes that the ~/wired/wire.conf file has been setup to your requirements.

Contents

_________________________
Command Line Options
Configuration File
_________________________


Command Line Options

user@boxen:~/Wire$ ./wircmd -h
Wagner IR Commander, v1.0

 Usage: wircmd [-b buttons] [-c connector] [-d n] [-h] [-i ip]
              [-p port] [-q] [-r remote] [-u] [-v]

 Where:
        -b buttons     List of buttons to send
        -c connector   Set IR output connector     (default: 1)
        -d n           Seconds between IR commands (default: 0.5)
        -h             Help (this screen)
        -i ip          Set ip address              (default: 192.168.1.70)
        -p port        Set command port            (default: 4998)
        -q             Enable quiet mode
        -r remote      Name of IR remote           (default: default)
        -u             Update config file
        -v             Verbose mode

 Default values are stored in the file ~/wired/wire.conf

Option: List of buttons to send (-b button)

A comma separated list of button names. The IR codes are sent in sequence to the IR emitter. The list of button names may have to be enclosed in quotes.

Option: Set IR output connector (-c connector)

Selects one of the three connectors on the iTach device for output of the IR data.

Option: Seconds between IR commands (-d n)

Provide a decimal number of seconds to be inserted as a delay between each IR command sent. The value can be a fraction of a second. (e.g., 0.5)

Option: Help screen (-h)

Display the command line options. Options with values will show the default values currently stored in the configuration file.

Option: Set ip address (-i ip)

Once you discover the IP address assigned to your iTach device you will need to supply it with this option.

Option: Set command port (-p port)

The IP port number used by the iTach device. There are very few reasons to alter this value from the default of 4998.

Option: Enable quiet mode (-q)

Turn off all output to users console. Standard output and standard error are redirected to a file called ~/wired/wircmd.log

Option: Name of IR remote (-r remote)

This option sets the name of the remote. There must be a corresponding remote file or an error will occur. Remote names containing spaces will need to be quoted.

Option: Update configuration file (-u)

The following options requiring a parameter (-c, -d -i, -p, and -r) derive their default values from the Wire configuration file. Providing one of these options overrides the default configuration. You may write these command line values to the configuration file with the ‘-u‘ option. The next invocation of Wircmd will therefore use the newly saved values, eliminating the need to provide them on the command line. For example, the default for the IP address in the ‘-i‘ option shown above is 192.168.1.70, but the following Wircmd command:

user@boxen:~/Wire$ ./wirch -i 172.16.1.100 -s 2 -u

changes the configuration file to reflect 172.16.1.100 as the new default IP address.

NOTE: The button list (-b) is not saved in the configuration file and must be provided on every Wircmd command line.

Option: Verbose mode (-v)

Display messages showing the channel change operation in great detail. These messages are normally displayed on the terminal but will be redirected to the ~/wired/wircmd.log if combined with the ‘-q‘ switch.


Configuration File

# ********************************************************
# Default values used by "wire", "wirch" and "wircmd"
# Edit these for your specific needs
# ********************************************************

# - IP address assigned to iTach device
# Out of the box, an iTach device is assigned the ip address: 169.254.1.70
ip_address="192.168.1.70"

# - Command port number of iTach device
# This default value is unlikely to ever change.
command_port="4998"

# - Number of learn attempts that must match
# A value of 1 shuts off the mechanism and
# just accepts whatever the first attempt provides.
# This parameter only used by wire utility
learn_strength="3"

# - Number of learn attempts before quiting
# Otherwise the program may get caught in an infinite loop.
# This parameter only used by wire utility
learn_attempts="10"

# - Name of chosen remote
# Remotes are stored in your home directory
# under wired/remotes. Each is a file with the 'txt' extension.
ir_remote="default"

# - IR Blaster connector port number (1-3)
# This parameter only used by wirch and wircmd utilities.
ir_connector="1"

# - Delay in seconds between each IR character transmitted
# This parameter only used by wirch and wircmd utilities.
digit_delay="0.5"

# - Name of button to be sent after channel number
# This parameter only used by wirch utility.
terminal_button=""
 Posted by at 9:44 am