MatrixSwitcher CLI

OREI HDMI Matrix Command Line Tool

Standalone command-line utility for controlling OREI HDMI matrix switches

MatrixSwitcher.exe provides direct control of OREI HDMI matrix switches over the network. For unified display and matrix control, see TMRemote CLI.

Installation

MatrixSwitcher is a standalone command-line tool. No installation required - simply run the executable from any location.

First-Time Setup

Before using MatrixSwitcher, configure the IP address of your OREI matrix:

MatrixSwitcher ip 192.168.1.50

This setting is saved and persists between sessions.

Commands

Routing Commands

Route HDMI inputs to outputs on your matrix switch.

Command Description
route <input> <output> Route a single input (1-8) to an output (1-8)
route <input> all Route a single input to all outputs
route 1:1,2:2,... Set multiple routes using input:output pairs

Examples:

# Route input 1 to output 2
MatrixSwitcher route 1 2

# Route input 3 to all outputs
MatrixSwitcher route 3 all

# Set multiple routes at once
MatrixSwitcher route 1:1,2:2,3:3,4:4

Preset Commands

Device presets are stored on the matrix hardware itself.

Command Description
preset <1-8> Recall a device preset
preset save <1-8> Save current routing to a device preset

Examples:

# Load device preset 1
MatrixSwitcher preset 1

# Save current routing to preset 3
MatrixSwitcher preset save 3

Profile Commands

Profiles are software-based routing configurations stored on your computer.

Command Description
load <profile> Load a matrix profile from file
save <profile> Save current routing to a profile file

Examples:

# Load the 'Gaming' profile
MatrixSwitcher load Gaming

# Save current routing as 'Movie Night' profile
MatrixSwitcher save "Movie Night"

Power Commands

Control the power state of the matrix.

Command Description
power on Turn the matrix on
power off Turn the matrix off
power status Show current power status

Examples:

# Power on the matrix
MatrixSwitcher power on

# Check power status
MatrixSwitcher power status

Status Command

Display current routing configuration and device status.

MatrixSwitcher status

Audio Commands

Configure external audio input and SPDIF settings.

Command Description
audio <0-8> Set external audio input (0=off, 1-8=input)
audio mode <0-2> Set SPDIF mode

SPDIF Modes:

Mode Description
0 Bind Input - Audio follows the input source
1 Bind Output - Audio is tied to output
2 Matrix - Independent audio matrix routing

Examples:

# Set external audio to input 2
MatrixSwitcher audio 2

# Disable external audio
MatrixSwitcher audio 0

# Set SPDIF to Matrix mode
MatrixSwitcher audio mode 2

CEC Commands (HDMI-CEC)

Control connected HDMI devices via CEC (Consumer Electronics Control). Supports power control, volume, and playback commands.

Output Device Commands (TVs/Displays)

Command Description
cec on Power on all output displays
cec off Power off all output displays
cec output <n|all> on Power on specific output(s)
cec output <n|all> off Power off specific output(s)
cec output <n|all> volup Increase volume
cec output <n|all> voldown Decrease volume
cec output <n|all> mute Toggle mute
cec output <n|all> active Set as active source (wake TV + switch input)

Input Device Commands (Sources)

Command Description
cec input <n|all> on|off Power control
cec input <n|all> play|pause|stop Playback control
cec input <n|all> rew|ff Rewind / Fast forward
cec input <n|all> prev|next Previous / Next track
cec input <n|all> menu|back Menu navigation
cec input <n|all> up|down|left|right|enter D-pad navigation

Examples:

# Power on all displays
TMRemote cec on

# Power on display 1 only
TMRemote cec output 1 on

# Power off all displays
TMRemote cec off

# Send play command to input 2
TMRemote cec input 2 play

# Open menu on input 3 device
TMRemote cec input 3 menu

# Increase volume on output 1
TMRemote cec output 1 volup

CEC Command Index Reference

Command indices derived from OREI BK-808 RS-232 specification (pages 36-37):

Output Commands (TVs/Displays):

IndexRS-232CLI CommandAction
0s cec hdmi out y on!onPower On
1s cec hdmi out y off!offPower Off (Standby)
2s cec hdmi out y vol+!volupVolume Up
3s cec hdmi out y vol-!voldownVolume Down
4s cec hdmi out y mute!muteMute Toggle
5s cec hdmi out y active!activeSet Active Source

Input Commands (Source Devices):

IndexRS-232CLI CommandAction
0s cec in x on!onPower On
1s cec in x off!offPower Off
2s cec in x vol+!volupVolume Up
3s cec in x vol-!voldownVolume Down
4s cec in x mute!muteMute Toggle
5s cec in x menu!menuOpen Menu
6s cec in x back!backBack/Return
7s cec in x up!upNavigate Up
8s cec in x down!downNavigate Down
9s cec in x left!leftNavigate Left
10s cec in x right!rightNavigate Right
11s cec in x enter!enterSelect/OK
12s cec in x play!playPlay
13s cec in x pause!pausePause
14s cec in x stop!stopStop
15s cec in x rew!rewRewind
16s cec in x ff!ffFast Forward
17s cec in x prev!prevPrevious Track
18s cec in x next!nextNext Track

HTTP JSON API Format:

POST /cgi-bin/instr
{
  "comhead": "cec command",
  "language": 0,
  "object": 0,              // 0=input, 1=output
  "port": [1,0,0,0,0,0,0,0], // selected ports (1=yes)
  "index": 0                // command index from tables above
}

IP Configuration

Configure the network address of your OREI matrix.

Command Description
ip <address> Set the matrix IP address (saved to settings)
ip Show the current matrix IP address

Examples:

# Set the matrix IP address
MatrixSwitcher ip 192.168.1.50

# Display current IP address
MatrixSwitcher ip

Configuration Files

Settings Location

%APPDATA%\MonitorSwitcher\Matrix\

Profile Location

Profiles are stored as XML files:

%APPDATA%\MonitorSwitcher\Matrix\*.xml

Quick Reference

MatrixSwitcher <command> [options]

Commands:
  route <input> <output>    Route input to output (1-8)
  route <input> all         Route input to all outputs
  route 1:1,2:2,...         Set multiple routes (input:output pairs)

  preset <1-8>              Recall device preset
  preset save <1-8>         Save current routing to device preset

  load <profile>            Load a matrix profile from file
  save <profile>            Save current routing to profile file

  power on|off              Turn matrix power on or off
  power status              Show power status

  status                    Show current routing and status

  audio <0-8>               Set external audio input (0=off, 1-8=input)
  audio mode <0-2>          Set SPDIF mode (0=Bind, 1=Bind Output, 2=Matrix)

  cec on|off                Power all outputs on/off
  cec output <n|all> <cmd>  TV: on|off|volup|voldown|mute|active
  cec input <n|all> <cmd>   Source: on|off|play|pause|menu|...

  ip <address>              Set matrix IP address (saved to settings)
  ip                        Show current matrix IP address

Troubleshooting

Connection Issues

Command Not Recognized

See Also

Top