Skip to main content

Configuration

Overview

The MQTT connection must be configured before the TBox can communicate with an MQTT broker or Home Assistant.

The configuration is stored persistently inside the TBox and is restored automatically after a restart.

Required Settings

SettingDescriptionExample
Broker AddressIP address or hostname of the MQTT broker192.168.178.20
Broker PortTCP port used by the MQTT broker1883
UsernameMQTT authentication username<broker-username>
PasswordMQTT authentication password<broker-password>
Device NameIndividual name of the TBoxTBox Greenhouse
External ControlAllows MQTT commands to control the outputsEnabled

Broker Address

Enter the IP address or hostname of the MQTT broker.

Example using an IP address:

192.168.178.20

Example using a hostname:

mqtt.local

The broker must be reachable from the same network as the TBox.

Broker Port

The default MQTT port is:

1883

The port must match the configuration of the MQTT broker.

Connection typeCommon port
MQTT without TLS1883
MQTT with TLS8883

The current TBox implementation uses a standard MQTT TCP connection without TLS.

Authentication

When authentication is enabled on the MQTT broker, enter the corresponding username and password.

Username: <broker-username>
Password: <broker-password>

The configured MQTT account must have permission to publish and subscribe below the following topic:

homeassistant/#

Device Name

The configured device name identifies the TBox inside the user interface.

The internally generated MQTT device identifier is based on the device MAC address:

tbox<MAC address>

Example:

tboxAABBCCDDEEFF

Using the MAC address ensures that every TBox has a unique MQTT identifier, even when several devices use the same broker.

External Control

External control determines whether commands received through MQTT may control the physical outputs.

ValueFunction
DisabledMQTT commands are ignored for output control
EnabledValid MQTT commands can control the outputs
warning

Enable external control only when the MQTT broker and connected automation system are configured correctly.

Saving the Configuration

After changing the MQTT settings, save the configuration using the TBox web interface.

The following values are stored persistently:

  • Broker address
  • Broker port
  • Username
  • Password
  • Device name
  • External-control setting

The settings remain available after restarting or disconnecting the TBox from its power supply.

Connection Process

After loading the configuration, the TBox performs the following sequence:

  1. Connects to the configured Wi-Fi network.
  2. Configures the MQTT broker address and port.
  3. Connects using the configured username and password.
  4. Subscribes to the actuator command topics.
  5. Publishes the Home Assistant Discovery configuration.
  6. Begins publishing actuator states and sensor values.

Reconnection

When the MQTT connection is interrupted, the TBox attempts to reconnect automatically.

After reconnecting, it subscribes to the actuator command topics again and republishes the required Home Assistant Discovery information.

Home Assistant Broker Example

A typical configuration using the Home Assistant Mosquitto broker could look like this:

SettingExample
Broker Address192.168.178.20
Broker Port1883
Usernametbox
PasswordMQTT user password
Device NameTBox Greenhouse
External ControlEnabled

The MQTT username and password must correspond to a valid account configured for the Home Assistant MQTT broker.

Connection Status

The current MQTT connection status can be checked through the TBox user interface.

StatusMeaning
ConnectedCommunication with the MQTT broker is active
DisconnectedNo active broker connection
Connection failedBroker address, credentials, network connection or port may be incorrect

Troubleshooting

Broker connection fails

Check:

  • The TBox is connected to Wi-Fi.
  • The broker address is correct.
  • The broker port is correct.
  • The MQTT username and password are valid.
  • The broker permits connections from the TBox network.
  • No firewall blocks the configured MQTT port.

TBox is connected but no entities appear

Check:

  • The Home Assistant MQTT integration is active.
  • MQTT Discovery is enabled in Home Assistant.
  • The TBox uses the same broker as Home Assistant.
  • The TBox has successfully published its discovery configuration.
  • No other device uses the same MQTT identifier.

Entities appear but cannot be controlled

Check:

  • External control is enabled.
  • The MQTT account has subscription permissions.
  • Home Assistant publishes commands to the correct /set topic.
  • The selected actuator supports external control.