sw41

General notes

API detail

Get Active Source

Description

Retrieves the active source being currently routed to the sink.

Command Usage

Request Format Example: “none”

Arguments: “none”

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

Get Auto Switch

Description

Retrieves the autoswitch setting. Autoswitch will automatically switch the input when an input becomes active.

Command Usage

Request Format Example: “none”

Arguments: “none”

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

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
    ]
}

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 Audio Settings

Description

Retrieves all analog audio settings.

Command Usage

Request Format Example: “none”

Arguments: “none”

curl -X GET "/GetAudioSettings"
GET /GetAudioSettings HTTP/1.1
Host: 
Status200 OK
ServerzigenIP (http://zigencorp.com)
Content-typeapplication/json
{
    "status": "success",
    "audioInfo": {
        "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
    }
}

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
{
    "sinkname": "LG TV RVU\n   "
}

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": "SW41-0000",
        "firmware": "1.0.11",
        "firmware date": "May 11 2020",
        "firmware time": "15:53:51",
        "hardware": "0004",
        "current ip": "192.168.100.211",
        "static ip": "192.168.0.10",
        "netmask": "255.255.255.0",
        "gateway": "192.168.0.1",
        "mac": "00:80:E6:00:00:00",
        "hostname": "SW41-0000",
        "dhcp": true
    }
}

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: “none”

Arguments: “none”

curl -X GET "/GetVideoInfo"
GET /GetVideoInfo HTTP/1.1
Host: 
Status200 OK
ServerzigenIP (http://zigencorp.com)
Content-typeapplication/json
{
    "status": "success",
    "videoInfo": {
        "input link": [
            true,
            false,
            false,
            false
        ],
        "input hdcp status": "success",
        "output hdcp status": "success",
        "output link": true,
        "output active": true,
        "video stable": true,
        "signal stable": true,
        "resolution": "1920x1080",
        "scan type": "progressive",
        "color format": "RGB:444",
        "dynamic range": "VESA (Full Range)",
        "color bit depth": 8,
        "pixel clock": "146 Mhz",
        "framerate": "59.12 Hz;",
        "audio type": "  LPCM",
        "audio sample rate": "48 kHz",
        "audio channels": 2
    }
}

Restart

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

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"
}

Request Update

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"
}

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."
    }
}

Set Active Source

Description

Sets the desired source to route to the sink.

Command Usage

Request Format Example:

{
    "source": 0
}

Arguments:

"source" (required)
    Type: Integer
    Parameter: Desired source
curl -X POST -H "Content-Type: application/json" -d '{
    "source": "1"
}' "/SetActiveSource"
POST /SetActiveSource HTTP/1.1
Host: 
Content-Type: application/json

{
    "source": "1"
}
Status200 OK
ServerzigenIP (http://zigencorp.com)
Content-typeapplication/json
{
    "status": "success",
    "message": "Source is already selected."
}
Status200 OK
ServerzigenIP (http://zigencorp.com)
Content-typeapplication/json
{
    "status": "success"
}

Set Auto Switch

Description

Enables or disable the autoswitch setting. Autoswitch will automatically switch the input when an input becomes active.

Command Usage

Request Format Example:

{
    "autoswitch": true
}

Arguments:

"autoswitch" (required)
    Type: Boolean
    Parameter: Set to true to enable, false otherwise.
curl -X POST -H "Content-Type: application/json" -d '{
    "autoswitch": true
}' "/SetAutoSwitch"
POST /SetAutoSwitch HTTP/1.1
Host: 
Content-Type: application/json

{
    "autoswitch": true
}
Status200 OK
ServerzigenIP (http://zigencorp.com)
Content-typeapplication/json
{
    "status": "success"
}

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:

{
    "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:

"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 '{
    "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
}' "/SetAudioSettings"
POST /SetAudioSettings HTTP/1.1
Host: 
Content-Type: application/json

{
    "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
}
Status200 OK
ServerzigenIP (http://zigencorp.com)
Content-typeapplication/json
{
    "status": "success"
}
Status200 OK
ServerzigenIP (http://zigencorp.com)
Content-typeapplication/json
{
    "status": "success"
}

Upload Edid

Description

Upload a EDID file. Must be 256 bytes of raw EDID data. Can save up to 4 different EDID files. Subsequent uploads overwrites oldest file.

Command Usage

Request Format Example: “none”

Arguments: “none”

curl -X POST -H "Content-Type: application/json" "/UploadEdid"
POST /UploadEdid HTTP/1.1
Host: 
Content-Type: application/json
Status200 OK
ServerzigenIP (http://zigencorp.com)
Content-typeapplication/json
{
    "status": "success",
    "message": "EDID \"M50-E1\n      \" successfully uploaded."
}

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"
}

Set Hostname

Description

Sets the new hostname of the unit. This will affect Zeroconf / Avahi hostname broadcasting.

Command Usage

Request Format Example:

{
    "hostname": "NEW HOSTNAME"
}

Arguments:

"hostname" (required)
    Type: String
    Parameter: Type desired new hostname for the unit
curl -X POST -H "Content-Type: application/json" -d '{
    "hostname": "HOST LONGER THAN 14 CHARACTERS"
}' "/SetHostname"
POST /SetHostname HTTP/1.1
Host: 
Content-Type: application/json

{
    "hostname": "HOST LONGER THAN 14 CHARACTERS"
}
Status200 OK
ServerzigenIP (http://zigencorp.com)
Content-typeapplication/json
{
    "status": "success"
}

Set Static IP

Description

Sets the static IP setting of the unit. This will affect only take affect if or when the unit is set to static mode using the “Set DHCP” API.

Command Usage

Request Format Example:

{ “ip address”: “192.168.1.100”, “netmask”: “255.255.255.0”, “gateway”: “192.168.1.1” }

Arguments:

"ip address" (required)
    Type: String
    Parameter: Type desired new static ip address of the unit.
"netmask" (required)
    Type: String
    Parameter: Type desired new netmask of the unit.
"gateway" (required)
    Type: String
    Parameter: Type desired new gateway of the unit.
curl -X POST -H "Content-Type: application/json" -d '{
    "ip address": "192.168.100.254",
    "netmask": "255.255.255.0",
    "gateway": "192.168.100.1"
    
}' "/SetStaticIP"
POST /SetStaticIP HTTP/1.1
Host: 
Content-Type: application/json

{
    "ip address": "192.168.100.254",
    "netmask": "255.255.255.0",
    "gateway": "192.168.100.1"
    
}
Status200 OK
ServerzigenIP (http://zigencorp.com)
Content-typeapplication/json
{
    "status": "success"
}

Set DHCP

Description

Sets the network settings to DHCP (AutoIP fallback) or static IP mode.

Command Usage

Request Format Example:

{
    "dhcp": false
}

Arguments: “dhcp” (required) Type: Boolean Parameter: Set to true to enable DHCP (AutoIP fallback), false to set to static IP.

curl -X POST -H "Content-Type: application/json" -d '{
    "dhcp": true
}' "/SetDHCP"
POST /SetDHCP HTTP/1.1
Host: 
Content-Type: application/json

{
    "dhcp": true
}
Status200 OK
ServerzigenIP (http://zigencorp.com)
Content-typeapplication/json
{
    "status": "success"
}