MattIPv4 / MattIPv4/PyDMXControl

Multiple USB to DMX interface support?

Abierto
#56 2 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Lenguaje dominante
Python
Estrellas
143
Forks
23
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

Hi Matt! I‘m currently trying to use this library for a lighting project. I use USB to DMX interface cables with FT232R chip. I used "zadig" to flash the driver of interface to libusb-win32 and successfully dim the light on PC using Python! Thankyou :)

But I found when I plug two dongles in my PC, it seems that it can only control one of them. Luminaires of the other cable won't work.
Does this library support multiple interface to work simultaneously?

I am not a programmer. If I question something wrong please forgive me. And here's my code:


# Create controller
dmx = Controller()

# Load fixture from JSON
dmx.json.load_config('LabLight.json')

# Define a global fade time
fade_time = 5000

# DMA Value Mapping Percentage
def percent_to_dmx_value(percent):
    return int((255 * percent) / 100)

# clear
dmx.clear_all_effects()

for brightness_percent in range(5, 101, 5):
    dmx_value = percent_to_dmx_value(brightness_percent)
    # Dimming
    for f in dmx.get_fixtures_by_name_include('DownLight_1Y'):       # Y for Yellow light, W for White light
        f.dim(dmx_value, fade_time)
    for f in dmx.get_fixtures_by_name_include('DownLight_1W'):
        f.dim(dmx_value, fade_time)
    for f in dmx.get_fixtures_by_name_include('DownLight_2Y'):
        f.dim(dmx_value, fade_time)
    for f in dmx.get_fixtures_by_name_include('DownLight_2W'):
        f.dim(dmx_value, fade_time)
    # rest of downlights

    time.sleep(3)

# Manual Close
dmx.sleep_till_enter()
dmx.close()

And the json:

    {
        "type": "Generic.Dimmer",
        "args": [],
        "name": "DownLight_1Y",
        "start_channel": 1
    },
    {
        "type": "Generic.Dimmer",
        "args": [],
        "name": "DownLight_1W",
        "start_channel": 2
    },
    {
        "type": "Generic.Dimmer",
        "args": [],
        "name": "DownLight_2Y",
        "start_channel": 3
    },
    {
        "type": "Generic.Dimmer",
        "args": [],
        "name": "DownLight_2W",
        "start_channel": 4
    },
    {
        "type": "Generic.Dimmer",
        "args": [],
        "name": "DownLight_3Y",
        "start_channel": 5
    },
    {
        "type": "Generic.Dimmer",
        "args": [],
        "name": "DownLight_3W",
        "start_channel": 6
    }
]```

There're more but it's just for example.

For instance Downlight1-3 connect dongle_1, and 3_6 connect dongle_2. 

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Línea de trabajo

Comienza en el punto de entrada OpenDMXController mostrado en el ejemplo y sigue cómo se seleccionan y gestionan las interfaces USB. Reproduce la configuración con dos dongles FT232R/libusb-win32; se considera terminado cuando las fixtures asignadas a cada dongle pueden controlarse simultáneamente.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
python
Área
embedded-iot
Tipo de issue
Nueva funcionalidad
Dificultad
5/5
Tiempo estimado
Más de una semana
Estado de actividad
Estancado
Claridad
Necesita aclaración
Aptitud para principiantes
25/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.