/script.kodi.lifx.ambilight

Kodi add-on for Lifx lights with ambilight support.

Primary LanguagePythonGNU General Public License v2.0GPL-2.0

Lifx (Ambilight) Addon for Kodi

A Kodi add-on for your Lifx lights.

Say Thanks!

Compatibility

Kodi v16 Kodi v17+
Release v0.1.3 Branch "develop"
download download

Description

This Kodi add-on controls Lifx lights based on the following light groups, fully configurable using the setup wizard from addon settings.

Theater Group

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

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.

Static Group

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.

Features

  • Fully customizable
    • Each group fully configurable with a discovery and selection wizard.
    • Override brightness/hue/saturation/temperature for different states in each of the theater/ambilight/static group - playback started/resumed, paused and stopped.
    • 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.
  • 3 groups for your Lifx powered media center room
    • Theatre
      • 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
      • Option to Dim the lights when Movie starts playing
      • Option to change minimum and maximum brightness
      • 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)
    • Static
      • 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

Demo

Kodi + Lifx + Ambilight + Movie (LOTR) Test

Kodi + Lifx + Ambilight + Movie (LOTR) Test

Kodi (XBMC) + Lifx + Ambilight + Video Test

Kodi (XBMC) + Lifx + Ambilight + Video Test

Other Ambient Lighting Demo

Kodi Philips hue Ambilight mode Kodi und Hue Philips Hue Kodi Ambilight Color Demo using two Hue Blooms - 4k Kodi + Philips hue Kodi with Hue ambilight

Screenshots

Installation

Installation

Stable release

  • Open Kodi
  • Go to System -> Settings -> File Manager -> Add source
  • Go to System -> Settings -> Add-ons -> Install from zip file.
  • Select the zip file from "Harshit's Addons" location
  • Restart Kodi and configure the add-on:
    • System -> Settings -> Add-ons -> Enabled add-ons -> Services -> Lifx Ambilight
    • Configure available settings

Development version

  • 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.

Configurations

Light Groups

Setting up Light Groups

Other settings

Other Configurations

Example Use Case

I have 7 Lifx lights - TV Left, TV Right, Ceiling 1, Ceiling 2, Kitchen 1, Kitchen 2, Hallway.

I want to use

  • TV Left, TV Right as ambilight.
  • Ceilin 1, Ceiling 2 as theater lights, so they dim/turn off when the video playback starts, undim on pause and restore original state when video stops.
  • Hallway light as Static light that will turn on when we are watching movie
  • Leave Kitchen 1 and Kitchen 2 untouched.

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.

Changelog

Known Issues

Todo:

  • Credits undimming was removed, will be reimplemented when the state checking gets more robust
  • Add tests
  • Theater sunset/sunrise
  • Force lights on based 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

Support

Credits

Pingbacks

Analytics