Control API

This section describes the communication protocol between the control system and the 32140PWR

Connection TCP/HTTP (NGTC-32140PWR is HTTP server), Port 80
Command Format IP/0CXQRB2XQ3KD7XB/nexgentec.fcgi?action=action&param=value

Multiple parameters and values must be sent like: …?action=21&channel=1&name=MySpeaker

Caution

All commands must be sent as standard HTTP requests including headers, the server responds with a reply header and a JSON data table
Server will close the connection once replied, to keep the connection open set the keep-alive flag in the request header

Info

Use any browser to test the communication"

Example

Communication Action Parameter Example
Request 0
IP/0CXQRB2XQ3KD7XB/nexgentec.fcgi?action=0
Reply {“version”: “1.0.0”, “api-version”: “N3”,“fpga-version”: “2.2.0-d51c0cc4-#1040”,
“serial”: “240818000117”,“type”: 1,“type-string”: “32140PWR”,“channel”: 32}

Subsections of Control API

General

Get device info

Communication Action Parameter Example
Request 0
IP/0CXQRB2XQ3KD7XB/nexgentec.fcgi?action=0
Reply {“version”: “1.0.0”, “api-version”: “N3”,“fpga-version”: “2.2.0-d51c0cc4-#1040”,
“serial”: “240818000117”,“type”: 1,“type-string”: “32140PWR”,“channel”: 32}

Get host name

Communication Action Parameter Example
Request 1
IP/0CXQRB2XQ3KD7XB/nexgentec.fcgi?action=1
Reply {“hostname”: “My Amp”}

Set host name

Communication Action Parameter Example
Request 2
IP/0CXQRB2XQ3KD7XB/nexgentec.fcgi?action=2&hostname=“MyAmp”
Reply {“hostname”: “MyAmp”}

Get IP configuration

Communication Action Parameter Example
Request 3
IP/0CXQRB2XQ3KD7XB/nexgentec.fcgi?action=3
Reply {“type”: “dhcp”,“ip”: “10.77.178.237”,“subnet”: “255.255.0.0”,“gateway”: “10.77.178.1”}

Set IP configuration

Communication Action Parameter Example
Request 4
type=static/dhcp/auto
ip=x.x.x.x
netmask=x.x.x.x
gateway=x.x.x.x
IP/0CXQRB2XQ3KD7XB/nexgentec.fcgi?action=4&type=static&ip=10.77.178.10&subnet=255.255.0.0&gateway=10.77.178.1
Reply {“type”: “dhcp”,“ip”: “10.77.178.237”,“subnet”: “255.255.0.0”,“gateway”: “10.77.178.1”}

Get mains voltage

Communication Action Parameter Example
Request 5
IP/0CXQRB2XQ3KD7XB/nexgentec.fcgi?action=5
Reply {“value”: 230}

Set mains voltage

Communication Action Parameter Example
Request 6
value=90-240V
IP/0CXQRB2XQ3KD7XB/nexgentec.fcgi?action=6&value=110
Reply {“value”: 110}

Audio

Get master volume

Communication Action Parameter Example
Request 7
IP/0CXQRB2XQ3KD7XB/nexgentec.fcgi?action=7
Reply {“volume”: 0.0}

Set master volume

Communication Action Parameter Example
Request 8
volume=-100.0 - 24.0
IP/0CXQRB2XQ3KD7XB/nexgentec.fcgi?action=6&volume=0
Reply {“volume”: 0.0}

Get master mute

Communication Action Parameter Example
Request 9
IP/0CXQRB2XQ3KD7XB/nexgentec.fcgi?action=9
Reply {“mute”: 1}

Set master mute

Communication Action Parameter Example
Request 10
mute=0/1
IP/0CXQRB2XQ3KD7XB/nexgentec.fcgi?action=10&mute=1
Reply {“mute”: 1}

Get PSU gain reduction

Communication Action Parameter Example
Request 11
IP/0CXQRB2XQ3KD7XB/nexgentec.fcgi?action=11
Reply {“reduction”: -0.0}

Get channel name

Communication Action Parameter Example
Request 20
channel=1-MAX Channel Number
IP/0CXQRB2XQ3KD7XB/nexgentec.fcgi?action=20&channel=1
Reply {“channel”:1,“name”: “Ch 1”}

Set channel name

Communication Action Parameter Example
Request 21
channel=1-MAX Channel Number
name=MAX 30 Chars
IP/0CXQRB2XQ3KD7XB/nexgentec.fcgi?action=21&channel=1&name=MySpeaker
Reply {“channel”:1,“name”: “MySpeaker”}

Get channel enable

Communication Action Parameter Example
Request 22
channel=1-MAX Channel Number
IP/0CXQRB2XQ3KD7XB/nexgentec.fcgi?action=22&channel=1
Reply {“channel”:1,“enable”: 1}

Set channel enable

Communication Action Parameter Example
Request 23
channel=1-MAX Channel Number, comma seperated if multiple
enable=1/0
IP/0CXQRB2XQ3KD7XB/nexgentec.fcgi?action=23&channel=1,2,3,4,5&enable=1
Reply {“channel”: [1,2,3,4,5],“enable”: 0}

Get channel volume

Communication Action Parameter Example
Request 24
channel=1-MAX Channel Number
IP/0CXQRB2XQ3KD7XB/nexgentec.fcgi?action=24&channel=1
Reply {“channel”:1,“volume”: 0.0}

Set channel volume

Communication Action Parameter Example
Request 25
channel=1-MAX Channel Number
volume=-72.0 - 24.0
IP/0CXQRB2XQ3KD7XB/nexgentec.fcgi?action=25&channel=1&volume=1
Reply {“channel”:1,“volume”: 1.0}

Get channel level

Communication Action Parameter Example
Request 30
channel=1-MAX Channel Number
IP/0CXQRB2XQ3KD7XB/nexgentec.fcgi?action=30&channel=1
Reply {“channel”:1,“peak”: -11.1,“hold”: -9.7,“clip”: 0}

Get channel status

Communication Action Parameter Example
Request 31
channel=1-MAX Channel Number
IP/0CXQRB2XQ3KD7XB/nexgentec.fcgi?action=31&channel=1
Reply {“channel”:1,“status”: 0,“status_text”: “OFF”,“temp”: 38.5}

Get all channel level

Communication Action Parameter Example
Request 40
IP/0CXQRB2XQ3KD7XB/nexgentec.fcgi?action=40
Reply {“level”: [{
“peak”: -10.0,“hold”: -9.3,“clip”: 0},
{“peak”: -12.0,“hold”: -11.4,“clip”: 0},
… ]}

Get overview status data

Communication Action Parameter Example
Request 41
IP/0CXQRB2XQ3KD7XB/nexgentec.fcgi?action=41
Reply {“overview”: [
{ “status”: 0,“status_text”: “OFF”,“temp”: 38.5,“enable”: 0,“volume”: 1.0,“name”: “MySpeaker”},
{ “status”: 1,“status_text”: “OK”,“temp”: 38.5,“enable”: 1,“volume”: 0.0,“name”: “Ch 2”},
… ]}

Syslog

Get get attached syslog server address

Communication Action Parameter Example
Request 50
IP/0CXQRB2XQ3KD7XB/nexgentec.fcgi?action=50
Reply {“syslog_ip”: “192.168.1.1”,“syslog_port”: “555”}

Set set syslog server address

Communication Action Parameter Example
Request 51
syslog_ip=x.x.x.x
syslog_port=x
IP/0CXQRB2XQ3KD7XB/nexgentec.fcgi?action=action=51 &syslog_ip=192.168.1.1&syslog_port=555
Reply {“syslog_ip”: “192.168.1.1”,“syslog_port”: “555”}

Get number of syslog messages

Communication Action Parameter Example
Request 52
number=x
IP/0CXQRB2XQ3KD7XB/nexgentec.fcgi?action=52&number=1
Reply {“log”: [“Jan 1 01:42:37 32140PWR-000117user.info root: Amp is ok”]}