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):
| Index | RS-232 | CLI Command | Action |
|---|---|---|---|
| 0 | s cec hdmi out y on! | on | Power On |
| 1 | s cec hdmi out y off! | off | Power Off (Standby) |
| 2 | s cec hdmi out y vol+! | volup | Volume Up |
| 3 | s cec hdmi out y vol-! | voldown | Volume Down |
| 4 | s cec hdmi out y mute! | mute | Mute Toggle |
| 5 | s cec hdmi out y active! | active | Set Active Source |
Input Commands (Source Devices):
| Index | RS-232 | CLI Command | Action |
|---|---|---|---|
| 0 | s cec in x on! | on | Power On |
| 1 | s cec in x off! | off | Power Off |
| 2 | s cec in x vol+! | volup | Volume Up |
| 3 | s cec in x vol-! | voldown | Volume Down |
| 4 | s cec in x mute! | mute | Mute Toggle |
| 5 | s cec in x menu! | menu | Open Menu |
| 6 | s cec in x back! | back | Back/Return |
| 7 | s cec in x up! | up | Navigate Up |
| 8 | s cec in x down! | down | Navigate Down |
| 9 | s cec in x left! | left | Navigate Left |
| 10 | s cec in x right! | right | Navigate Right |
| 11 | s cec in x enter! | enter | Select/OK |
| 12 | s cec in x play! | play | Play |
| 13 | s cec in x pause! | pause | Pause |
| 14 | s cec in x stop! | stop | Stop |
| 15 | s cec in x rew! | rew | Rewind |
| 16 | s cec in x ff! | ff | Fast Forward |
| 17 | s cec in x prev! | prev | Previous Track |
| 18 | s cec in x next! | next | Next 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
- Verify the matrix IP address is correct:
MatrixSwitcher ip - Ensure the matrix is powered on and connected to the network
- Check that your computer can reach the matrix:
ping <matrix-ip>
Command Not Recognized
- Ensure input/output numbers are within valid range (1-8)
- Profile names with spaces should be enclosed in quotes
See Also
- TMRemote CLI - Unified display and matrix control
- TMRemote README - Main documentation
- Matrix Setup Guide - HDMI matrix configuration
- OREI API Documentation - HTTP JSON API reference