-
Notifications
You must be signed in to change notification settings - Fork 6
MQTT
The device can connect to an MQTT broker to receive and publish messages. MQTT can be enabled using the config setting network/mqtt-enabled
. The MQTT broker can be configured using the settings:
network/mqtt-server
network/mqtt-port
network/mqtt-username
network/mqtt-password
MQTT is currently used to synchronize multiple devices (see chapter Device Synchronization for details) and to publish events indicating finished animations. Also it can be used to control the exact same JSON command messages as they are used via the HTTP protocol.
When the controller publishes messages to the broker then the used topic always begins with a configurable prefix followed by the device name. It will have this format:
<prefix>/<device_name>/<message_specific_topic>
The prefix
can be configured using the configuration setting network/mqtt-topic_base
. device_name
is configured in general/device_name
.
Example:
If the topic_prefix
is set to myHome/kitchen
and device name is led1
then the topic used to publish color commands would be:
myHome/kitchen/led1/command