Skip to content

A python script to change Hue lightbulb colors based on what's displayed on the screen. [Mac].

Notifications You must be signed in to change notification settings

G2Jose/AmbienceHue

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 

Repository files navigation

AmbienceHue

A python script that continuously changes Hue lightbulb colors based on what's displayed on the screen. This script uses the Quartz.CoreGraphics module, which is Mac specific.

Video

Demo video

How to use

Requirements

  • macOS with Xcode & command line tools installed. Tested with macOS 10.12 (Sierra).

  • Quartz.CoreGraphics python module

     pip install -U pyobjc-core
     pip install -U pyobjc
  • PHue python module

     pip install phue
  • AmbienceHue code

     git clone [email protected]:G2Jose/AmbienceHue.git

Customizing

  • Change the value of BRIDGE_IP to the IP address of your Hue Bridge. You can find this by logging into your Router's admin page.
  • Change the LEFT_LIGHT and RIGHT_LIGHT parameters to match your setup. This might require some trial to figure out what numbers map to what lights.
  • The transition time is set to 0.1 ds (0.1 * 1/10th of a second) to avoid the appearance of the lights flickering.
  • By default, the script only watches a strip 1/20th the width of the screen on each side. This setting can be changed by modifying the WIDTH parameter.

Launching

  • Navigate to the directory containing the script

     cd AmbienceHue
  • Launch the script using python (tested on 3.5.2)

     python AmbienceHue.py

In case of bugs or issues, get in touch through www.georgejose.com or file a github issue!

About

A python script to change Hue lightbulb colors based on what's displayed on the screen. [Mac].

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages