System operation

System gain

Get current system gain in dB

get

Returns the current system gain in dB (from -120dB to 0dB).

Responses
200
OK
application/json
get
GET /psapi/gain/db HTTP/1.1
Host: aaa-1234.local
Accept: */*
{
  "scale": "linear",
  "value": 1
}

Set current system gain in dB

put

Changes the target gain level for the system, the values should be in dB (-120dB to 0dB)

Body
valuenumberRequired
Responses
200
OK
application/json
put
PUT /psapi/gain/db HTTP/1.1
Host: aaa-1234.local
Content-Type: application/json
Accept: */*
Content-Length: 11

{
  "value": 1
}
{
  "scale": "linear",
  "value": 1
}

Decrease System Gain

put

Decrease the target system gain by X dB

Body
valuenumberRequired
Responses
200
OK
application/json
put
PUT /psapi/gain/decrease HTTP/1.1
Host: aaa-1234.local
Content-Type: application/json
Accept: */*
Content-Length: 11

{
  "value": 1
}
{
  "scale": "linear",
  "value": 1
}

Increase System Gain

put

Increase the target system gain by X dB

Body
valuenumberRequired
Responses
200
OK
application/json
put
PUT /psapi/gain/increase HTTP/1.1
Host: aaa-1234.local
Content-Type: application/json
Accept: */*
Content-Length: 11

{
  "value": 1
}
{
  "scale": "linear",
  "value": 1
}

Get current system gain in linear values

get

Returns the current system gain in linear values (from 0 to 1).

Responses
200
OK
application/json
get
GET /psapi/gain/linear HTTP/1.1
Host: aaa-1234.local
Accept: */*
{
  "scale": "linear",
  "value": 1
}

Set current system gain in linear values

put

Changes the target gain level for the system, the values should be in linear scale (0 to 1)

Body
valuenumberRequired
Responses
200
OK
application/json
put
PUT /psapi/gain/linear HTTP/1.1
Host: aaa-1234.local
Content-Type: application/json
Accept: */*
Content-Length: 11

{
  "value": 1
}
{
  "scale": "linear",
  "value": 1
}

System Mute

Get System Mute

get

Returns the system mute state

Responses
200
OK
application/json
get
GET /psapi/mute HTTP/1.1
Host: aaa-1234.local
Accept: */*
{
  "muted": true
}

Set System Mute

put

Changes the system mute state

Body
mutedbooleanRequired
Responses
200
OK
application/json
put
PUT /psapi/mute HTTP/1.1
Host: aaa-1234.local
Content-Type: application/json
Accept: */*
Content-Length: 14

{
  "muted": true
}
{
  "muted": true
}

System Power

Get Power State

get

Returns the target power state for the system

Responses
200
OK
application/json
get
GET /psapi/power HTTP/1.1
Host: aaa-1234.local
Accept: */*
{
  "system": "on"
}

Set Power State

put

Changes the target power state for the system, allowed values are "on" and "sleep"

Body
systemall ofRequiredExample: onPossible values:
string · enumOptionalPossible values:
Responses
200
OK
application/json
put
PUT /psapi/power HTTP/1.1
Host: aaa-1234.local
Content-Type: application/json
Accept: */*
Content-Length: 15

{
  "system": "on"
}
{
  "system": "on"
}

Get Module Power States

get

Get power information for all modules

Responses
200
OK
application/json
get
GET /psapi/status/power HTTP/1.1
Host: aaa-1234.local
Accept: */*
{
  "modules": {
    "ANY_ADDITIONAL_PROPERTY": {
      "status": "awake"
    }
  }
}

Stream Power Updates

get

This endpoint can be used to stream updates about the system power state through WebSockets. The payload returned is the same as in GET /power.

Find a Javascript client to use use this endpoint below.

const WebSocket = require('ws');

const client = new WebSocket('ws://localhost:6789/ws/power');
client.on('message', msg => console.log("Power update:" + msg.toString()));
Responses
200
OK
get
GET /psapi/ws/power HTTP/1.1
Host: aaa-1234.local
Accept: */*
200

OK

No content

Stream power information for all modules

get

This endpoint can be used to stream system power status information through WebSockets. The payload returned is the same as in GET /status/power but only the fields that have changed will be populated.

Upon reception of a message through the Websocket, a full system status can be retrieved by issuing a GET request to /status/power.

Find a Javascript client to use use this endpoint below.

const WebSocket = require('ws');

const client = new WebSocket('ws://localhost:6789/ws/status/power');
client.on('message', msg => console.log("Power status update:" + msg.toString()));
Responses
200
OK
get
GET /psapi/ws/status/power HTTP/1.1
Host: aaa-1234.local
Accept: */*
200

OK

No content

Last updated

Was this helpful?