Skip to main content

MQTT API

Overview

This page provides a complete reference of all MQTT topics used by the TBox.

Topics follow the Home Assistant MQTT Discovery specification.

Topic Format

homeassistant/<component>/<device>/<identifier>/<type>
FieldDescription
componentMQTT entity type (sensor, switch, light, fan)
deviceUnique TBox identifier
identifierIndividual actuator or sensor
typeconfig, state or set

Switches

Socket 1

Topic TypeTopic
Confighomeassistant/switch/<device>/socket01/config
Statehomeassistant/switch/<device>/socket01/state
Commandhomeassistant/switch/<device>/socket01/set

Socket 2

Topic TypeTopic
Confighomeassistant/switch/<device>/socket02/config
Statehomeassistant/switch/<device>/socket02/state
Commandhomeassistant/switch/<device>/socket02/set

...

Pump 1

Topic TypeTopic
Confighomeassistant/switch/<device>/pump01/config
Statehomeassistant/switch/<device>/pump01/state
Commandhomeassistant/switch/<device>/pump01/set

...

Valve 1

Topic TypeTopic
Confighomeassistant/switch/<device>/valve01/config
Statehomeassistant/switch/<device>/valve01/state
Commandhomeassistant/switch/<device>/valve01/set

...


Phase Controlled Socket

Socket 7

Topic TypeTopic
Confighomeassistant/fan/<device>/socket07/config
Statehomeassistant/fan/<device>/socket07/state
Commandhomeassistant/fan/<device>/socket07/set

Dimmers

Dimmer 1

Topic TypeTopic
Confighomeassistant/light/<device>/dimmer01/config
Statehomeassistant/light/<device>/dimmer01/state
Commandhomeassistant/light/<device>/dimmer01/set

...


Sensors

Temperature example

Topic TypeTopic
Confighomeassistant/sensor/<device>/temperature/config
Statehomeassistant/sensor/<device>/temperature/state

Humidity example

Topic TypeTopic
Confighomeassistant/sensor/<device>/humidity/config
Statehomeassistant/sensor/<device>/humidity/state

Power example

Topic TypeTopic
Confighomeassistant/sensor/<device>/power/config
Statehomeassistant/sensor/<device>/power/state

Energy example

Topic TypeTopic
Confighomeassistant/sensor/<device>/energy/config
Statehomeassistant/sensor/<device>/energy/state

...


Payload Reference

Switches

PayloadDescription
ONEnable output
OFFDisable output

Dimmers

PayloadDescription
0...100Output value (%)

Phase Controlled Socket

PayloadDescription
0...100Output value (%)

Sensors

Sensor state topics publish the measured value as a numeric payload.

Examples:

23.6
48.2
1013.4
156.8

MQTT Components

Home Assistant ComponentUsed For
switchSockets, Pumps, Valves
fanPhase Controlled Socket
light0–10 V Dimmers
sensorAll Process Values