andyboeh / esphome-dmx512

An ESPHOME custom component to control DMX-512 devices via UART + RS485 module
38 stars 18 forks source link

E131 input to DMX output #22

Closed filmgarage closed 11 months ago

filmgarage commented 1 year ago

This issue is somehow related to this component.

I am trying to create an ESPhome node to receive E131 commands from jinx or some other source to control a light and to spit out these settings to a DMX output with the esphome-dmx512 component through a 485 module. Outputting the DMX signal is working fine but I can't get the E131 traffic from my source to control the same light. It would be great to have this light function with the E131 input and DMX output while having ESPhome/HA as a "man in the middle". Is anyone capable of adding the missing link here?

e131:
  method: multicast

output:
  - platform: dmx512
    channel: 1
    universe: dmx
    id: dmx_ch1

light:
  - platform: monochromatic
    name: "DMX from SACN"
    output: dmx_ch1
    id: sacn2dmx_light
    gamma_correct: 0
  - platform: partition
    id: test_light
    segments:
     - single_light_id: sacn2dmx_light
    effects:
      - e131:
          universe: 1
          channels: MONO

uart:
  id: uart_bus
  tx_pin: GPIO2
  rx_pin: GPIO3
  baud_rate: 9600

dmx512:
  id: dmx
  uart_id: uart_bus
  # enable_pin: GPIO33 # optional
  tx_pin: GPIO2
  uart_num: 1
  periodic_update: true # optional
  force_full_frames: false #optional
  custom_break_len: 92 #optional
  custom_mab_len: 12 #optional
  update_interval: 500 #optional
andyboeh commented 1 year ago

I'm pretty sure that not many people monitor this issue tracker, I would post it in the ESPHome forum (HA forum) or its issue tracker. It doesn't seem to be an issue with DMX, as you have already mentioned.

Edit: Are you sure that DMX is working after all? You need a baud rate of 250000 and 2 stop bits, not 9600 for DMX to work properly.

uart:
  id: uart_bus
  baud_rate: 250000
  tx_pin: GPIO2
  stop_bits: 2
filmgarage commented 1 year ago

The issue is much related to the dmx output.I am sure a lot of people will try to use an esp as an artnet/e131 bridge to dmx... Hopefully someone will read this and help me out... ;-) I already posted in other forums but have not succeeded to get it working. I will keep trying. Concerning the baud rate. I am sure you are right. I as only running the esp offline. I could see the log was running with DMX commands. So thanks helping me with the baud rate, that will save me some a lot of time figuring that out later.

andyboeh commented 1 year ago

Ahm, you stated that DMX is working fine while you are now stating that you never tried!? Please be aware that the DMX component has only very minimal logging implemented, if you get output or no output in the logs doesn't mean anything.

filmgarage commented 1 year ago

True! Sorry, I was so happy to see the results in the logger that I thought it would be ready if I connected my 485 chip. Ik will report back after checking the hardware... Thanks foor your great work!