OREI HDMI Matrix Switch - HTTP API Reference
API Endpoint
Base URL:http://{device_ip}/cgi-bin/instr
Method: POST
Content-Type: application/json
Accept: application/json
Default Behavior: When a POST request is sent without a body (empty POST), the device returns either get video status or get output status depending on firmware version.
Important Notes for Windows Users
When using curl on Windows Command Prompt (CMD), you must:
- Remove the space after the
-dflag - Use double quotes and escape them with backslash (
\") - Do NOT use single quotes (they don't work in CMD)
-d"{\"comhead\":\"get system status\",\"language\":0}"
Unix/Linux/PowerShell Format:
-d '{"comhead":"get system status","language":0}'
Quick Reference Table
| Function | HTTP Endpoint | Method | Command (comhead) |
|---|---|---|---|
| Get System Status | /cgi-bin/instr |
POST | get system status |
| Get Video Status | /cgi-bin/instr |
POST | get video status |
| Get Output Status | /cgi-bin/instr |
POST | get output status |
| Get Input Status | /cgi-bin/instr |
POST | get input status |
| Switch Video | /cgi-bin/instr |
POST | video switch |
| TX Stream Control | /cgi-bin/instr |
POST | tx stream |
| ARC Control | /cgi-bin/instr |
POST | set arc |
| Video Scaler | /cgi-bin/instr |
POST | video scaler |
| Set EDID | /cgi-bin/instr |
POST | set edid |
| Output CEC Command | /cgi-bin/instr |
POST | cec command (object: 1) |
| Input CEC Command | /cgi-bin/instr |
POST | cec command (object: 0) |
| Power Control | /cgi-bin/instr |
POST | set poweronoff |
| Preset Recall (Set) | /cgi-bin/instr |
POST | preset set |
| Preset Save | /cgi-bin/instr |
POST | preset save |
| Preset Clear | /cgi-bin/instr |
POST | preset clear |
| Preset Rename | /cgi-bin/instr |
POST | preset name |
| Panel Lock | /cgi-bin/instr |
POST | set panel lock |
| Beep Control | /cgi-bin/instr |
POST | set beep |
Quick Command Reference (Windows CMD)
All commands use the same endpoint: http://192.168.0.100/cgi-bin/instr
curl -X POST http://192.168.0.100/cgi-bin/instr -H "Accept: application/json" -H "Content-Type: application/json" -d"{\"comhead\":\"get system status\",\"language\":0}"
Get Video Status (routing + preset names):
curl -X POST http://192.168.0.100/cgi-bin/instr -H "Accept: application/json" -H "Content-Type: application/json" -d"{\"comhead\":\"get video status\",\"language\":0}"
Get Output Status (connections + audio settings):
curl -X POST http://192.168.0.100/cgi-bin/instr -H "Accept: application/json" -H "Content-Type: application/json" -d"{\"comhead\":\"get output status\",\"language\":0}"
Get Input Status (input names + settings):
curl -X POST http://192.168.0.100/cgi-bin/instr -H "Accept: application/json" -H "Content-Type: application/json" -d"{\"comhead\":\"get input status\",\"language\":0}"
Quick Status Check (empty POST - returns default status):
curl -X POST http://192.168.0.100/cgi-bin/instr -H "Accept: application/json" -H "Content-Type: application/json"
Recall Preset (load saved routing):
curl -X POST http://192.168.0.100/cgi-bin/instr -H "Accept: application/json" -H "Content-Type: application/json" -d"{\"comhead\":\"preset set\",\"language\":0,\"index\":1}"
Detailed Examples
1. Get System Status
Endpoint:POST http://192.168.1.168/cgi-bin/instr
Request Headers:
Accept: application/json
Content-Type: application/json
Request Body:
{
"comhead": "get system status",
"language": 0
}
Response Example:
{
"comhead": "get system status",
"power": 1,
"baudrate": 2,
"beep": 1,
"lock": 0,
"mode": 0,
"version": "1.0.5"
}
curl Example (Unix/Linux/Mac/PowerShell):
curl -X POST http://192.168.1.168/cgi-bin/instr \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"comhead":"get system status","language":0}'
curl Example (Windows CMD):
curl -X POST http://192.168.0.100/cgi-bin/instr -H "Accept: application/json" -H "Content-Type: application/json" -d"{\"comhead\":\"get system status\",\"language\":0}"
2. Get Video Status
Endpoint:POST http://192.168.1.168/cgi-bin/instr
Request Headers:
Accept: application/json
Content-Type: application/json
Request Body:
{
"comhead": "get video status",
"language": 0
}
Note: This is the default command when no body is provided. You can get video status by sending an empty POST request.
Response Example:
{
"comhead": "get video status",
"power": 1,
"allsource": [5, 5, 3, 2, 5, 6, 7, 1, 0],
"allinputname": ["Atom", "Mige", "AIX1", "KVM-A", "KVM-B", "USBC-A", "Input7", "Input8"],
"alloutputname": ["OG-Orei1", "NEO-HDMI2", "Output3", "Output4", "Output5", "Output6", "Output7", "SAM-HDMI1-Port"],
"allname": ["Atom-4", "Preset2", "Preset3", "Preset4", "Preset5", "Preset6", "Preset7", "Preset8"]
}
Response Fields:
power: Matrix power status (1=ON, 0=Standby)allsource: Array showing which input feeds each output (index 0 = Output 1, etc.)
[5, 5, 3, 2, 5, 6, 7, 1, 0] means:
- Output 1 ← Input 5 (KVM-B)
- Output 2 ← Input 5 (KVM-B)
- Output 3 ← Input 3 (AIX1)
- Output 8 ← Input 1 (Atom)
- The 9th element (0) appears to be padding/unused
allinputname: User-defined names for inputs (8 inputs total)alloutputname: User-defined names for outputs (8 outputs total)allname: User-defined preset names (8 presets available)
curl -X POST http://192.168.1.168/cgi-bin/instr \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"comhead":"get video status","language":0}'
curl Example (Windows CMD):
curl -X POST http://192.168.0.100/cgi-bin/instr -H "Accept: application/json" -H "Content-Type: application/json" -d"{\"comhead\":\"get video status\",\"language\":0}"
Quick Status Check (no body required - Windows CMD):
curl -X POST http://192.168.0.100/cgi-bin/instr -H "Accept: application/json" -H "Content-Type: application/json"
3. Get Output Status
Endpoint:POST http://192.168.1.168/cgi-bin/instr
Request Headers:
Accept: application/json
Content-Type: application/json
Request Body:
{
"comhead": "get output status",
"language": 0
}
Response Example:
{
"comhead": "get output status",
"power": 1,
"allconnect": [1, 1, 0, 0, 0, 0, 0, 1],
"name": ["OG-Orei1", "NEO-HDMI2", "Output3", "Output4", "Output5", "Output6", "Output7", "SAM-HDMI1-Port"],
"allscaler": [3, 3, 0, 0, 0, 0, 0, 3, 255],
"allhdr": [0, 0, 0, 0, 0, 0, 0, 0, 0],
"allhdcp": [3, 3, 3, 3, 3, 3, 3, 3, 3],
"allarc": [0, 0, 0, 0, 0, 0, 0, 0, 0],
"allout": [1, 1, 1, 1, 1, 1, 1, 1, 1],
"allaudiomute": [0, 0, 0, 0, 0, 0, 0, 0, 0]
}
Field Descriptions:
power: Matrix power status (1=ON, 0=Standby)allconnect: Display connection status per output (1=connected, 0=not connected)name: User-defined names for each output (8 outputs total)allscaler: Scaler mode for each output (0=off, 3=auto/specific mode)allhdr: HDR status per output (0=disabled, 1=enabled)allhdcp: HDCP mode per output (3=specific mode)allarc: ARC (Audio Return Channel) status per output (0=disabled, 1=enabled)allout: Output enable status (1=enabled, 0=disabled)allaudiomute: Audio mute status per output (0=unmuted, 1=muted)
Unix/Linux/PowerShell:
curl -X POST http://192.168.1.168/cgi-bin/instr \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"comhead":"get output status","language":0}'
Windows CMD:
curl -X POST http://192.168.0.100/cgi-bin/instr -H "Accept: application/json" -H "Content-Type: application/json" -d"{\"comhead\":\"get output status\",\"language\":0}"
Or simply send an empty POST (no -d flag) to get the default status (firmware-dependent):
curl -X POST http://192.168.0.100/cgi-bin/instr -H "Accept: application/json" -H "Content-Type: application/json"
This returns either "get video status" or "get output status" depending on firmware version.
4. Get Input Status
Endpoint:POST http://192.168.1.168/cgi-bin/instr
Request Headers:
Accept: application/json
Content-Type: application/json
Request Body:
{
"comhead": "get input status",
"language": 0
}
Response Example:
{
"comhead": "get input status",
"edid": [21, 21, 18, 18, 1, 1, 1, 1],
"inactive": [0, 0, 0, 0, 1, 1, 1, 1],
"inname": ["Xbox", "PS5", "Apple TV", "PC", "Input 5", "Input 6", "Input 7", "Input 8"],
"power": [1, 1, 1, 1, 0, 0, 0, 0]
}
curl Example (Unix/Linux/Mac/PowerShell):
curl -X POST http://192.168.1.168/cgi-bin/instr \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"comhead":"get input status","language":0}'
curl Example (Windows CMD):
curl -X POST http://192.168.0.100/cgi-bin/instr -H "Accept: application/json" -H "Content-Type: application/json" -d"{\"comhead\":\"get input status\",\"language\":0}"
5. Preset Commands
Endpoint:POST http://192.168.0.100/cgi-bin/instr
Request Headers:
Accept: application/json
Content-Type: application/json
5.1 Recall Preset (Set)
Loads a saved preset configuration (recalls routing from preset slot).
Request Body:{
"comhead": "preset set",
"language": 0,
"index": 1
}
Parameters:
index: Preset number (1-8)
{"comhead":"preset set","result":1}
curl Examples:
Unix/Linux/PowerShell:
curl -X POST http://192.168.0.100/cgi-bin/instr \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"comhead":"preset set","language":0,"index":1}'
Windows CMD:
curl -X POST http://192.168.0.100/cgi-bin/instr -H "Accept: application/json" -H "Content-Type: application/json" -d"{\"comhead\":\"preset set\",\"language\":0,\"index\":1}"
5.2 Save Preset
Saves the current routing configuration to a preset slot.
Request Body:{
"comhead": "preset save",
"language": 0,
"index": 1
}
Windows CMD:
curl -X POST http://192.168.0.100/cgi-bin/instr -H "Accept: application/json" -H "Content-Type: application/json" -d"{\"comhead\":\"preset save\",\"language\":0,\"index\":1}"
5.3 Clear Preset
Clears a preset slot.
Request Body:{
"comhead": "preset clear",
"language": 0,
"index": 1
}
Windows CMD:
curl -X POST http://192.168.0.100/cgi-bin/instr -H "Accept: application/json" -H "Content-Type: application/json" -d"{\"comhead\":\"preset clear\",\"language\":0,\"index\":1}"
5.4 Rename Preset
Changes the display name of a preset.
Request Body:{
"comhead": "preset name",
"language": 0,
"index": 1,
"name": "Atom-4"
}
Windows CMD:
curl -X POST http://192.168.0.100/cgi-bin/instr -H "Accept: application/json" -H "Content-Type: application/json" -d"{\"comhead\":\"preset name\",\"language\":0,\"index\":1,\"name\":\"Living Room\"}"
6. Switch Video Source
Endpoint:POST http://192.168.1.168/cgi-bin/instr
Request Headers:
Accept: application/json
Content-Type: application/json
Request Body:
{
"comhead": "video switch",
"language": 0,
"source": [3, 1]
}
Routes Input 3 to Output 1
Parameters:
source[0]: Input number (1-8)source[1]: Output number (1-8)
Route Input 1 to Output 1:
curl -X POST http://192.168.1.168/cgi-bin/instr \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"comhead":"video switch","language":0,"source":[1,1]}'
Route Input 5 to Output 3:
curl -X POST http://192.168.1.168/cgi-bin/instr \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"comhead":"video switch","language":0,"source":[5,3]}'
curl Examples (Windows CMD):
Route Input 1 to Output 1:
curl -X POST http://192.168.1.168/cgi-bin/instr -H "Accept: application/json" -H "Content-Type: application/json" -d"{\"comhead\":\"video switch\",\"language\":0,\"source\":[1,1]}"
Route Input 2 to Output 8:
curl -X POST http://192.168.1.168/cgi-bin/instr -H "Accept: application/json" -H "Content-Type: application/json" -d"{\"comhead\":\"video switch\",\"language\":0,\"source\":[2,8]}"
6. TX Stream Control
Endpoint:POST http://192.168.1.168/cgi-bin/instr
Request Headers:
Accept: application/json
Content-Type: application/json
Request Body:
{
"comhead": "tx stream",
"language": 0,
"out": [1, 1]
}
Enables TX stream on Output 1
Parameters:
out[0]: Output number (1-8)out[1]: State (0 = off, 1 = on)
Enable TX stream on Output 1:
curl -X POST http://192.168.1.168/cgi-bin/instr \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"comhead":"tx stream","language":0,"out":[1,1]}'
Disable TX stream on Output 4:
curl -X POST http://192.168.1.168/cgi-bin/instr \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"comhead":"tx stream","language":0,"out":[4,0]}'
7. Set ARC (Audio Return Channel)
Endpoint:POST http://192.168.1.168/cgi-bin/instr
Request Headers:
Accept: application/json
Content-Type: application/json
Request Body:
{
"comhead": "set arc",
"language": 0,
"arc": [1, 1]
}
Enables ARC on Output 1
Parameters:
arc[0]: Output number (1-8)arc[1]: State (0 = disabled, 1 = enabled)
Enable ARC on Output 1:
curl -X POST http://192.168.1.168/cgi-bin/instr \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"comhead":"set arc","language":0,"arc":[1,1]}'
Disable ARC on Output 2:
curl -X POST http://192.168.1.168/cgi-bin/instr \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"comhead":"set arc","language":0,"arc":[2,0]}'
8. Video Scaler
Endpoint:POST http://192.168.1.168/cgi-bin/instr
Request Headers:
Accept: application/json
Content-Type: application/json
Request Body:
{
"comhead": "video scaler",
"language": 0,
"scaler": [1, 3]
}
Sets Output 1 scaler to AUTO
Parameters:
scaler[0]: Output number (1-8)scaler[1]: Scaler mode
0 = BYPASS
- 1 = SCALE_4K_1080P
- 3 = AUTO
curl Examples:
Set Output 1 to AUTO scaler:
curl -X POST http://192.168.1.168/cgi-bin/instr \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"comhead":"video scaler","language":0,"scaler":[1,3]}'
Set Output 3 to BYPASS:
curl -X POST http://192.168.1.168/cgi-bin/instr \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"comhead":"video scaler","language":0,"scaler":[3,0]}'
Set Output 5 to SCALE_4K_1080P:
curl -X POST http://192.168.1.168/cgi-bin/instr \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"comhead":"video scaler","language":0,"scaler":[5,1]}'
9. Set EDID
Endpoint:POST http://192.168.1.168/cgi-bin/instr
Request Headers:
Accept: application/json
Content-Type: application/json
Request Body:
{
"comhead": "set edid",
"language": 0,
"edid": [1, 21]
}
Sets Input 1 EDID to 4K2K60_444, HD Audio 7.1 HDR
Parameters:
edid[0]: Input number (1-8)edid[1]: EDID mode (1-39, see EDID table below)
1= 1080P, Stereo Audio 2.02= 1080P, Dolby/DTS 5.13= 1080P, HD Audio 7.118= 4K2K60_444, HD Audio 7.121= 4K2K60_444, HD Audio 7.1 HDR
Set Input 1 to 4K HDR with 7.1 audio:
curl -X POST http://192.168.1.168/cgi-bin/instr \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"comhead":"set edid","language":0,"edid":[1,21]}'
Set Input 3 to 1080P with Dolby/DTS 5.1:
curl -X POST http://192.168.1.168/cgi-bin/instr \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"comhead":"set edid","language":0,"edid":[3,2]}'
Copy EDID from Output 1 to Input 5:
curl -X POST http://192.168.1.168/cgi-bin/instr \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"comhead":"set edid","language":0,"edid":[5,24]}'
10. Output CEC Commands
Endpoint:POST http://192.168.1.168/cgi-bin/instr
Request Headers:
Accept: application/json
Content-Type: application/json
Request Body:
{
"comhead": "cec command",
"language": 0,
"object": 1,
"port": [1, 0, 0, 0, 0, 0, 0, 0],
"index": 0
}
Sends POWER_ON CEC command to Output 1
Parameters:
object: Must be1for outputport: Array of 8 values (1 = selected, 0 = not selected)index: CEC command
0 = POWER_ON
- 1 = POWER_OFF
- 2 = VOLUME_MUTE
- 3 = VOLUME_DOWN
- 4 = VOLUME_UP
- 5 = SOURCE
curl Examples:
Power ON Output 1:
curl -X POST http://192.168.1.168/cgi-bin/instr \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"comhead":"cec command","language":0,"object":1,"port":[1,0,0,0,0,0,0,0],"index":0}'
Power OFF Output 3:
curl -X POST http://192.168.1.168/cgi-bin/instr \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"comhead":"cec command","language":0,"object":1,"port":[0,0,1,0,0,0,0,0],"index":1}'
Volume UP on Outputs 1 and 2:
curl -X POST http://192.168.1.168/cgi-bin/instr \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"comhead":"cec command","language":0,"object":1,"port":[1,1,0,0,0,0,0,0],"index":4}'
Mute Output 4:
curl -X POST http://192.168.1.168/cgi-bin/instr \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"comhead":"cec command","language":0,"object":1,"port":[0,0,0,1,0,0,0,0],"index":2}'
11. Input CEC Commands
Endpoint:POST http://192.168.1.168/cgi-bin/instr
Request Headers:
Accept: application/json
Content-Type: application/json
Request Body:
{
"comhead": "cec command",
"language": 0,
"object": 0,
"port": [0, 0, 1, 0, 0, 0, 0, 0],
"index": 11
}
Sends PLAY CEC command to Input 3
Parameters:
object: Must be0for inputport: Array of 8 values (1 = selected, 0 = not selected)index: CEC command
1 = POWER_ON
- 2 = POWER_OFF
- 5 = ENTER
- 11 = PLAY
- 14 = PAUSE
- 16 = STOP
- 17 = VOLUME_MUTE
- 18 = VOLUME_DOWN
- 19 = VOLUME_UP
curl Examples:
Send PLAY to Input 2:
curl -X POST http://192.168.1.168/cgi-bin/instr \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"comhead":"cec command","language":0,"object":0,"port":[0,1,0,0,0,0,0,0],"index":11}'
Send PAUSE to Input 1:
curl -X POST http://192.168.1.168/cgi-bin/instr \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"comhead":"cec command","language":0,"object":0,"port":[1,0,0,0,0,0,0,0],"index":14}'
Send POWER_ON to Input 4:
curl -X POST http://192.168.1.168/cgi-bin/instr \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"comhead":"cec command","language":0,"object":0,"port":[0,0,0,1,0,0,0,0],"index":1}'
12. Set Power
Endpoint:POST http://192.168.1.168/cgi-bin/instr
Request Headers:
Accept: application/json
Content-Type: application/json
Request Body:
{
"comhead": "set poweronoff",
"language": 0,
"power": 1
}
Parameters:
power: 0 = standby, 1 = power on
Power ON the matrix:
curl -X POST http://192.168.1.168/cgi-bin/instr \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"comhead":"set poweronoff","language":0,"power":1}'
Power OFF (standby) the matrix:
curl -X POST http://192.168.1.168/cgi-bin/instr \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"comhead":"set poweronoff","language":0,"power":0}'
curl Examples (Windows CMD):
Power ON the matrix:
curl -X POST http://192.168.1.168/cgi-bin/instr -H "Accept: application/json" -H "Content-Type: application/json" -d"{\"comhead\":\"set poweronoff\",\"language\":0,\"power\":1}"
Power OFF (standby) the matrix:
curl -X POST http://192.168.1.168/cgi-bin/instr -H "Accept: application/json" -H "Content-Type: application/json" -d"{\"comhead\":\"set poweronoff\",\"language\":0,\"power\":0}"
13. Set Panel Lock
Endpoint:POST http://192.168.1.168/cgi-bin/instr
Request Headers:
Accept: application/json
Content-Type: application/json
Request Body:
{
"comhead": "set panel lock",
"language": 0,
"lock": 1
}
Parameters:
lock: 0 = unlocked, 1 = locked
Lock the front panel:
curl -X POST http://192.168.1.168/cgi-bin/instr \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"comhead":"set panel lock","language":0,"lock":1}'
Unlock the front panel:
curl -X POST http://192.168.1.168/cgi-bin/instr \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"comhead":"set panel lock","language":0,"lock":0}'
14. Set Beep
Endpoint:POST http://192.168.1.168/cgi-bin/instr
Request Headers:
Accept: application/json
Content-Type: application/json
Request Body:
{
"comhead": "set beep",
"language": 0,
"beep": 0
}
Parameters:
beep: 0 = disabled, 1 = enabled
Enable beep:
curl -X POST http://192.168.1.168/cgi-bin/instr \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"comhead":"set beep","language":0,"beep":1}'
Disable beep:
curl -X POST http://192.168.1.168/cgi-bin/instr \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"comhead":"set beep","language":0,"beep":0}'
Programming Examples
Python
``python
import requests
def send_command(command_data): """Send command to OREI matrix""" response = requests.post( API_URL, headers={"Accept": "application/json"}, json=command_data, timeout=5 ) return response.json()
Get system status
status = send_command({ "comhead": "get system status", "language": 0 }) print(status)Switch input 3 to output 1
result = send_command({ "comhead": "video switch", "language": 0, "source": [3, 1] })Power on
send_command({ "comhead": "set poweronoff", "language": 0, "power": 1 })Send PLAY to input 2
send_command({ "comhead": "cec command", "language": 0, "object": 0, "port": [0, 1, 0, 0, 0, 0, 0, 0], "index": 11 })
<h3>JavaScript / Node.js</h3>
javascript
const MATRIX_IP = "192.168.1.168";
const API_URL = http://${MATRIX_IP}/cgi-bin/instr;
async function sendCommand(commandData) {
const response = await fetch(API_URL, {
method: 'POST',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
},
body: JSON.stringify(commandData)
});
return await response.json();
}
// Get system status
const status = await sendCommand({
comhead: "get system status",
language: 0
});
console.log(status);
// Switch input 5 to output 2
await sendCommand({
comhead: "video switch",
language: 0,
source: [5, 2]
});
// Power on
await sendCommand({
comhead: "set poweronoff",
language: 0,
power: 1
});
<h3>PowerShell</h3>
powershell
$MatrixIP = "192.168.1.168"
$ApiUrl = "http://$MatrixIP/cgi-bin/instr"
Get system status
$body = @{
comhead = "get system status"
language = 0
} | ConvertTo-Json
$response = Invoke-RestMethod -Uri $ApiUrl -Method Post -Body $body -ContentType "application/json"
$response
Switch input 2 to output 4
$body = @{
comhead = "video switch"
language = 0
source = @(2, 4)
} | ConvertTo-Json
Invoke-RestMethod -Uri $ApiUrl -Method Post -Body $body -ContentType "application/json"
Power on
$body = @{
comhead = "set poweronoff"
language = 0
power = 1
} | ConvertTo-Json
Invoke-RestMethod -Uri $ApiUrl -Method Post -Body $body -ContentType "application/json"
`
Complete EDID Mode Reference
Value
EDID Mode
1
1080P, Stereo Audio 2.0
2
1080P, Dolby/DTS 5.1
3
1080P, HD Audio 7.1
4
1080I, Stereo Audio 2.0
5
1080I, Dolby/DTS 5.1
6
1080I, HD Audio 7.1
7
3D, Stereo Audio 2.0
8
3D, Dolby/DTS 5.1
9
3D, HD Audio 7.1
10
4K2K30_444, Stereo Audio 2.0
11
4K2K30_444, Dolby/DTS 5.1
12
4K2K30_444, HD Audio 7.1
13
4K2K60_420, Stereo Audio 2.0
14
4K2K60_420, Dolby/DTS 5.1
15
4K2K60_420, HD Audio 7.1
16
4K2K60_444, Stereo Audio 2.0
17
4K2K60_444, Dolby/DTS 5.1
18
4K2K60_444, HD Audio 7.1
19
4K2K60_444, Stereo Audio 2.0 HDR
20
4K2K60_444, Dolby/DTS 5.1 HDR
21
4K2K60_444, HD Audio 7.1 HDR
22
User Define 1
23
User Define 2
24
COPY_FROM_OUT_1
25
COPY_FROM_OUT_2
26
COPY_FROM_OUT_3
27
COPY_FROM_OUT_4
28
COPY_FROM_OUT_5
29
COPY_FROM_OUT_6
30
COPY_FROM_OUT_7
31
COPY_FROM_OUT_8
32
COPY_FROM_HDBT_OUT_1
33
COPY_FROM_HDBT_OUT_2
34
COPY_FROM_HDBT_OUT_3
35
COPY_FROM_HDBT_OUT_4
36
COPY_FROM_HDBT_OUT_5
37
COPY_FROM_HDBT_OUT_6
38
COPY_FROM_HDBT_OUT_7
39
COPY_FROM_HDBT_OUT_8
Notes
- The matrix switch has a single HTTP endpoint that accepts all commands
- All commands are differentiated by the
comhead parameter
Port/input/output numbers are 1-indexed (1-8)
The language parameter should always be set to 0
Request timeout is recommended at 5 seconds
All responses echo back the comhead` value from the request