MQTT
If you use Home Assistant, you don’t need this page: see Home Assistant. This page is for Node-RED, scripts and other MQTT tools.
Set the broker in the web interface’s Settings. Every topic starts with
pwrman/<name>/, where <name> is the device name (pwrman by default).
Ports are numbered 1 to 6.
Topic map
Section titled “Topic map”pwrman/<name>/availabilityoutonline or offline, retainedonline
statusoutthe whole chassis, every second, retained{ "total_w": 110.42, "reserved_w": 202, "budget_w": 240, "headroom_w": 38, "energy_kwh": 17.85, "fan": "ON", "fan_mode": "auto", "alert": false, "rssi": -58, "uptime_s": 274620, "led": 48, "fw": "0.12.0", "boot": "power-on", "problem": "OFF", "problems": "", "charged_mw": 500, "charged_min": 10, "led_mode": "normal", "vin": true, "vin_v": 24.06, "ceiling_w": 0, "contract_steps": "OFF" }eventoutsomething happened to a port, or to the chassis as port 0{ "port": 4, "event": "charge", "kind": "auto_off", "code": 2, "arg": 0, "text": "charged", "ts": 1791268930 }port/<n>/telemetryoutone port, every second{ "state": "active", "gen": 3, "v": 20.021, "i": 2.712, "p": 54.3, "e": 6.211, "pdo": 5, "contract": "fixed", "contract_w": 65, "prio": 2, "limit_w": 100, "max_v": 20, "boot": "on", "charged": false, "auto_off": false, "sleep_min": 0, "fault": 0, "last_fault": "", "last_fault_at": 0, "t_conv": 54.9, "t_plug": 41.3, "t_mcu": 36.2, "progress": 0, "update_due": false, "fw": "0.2.0", "silent": false }setinON, OFF, hard_reset or src_cappriority/setin0–255, 0 = most importantlimit/setinpower limit, 5–100 Wvolt/setinvoltage cap: 5, 9, 12, 15 or 20boot/setinat power-up: on, off or lastautooff/setinswitch off once charged: ON or OFFsleep/setinsleep timer in minutes, 0 = off
budget/setinchassis budget in wattsfan/setinauto, on or offled/setinlight brightness, 0–255charged_mw/setina device is considered charged when its power draw is below this many mW…charged_min/setin…for this many minutescontract_steps/setinON: a contract event for every voltage step a PPS or SPR AVS device takesimprov/setinopen: Wi-Fi setup for ten minutesupdate/stateoutinstalled and newest versions, retained{ "installed_version": "0.12.0", "latest_version": "0.12.0" }setininstall: install the newest known releaselatestinretained pointer to your own release{ "version": "0.13.0", "url": "http://fw.lan/controller.signed.bin" }
blades/stateoutthe blades' firmware; differs while an update waits, retained{ "installed_version": "0.1.0", "latest_version": "0.2.0", "release_summary": "Waiting: Pi 1. Each updates once its device is unplugged or switched off (drawing under the Charged below threshold). Install updates them now, cutting their power for a few seconds." }setininstall: update the waiting blades now
What it publishes
Section titled “What it publishes”| Topic | When | Contents |
|---|---|---|
availability |
retained | online, or offline when the controller disconnects |
status |
every second, retained | the whole chassis, see below |
port/<n>/telemetry |
every second | one port, see below |
event |
on each event | {"port", "event", "kind", "code", "arg", "text", "ts"} |
update/state |
retained | installed_version, latest_version, release_url (the release notes), in_progress and update_percentage (0–100 while an update downloads, else null) |
update/auto |
retained, on change | ON or OFF: whether new releases install automatically |
blades/state |
retained, on change | installed_version, latest_version and release_summary for the blades: the installed version differs while a blade update waits |
status fields: total_w, reserved_w, budget_w, headroom_w,
energy_kwh, fan, fan_mode, alert, rssi, uptime_s, led,
led_mode, fw, boot (why it last started), problem and problems,
charged_mw, charged_min, the input voltage vin_v (vin is false
when it isn’t measured), and ceiling_w (60 while low input voltage caps
the ports,
else 0), and contract_steps (ON while every voltage step a PPS or SPR
AVS device takes is a contract event), and link (the connections that
are online: ethernet, wifi or both).
port/<n>/telemetry fields: state, gen (blade generation), v,
i, p, e (kWh), contract_w, pdo, contract (fixed, pps,
avs, or null without a contract), prio, limit_w, max_v,
boot, charged, auto_off, sleep_min, fault, last_fault,
last_fault_at, the blade temperatures t_conv, t_plug and t_mcu in
°C (null when there’s no reading), progress (0–100 during a blade
update), update_due (a blade update is waiting), fw (the blade’s
firmware version, null when unknown) and silent.
Events: kind is one of the
Home Assistant event types.
text explains faults, auto-off, USB-C® resets and blade updates. Chassis events, such as
the input voltage crossing its low warning, use port 0.
Commands
Section titled “Commands”Publish to these topics to send commands or change settings. Settings changed over MQTT are saved a few seconds after the last change.
| Topic | Payload |
|---|---|
port/<n>/set |
ON, OFF, hard_reset or src_cap (re-announce) |
port/<n>/priority/set |
0–255, 0 = most important |
port/<n>/limit/set |
power limit in watts, 5–100 |
port/<n>/volt/set |
voltage cap: 5, 9, 12, 15 or 20 |
port/<n>/boot/set |
power-up state: on, off or last |
port/<n>/autooff/set |
switch off once charged: ON or OFF |
port/<n>/sleep/set |
sleep timer in minutes, 0 = off |
budget/set |
chassis budget in watts |
fan/set |
auto, on or off |
led/set |
light brightness, 0–255 |
charged_mw/set, charged_min/set |
when a device counts as charged |
contract_steps/set |
ON: a contract event for every voltage step a PPS or SPR AVS device takes; OFF (the default): only when it switches to that range or away from it |
improv/set |
open: open Wi-Fi setup for ten minutes |
update/set |
install: install the newest known release; check: ask for a new release now instead of at the daily check; postpone or skip: hold back automatic installs for 7 days, or for the release now offered |
blades/set |
install: update every blade whose update is waiting now; their devices lose power for a few seconds |
update/latest |
retained pointer {"version":"x.y.z","url":"http://…/controller.signed.bin"} to offer your own release source. The controller uses the newer of this version and the one found by the daily check. |
Example, with Mosquitto’s command-line client:
mosquitto_pub -h broker.lan -t pwrman/pwrman/port/3/set -m OFFThe broker is trusted: anyone who can publish to these topics can control the ports. Use your broker’s access control to limit who can.
USB Type-C® and USB-C® are registered trademarks of USB Implementers Forum.