Platform-level MQTT topics, payloads, commands, and Home Assistant auto-discovery entities available on every PumpFuse product.
Covers availability, status, relay control, power telemetry, and event notifications.
For product-specific MQTT topics and HA entities, see the product's own MQTT/HA Reference (e.g., Watchdog MQTT/HA).
| Version | Date | Notes |
|---|---|---|
| 1.0 | 2026-02-11 | Initial release |
Every PumpFuse device publishes 7 topics and subscribes to 3 command topics at the platform level. It also registers 3 Home Assistant discovery entities for automatic dashboard integration.
All topics use the device's configured MQTT base topic:
{base}/...
Where {base} is set during provisioning (default: pumpfuse/<device_id>). Example: pumpfuse/test-board.
pumpfuse_<full_mac_hex> (6 octets, e.g., pumpfuse_aabbccddeeff)POST /api/v1/config{base}/availability → "offline" (QoS 1, retained)| Topic | QoS | Retained | Purpose |
|---|---|---|---|
{base}/availability | 1 | Yes | Online/offline (LWT) |
{base}/status | 1 | Yes | Full platform status (JSON) |
{base}/event | 0 | No | Event notifications (JSON) |
{base}/relay/state | 1 | Yes | Relay ON/OFF |
{base}/telemetry/state | 1 | Yes | Telemetry config (JSON) |
{base}/telemetry/active/state | 1 | Yes | Telemetry ON/OFF |
{base}/power | 0 | No | Power readings stream (JSON) |
| Topic | Payload | Purpose |
|---|---|---|
{base}/relay/set | ON / OFF | Set relay state |
{base}/telemetry/set | JSON | Update telemetry config |
{base}/telemetry/active/set | ON / OFF | Toggle telemetry on/off |
Topic: {base}/availability
QoS: 1 | Retained: Yes
Published on MQTT connect. The broker publishes the LWT ("offline") if the device disconnects unexpectedly.
| Payload | Meaning |
|---|---|
online | Device connected to broker |
offline | Device disconnected (LWT) |
Topic: {base}/status
QoS: 1 | Retained: Yes
Cadence: On every state change and every 60 seconds (heartbeat)
{
"product": "pf-watchdog",
"firmware": "1.0.0",
"wifi_connected": true,
"mqtt_connected": true,
"relay": true,
"telemetry_active": true,
"telemetry_interval_s": 5,
"power_w_last": 12.345,
"power_sample_ts_ms": 1739260200000,
"uptime_s": 3600,
"ip": "192.168.40.114"
}
| Field | Type | Description |
|---|---|---|
product | string | Product identifier |
firmware | string | Firmware version |
wifi_connected | boolean | WiFi connected |
mqtt_connected | boolean | MQTT broker connected |
relay | boolean | Relay state (true = closed/ON) |
telemetry_active | boolean | Telemetry streaming enabled |
telemetry_interval_s | integer | Telemetry interval in seconds |
power_w_last | float | Most recent power reading in watts |
power_sample_ts_ms | integer | Power sample timestamp (ms) |
uptime_s | integer | Seconds since boot |
ip | string | Current IP address |
When republished (on state change):
Topic: {base}/event
QoS: 0 | Retained: No
Published at the moment a notable event occurs.
{
"event": "relay_changed",
"message": "ON",
"ts_ms": 1739260200000
}
| Field | Type | Description |
|---|---|---|
event | string | Event type identifier |
message | string | Human-readable detail |
ts_ms | integer | Timestamp in milliseconds (device uptime epoch) |
Platform event types:
| Event | Message | When |
|---|---|---|
relay_changed | "ON" or "OFF" | Relay state changed via MQTT command |
telemetry_changed | "ok" or "ON" / "OFF" | Telemetry settings changed via MQTT command |
invalid_command | Error description | Unrecognized or malformed MQTT command |
📝 Product-specific events are published to the product's own event topic (e.g.,
{base}/watchdog/event), not to this platform event topic.
Topic: {base}/relay/state
QoS: 1 | Retained: Yes
ON
Plain text: ON (relay closed, power flowing) or OFF (relay open).
Published on connect (initial state) and on every relay change.
Topic: {base}/telemetry/state
QoS: 1 | Retained: Yes
{
"active": true,
"interval_s": 5
}
Published on connect and on every telemetry settings change.
Topic: {base}/telemetry/active/state
QoS: 1 | Retained: Yes
ON
Plain text: ON or OFF. Published alongside telemetry/state for HA switch compatibility.
Topic: {base}/power
QoS: 0 | Retained: No
{
"power_w": 12.345,
"ts_ms": 1739260200000
}
Published at telemetry_interval_s intervals, only when telemetry_active is true.
Topic: {base}/relay/set
Payload: ON or OFF (case-insensitive)
| Payload | Effect |
|---|---|
ON | Close relay (power on) |
OFF | Open relay (power off) |
Publishes relay/state, status, and event (type relay_changed) immediately.
Invalid payload publishes an event with type invalid_command.
Topic: {base}/telemetry/set
Payload: JSON object
{
"active": true,
"interval_s": 10
}
| Field | Type | Required | Validation |
|---|---|---|---|
active | boolean | No | Must be boolean |
interval_s | integer | No | 1–60, must be whole number |
Publishes telemetry/state, telemetry/active/state, status, and event (type telemetry_changed) on success.
Invalid JSON or out-of-range values publish an event with type invalid_command.
Topic: {base}/telemetry/active/set
Payload: ON or OFF (case-insensitive)
Simple toggle that keeps the existing interval_s unchanged. Designed for the HA telemetry switch entity.
Publishes same topics as telemetry/set.
The device publishes HA discovery configs on every MQTT connect. All use QoS 1, retained.
Discovery topic pattern:
homeassistant/<component>/<object_id>_<entity_id>/config
Where <object_id> = pumpfuse_<mac[3]:mac[4]:mac[5]> (last 3 MAC octets, hex).
All entities include:
unique_id derived from MACavailability_topic → {base}/availabilitydevice block with name, manufacturer ("PumpFuse"), model (product display name), identifiers| Property | Value |
|---|---|
| Component | switch |
| ID | relay |
| Name | PumpFuse Relay |
| State topic | {base}/relay/state |
| Command topic | {base}/relay/set |
| Payload on/off | ON / OFF |
| State on/off | ON / OFF |
Standard HA toggle switch for relay control.
| Property | Value |
|---|---|
| Component | sensor |
| ID | power |
| Name | PumpFuse Power |
| Device class | power |
| Unit | W |
| State topic | {base}/power |
| Value template | {{ value_json.power_w }} |
Displays current power draw. Updates at telemetry_interval_s when telemetry is active.
| Property | Value |
|---|---|
| Component | switch |
| ID | telemetry |
| Name | PumpFuse Telemetry |
| Icon | mdi:chart-line |
| State topic | {base}/telemetry/active/state |
| Command topic | {base}/telemetry/active/set |
| Payload on/off | ON / OFF |
| State on/off | ON / OFF |
Toggle switch to enable/disable power telemetry streaming.
| Topic | Trigger | Interval |
|---|---|---|
availability | On MQTT connect | — |
status | On state change + heartbeat | 60s heartbeat |
event | On event occurrence | — |
relay/state | On relay change + connect | — |
telemetry/state | On settings change + connect | — |
telemetry/active/state | On settings change + connect | — |
power | On telemetry tick | telemetry_interval_s |
| HA discovery configs | On MQTT connect | — |
The publisher task runs at 200ms resolution, checking for state changes and heartbeat/telemetry timers.
type: entities
title: PumpFuse Device
entities:
- entity: switch.<device>_relay
name: Relay
- entity: sensor.<device>_power
name: Power
- entity: switch.<device>_telemetry
name: Telemetry
Replace <device> with the device's object ID prefix (derived from device name).
Products add their own topics under {base}/<product>/.... For example, the watchdog adds:
| Topic | Purpose |
|---|---|
{base}/watchdog/state | Watchdog state payload |
{base}/watchdog/event | Watchdog events |
{base}/watchdog/enabled/set | Enable/disable monitoring |
{base}/watchdog/reboot/set | Trigger router reboot |
{base}/watchdog/stats/reset/set | Reset statistics |
Products also register additional HA discovery entities through the platform's discovery system. See each product's MQTT/HA Reference for details.