Breina / ha-artnet-led

DMX lighting Integration for Home Assistant. Using the HA Color Mode update and Pyartnet library to control lights in multiple DMX universes over ethernet with the Art-Net protocol.
MIT License
104 stars 9 forks source link

Unique IDs when using multiple DMX controllers #12

Closed tobias-friedrich closed 1 year ago

tobias-friedrich commented 1 year ago

I just moved from @jnimmo and observed that this fork does not support reusing DMX channels on multiple DMX controllers. I have three controllers:

light:
  - platform: artnet_led
    host: 192.168.0.20
    universes:
      0:
        devices:
          - channel: 1
...
  - platform: artnet_led
    host: 192.168.0.44
    universes:
      0:
        devices:
          - channel: 1
...
  - platform: artnet_led
    host: 192.168.0.21
    universes:
      0:
        devices:
          - channel: 1

In @jnimmo this worked fine, but now I can't have the same channel on different controllers:

2022-09-18 10:37:33.878 ERROR (MainThread) [homeassistant.components.light] Platform artnet_led does not generate unique IDs. ID 01 already exists - ignoring light.xxx
2022-09-18 10:37:33.879 ERROR (MainThread) [homeassistant.components.light] Platform artnet_led does not generate unique IDs. ID 05 already exists - ignoring light.yyy
...

Could this be incorporated?

Breina commented 1 year ago

Was a bit tricky to figure out how to change unique_ids without creating new entities (would be annoying for other users). But this will work now in v0.0.6.

Please make sure your device names are unique, it's using that as reference for migrating. Please let me know if it works for you. :)

tobias-friedrich commented 1 year ago

Thanks, @Breina! I couldn't safely test it due to hardware issues, but that's now resolved and it works fine. Thanks a lot for the swift fix!