Skip to content

Read the settings

GET
/api/v1/settings
curl --request GET \
--url http://pwrman.local/api/v1/settings \
--header 'Authorization: Bearer <token>'

Every setting except the passwords and the token. During first-time setup a request without a token is let in; see first-time setup.

The settings.

Media typeapplication/json
object
name

Device name, used for <name>.local and the MQTT topics.

string
<= 31 characters /^[A-Za-z0-9]([A-Za-z0-9-]*[A-Za-z0-9])?$/
wifi_ssid
string
<= 32 characters
mqtt_host

MQTT broker; empty turns MQTT off.

string
<= 63 characters
mqtt_port
integer
>= 1 <= 65535
mqtt_user
string
<= 32 characters
mqtt_tls

Connect to the broker over TLS.

boolean
mqtt_tls_verify

With mqtt_tls, check the broker’s certificate.

boolean
mqtt_ca

The broker’s CA certificate as PEM, up to 2048 bytes as DER; empty for none. Without one a verified link trusts the Let’s Encrypt roots.

string
contract_steps

A contract event for every voltage step a PPS or SPR AVS sink takes. Off, the event comes only when the sink switches to that range or away from it.

boolean
ip_mode
string
Allowed values: dhcp static
ip

Static address, as a dotted quad or empty.

string
netmask
string
gateway
string
dns

DNS server; empty uses the one DHCP names (the gateway with static addressing).

string
ntp_server

Time server; empty uses the one DHCP names, or time.cloudflare.com.

string
<= 63 characters
hostnames

Extra host names the web server answers to, separated by spaces. Commas are also accepted when writing.

string
syslog_host

Syslog server; empty sends no syslog.

string
<= 63 characters
syslog_port
integer
>= 1 <= 65535
update_url

Update source, as http://host[:port][/path] without a trailing slash; empty never checks.

string
<= 63 characters
update_auto

New releases install by themselves.

boolean
auth_read

Also require the API token to read status, the fault log, the certificate details and Prometheus metrics.

boolean
budget_w

The power budget, in watts.

integer
>= 15 <= 600
fan_mode
string
Allowed values: auto on off
fan_on_w

Automatic mode turns the fan on at this total power, in watts.

integer
>= 1 <= 1000
fan_off_w

Automatic mode turns the fan off at this total power, in watts. Must be below fan_on_w.

integer
<= 1000
fan_on_ma

Automatic mode also runs the fan while any contract is above this current, in mA; 0 turns this off.

integer
<= 10000
charged_mw

A device drawing less than this, in mW, for charged_min minutes counts as charged; 0 turns this off.

integer
<= 20000
charged_min
integer
>= 1 <= 255
led_brightness
integer
<= 255
led_boot

The light sweep at power-up.

string
Allowed values: white rainbow
led_dim

Brightness during the night window and when idle.

integer
<= 255
led_night

Night window as HH:MM-HH:MM local time; empty for none.

string
led_idle_min

Dim after this many minutes without a port event; 0 never.

integer
<= 1440
tz_offset_min

Local time minus UTC, in minutes.

integer
>= -720 <= 840
blade_boot_via_loader

Set each blade, once, to start through its bootloader, so the controller can update it.

boolean
blade_watch_s

A switched-off blade the controller has not addressed for this many seconds restarts into its bootloader; 0 never.

integer
<= 255
port_names

Port names; empty for the default name.

Array<string>
<= 6 items
port_limits_w

Power limit per port, in watts.

Array<integer>
<= 6 items
port_max_v

The highest voltage each port offers.

Array<integer>
<= 6 items
Allowed values: 5 9 12 15 20
port_priorities

Priority per port; 0 is the most important.

Array<integer>
<= 6 items
port_boot

Each port’s state at power-up.

Array<string>
<= 6 items
Allowed values: on off last
port_auto_off

1 switches the port off once its device is charged.

Array<integer>
<= 6 items
Allowed values: 0 1
port_sleep_min

Switch the port off this many minutes after a device connects; 0 never.

Array<integer>
<= 6 items
mqtt_pass_set

A broker password is stored.

boolean
token_set

An API token is stored.

boolean
setup

This request was let in by first-time setup.

boolean
vin_cal

The input voltage trim, in thousandths. It belongs to this unit’s measuring circuit and cannot be changed over the API.

integer
https

HTTPS is on.

boolean

Example

{
"ip_mode": "dhcp",
"fan_mode": "auto",
"led_boot": "white",
"port_max_v": [
5
],
"port_boot": [
"on"
],
"port_auto_off": [
0
]
}

The token is missing or wrong. On a controller with no token yet, the error says how to open first-time setup.

Media typeapplication/json
object
error
required

Why the request was refused, in words.

string

Examples

{
"error": "bearer token required"
}

The controller is busy with another request. Try again.

Media typeapplication/json
object
error
required

Why the request was refused, in words.

string

Example

{
"error": "busy, retry"
}

USB Type-C® and USB-C® are registered trademarks of USB Implementers Forum.