Kodi add-on for Lifx lights with ambilight support

Here is something I have built - Lifx Ambilight Addon for Kodi

  • In Theater mode the add-on dims the Lifx lights as soon as a movie starts playing, and turns the lights back to original settings once the movie is done.
  • Ambilight mode turns your Lifx lights in a room-sized Ambilight.

Ambilight creates light effects around the television that correspond to the video content. Philips claims that a “more immersive viewing experience” can result. Ambilight is a lighting system that actively adjusts both brightness and color based upon picture content. Integrated into the television cabinet, Ambilight technology is aimed to enable the viewer to see more picture detail, contrast and color while eliminating on-screen reflections.

Ambilight technology works by projecting light from the rear of the TV cabinet in a very wide range of colors, shades and intensities. Viewers can choose to have Ambilight follow the color and brightness of the programme content – automatically changing with the colors on the screen

Features

  • Fully customizable
    • Select All lights or a Group of lights.
    • Override brightness/hue/saturation for different states in Ambilight mode - playback started/resumed and paused.
    • Option to forcefully turn on or ignore lights which are powered off (not switched off)
    • Option to flash lights once on discovery
    • Option to disable the Theater/Ambilight mode for short videos
      • Option to customize what is considered a short video
    • Experimental: Option to undim lights when credits start rolling. (Uses ChapterDB.org)
      • Option to delay the credits start time.
      • Does not always work, may ruin your movie-watching experience
    • Restore the lights to original states (color and power) when movie stops.
  • 2 Modes for your Lifx powered media center room
    • Theatre Mode
      • Dim or Turn off the lights when Movie starts playing
      • Undim or Turn on the lights when you pause the movie
      • Return the lights to original settings when Movie ends.
      • Option to configure Fading time to be proportional to the current brightness. (e.g. take 7 seconds to change brightness from 100% to 30%, while taking 5 seconds to change from 50% to 0%)
    • Ambilight Mode
      • Option to Dim the lights when Movie starts playing
      • Option to change minimum and maximum brightness

Demo

Kodi + Lifx + Ambilight + Movie (LOTR) Test

3 Likes

Great, thanks for developing this. This works for me while navigating Kodi menu’s but my Lifx z strip stays the same colour when the movie starts. I’m using Ambient not Theatre mode. Any ideas? Thanks

I haven’t tested this with Lifx Z as I don’t own one. But the Lifx LAN protocol used by my addon claims to support this, so there shouldn’t have been any issue with controlling the Z strip. When you start kodi, does the addon say how many Lifx devices were found? If the count includes Lifx-Z, then I’d suggest checking your Addon configurations and maybe try with “All” devices instead of limiting by the group name.

Thanks for building this. It works with my lifx z strip led. I have been using it with the ambilight option behind my projector screen.

But I noticed the light is not matching with the one presented in the movie? Is the code taking the average colours presented on the screen?
OR is it based on the edges of the movie?

I have also noticed a slight delays, is there a way to reduce this?

Also, what does the following menu means:

  • threshold (value and saturation)
  • color bias

Suggestion:

  • ability to change the min and max brightness dependent to the time of the day (night dimmer obviously)
  • shortcut to change the max and min brightness during the movie play

Very cool. I also use a strip behind my TV, and it seems to go decently, but yes an idea of what the parameters do would help me maybe tweak it more. Generally it works decently but sometimes picks up some weird colors.

The latest version should fix the delays and has better instructions on the addon page.

  • The addon uses most used colors on the screen, not just the edges to set the light colors.
  • The threshold in the settings is used to ignore the lower brightness values and saturation values when calculating most used colors from the picture frame.
  • Think of Color bias as opposite of color variation
    • Higher the value => higher the accuracy of colors => lower color variation
      • If the picture frame had 3 shades of red, green and blue, for example, it will return 9 different colors to be set for your lights in the sorted order, so if you had 3 lights, it might use the three shades of red to set colors for these three lights => lower color variation
    • Lower the value => lower the accuracy and more grouping of colors => => lower color variation
      • Different shades of each primary color will be grouped together and 3 primary colors will be returned in sorted order to be set for your lights, so if you had 3 lights, it will use all three colors for these lights => higher color variation

Hope this helps, let me know if you have more questions!

This is exactly what I’ve been looking for to automate my home theatre setup! Thanks for your work on this!
My only problem is that ambilight mode gets stuck on whatever color/brightness it started on and never changes. Any suggestions?