Read the settings
const url = 'http://pwrman.local/api/v1/settings';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”The settings.
object
Device name, used for <name>.local and the MQTT topics.
MQTT broker; empty turns MQTT off.
Connect to the broker over TLS.
With mqtt_tls, check the broker’s certificate.
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.
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.
Static address, as a dotted quad or empty.
DNS server; empty uses the one DHCP names (the gateway with static addressing).
Time server; empty uses the one DHCP names, or time.cloudflare.com.
Extra host names the web server answers to, separated by spaces. Commas are also accepted when writing.
Syslog server; empty sends no syslog.
Update source, as http://host[:port][/path] without a trailing slash; empty never checks.
New releases install by themselves.
Also require the API token to read status, the fault log, the certificate details and Prometheus metrics.
The power budget, in watts.
Automatic mode turns the fan on at this total power, in watts.
Automatic mode turns the fan off at this total power, in watts. Must be below fan_on_w.
Automatic mode also runs the fan while any contract is above this current, in mA; 0 turns this off.
A device drawing less than this, in mW, for charged_min minutes counts as charged; 0 turns this off.
The light sweep at power-up.
Brightness during the night window and when idle.
Night window as HH:MM-HH:MM local time; empty for none.
Dim after this many minutes without a port event; 0 never.
Local time minus UTC, in minutes.
Set each blade, once, to start through its bootloader, so the controller can update it.
A switched-off blade the controller has not addressed for this many seconds restarts into its bootloader; 0 never.
Port names; empty for the default name.
Power limit per port, in watts.
The highest voltage each port offers.
Priority per port; 0 is the most important.
Each port’s state at power-up.
1 switches the port off once its device is charged.
Switch the port off this many minutes after a device connects; 0 never.
A broker password is stored.
An API token is stored.
This request was let in by first-time setup.
The input voltage trim, in thousandths. It belongs to this unit’s measuring circuit and cannot be changed over the API.
HTTPS is on.
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.
object
Why the request was refused, in words.
Examples
{ "error": "bearer token required"}{ "error": "no API token yet: Wi-Fi setup unlocks settings for an hour, or connect Ethernet"}The controller is busy with another request. Try again.
object
Why the request was refused, in words.
Example
{ "error": "busy, retry"}USB Type-C® and USB-C® are registered trademarks of USB Implementers Forum.