SW42

General notes

Version 1.0.0

First Release!

API detail

Video

All video requests are described in this section. These requests will allow for video switching, retreieving switch configuration, and retrieving video diagnostic information.

Get Matrix

Description

Retrieves the active matrix configuration. Shows which inputs are routed to the outputs.

Command Usage

Request Format Example: “none”

Arguments: “none”

curl -X GET "/GetMatrix"
GET /GetMatrix HTTP/1.1
Host: 
Status200 OK
ServerzigenIP (http://zigencorp.com)
Content-typeapplication/json
{
    "matrix": [
        0,
        0
    ]
}

Set Matrix

Description

Sets the active video matrix configuration. Use “matrix” key to specifiy an array as the matrix configuration.Use “switch” key with input/output keys to only switch a discrete input and output. Use integer 9 for setting a source to test pattern instead of HDMI source.

Command Usage

Request Format Example 1:

{
    "matrix": [0, 9]
}

Request Format Example 2:

{
    "switch": {
        "input": 3,
        "output": 1
    }
}

Arguments:

"matrix"
    Type: Array of Integers
    Parameter: Specifies which inputs are routed to each outputs. Each integer in the array specifies the source to route to that index of output.
    Range: 0 - 3, array size = 2
"switch"
    Type: Json Object
    Parameter: Json object should contain an input and an output key and integer value with the desired input and output.
    Range (input): 0 - 3
    Range (output): 0 - 1
curl -X POST -d '{
	"switch": {
        "input": 2,
        "output": 0
    }
}' "/SetMatrix"
POST /SetMatrix HTTP/1.1
Host: 

{
	"switch": {
        "input": 2,
        "output": 0
    }
}
Status200 OK
ServerzigenIP (http://zigencorp.com)
Content-typeapplication/json
{
    "status": "success"
}

Get Video Info

Description

Retrieves the video parameters such as resolution and framerate of the video passing through the unit.

Command Usage

Request Format Example:

{
    "output": 0,
    "input": "all"
}

Arguments: “output” (optional) Type: Integer or String Parameter: Desired output < 0 - 1 > or a string “all” to get all outputs. “input” (optional) Type: Integer or String Parameter: Desired input < 0 - 3 > or a string “all” to get all inputs.

curl -X POST -d '{
    "input": "all"
}' "/GetVideoInfo"
POST /GetVideoInfo HTTP/1.1
Host: 

{
    "input": "all"
}
Status200 OK
ServerzigenIP (http://zigencorp.com)
Content-typeapplication/json
{
    "inputs": [
        {
            "channel": 0,
            "link": true,
            "hdcp status": "started",
            "video stable": false,
            "resolution": "0x0",
            "scan type": "progressive",
            "color format": "RGB:444",
            "color bit depth": 0,
            "pixel clock": "0 MHz",
            "framerate": "0 Hz",
            "audio type": "N/A",
            "audio sample rate": "32 KHz",
            "audio channels": ""
        },
        {
            "channel": 1,
            "link": true,
            "hdcp status": "success 2.2",
            "video stable": true,
            "resolution": "3840x2160",
            "scan type": "progressive",
            "color format": "YUV:420",
            "color bit depth": 30,
            "pixel clock": "294 MHz",
            "framerate": "60 Hz",
            "audio type": "LPCM",
            "audio sample rate": "48 KHz",
            "audio channels": "2 channels"
        },
        {
            "channel": 2,
            "link": false,
            "hdcp status": "started",
            "video stable": false,
            "resolution": "0x0",
            "scan type": "progressive",
            "color format": "RGB:444",
            "color bit depth": 0,
            "pixel clock": "0 MHz",
            "framerate": "0 Hz",
            "audio type": "N/A",
            "audio sample rate": "32 KHz",
            "audio channels": ""
        },
        {
            "channel": 3,
            "link": false,
            "hdcp status": "started",
            "video stable": false,
            "resolution": "0x0",
            "scan type": "progressive",
            "color format": "RGB:444",
            "color bit depth": 0,
            "pixel clock": "0 MHz",
            "framerate": "0 Hz",
            "audio type": "N/A",
            "audio sample rate": "32 KHz",
            "audio channels": ""
        }
    ],
    "outputs": [
        {
            "channel": 0,
            "link": true,
            "hdcp status": "success 2.2",
            "video stable": true,
            "resolution": "3840x2160",
            "scan type": "progressive",
            "color format": "YUV:420",
            "color bit depth": 30,
            "pixel clock": "370 Mhz",
            "framerate": "60 Hz;",
            "audio type": "LPCM",
            "audio sample rate": "48 KHz",
            "audio channels": ""
        },
        {
            "channel": 1,
            "link": true,
            "hdcp status": "started",
            "video stable": false,
            "resolution": "0x0",
            "scan type": "progressive",
            "color format": "RGB:444",
            "color bit depth": 0,
            "pixel clock": "0 Mhz",
            "framerate": "0 Hz;",
            "audio type": "N/A",
            "audio sample rate": "32 KHz",
            "audio channels": "2 channels"
        }
    ],
    "status": "success"
}
Status200 OK
ServerzigenIP (http://zigencorp.com)
Content-typeapplication/json
{
    "inputs": [
        {
            "channel": 0,
            "link": true,
            "hdcp status": "started",
            "video stable": false,
            "resolution": "0x0",
            "scan type": "progressive",
            "color format": "RGB:444",
            "color bit depth": 0,
            "pixel clock": "0 MHz",
            "framerate": "0 Hz",
            "audio type": "N/A",
            "audio sample rate": "32 KHz",
            "audio channels": ""
        },
        {
            "channel": 1,
            "link": true,
            "hdcp status": "success 2.2",
            "video stable": true,
            "resolution": "3840x2160",
            "scan type": "progressive",
            "color format": "YUV:420",
            "color bit depth": 30,
            "pixel clock": "294 MHz",
            "framerate": "60 Hz",
            "audio type": "LPCM",
            "audio sample rate": "48 KHz",
            "audio channels": "2 channels"
        },
        {
            "channel": 2,
            "link": false,
            "hdcp status": "started",
            "video stable": false,
            "resolution": "0x0",
            "scan type": "progressive",
            "color format": "RGB:444",
            "color bit depth": 0,
            "pixel clock": "0 MHz",
            "framerate": "0 Hz",
            "audio type": "N/A",
            "audio sample rate": "32 KHz",
            "audio channels": ""
        },
        {
            "channel": 3,
            "link": false,
            "hdcp status": "started",
            "video stable": false,
            "resolution": "0x0",
            "scan type": "progressive",
            "color format": "RGB:444",
            "color bit depth": 0,
            "pixel clock": "0 MHz",
            "framerate": "0 Hz",
            "audio type": "N/A",
            "audio sample rate": "32 KHz",
            "audio channels": ""
        }
    ],
    "outputs": [],
    "status": "success"
}
Status200 OK
ServerzigenIP (http://zigencorp.com)
Content-typeapplication/json
{
    "inputs": [],
    "outputs": [
        {
            "channel": 0,
            "link": true,
            "hdcp status": "success 2.2",
            "video stable": true,
            "resolution": "3840x2160",
            "scan type": "progressive",
            "color format": "YUV:420",
            "color bit depth": 30,
            "pixel clock": "370 Mhz",
            "framerate": "60 Hz;",
            "audio type": "LPCM",
            "audio sample rate": "48 KHz",
            "audio channels": ""
        }
    ],
    "status": "success"
}

Get Video Generator Info

Description

Retrieves the video generator parameters such as test pattern, resolution and framerate of the video being generated by the unit.

Command Usage

Request Format Example: “none”

Arguments: “none”

curl -X GET "/GetVidGen"
GET /GetVidGen HTTP/1.1
Host: 
Status200 OK
ServerzigenIP (http://zigencorp.com)
Content-typeapplication/json
{
    "resolution": "1920x1080, 60",
    "color depth": 24,
    "pattern": "Checkerboard",
    "status": "success"
}

EDID

Get Edid Info

Description

Retrieves the decoded EDID information of the desired output or custom uploaded EDID.

Command Usage

Request Format Example:

{
    "edid": "sink0"
}

Arguments: “edid”: The desired EDID to decode. “sink0” or “sink0” for the outputs, and “custom0” through “custom3” for the custom uploaded EDIDs.

curl -X POST -H "Content-Type: application/json" "192.168.22.85/GetEdidInfo"
POST 192.168.22.85/GetEdidInfo HTTP/1.1
Host: 
Content-Type: application/json
Status200 OK
ServerzigenIP (http://zigencorp.com)
Content-typeapplication/json
{
    "status": "success",
    "update": {
        "avaliable": false,
        "message": "No update is avaliable."
    }
}

Get Active Edid Info

Description

Retrieves the EDID being sent to each source in an array corresponding to each input.

Command Usage

Request Format Example: “none”

Arguments: “none”

curl -X GET "/GetActiveEdidInfo"
GET /GetActiveEdidInfo HTTP/1.1
Host: 
Status200 OK
ServerzigenIP (http://zigencorp.com)
Content-typeapplication/json
{
    "activeEdids": [
        "1080p60 2ch         ",
        "2160p30 2ch         ",
        "2160p60 5.1ch HDR   ",
        "None (Out)"
    ]
}

Get Sink Name

Description

Retrieves the monitor name contained in the EDID of the sink device.

Command Usage

Request Format Example: “none”

Arguments: “none”

curl -X GET "/GetSinkName"
GET /GetSinkName HTTP/1.1
Host: 
Status200 OK
ServerzigenIP (http://zigencorp.com)
Content-typeapplication/json
{
    "sinknames": [
        "LG TV RVU\n   ",
        "M50-E1\n      "
    ]
}

Get Custom Edid Info

Description

Retrieves the monitor name contained in any custom EDID uploaded to the unit if any.

Command Usage

Request Format Example: “none”

Arguments: “none”

curl -X GET "/GetCustomEdidInfo"
GET /GetCustomEdidInfo HTTP/1.1
Host: 
Status200 OK
ServerzigenIP (http://zigencorp.com)
Content-typeapplication/json
{
    "customEdids": [
        "M50-E1\n      ",
        null,
        null,
        null
    ]
}
Status200 OK
ServerzigenIP (http://zigencorp.com)
Content-typeapplication/json
{
    "customEdids": [
        null,
        null,
        null,
        null
    ]
}

Set Edid

Description

Sets the desired EDID to the desired source. For “1080p60” EDID, HDR is not required and has no effect, only “audio ch”. For “2160p30” and “2160p60”, both “audio ch” and “hdr” are required. For all others, “audio ch” and “hdr” is not required and has no effect.

Command Usage

Request Format Example:

{
    "source": 0,
    "edid": "1080p60",
    "audio ch": 2,
    "hdr": false
}

Arguments:

"source" (required)
    Type: Integer or String
    Parameter: Select the desired source specifying the number or "all" for all sources.
"edid" (required)
    Type: String
    Parameter: Select the desired edid between "1080p60", "2160p30", "2160p60", "sink", "custom0", "custom1", "custom2", or "custom3". Note if selecting "1080p60", then "audio ch" parameter must be included. If selecting "2160p30", or "2160p60" then "audio ch" and "hdr" parameter must be included.
"audio ch" (dependency)
    Type: String or Integer
    Parameter: Select the desired audio channels for "1080p60", "2160p30", or "2160p60" edids.
"hdr" (dependency)
    Type: String or Integer
    Parameter: Select if HDR is desired for "2160p30" or "2160p60" edids.
curl -X POST -H "Content-Type: application/json" -d '{
    "source": "all",
    "edid": "sink"
}' "/SetEdid"
POST /SetEdid HTTP/1.1
Host: 
Content-Type: application/json

{
    "source": "all",
    "edid": "sink"
}
Status200 OK
ServerzigenIP (http://zigencorp.com)
Content-typeapplication/json
{
    "status": "success"
}
Status200 OK
ServerzigenIP (http://zigencorp.com)
Content-typeapplication/json
{
    "status": "success"
}

Audio

All audio requests are described in this section. These requests will allow for audio switching and retrieving switch configuration. Furthermore, analog audio settings can be set and retrieved as well.

Get Audio Settings

Description

Retrieves all analog audio settings for the selected output.

Command Usage

Request Format Example:

{
    "output": 0
}

Arguments: “output” (required) Type: Integer Parameter: Desired output < 0 - 1 >

curl -X POST -d '{
    "output": 0
}' "/GetAudioSettings"
POST /GetAudioSettings HTTP/1.1
Host: 

{
    "output": 0
}
Status200 OK
ServerzigenIP (http://zigencorp.com)
Content-typeapplication/json
{
    "status": "success",
    "audioInfo": {
        "audiosel": "local",
        "mute": false,
        "volume": 20,
        "analog type": "unbalanced",
        "tune mode": "disabled",
        "presets": "flat",
        "band0": 0,
        "band1": 0,
        "band2": 0,
        "band3": 0,
        "band4": 0,
        "basstone": 0,
        "treble": 0,
        "surround": false,
        "surrlevel": 1,
        "basslevel": 31,
        "bass": false,
        "bassfreq": 100,
        "highpass": false
    }
}

Set Audio Settings

Description

Sets desired analog output settings. All settings are optional and only requested settings will take effect.

Command Usage

Request Format Example:

{
    "output": 0,
    "analog type": "balanced",
    "audiosel": "local",
    "mute": false,
    "volume": 50,
    "tune mode": "disabled",
    "presets": "flat",
    "band0": 0,
    "band1": 0,
    "band2": 0,
    "band3": 0,
    "band4": 0,
    "basstone": 0,
    "treble": 0,
    "surround": false,
    "surrlevel": 1,
    "basslevel": 31,
    "bass": false,
    "bassfreq": 100,
    "highpass": false
}

Arguments:

"output" (required)
    Type: Integer
    Parameter: The desired output to change settings for.
"analog type" (optional)
    Type: String
    Parameter: Sets the analog type for 'balanced' or 'unbalanced'.
"audiosel" (optional)
    Type: String
    Parameter: Sets the analog output source for HDMI local or HDMI ARC.
"mute" (optional)
    Type: Boolean
    Parameter: Mutes the analog output when true, unmutes when false.
"volume" (optional)
    Type: Integer
    Parameter: Sets the analog output volume level from 0 to 100.
"tune mode" (optional)
    Type: String
    Parameter: Sets the digital processing unit to "disabled", "presets", "equalizer", or "tonecontrol".
"presets" (optional)
    Type: String
    Parameter: Sets the preset to "flat", "rock", "classical", "dance", or "acoustic". Note that tune mode must be set to "presets" to have an effect.
"band0" (optional)
    Type: Integer
    Parameter: Sets the 115 Hz band of the graphic EQ to -11.75 dB to 12 dB. Note that tune mode must be set to "equalizer" to have an effect.
"band1" (optional)
    Type: Integer
    Parameter: Sets the 330 Hz band of the graphic EQ to -11.75 dB to 12 dB. Note that tune mode must be set to "equalizer" to have an effect.
"band2" (optional)
    Type: Integer
    Parameter: Sets the 990 Hz band of the graphic EQ to -11.75 dB to 12 dB. Note that tune mode must be set to "equalizer" to have an effect.
"band3" (optional)
    Type: Integer
    Parameter: Sets the 3000 Hz band of the graphic EQ to -11.75 dB to 12 dB. Note that tune mode must be set to "equalizer" to have an effect.
"band4" (optional)
    Type: Integer
    Parameter: Sets the 9900 Hz band of the graphic EQ to -11.75 dB to 12 dB. Note that tune mode must be set to "equalizer" to have an effect.
"basstone" (optional)
    Type: Integer
    Parameter: Sets the bass of the tone control to -11.75 dB to 12 dB. Note that tune mode must be set to "tonecontrol" to have an effect.
"treble" (optional)
    Type: Integer
    Parameter: Sets the treble of the tone control to -11.75 dB to 12 dB. Note that tune mode must be set to "tonecontrol" to have an effect.
"surround" (optional)
    Type: Boolean
    Parameter: Enables or disables the surround effect.
"surrlvl" (optional)
    Type: Integer
    Parameter: Sets the surround effect level to a value between 0 (least) and 7 (most).
"bass" (optional)
    Type: Boolean
    Parameter: Enables or disables the bass enchancement effect.
"basslvl" (optional)
    Type: Integer
    Parameter: Sets the surround effect level to a value between 0 (least) and 127 (most).
"bassfreq" (optional)
    Type: Integer
    Parameter: Sets the cutoff frequency for the bass enchancement to 80, 100, 125, 150, 175, 200, or 225.
"highpass" (optional)
    Type: Boolean
    Parameter: Enables or disables the highpass filter for the bass enchancement.
curl -X POST -H "Content-Type: application/json" -d '{
    "output": 0,
    "audiosel": "local",
    "analog type": "balanced",
    "mute": false,
    "volume": 50,
    "tune mode": "tonecontrol",
    "presets": "flat",
    "band0": 5,
    "band1": 10,
    "band2": -10,
    "band3": -5,
    "band4": 0,
    "basstone": 0,
    "treble": 0,
    "surround": false,
    "surrlevel": 1,
    "basslevel": 31,
    "bass": false,
    "bassfreq": 100,
    "highpass": false
}' "/SetAudioSettings"
POST /SetAudioSettings HTTP/1.1
Host: 
Content-Type: application/json

{
    "output": 0,
    "audiosel": "local",
    "analog type": "balanced",
    "mute": false,
    "volume": 50,
    "tune mode": "tonecontrol",
    "presets": "flat",
    "band0": 5,
    "band1": 10,
    "band2": -10,
    "band3": -5,
    "band4": 0,
    "basstone": 0,
    "treble": 0,
    "surround": false,
    "surrlevel": 1,
    "basslevel": 31,
    "bass": false,
    "bassfreq": 100,
    "highpass": false
}
Status200 OK
ServerzigenIP (http://zigencorp.com)
Content-typeapplication/json
{
    "status": "success"
}

Settings

Get Admin Info

Description

Retrieves the administration settings such as network settings and serial number.

Command Usage

Request Format Example: “none”

Arguments: “none”

curl -X GET "/GetAdminInfo"
GET /GetAdminInfo HTTP/1.1
Host: 
Status200 OK
ServerzigenIP (http://zigencorp.com)
Content-typeapplication/json
{
    "status": "success",
    "systemInfo": {
        "serial": "SW42-0000",
        "firmware": "0.8.3",
        "firmware date": "Oct 29 2020",
        "firmware time": "13:37:14",
        "hardware": "0002",
        "current ip": "192.168.22.85",
        "current netmask": "255.255.255.0",
        "current gateway": "192.168.22.1",
        "static ip": "192.168.0.10",
        "static netmask": "255.255.255.0",
        "static gateway": "192.168.0.1",
        "mac": "18:0A:D1:F1:FC:BA",
        "hostname": "SW42-0000",
        "dhcp": true
    }
}

Restart System

Description

Restarts the unit.

Command Usage

Request Format Example: “none”

Arguments: “none”

curl -X GET "/Restart"
GET /Restart HTTP/1.1
Host: 
Status200 OK
ServerzigenIP (http://zigencorp.com)
Content-typeapplication/json
{
    "status": "success"
}

Factory Reset System

Description

Restores all settings to factory defaults.

Command Usage

Request Format Example: “none”

Arguments: “none”

curl -X GET "/Reset"
GET /Reset HTTP/1.1
Host: 
Status200 OK
ServerzigenIP (http://zigencorp.com)
Content-typeapplication/json
{
    "status": "success"
}

Get Update Info

Description

Checks if a firmware update is avaliable for this unit.

Command Usage

Request Format Example: “none”

Arguments: “none”

curl -X POST -H "Content-Type: application/json" "/GetUpdateInfo"
POST /GetUpdateInfo HTTP/1.1
Host: 
Content-Type: application/json
Status200 OK
ServerzigenIP (http://zigencorp.com)
Content-typeapplication/json
{
    "status": "success",
    "update": {
        "avaliable": false,
        "message": "No update is avaliable."
    }
}

Update Firmware

Description

Requests that the unit update itself. Note that unit must have an update avaliable to be able to update. Use “Get Update Info” to check if an update is avaliable.

Command Usage

Request Format Example: “none”

Arguments: “none”

curl -X GET "/Update"
GET /Update HTTP/1.1
Host: 
Status200 OK
ServerzigenIP (http://zigencorp.com)
Content-typeapplication/json
{
    "status": "success"
}