📚 RS232 vs HTTP API Comparison

TMRemote Documentation

OREI BK-808 HDMI Matrix - RS232 vs HTTP API Command Comparison

Overview

This document provides a side-by-side comparison of RS232 serial commands and HTTP/IP API commands for controlling the OREI BK-808 8x8 HDMI Matrix.

Connection Details

Control Method RS232 HTTP/IP API
Port RS-232 D-Sub 9 TCP/IP RJ45
Protocol Serial HTTP POST
Endpoint N/A http://{ip}/cgi-bin/instr
Baud Rate 115200, 8N1 N/A
Default IP N/A 192.168.0.100
TCP Port N/A 8000
Default Behavior N/A POST with no body returns get video status

System Commands

Power Control

Function RS232 Command HTTP API Command
Power On power 1! {"comhead":"set poweronoff","language":0,"power":1}
Power Off power 0! {"comhead":"set poweronoff","language":0,"power":0}
Get Power Status r power! {"comhead":"get system status","language":0} (check power field)
Examples:

RS232:

power 1!

HTTP API (Unix/Linux/Mac/PowerShell):
curl -X POST http://192.168.0.100/cgi-bin/instr \
  -H "Content-Type: application/json" \
  -d '{"comhead":"set poweronoff","language":0,"power":1}'

HTTP API (Windows CMD):

curl -X POST http://192.168.0.100/cgi-bin/instr -H "Content-Type: application/json" -d"{\"comhead\":\"set poweronoff\",\"language\":0,\"power\":1}"


Beep Control

Function RS232 Command HTTP API Command
Enable Beep s beep 1! {"comhead":"set beep","language":0,"beep":1}
Disable Beep s beep 0! {"comhead":"set beep","language":0,"beep":0}
Get Beep Status r beep! {"comhead":"get system status","language":0} (check beep field)

Panel Lock

Function RS232 Command HTTP API Command
Lock Panel s lock 1! N/A (Web GUI only)
Unlock Panel s lock 0! N/A (Web GUI only)
Get Lock Status r lock! N/A (Web GUI only)

System Information

Function RS232 Command HTTP API Command
Get Model r type! N/A
Get Firmware Version r fw version! N/A (available in Web GUI Status page)
Get All Status status! Multiple API calls required
Reboot Device reboot! N/A (Web GUI only)
Factory Reset reset! N/A (Web GUI only)

Video Switching Commands

Route Input to Output

Function RS232 Command HTTP API Command
Route Input X to Output Y s output Y in source X! {"comhead":"video switch","language":0,"source":[X,Y]}
Route Input 3 to Output 1 s output 1 in source 3! {"comhead":"video switch","language":0,"source":[3,1]}
Route Input to All Outputs s output 0 in source X! Multiple API calls required (loop outputs 1-8)
Get Output Routing r output Y in source! {"comhead":"get video status","language":0}
Comparison Example - Route Input 5 to Output 2:

RS232:

s output 2 in source 5!

HTTP API:
curl -X POST http://192.168.0.100/cgi-bin/instr \
  -H "Content-Type: application/json" \
  -d '{"comhead":"video switch","language":0,"source":[5,2]}'

Output Control Commands

Video Scaler

Function RS232 Command HTTP API Command
Set Bypass s output Y scaler 1! {"comhead":"video scaler","language":0,"scaler":[Y,0]}
Set 8K→4K s output Y scaler 2! {"comhead":"video scaler","language":0,"scaler":[Y,1]}
Set 8K/4K→1080P s output Y scaler 3! {"comhead":"video scaler","language":0,"scaler":[Y,2]}
Set Auto s output Y scaler 4! {"comhead":"video scaler","language":0,"scaler":[Y,3]}
Get Scaler Mode r output Y scaler! {"comhead":"get output status","language":0}
Note: The scaler mode values differ between RS232 and HTTP API!
Mode RS232 Value HTTP API Value
Bypass 1 0
8K→4K 2 1
8K/4K→1080P 3 2
Auto 4 3

HDR Conversion

Function RS232 Command HTTP API Command
Set Bypass s output Y hdr 1! N/A (Web GUI only)
Set HDR→SDR s output Y hdr 2! N/A (Web GUI only)
Set Auto s output Y hdr 3! N/A (Web GUI only)
Get HDR Mode r output Y hdr! {"comhead":"get output status","language":0}

ARC (Audio Return Channel)

Function RS232 Command HTTP API Command
Enable ARC s output Y arc 1! {"comhead":"set arc","language":0,"arc":[Y,1]}
Disable ARC s output Y arc 0! {"comhead":"set arc","language":0,"arc":[Y,0]}
Get ARC Status r output Y arc! {"comhead":"get output status","language":0}

Stream Control

Function RS232 Command HTTP API Command
Enable Stream s output Y stream 1! {"comhead":"tx stream","language":0,"out":[Y,1]}
Disable Stream s output Y stream 0! {"comhead":"tx stream","language":0,"out":[Y,0]}
Get Stream Status r output Y stream! {"comhead":"get output status","language":0}

HDCP Control

Function RS232 Command HTTP API Command
Set HDCP 1.4 s output Y hdcp 1! N/A (Web GUI only)
Set HDCP 2.2 s output Y hdcp 2! N/A (Web GUI only)
Follow Sink s output Y hdcp 3! N/A (Web GUI only)
Follow Source s output Y hdcp 4! N/A (Web GUI only)
User Mode s output Y hdcp 5! N/A (Web GUI only)
Get HDCP Status r output Y hdcp! {"comhead":"get output status","language":0}

Input Control Commands

EDID Management

Function RS232 Command HTTP API Command
Set EDID Mode s input X EDID Z! {"comhead":"set edid","language":0,"edid":[X,Z]}
Copy from Output s input X edid copy output Y! {"comhead":"set edid","language":0,"edid":[X,24+Y]}
Get EDID Mode r input X EDID! {"comhead":"get input status","language":0}
Set User EDID s user X edid 00 FF FF...! N/A (Web GUI only)
Get User EDID r user X edid! N/A (Web GUI only)
EDID Mode Values (Same for both RS232 and HTTP API):
Value EDID Mode
1 1080P, 2.0CH
2 1080P, 5.1CH
3 1080P, 7.1CH
10 4K60(444), 2.0CH
21 4K60(420)_HDR, 7.1CH
36 FRL12G_8K_HDR, 7.1CH
37 user1_EDID
40 copy out1 (RS232) / 24 (HTTP)
Example - Set Input 1 to 4K HDR 7.1:

RS232:

s input 1 EDID 21!

HTTP API:
curl -X POST http://192.168.0.100/cgi-bin/instr \
  -H "Content-Type: application/json" \
  -d '{"comhead":"set edid","language":0,"edid":[1,21]}'

Audio Extraction Commands

External Audio Control

Function RS232 Command HTTP API Command
Enable Ext Audio s output Y exa 1! N/A (Web GUI only)
Disable Ext Audio s output Y exa 0! N/A (Web GUI only)
Set Bind to Input s output exa mode 0! N/A (Web GUI only)
Set Bind to Output s output exa mode 1! N/A (Web GUI only)
Set Matrix Mode s output exa mode 2! N/A (Web GUI only)
Route Audio Source s output Y exa in source X! N/A (Web GUI only)

CEC Commands

Input CEC Commands

Function RS232 Command HTTP API Command
Power On s cec in X on! {"comhead":"cec command","language":0,"object":0,"port":[array],"index":1}
Power Off s cec in X off! {"comhead":"cec command","language":0,"object":0,"port":[array],"index":2}
Play s cec in X play! {"comhead":"cec command","language":0,"object":0,"port":[array],"index":11}
Pause s cec in X pause! {"comhead":"cec command","language":0,"object":0,"port":[array],"index":14}
Volume Mute s cec in X mute! {"comhead":"cec command","language":0,"object":0,"port":[array],"index":17}
Example - Send PLAY to Input 2:

RS232:

s cec in 2 play!

HTTP API:
curl -X POST http://192.168.0.100/cgi-bin/instr \
  -H "Content-Type: application/json" \
  -d '{"comhead":"cec command","language":0,"object":0,"port":[0,1,0,0,0,0,0,0],"index":11}'

Output CEC Commands

Function RS232 Command HTTP API Command
Power On s cec hdmi out Y on! {"comhead":"cec command","language":0,"object":1,"port":[array],"index":0}
Power Off s cec hdmi out Y off! {"comhead":"cec command","language":0,"object":1,"port":[array],"index":1}
Volume Mute s cec hdmi out Y mute! {"comhead":"cec command","language":0,"object":1,"port":[array],"index":2}
Volume Down s cec hdmi out Y vol-! {"comhead":"cec command","language":0,"object":1,"port":[array],"index":3}
Volume Up s cec hdmi out Y vol+! {"comhead":"cec command","language":0,"object":1,"port":[array],"index":4}

Network Configuration Commands

IP Configuration

Function RS232 Command HTTP API Equivalent
Get IP Config r ipconfig! N/A (Web GUI only)
Set Static IP s ip mode 0! N/A (Web GUI only)
Set DHCP s ip mode 1! N/A (Web GUI only)
Set IP Address s ip addr 192.168.0.100! N/A (Web GUI only)
Set Subnet Mask s subnet 255.255.255.0! N/A (Web GUI only)
Set Gateway s gateway 192.168.0.1! N/A (Web GUI only)
Network Reboot s net reboot! N/A (Web GUI only)

Preset Commands

Function RS232 Command HTTP API Equivalent
Save Preset s save preset Z! (Z=1-8) N/A (Web GUI only)
Recall Preset s recall preset Z! N/A (Web GUI only)
Clear Preset s clear preset Z! N/A (Web GUI only)
Get Preset Info r preset Z! N/A (Web GUI only)

Connection Status Commands

Function RS232 Command HTTP API Command
Get Input Connection r link in X! {"comhead":"get input status","language":0} (check inactive field)
Get Output Connection r link out Y! {"comhead":"get output status","language":0} (check allconnect field)

Quick Reference - Most Common Operations

Switch Video Source

Operation RS232 HTTP API
Input 1 → Output 1 s output 1 in source 1! {"comhead":"video switch","language":0,"source":[1,1]}
Input 3 → Output 5 s output 5 in source 3! {"comhead":"video switch","language":0,"source":[3,5]}
Input 8 → All Outputs s output 0 in source 8! Loop: source [8,1] through [8,8]

Set EDID

Operation RS232 HTTP API
Input 1 → 4K HDR 7.1 s input 1 EDID 21! {"comhead":"set edid","language":0,"edid":[1,21]}
Input 2 → 1080P 5.1 s input 2 EDID 2! {"comhead":"set edid","language":0,"edid":[2,2]}
Input 3 → Copy Out 1 s input 3 edid copy output 1! {"comhead":"set edid","language":0,"edid":[3,24]}

Control Power

Operation RS232 HTTP API
Power On Matrix power 1! {"comhead":"set poweronoff","language":0,"power":1}
Power Off Matrix power 0! {"comhead":"set poweronoff","language":0,"power":0}

Key Differences Summary

HTTP API Limitations

The following features are ONLY available via RS232 or Web GUI:

RS232 Advantages

HTTP API Advantages


Command Syntax Comparison

RS232 Format

<command> <parameters>!
Example:
s output 1 in source 3!

HTTP API Format

{
  "comhead": "<command>",
  "language": 0,
  "<param>": <value>
}
Example:
{
  "comhead": "video switch",
  "language": 0,
  "source": [3, 1]
}
Windows CMD curl syntax:
curl -X POST http://ip/cgi-bin/instr -H "Content-Type: application/json" -d"{\"comhead\":\"video switch\",\"language\":0,\"source\":[3,1]}"

Complete Workflow Examples

Example 1: Setup Display for Gaming (RS232 vs HTTP)

Goal: Route PS5 (Input 2) to TV (Output 1), set 4K120 HDR EDID, enable auto scaler RS232:
s input 2 EDID 30!
s output 1 in source 2!
s output 1 scaler 4!
HTTP API:
<h1>Set EDID</h1>
curl -X POST http://192.168.0.100/cgi-bin/instr \
  -H "Content-Type: application/json" \
  -d '{"comhead":"set edid","language":0,"edid":[2,30]}'

<h1>Route video</h1> curl -X POST http://192.168.0.100/cgi-bin/instr \ -H "Content-Type: application/json" \ -d '{"comhead":"video switch","language":0,"source":[2,1]}'

<h1>Set scaler (Note: Web GUI only for scaler)</h1>

Example 2: Query System Status

RS232:
r type!
r fw version!
r output 0 in source!
r link in 0!
HTTP API:
<h1>Get system status</h1>
curl -X POST http://192.168.0.100/cgi-bin/instr \
  -H "Content-Type: application/json" \
  -d '{"comhead":"get system status","language":0}'

<h1>Get video status</h1> curl -X POST http://192.168.0.100/cgi-bin/instr \ -H "Content-Type: application/json" \ -d '{"comhead":"get video status","language":0}'

<h1>Get input status</h1> curl -X POST http://192.168.0.100/cgi-bin/instr \ -H "Content-Type: application/json" \ -d '{"comhead":"get input status","language":0}'

Conclusion

Both control methods have their strengths:

For maximum flexibility, implement both RS232 and HTTP API control in your integration.