Addon Development
Addons can be made from UI in the same way as a script. However for more complex addons, it is recommended to work locally, and publish to the MQTT server.
When publishing, simply publish to the addons topic.
Caution
Make sure to have the retain flag set when publishing to make your addons persistent.
Splitting up across files
It is way easier to manage a project when split up across files. By using the DEPENDENCY Macro you can require other parts of the addon to be loaded before this one.
Example: Require addon_suite/core to be loaded before this addon
--#DEPENDENCY addon_suite/core
Initialization Order
Addons are loaded before any other script, including Fixtures, Layers, and Extra (code), however addons are loaded after the internal LMixer code.
The initialization process for addons is the following:
- Load all dependencies (skipping dependencies that already are loaded)
- Execute self as .lua code
Warning
Cyclic dependency loops lead to weird initialization orders, and should be avoided if possible.
Technical info
Active Addons is internally treated as an addon, which is why --#DEPENDENCY is used there.