Giter Club home page Giter Club logo

ha-artnet-led's People

Contributors

breina avatar corb3000 avatar mvandenabeele avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

ha-artnet-led's Issues

Lights goes off when restarting HA.

Anytime I do a restart of HA. The lights in this integration goes to 00.
Would really appreciate to have the lights stay at their state before restart.

auto Switch to HA

Is it possible to check for a boolean to activate or deactivate the Artnet output? The use case that I see in this project is to use Home Assistant as a light manager if the primary Artnet source from the light console is offline.

100% brightness turns off lights completely in some cases

When putting a light on 100% brightness, the DMX channel values are set to 0.

- platform: artnet_led
  host: 192.168.1.15
  max_fps: 40
  universes:
    0:
      devices:
        - channel: 1
          name: Bureau NO
          type: dimmer
          output_correction: quadratic
          channel_size: 16bit

In this image, we can see that on the last image, the DMX channel values are set to 0 0. The expected values are 255 255.

image

Error with python3.11

Running HA with python3.11, I get this error.
See https://docs.python.org/3.11/whatsnew/3.11.html#dataclasses
Maybe adding a __hash__ method will fix it.

2023-05-26 17:39:45.808 ERROR (MainThread) [homeassistant.loader] Unexpected exception importing platform custom_components.artnet_led.light
Traceback (most recent call last):
  File "/home/nuc/.local/lib/python3.11/site-packages/homeassistant/loader.py", line 833, in get_platform
    cache[full_name] = self._import_platform(platform_name)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/nuc/.local/lib/python3.11/site-packages/homeassistant/loader.py", line 850, in _import_platform
    return importlib.import_module(f"{self.pkg_path}.{platform_name}")
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1206, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1178, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1149, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/home/nuc/.homeassistant/custom_components/artnet_led/light.py", line 40, in <module>
    from custom_components.artnet_led.bridge.artnet_controller import ArtNetController
  File "/home/nuc/.homeassistant/custom_components/artnet_led/bridge/artnet_controller.py", line 11, in <module>
    from custom_components.artnet_led.client import PortAddress
  File "/home/nuc/.homeassistant/custom_components/artnet_led/client/__init__.py", line 240, in <module>
    @dataclass
     ^^^^^^^^^
  File "/usr/lib/python3.11/dataclasses.py", line 1221, in dataclass
    return wrap(cls)
           ^^^^^^^^^
  File "/usr/lib/python3.11/dataclasses.py", line 1211, in wrap
    return _process_class(cls, init, repr, eq, order, unsafe_hash,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/dataclasses.py", line 959, in _process_class
    cls_fields.append(_get_field(cls, name, type, kw_only))
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/dataclasses.py", line 816, in _get_field
    raise ValueError(f'mutable default {type(f.default)} for field '
ValueError: mutable default <class 'custom_components.artnet_led.client.GoodInput'> for field good_input is not allowed: use default_factory

Platform error light.artnet-led - Integration 'artnet-led' not found.

On checking the configuration with HASS, it fails with the error in title.

The visual studio code plugin for editing configuration.yaml has a lot of linting errors as well, like 'missing command_topic' etc.

Install: via HACS on HASSOS+Supervisor, RPI4

configuration.yaml

light:
  - platform: artnet-led
    host: 192.168.1.9                     # IP of Art-Net Node
    max_fps: 25                           # Max 40 per second
    refresh_every: 30                     # Resend values if no fades are running every x seconds, 0 disables automatic refresh
    universes:                            # Support for multiple universes
      0:                                  # Nr of Universe (see configuration of your Art-Net Node)
        output_correction: quadratic      # optional: output correction for the whole universe, will be used as default if nothing is set for the channel
        devices:
          - channel: 1                    # first channel of dmx dimmer
            name: Screen                  # name
            type: rgbw                    # type
            transition: 1                 # default duration of fades in sec. Will be overridden by Transition sent from HA
            output_correction: quadratic  # optional: quadratic, cubic or quadruple. Apply different dimming curves to the output. Default is None which means linear dimming
            channel_size: "16bit"         # width of the channel sent to DMX device, default "8bit", "16bit", "24bit" and "32bit" available.
          - channel: 10
            name: Floor
            type: rgbw
            transition: 1
            channel_size: "16bit"
            output_correction: quadratic
          - channel: 20
            name: High
            type: rgbw
            transition: 1
            channel_size: "16bit"
            output_correction: quadratic

Broadcasting address / flag

I do see broadcasting mentioned as an unfinished todo in the readme, but it refers to an issue in @jnimmo's branch.

As I understand broadcasting is already supported in pyArtNet in version 0.8.2

I tested by setting the host to 192.168.2.255 (my subnet mask is 255.255.255.0) and HA does not seem to output any udp packets with this setting (tested with wireshark)

Is this implemented? If so, what am I missing?. If not, can it be?

default_level causes error.

If i try to add the lines from the example code:

   - channel: 50
     name: sp4led_1_dimmer
     default_level: 255
     type: fixed

I get the following message when i try to restart HASS:
The system cannot restart because the configuration is not valid: Invalid config for [light.artnet_led]: [default_level] is an invalid option for [light.artnet_led]. Check: light.artnet_led->universes->0->devices->2->default_level. (See ?, line ?).

Support for the drgb type (dimmer, red, green, blue)

There are some obscure (or possibly not so obscure) dmx fixtures that use the following format:

  • DRGB / Dimmer, Red, Green, Blue

With the dimmer controlling the brightness of the three other values.

It would be nice if this type were configurable for dmx devices (as hass_dmx allowed).

If I am not mistaken, a brightness slider that is separate from the RGB values should be supported by Home Assistant lights.

python3.11: No module named 'netifaces'

Running HA with python3.11, I get the error: No module named 'netifaces'

File "/home/nuc/.homeassistant/custom_components/artnet_led/client/artnet_server.py", line 13, in
from netifaces import AF_INET

device_state_attributes

I'm running 2021.12.9

And got this:

Entity light.my_dimmer (<class 'custom_components.artnet_led.light.ArtnetDimmer'>) implements device_state_attributes. Please report it to the custom component author.

Anything I can do about it?

Lamps don't appear anywhere in HA but I can control them in the Alexa app.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.