Wirch Command Reference

 

Change channels on a TV or cable tuner box by sending IR data via a Global Caché® networked IR blaster. A typical command looks like this:

user@boxen:~/Wire$ ./wirch -s 45

This would 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$ ./wirch -h
Wagner IR Channel Changer, v2.0

 Usage: wirch [-c connector] [-d n] [-h] [-i ip] [-p port] [-q]
              [-r remote] -s station [-t button] [-u] [-v]

 Where:
        -c connector   Set IR output connector   (default: 1)
        -d n           Seconds between IR digits (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)
        -s station     TV station channel
        -t button      Terminating button name   (default: )
        -u             Update config file
        -v             Verbose mode

 Default values are stored in the file ~/wired/wire.conf
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 digits (-d n)

Provide a decimal number of seconds to be inserted as a delay between each channel digit sent to the TV. 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/wirch.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. The remote must have buttons for all ten digits, and they must be named with a single character of ‘0’ through ‘9’.

Option: TV station channel (-s station)

This option is required for the purpose of specifying the number of the TV channel to be tuned. The only time that it is OK to not supply this option is when requesting the Help (-h) display. The format of the parameter for this option is a decimal number comprised of the digits 0-9 (e.g., 0, 55, 421, 999, etc).

Option: Terminating button name (-t button)

Most tuners will delay after channel number entry, before actually changing the channel. The assumption is that there may be more digits to be entered. Many remotes provide a ‘Go’ or ‘Enter’ button to force the channel change immediately. You can supply that button name with this option. This makes channel changing more responsive.

Option: Update configuration file (-u)

The following options requiring a parameter (-c, -d -i, -p, -r, and -t) 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 Wirch 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 Wirch 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 TV station (-s) is not saved in the configuration file and must be provided on every Wirch 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/wirch.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 4:13 pm