MIDI-MT - DMX512/ArtNet Equipment

MIDI-MT Documentation in English

Repeaters, repeaters and protocol converters

To implement the integration of ArtNet, MQTT and DMX512 network technologies into a single lighting control system, you can use not only equipment from well-known manufacturers. It is much cheaper to use Arduino -like boards for these purposes that support WiFi technology, designed on ESP chipsets, for example ESP8266, ESP32, etc.

At the same time, it turns out to get a device with maximum capabilities at a minimum price. The budget of such a device will cost about the cost of one track lamp, in other words, its cost will be approximately 10-15% of the price of similar branded equipment.

One of these designs, which serves to expand the coverage of a network of smart devices, runs under the control of the MIDI-MT program, for which it was specially developed. Simplicity of execution and the wide availability of electronic components make it universal.

The circuitry of the “Repeater” and “End Point” is very simple; the test specimen uses a ready-made microcontroller board developed by LOLIN (Wemos) on the ESP8266 chipset and a ready-made TTL level converter board to the RS485 interface. There are no restrictions, you can use any available analogues.

Installation and connection are made according to the diagram:

“Repeater” device MIDI-MT MQTT+ArtNet Repeater to DMX512

Endpoint device MIDI-MT MQTT+ArtNet DMX512 Endpoint

connecting a TTL level converter to the RS485 interface

MIDI-MT RS485 to DMX512 Endpoint

Settings

The “Repeater” and “Endpoint” devices use HTTP server to receive the DMX512 network configuration in Json format. The json name of the configuration file is composed according to the following scheme:

example Json file of device settings “Repeater” or “Endpoint”

sub - full name of the MQTT topic. dmx - channel number in the DMX512 network.

  {"mqtt":[
     {"sub":"sensor/ctrl9/av9/slider","dmx":9},
     {"sub":"sensor/ctrl9/b21/onoff","dmx":10},
     {"sub":"sensor/ctrl9/b22/onoff","dmx":11},
     {"sub":"sensor/ctrl9/b23/onoff","dmx":12}
]}

One option for placing configurations is to use the built-in web server in the MQTT daemon mosquitto. To do this, you need to enable the use of web sockets and specify the path to the directory with json configuration.

mosquitto.conf configuration example

per_listener_settings true

listener 1883
protocol mqtt
socket_domain ipv4

user mosquitto

allow_anonymous false
retain_available true
use_username_as_clientid true
allow_zero_length_clientid true
auto_id_prefix auto-
queue_qos0_messages false
sys_interval 90
autosave_interval 1800
autosave_on_changes true

persistence true
persistent_client_expiration 1m
persistence_location /var/lib/mosquitto/

password_file /etc/mosquitto/pass.cfg
acl_file /etc/mosquitto/mosquitto.acl
pid_file /run/mosquitto/mosquitto.pid

log_dest syslog
log_type warning

listener 9001
protocol websockets
# путь до каталога с `json` конфигурацией
http_dir /srv/git/linuxconfig/mqttweb

example of setting up mosquitto.acl

topic read $SYS/#
pattern readwrite sensor/%u/#
pattern write $SYS/broker/connection/%c/state

# !!! ADD !!!
# name (login) gateway (art-dmx-XXX-XXX) or end point (art-ep-XXX-XXX)
# read only access!
user art-dmx-0-11
topic read #

user art-ep-0-12
topic read #

# your administrator rights to access topics.
user admin
topic readwrite #

build configuration settings

The main settings are in the config.h.default file. You need to edit it and rename it to config.h.

Options:

For the “Repeater” device:
For an Endpoint device:

Purpose and features

The “Repeater” device’s tasks include collecting control information about the switching status of lighting fixtures from the ArtNet and MQTT networks, then the information is summarized and transmitted via the DMX protocol to the wired network, through which actual lighting control occurs. Use requires the presence of a wired DMX512 network and a connection point to it.

The Endpoint device processes data received from the ArtNet and MQTT networks. This data is used to physically control relay blocks or dimmers connected to the device.

Management can be carried out using the ArtNet and MQTT protocols. The standard operating mode is the simultaneous use of the ArtNet and MQTT protocols to generate an outgoing DMX stream or control end devices.

MQTT control commands take precedence over ArtNet commands. If the source was enabled using MQTT control, it can only be disabled by it. This applies to any adjustments, both on and off, and to adjusting the brightness or changing the color. On the contrary, if the lighting fixture was turned on by commands from the ArtNet source, further control can be taken over by control signals via the MQTT protocol.

Schemes and firmware

Schemes and firmware can be downloaded here.