Lifx (Ambilight) Addon for Kodi
A Kodi add-on for your Lifx lights.
This Kodi add-on controls Lifx lights based on the following light groups, fully configurable using the setup wizard from addon settings.
Lights in the theater group act like wall lights in a typical theater. When playback starts the lights dim and they undim when playback is paused or ends. If you only want some of the lights to undim during pause, it is possible to configure “subgroup” in add-on settings -> Theater and only dim the subgroup.
Ambilight group tries to control the lights similarly to modern ambilight TVs. The add-on tries to figure out the most represented colors and brightness in each frame and change the lights to reflect that. They can also be configured to work similarly to theater group when playback is paused.
Turns the Lifx lights in
Ambilight group in to a room-sized environment.
Static lights act opposite to the theater lights – they are turned on when playback starts, turned off when you pause the playback and go back to initial state after the playback stops.
- Fully customizable
- Each group fully configurable with a discovery and selection wizard.
Overridebrightness/hue/saturation/temperature for different states in each of the theater/ambilight/static group - playback started/resumed, paused and stopped.
- Option to forcefully
ignorelights which are powered off (not switched off)
- Option to
flashlights once on discovery
- Option to disable the Theater/Ambilight mode for
- Option to customize what is considered a short video
Experimental: Option to undim lights when
creditsstart rolling. (Uses ChapterDB.org)
Option to delay the credits start time. Does not always work, may ruin your movie-watching experience
Restorethe lights to original states (color and power) when movie stops.
- 3 groups for your Lifx powered media center room
Dimor Turn off the lights when Movie starts
Undimor Turn on the lights when you
- Return the lights to
originalsettings when Movie ends.
- Option to configure Fading time to be
proportionalto 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%)
- Option to
Dimthe lights when Movie starts playing
- Option to change
- Option to configure threshold (minimum) values for brightness and saturation when calculating the color/brightness from picture frame.
- Option to set different colors for different lights or same color for all lights
- Option to configure bias value (lower the bias - more variety of colors, higher the bias - less variety of colors, but higher accuracy)
- Option to
- Option to set random color to the static lights that turn on when the video playback starts.
- Option to override hue, saturation, brightness or temperature values
Kodi + Lifx + Ambilight + Movie (LOTR) Test
Kodi (XBMC) + Lifx + Ambilight + Video Test
Other Ambient Lighting Demo
v1.0.0 (Mar 09, 2018)
- Download the add-on as a ZIP file from the top of this page
- (Click on the green “Clone or download button” then click on the “Download ZIP” link)
- Open Kodi
- Go to System -> Settings -> Add-ons -> Install from zip file.
- Select the zip file from the location where you downloaded the zip file
- Restart Kodi and configure the add-on:
- System -> Settings -> Add-ons -> Enabled add-ons -> Services -> Lifx Ambilight
- Configure available settings.
Example Use Case
I have 7 Lifx lights -
I want to use
TV Rightas ambilight.
Ceiling 2as theater lights, so they dim/turn off when the video playback starts, undim on pause and restore original state when video stops.
Staticlight that will turn on when we are watching movie
For this, you can configure the addon settings as the following
- Click start discovery to find all your Lifx lights first.
- Click Setup for each group that you want to configure and select the lights you want to add in each of those groups.
- Next, configure the settings for each of the groups.
- Click ok to save the settings.
Raspberry Pi users:
- Save the add-on configuration by exiting Kodi before shutting down the Pi completely Ambilight mode doesn’t work on a Raspberry Pi due to the way it renders video
ARM based devices/Nexus Player/Any other Android devices:
- Try disabling Mediacodec (Surface) in Settings > Video> Acceleration. This seems to fix the problem. Reference
- Ambilight mode doesn’t properly work with 4k-HD codecs (>1080p) when “hardware acceleration AVFoundation” is enabled.
Nvidia Shield / most Android boxes:
- Ambilight mode doesn’t properly work with 4k-HD codecs (>1080p) when “allow hardware acceleration - Mediacodec (Surface)” is enabled.
- When configuring groups, for window to properly react, one has to press OK after selecting the bulbs and then OK to exit the configuration and re-enter it
- Credits undimming was removed, will be reimplemented when the state checking gets more robust
- Add tests
- Theater sunset/sunrise
- Force lights
onbased on time of day
- Lifx Z Multi-zone support
- Update screenshots
- Update Demo video
- Add better descriptions for each settings for more use cases
- Bring the addon debug setting back
- IFTTT integration
- Home assistant integration ?
- Maintain kodi branch of sanghviharshit/lifxlan repository
- Add settings for broadcast IP address for LifxLAN discovery, since we are not using netifaces module from LifxLAN
- Rename the addon to script.service.lifxkodi
- Translations for settings
- If you find a problem or missing feature, open an issue or a pull requests on https://github.com/sanghviharshit/script.kodi.lifx.ambilight
- To have a higher chance of issue being solved, please attach a log file. To record one, go to settings wheel -> System settings -> Logging -> Enable Debug Logging and follow the procedure at http://kodi.wiki/view/Log_file/Easy
- @mclarkk for creating lifxlan - a Python library for accessing LIFX devices locally using the official LIFX LAN protocol.
- @mpolednik, @michaelrcarroll and others for maintaining script.kodi.hue.ambilight, originally started by @cees-elzinga