Online Manual
FLEX-16pro
2.2.2 API Control
This system supports HTTP and serial control methods.
HTTP Control Method
HTTP Port: 80.
Keep-alive mode is not supported.
Unless otherwise specified, the POST or GET URL for the interfaces below is: http://host_ip_address/index2.html
Login
| Request type | POST |
|---|---|
| Content | Json: { "Command" : "Login", "UserName" : "Username", "Password" : "MD5 string of password" } |
| Response | Json: { "Status" : "Ok"/"Error", "SessionId" : Session ID of this login -- valid when status is ok, "ScreenGroup" : [Screen group permissions, 1 = can operate, 0 = cannot operate], "Message" : "Error message" } |
📢 Notes
The session ID must be saved for subsequent use.
Get Host Scene List
This command retrieves the scene list corresponding to the screen group specified by ScreenGroup.
| Request type | GET |
|---|---|
| Header contains | session_id=session id |
| Content | Command=GetAllModal&ScreenGroup=Screen group number (1~4) |
| Response | Json: { "Status":"Ok"/"Error", "ModalList":["Scene Name", "Scene Name", ...] } |
Get Host Scene Thumbnail
| Request type | GET |
|---|---|
| URL | http://xxx.xxx.xxx.xxx/scene_name.jpg |
| Header contains | session_id=session id |
| Response | Image data |
Switch Scene
| Request type | POST |
|---|---|
| Header contains | session_id=session id |
| Content | Json: { "Command" : "LoadModal", "ScreenGroup" : Screen group number (1~4), "ModalName" : "Scene Name" } |
| Response | Json: { "Status" : "Ok"/"Error", "Message" : "Error message" } |
Serial Control Method
Serial Configuration
- Baud Rate: 9600
- Parity: None
- Flow Control: None
- Data Bits: 8
- Stop Bits: 1
If using RJ45 network cable to connect to the processor serial port, pin 1 is our TX, pin 2 is our RX, pin 6 is our GND; other pins are disconnected. RJ45 pinout diagram is as follows:
(Refer to original document for RJ45 pinout diagram)
If using DB9 serial cable to connect to the processor serial port, pin 3 is our TX, pin 2 is our RX, pin 5 is our GND. DB9 pin definitions are as follows:
(Refer to original document for DB9 pin definition diagram)
Packet Format
Commands sent from the control system to the device, and responses from the device to the control system, are both encapsulated into data packets. Each packet starts with the $ character and ends with the ^ character, as shown below:
Op indicates the operation command, one character.
Scr indicates the screen group number to be operated, one character.
Format: $ Op Scr DATA ^
The processor control system supports both string commands and hexadecimal commands. The control device can send either string commands or hexadecimal commands to the processor, both of which can be processed. Hexadecimal commands are the ASCII codes of the string.
Serial Commands
Get Host Scene List
| Op | 1 |
|---|---|
| Scr | One byte, value 1 to 4, specifying the screen group number |
| DATA | None |
| Examples | Get screen group 1 scenes: $11^ Get screen group 2 scenes: $12^ Get screen group 3 scenes: $13^ Get screen group 4 scenes: $14^ |
| Device Response | Op: 1 DATA: Multiple scene names separated by spaces (UTF8 format). Example: Scene1 Scene2 |
Get Current Window List
| Op | 2 |
|---|---|
| Scr | One byte, value 1 to 4, specifying the screen group number. |
| DATA | None |
| Examples | Get screen group 1 window list: $21^ Get screen group 2 window list: $22^ Get screen group 3 window list: $23^ Get screen group 4 window list: $24^ |
| Device Response | Op: 2 DATA: Multiple window information separated by brackets, window info format is [WindowID,Top-left X,Top-left Y,Bottom-right X,Bottom-right Y]. Example: 2[21326,0,0,960,540][25588,960,0,1920,540]...[13336,5760,8100,6720,8640][9651,6720,8100,7680,8640] |
Switch Scene
| Op | 3 |
|---|---|
| Scr | One byte, value 1 to 4, specifying the screen group number |
| DATA | Scene name (UTF8 format) |
| Examples | Switch screen group 1 to "Scene5": $31Scene5^ Switch screen group 2 to "ab": $32ab^ Switch screen group 3 to "123ab": $33123ab^ Switch screen group 4 to "Scene6a": $34Scene6a^ Scene name "1" code: 24 33 31 31 5E Scene name "2" code: 24 33 31 32 5E Scene name "3" code: 24 33 31 33 5E |
| Device Response | Op: 3 DATA: Ok or Error |
Open Window with Signal Source
| Op | 4 |
|---|---|
| Scr | One byte, value 1 to 4, specifying the screen group number |
| DATA | [WindowID][Input Slot 1-16][Input Port 1-8][Top-left X,Top-left Y,Bottom-right X,Bottom-right Y] Window ID must be an integer >=1, with uniqueness; multiple windows cannot have duplicate IDs. |
| Examples | Open input slot 2 port 3 on group 1, window ID=2, coords 1920,1080,3840,2160: $41[2][2][3][1920,1080,3840,2160]^ Hex code: 24 34 31 5B 32 5D 5B 32 5D 5B 33 5D 5B 31 39 32 30 2C 31 30 38 30 2C 33 38 34 30 2C 32 31 36 30 5D 5E |
| Device Response | Op: 4 DATA: Ok or Error |
Switch Window Signal Source
| Op | 5 |
|---|---|
| Scr | One byte, value 1 to 4, specifying the screen group number |
| DATA | [WindowID][Input Slot 1-16][Input Port 1-8] Window ID can be obtained via Get Current Window List interface. |
| Examples | Switch input slot 2 port 3 to window ID 21326 on group 1: $51[21326][2][3]^ Hex code: 24 35 31 5B 32 31 33 32 36 5D 5B 32 5D 5B 33 5D 5E |
| Device Response | Op: 5 DATA: Ok or Error |
Get Processor IP
| Op | 6 |
|---|---|
| Scr | None |
| DATA | None |
| Example | $6^ |
| Device Response | Op: 6 DATA: Processor IP. Example: IP:[192.168.1.250] |
Set Processor IP Address
| Op | 7 |
|---|---|
| Scr | None |
| DATA | IP address |
| Example | Set processor IP address to 192.168.1.200: $7192.168.1.200^ |
| Device Response | Op: 7 DATA: Ok or Error |
Reset Processor
| Op | 8 |
|---|---|
| Scr | None |
| DATA | None |
| Example | $8^ |
| Device Response | Op: 8 DATA: Ok or Error, device restarts after successful reset |
Switch Audio Channel
| Op | 9 |
|---|---|
| Scr | None |
| DATA | [Input Slot 1-16][Input Port 1-8] To close audio input, set both input slot and input port to 0. |
| Examples | Switch to slot 2 port 3: $9[2][3]^ Close audio input: $9[0][0]^ Switch to slot 2 port 3 hex code: 24 39 5B 32 5D 5B 33 5D 5E Close audio hex code: 24 39 5B 30 5D 5B 30 5D 5E |
| Device Response | Op: 9 DATA: Ok or Error |
Close Window
| Op | 0 |
|---|---|
| Scr | One byte, value 1 to 4, specifying the screen group number |
| DATA | [WindowID] To close all windows in current group, set WindowID to 0. |
| Examples | Close group 2 window ID 1: $02[1]^ Close group 1 all windows: $01[0]^ Close group 2 window ID 1 hex: 24 30 32 5B 31 5D 5E Close group 1 all windows hex: 24 30 31 5B 30 5D 5E |
| Device Response | Op: 0 DATA: Ok or Error |
Move Window
| Op | a |
|---|---|
| Scr | One byte, value 1 to 4, specifying the screen group number |
| DATA | [WindowID][Top-left X,Top-left Y,Bottom-right X,Bottom-right Y] Window ID can be obtained via Get Current Window List interface. 0509 point-to-point mode does not support window operations. |
| Example | Move group 1 window ID 1 to 1920,1080,3840,2160: $a1[1][1920,1080,3840,2160]^ Hex code: 24 61 31 5B 31 5D 5B 31 39 32 30 2C 31 30 38 30 2C 33 38 34 30 2C 32 31 36 30 5D 5E |
| Device Response | Op: a DATA: Ok or Error |