Skip to content

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.

pwrman/<name>/
  • availabilityoutonline or offline, retained
    online
  • 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",
      "ups": false,
      "ups_ac": "OFF",
      "ups_on_battery": "OFF",
      "ups_charging": "OFF",
      "ups_batt_v": 0,
      "ups_mains_v": 0,
      "ups_load_a": 0,
      "vin": true,
      "vin_v": 24.06,
      "ceiling_ma": 0
    }
  • 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_w": 65,
        "prio": 2,
        "limit_ma": 5000,
        "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,
        "silent": false
      }
    • setinON, OFF, hard_reset or src_cap
    • priority/setin0–255, 0 = most important
    • limit/setincurrent limit, 500–5000 mA
    • volt/setinvoltage cap: 5, 9, 12, 15 or 20
    • boot/setinat power-up: on, off or last
    • autooff/setinswitch off once charged: ON or OFF
    • sleep/setinsleep timer in minutes, 0 = off
  • budget/setinchassis budget in watts
  • fan/setinauto, on or off
  • led/setinlight brightness, 0–255
  • charged_mw/setincharged below this many mW…
  • charged_min/setin…for this many minutes
  • improv/setinopen: Bluetooth setup for ten minutes
  • update/
    • stateoutinstalled and newest versions, retained
      {
        "installed_version": "0.12.0",
        "latest_version": "0.12.0"
      }
    • setininstall: install the newest known release
    • latestinretained pointer to your own release
      {
        "version": "0.13.0",
        "url": "http://fw.lan/controller.signed.bin"
      }
out the controller publishes itin you publish it to change something. Topics with a ▸ open to show an example.
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 and latest_version

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), ceiling_ma (3000 while low input voltage caps the ports, else 0), ups (true once a UPS answers) and, with one connected, ups_ac, ups_on_battery, ups_charging, ups_batt_v, ups_mains_v, ups_load_a.

port/<n>/telemetry fields: state, gen (blade generation), v, i, p, e (kWh), contract_w, pdo, prio, limit_ma, 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 and silent.

Events: kind is one of the Home Assistant event types. text explains faults, auto-off and blade updates. Chassis events, such as the input voltage crossing its low warning, use port 0.

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 current limit in mA, 500–5000
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
improv/set open: open Bluetooth setup for ten minutes
update/set install: install the newest known release
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:

Terminal window
mosquitto_pub -h broker.lan -t pwrman/pwrman/port/3/set -m OFF

The broker is trusted: anyone who can publish to these topics can control the ports. Use your broker’s access control to limit who can.