jnimmo / hass-dmx

Home Assistant DMX over IP Integration
MIT License
107 stars 47 forks source link

Fails to load - missing 1 required positional argument: 'number_of_channels' #50

Closed nibblerrick closed 3 years ago

nibblerrick commented 3 years ago

Hi,

just updated the integration and now it won't work anymore. Uninstalled and reinstalled it although I didn't believe it would make a difference and it hasn't. I put the protocol: artnet in to see if it makes a difference. I also tried without dmx_channels: 512 but same happened.

I don't see why it is "missing" the number of channels now, I think on that part nothing has changed with the last commit.

Is there anything I can do to help debug? Please help brighten up my home again ;-)

The full error:

2021-05-12 19:06:57 ERROR (MainThread) [homeassistant.components.light] Error while setting up dmx platform for light
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 231, in _async_setup_platform
await asyncio.shield(task)
File "/usr/local/lib/python3.8/asyncio/coroutines.py", line 124, in coro
res = func(*args, **kw)
File "/config/custom_components/dmx/light.py", line 205, in async_setup_platform
dmx_gateway = ArtNetGateway(host, universe, port, overall_default_level,
File "/config/custom_components/dmx/light.py", line 594, in __init__
super().__init__(host, universe, port, default_level, number_of_channels)
TypeError: __init__() missing 1 required positional argument: 'number_of_channels'

My config:

light:
  - platform: dmx
    host: 10.134.107.26
    port: 6454
    dmx_channels: 512
    protocol: artnet
    send_levels_on_startup: false
    universe: 0
    devices:
      - channel: 1
        name: GWC_RGB
        type: rgb
        default_level: 0
        transition: 5
      - channel: 4
        name: GWC_W
        type: dimmer
        default_level: 0
        transition: 7
      - channel: 5
        name: Kueche 1
        type: rgb
        default_level: 0
        transition: 2
      - channel: 8
        name: Kueche 1w
        type: dimmer
        default_level: 0
        transition: 3
      - channel: 9
        name: Kueche 2
        type: rgb
        default_level: 0
        transition: 5
      - channel: 12
        name: Kueche 2w
        type: dimmer
        default_level: 0
        transition: 6
      - channel: 13
        name: Kueche 3
        type: rgb
        default_level: 0
        transition: 8
      - channel: 16
        name: Kueche 3w
        type: dimmer
        default_level: 0
        transition: 10
jnimmo commented 3 years ago

Sorry for that, I need to setup a dev branch. I can see the issue (missing default_off argument in the two subclass init methods) and will try and fix it shortly

On Thu, 13 May 2021 at 5:12 AM, nibblerrick @.***> wrote:

Hi,

just updated the integration and now it won't work anymore. Uninstalled and reinstalled it although I didn't believe it would make a difference and it hasn't. I put the protocol: artnet in to see if it makes a difference. I also tried without dmx_channels: 512 but same happened.

I don't see why it is "missing" the number of channels now, I think on that part nothing has changed with the last commit.

Is there anything I can do to help debug? Please help brighten up my home again ;-)

The full error:

2021-05-12 19:06:57 ERROR (MainThread) [homeassistant.components.light] Error while setting up dmx platform for light Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 231, in _async_setup_platform await asyncio.shield(task) File "/usr/local/lib/python3.8/asyncio/coroutines.py", line 124, in coro res = func(*args, **kw) File "/config/custom_components/dmx/light.py", line 205, in async_setup_platform dmx_gateway = ArtNetGateway(host, universe, port, overall_default_level, File "/config/custom_components/dmx/light.py", line 594, in init super().init(host, universe, port, default_level, number_of_channels) TypeError: init() missing 1 required positional argument: 'number_of_channels'

My config:

light:

  • platform: dmx host: 10.134.107.26 port: 6454 dmx_channels: 512 protocol: artnet send_levels_on_startup: false universe: 0 devices:
    • channel: 1 name: GWC_RGB type: rgb default_level: 0 transition: 5
    • channel: 4 name: GWC_W type: dimmer default_level: 0 transition: 7
    • channel: 5 name: Kueche 1 type: rgb default_level: 0 transition: 2
    • channel: 8 name: Kueche 1w type: dimmer default_level: 0 transition: 3
    • channel: 9 name: Kueche 2 type: rgb default_level: 0 transition: 5
    • channel: 12 name: Kueche 2w type: dimmer default_level: 0 transition: 6
    • channel: 13 name: Kueche 3 type: rgb default_level: 0 transition: 8
    • channel: 16 name: Kueche 3w type: dimmer default_level: 0 transition: 10

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jnimmo/hass-dmx/issues/50, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAO2D3TDC266Z4ILQE4JNLTNKZGVANCNFSM44ZAJVMA .

nibblerrick commented 3 years ago

Thank you very much!

jnimmo commented 3 years ago

Can you give it a test now please?

On Thu, 13 May 2021 at 8:51 AM, nibblerrick @.***> wrote:

Thank you very much!

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/jnimmo/hass-dmx/issues/50#issuecomment-840088402, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAO2D3X7XT4MCLWIPTOSQTTNLS6HANCNFSM44ZAJVMA .

nibblerrick commented 3 years ago

It's working! Thanks for this insanely fast fix!

nibblerrick commented 3 years ago

Just curious: Was this sth. specific to my configuration or was I just the first one creating an issue that it won't start?