Hyperion WLED Control

So I have a light strip setup connected to an ESP32 running WLED. Integration of WLED into Home Assistant works fine.

I have also setup Hyperion on my raspberry Pi running Kodi. This is sending UDP traffic for frame grabbing to WLED. This works fine however is now locking out Home Assistant from controlling the WLED integration.

Now I would still like to use the backlight (Normal colours etc) for other inputs (Hyperion only works on Kodi) so what is the best approach to disable Hyperion from running or taking control away from HA when Kodi isn’t active.

I use a harmony remote so I can setup a trigger they enables hyperion when Kodi activity is active and disabled when not but I don’t know how best to do that.

Does the Hyperion integration actually switch off the lights or just set them to black? Will it allow me to interact with WLED even if Kodi is on but not actively being watched.

So i have sort of sorted this in case anyone searches for my issues.

WLED has an option (in version 0.10.0) that allows you to override the UDP control. This option can be set through the JSON Rest API using the lor value.

0 = Allow UDP
1 = Override once
2 - Override until reboot

To set this i have created a restful switch which controls the value. As such i can now toggle the UDP control into WLED from Hyperion allowing me control WLED through home assistant or WLED App/Website as well as allow Hyperion to control the light through Kodi.

- platform: rest
  name: WLED-LOR
  resource: http://wledip/json/state
  body_on: '{"lor": 0}'
  body_off: '{"lor": 1}'
  is_on_template: '{{value_json.lor == 0}}'
  headers:
    Content-Type: application/json

My automations dynamically toggle this on and off with the harmony activity checking if Kodi is active etc…

6 Likes

This is great, thanks for sharing this!

@frenck Is this something that would be doable without the above hack? Would be great if we could set an override setting somehow to allow WLED to take information from HA instead of UDP (aka Hyperion).