lubeda / EsphoMaTrix

A simple DIY status display with an 8x32 RGB LED panel implemented with esphome.io and Home Assistant
MIT License
217 stars 23 forks source link

Export WLED effects #92

Closed megane999 closed 1 year ago

megane999 commented 1 year ago

Is it possible to export WLED effects, to show like screen saver?

idodov commented 1 year ago

You can try to add a screen with animated gif icon size of 8x32 pixels (not 8x8). In HA create automation that will expose this screen within the trigger you want (like when there is no other triggers that shows screens).

megane999 commented 1 year ago

Think about it, but WLED effects are random. GIF will be same every time

lubeda commented 1 year ago

Hi, this is not part of my component! But esphome might be capable to do this without any special code.

See https://esphome.io/components/light/index.html?highlight=e1.31 If you disable ehmtx and activate the light component the matrix can receive e1.31 data from wled.

lubeda commented 1 year ago

I didn't try wled but e1.31(https://esphome.io/components/light/index.html#e1-31-effect) works fine, this is already build in esphome.

Here is the light part of my yaml:

light:
  - platform: neopixelbus
    id: ehmtx_light
    type: GRB
    variant: WS2812
    pin: $ledpin
    num_leds: 256
    color_correct: [30%, 30%, 30%]
    gamma_correct: 2
    name: "$devicename Light"
    restore_mode: ALWAYS_OFF
    effects:
      - e131:
          universe: 1
          channels: RGB
    on_turn_on:
      lambda: |-
         id(ehmtx_display)->set_enabled(false);
    on_turn_off:
       lambda: |-
         id(ehmtx_display)->set_enabled(true);

e131:
  method: multicast # default: register E1.31 to Multicast group
lubeda commented 1 year ago

You have to turn the light on and select the e1.31 effect.

idodov commented 1 year ago

You have to turn the light on and select the e1.31 effect.

I added the code exactly as yous here but the effect is not working. However at the log I got an error that I'm not sure it's because of the effect

Entity sensor.ulanzi_illuminance (<class 'homeassistant.components.esphome.sensor.EsphomeSensor'>) is using native unit of measurement 'lx' which is not a valid unit for the device class ('voltage') it is using; expected one of ['mV', 'V'];