This Arduino library implements support for sending data and commands to MegunoLink visualizers and processing command messages sent using a Mqtt server. It supports both ESP8266 and ESP32 devices.
This library requires:
- PangolinMQTT
- AsyncTCP (for ESP32 boards)
- ESPAsyncTCP (for ESP8266 boards)
- MegunoLink core library.
Download each of the above 3rd party libraries and put them into your Arduino libraries folder (typically My Documents\Arduino\libraries
). The original AsyncTCP (https://github.com/me-no-dev/AsyncTCP) and ESPAsyncTCP (https://github.com/me-no-dev/ESPAsyncTCP) are a vast improvement over the standard Arduino libraries but include a couple of bugs that Phil Bowles fixed in the repositories referenced above. We use the v1.0 release of the PangolinMQTT library because later versions rely on another library with a license that precludes commercial use.
You can use MegunoLink's Ardunio integration setup tool to install the MegunoLink core library.
Finally, install the MegunoLink Mqtt library from this repository by downloading and placing it in your Arduino libraries folder.
This library supports both sending commands and data to MegunoLink, using MegunoLinkMqtt, and receiving commands from MegunoLink, using MqttCommandLineHandler, via a Mqtt broker. In both cases, communication with the broker is managed by MqttManager.
Our examples can retrieve the Mqtt server information from a MqttConfig.h
file in your configuration library, or you can add your credentials manually. Just take care not to commit files containing passwords to a public repository.