MQTT
The mqtt trigger publishes JSON update payloads to an MQTT message broker with Home Assistant auto-discovery support.
⚙️ Configuration Variables
URL of the MQTT broker
MQTT client ID to use for the broker connection
Device identifier in Home Assistant
Device display name in Home Assistant
Enable Home Assistant MQTT Auto-Discovery
Enable Home Assistant integration and publish state updates
MQTT discovery prefix topic for Home Assistant
MQTT broker password
Path to CA certificate chain PEM file (for private CAs)
Path to client certificate PEM file (for mutual TLS)
Path to client private key PEM file (for mutual TLS)
Whether to reject unauthorized/untrusted server SSL certificates
Base MQTT topic to which updates are published
MQTT broker username
This trigger supports all common trigger configuration options and runs in simple mode by default.
You can customize how containers display in Home Assistant using the wud.display.name and wud.display.icon labels.
🚀 Examples
Basic Mosquitto Broker Setup
- Docker Compose
- Docker
services:
whatsupdocker:
image: getwud/wud
environment:
- WUD_TRIGGER_MQTT_LOCAL_URL=mqtt://mosquitto:1883
docker run \
-e WUD_TRIGGER_MQTT_LOCAL_URL="mqtt://mosquitto:1883" \
getwud/wud
Mutual TLS (mTLS) Authentication
- Docker Compose
- Docker
services:
whatsupdocker:
image: getwud/wud
volumes:
- /etc/certs/mqtt/client-key.pem:/wud/mqtt/client-key.pem:ro
- /etc/certs/mqtt/client-cert.pem:/wud/mqtt/client-cert.pem:ro
- /etc/certs/mqtt/ca.pem:/wud/mqtt/ca.pem:ro
environment:
- WUD_TRIGGER_MQTT_LOCAL_URL=mqtts://mosquitto:8883
- WUD_TRIGGER_MQTT_LOCAL_TLS_CLIENTKEY=/wud/mqtt/client-key.pem
- WUD_TRIGGER_MQTT_LOCAL_TLS_CLIENTCERT=/wud/mqtt/client-cert.pem
- WUD_TRIGGER_MQTT_LOCAL_TLS_CACHAIN=/wud/mqtt/ca.pem
docker run \
-v /etc/certs/mqtt/client-key.pem:/wud/mqtt/client-key.pem:ro \
-v /etc/certs/mqtt/client-cert.pem:/wud/mqtt/client-cert.pem:ro \
-v /etc/certs/mqtt/ca.pem:/wud/mqtt/ca.pem:ro \
-e WUD_TRIGGER_MQTT_LOCAL_URL="mqtts://mosquitto:8883" \
-e WUD_TRIGGER_MQTT_LOCAL_TLS_CLIENTKEY="/wud/mqtt/client-key.pem" \
-e WUD_TRIGGER_MQTT_LOCAL_TLS_CLIENTCERT="/wud/mqtt/client-cert.pem" \
-e WUD_TRIGGER_MQTT_LOCAL_TLS_CACHAIN="/wud/mqtt/ca.pem" \
getwud/wud
🏠 Home Assistant Integration
WUD integrates with Home Assistant via MQTT Discovery.
- Docker Compose
- Docker
services:
whatsupdocker:
image: getwud/wud
environment:
- WUD_TRIGGER_MQTT_HASS_URL=mqtt://homeassistant.local:1883
- WUD_TRIGGER_MQTT_HASS_HASS_ENABLED=true
- WUD_TRIGGER_MQTT_HASS_HASS_DISCOVERY=true
docker run \
-e WUD_TRIGGER_MQTT_HASS_URL="mqtt://homeassistant.local:1883" \
-e WUD_TRIGGER_MQTT_HASS_HASS_ENABLED="true" \
-e WUD_TRIGGER_MQTT_HASS_HASS_DISCOVERY="true" \
getwud/wud