Skip to content
bpohvoodoo edited this page Mar 27, 2019 · 2 revisions

MQTT connection

For those of you who want to use MQTT, McLighting now supports MQTT via the great PubSubClient or AsyncMqttClient library. You could enable/disable the MQTT functionality by (un-)commenting the #define ENABLE_MQTT in definitions.h. The PubSubClient or AsyncMqttClient library is only needed when you have MQTT enabled (this is the default).

MQTT broker setup

When you're in AP mode, you can enter your MQTT host (IP or hostname), port, user and password. Leave them empty when they are not used.

Captive portal with MQTT

or you can configure it later via UI, Websocket-API or Rest-API.

MQTT topics

McLighting listens for commands on the topic <HOSTNAME>/in and responds on <HOSTNAME>/out.

MQTT API

The MQTT API has essentially the same commands as the WebSocket-API.