koying / openrgb_ha

OpenRGB integration for Home Assistant
110 stars 18 forks source link

When Effects Plugin is being used, light control disabled #25

Open TheOneOgre opened 1 year ago

TheOneOgre commented 1 year ago

Whenever any effect from the plugin is active, any control from HA is completely null. Would there be anyway to integrate the effects into the integration or at least make sure on/off works?

amaisano commented 1 year ago

You could potentially use the Remote API or HTTP API to send curl requests from HA to control layers (like enabling/disabling a layer with data binding values).

amaisano commented 1 year ago

I think I have a little more anecdotal context for this. It seems that you CAN control things from HA when an Effects Plugin is being used.

What happens (in my observation) is that whenever an update occurs in Artemis (or Open RGB) to the LEDs, it cancels or reverts the HA settings:

  1. Startup keyboard, open rgb, effects, etc. Have a layer that reacts to mic or volume level in realtime.
  2. Go into HA and turn off a key or the keyboard itself -- the key actually turns off
  3. Trigger an update with changing the system volume or mic input level (something that causes leds to change)
  4. Key LED immediately returns to OpenRGB/Artemis color

This can happen REALLY fast so you might not notice HA is actually responding, but then reverting to the current LED settings due to frame updates in the LED software.

I haven't scientifically tested this, but it's something I've noticed the past 2 weeks. It's actually handy when waking the PC to shut off the HA switch for the keyboard, to refresh it's LEDs which usually stay blank on wake.