forked from toblum/McLighting
-
Notifications
You must be signed in to change notification settings - Fork 30
MQTT API
bpohvoodoo edited this page Mar 27, 2019
·
2 revisions
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).
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.
or you can configure it later via UI, Websocket-API or Rest-API.
McLighting listens for commands on the topic <HOSTNAME>/in
and responds on <HOSTNAME>/out
.
The MQTT API has essentially the same commands as the WebSocket-API.