8eadc3ca3b9ca6f3c0e667e4817fec8634f176a4
esphome-dmx512
This is a DMX512 custom component for ESPHome that allows ESP32-Arduino-based devices to control DMX devices via UART (this requires usually an RS485 module).
Implementation
The implementation is based on other projects:
It differs in that it uses the internal UART component but generates the break signal by detaching and re-attaching the GPIO pin. Since this requires directly messing around with GPIO pins, it is limited to the Arduino ESP32 core.
Configuration
See the provided example file. For the dmx512 component, some options need
additonal explanation:
dmx512:
id: dmx
uart_id: uart_bus
enable_pin: 33
tx_pin: 5
uart_num: 1
periodic_update: true
force_full_frames: false
custom_break_len: 92
custom_mab_len: 12
update_interval: 500
id: The ID of this DMX512 hubuart_id: Set this to the ID of your UART componentenable_pin: Set this to the pin number the MAX585 enable pins are connected to. Optionaltx_pin: Set this to the same pin number as the UART component. This is required for the generation of the break signal. Defaults to 5.uart_num: Set this to the internal ESP32 UART number. If only logging is configured, this should be set to 1 (default).periodic_update: If set to false, only state changes are transmitted and the bus is silent in between - violates the specification and may cause some dimmers to turn offforce_full_frames: If set to true, the full 513-byte frame is always sent. Otherwise, only the configured channels are transmitted.custom_mab_len: Set a custom mark-after-break length (in uS, default 12)custom_break_len: Set a custom break length (in uS, default 92)update_interval: Specify a custom update interval, i.e. the minimum time between resending the current values (in ms, default 500)
Description
Languages
C++
63.2%
Python
36.8%