Phillips Hue Lightstrip Change Color During Meetings

November 16, 2020


This post will cover how to set up a Phillips Hue Lightstrip to change color automatically to red during a meeting, and green when not in a meeting.

Required Materials

  1. Phillips Hue Lightstrip
  2. Phillips Hue Smart Hub


  1. nodejs and npm
  2. Command line git
  3. Computer with Mac OSX Catalina


My instructions will walk through setting up the script at the following location:


If you place your script at a subdirectory of $HOME/Documents you will have to add permissions for cron to access all files and folders via system preferences.

Downloading and connecting to the hub

We will be using phillips-hue-experiments by Armando Magalhães to connect to our hue smart hub.

Download the code to $HOME/Library/cron

mkdir -p $HOME/Library/cron
cd $HOME/Library/cron
git clone
cd philips-hue-experiments
npm ci

Setting up your API key

In order to make calls to Philips Bridge, you need to authenticate your device.

Keep in mind you need to press the button in Philips Bridge before running this command in order for it to work (you’ll have an error message telling you to do so, if you forget to do this).


Storing your API key

Once you obtain your API key place it file $HOME/.hue like this


Setting up the Meeting Checker

Download the code to check if a meeting is running and change the color of the light

cd $HOME/Library/cron/philips-hue-experiments
curl -L -O
sudo chmod +x

Meeting Checker Code Details

The code will check if the GotoMeeting, Zoom, Teams, or WebEx teams process is running.

If true the light will turn red:

If false, the light will turn green:

Known Issues

Right now the code will attempt to change all lights connected to the hub to either red or green

Running the Code Every Minute

To run the code every minute you will need to modify the crontab

Opening the Crontab

Specify your preferred editor via the EDITOR variable, then open the crontab via ‘crontab -e’.


export EDITOR=nano
crontab -e

Modifying the Crontab

To run the script every minute, add the following code at the bottom of the crontab:

* * * * * . $HOME/.bash_profile; cd $HOME/Library/cron/philips-hue-experiments && $HOME/Library/cron/philips-hue-experiments/ 2>&1 >> $HOME/Library/cron/philips-hue-experiments/log/hue.log
@daily /bin/echo "" > $HOME/Library/cron/philips-hue-experiments/log/hue.log

Code can also be found here:

Debugging the Crontab

You can use mail and console.


Crontab messages can be found by running the “mail” command from the terminal. You may see a message that reads:

Failed to run operation "set color to 'weird green (#42f581)'": { Api Error: parameter, xy, not available

That is okay as long as your light strip is still changing color. That message means that the app tried to change the color of lights on the hub that did not have that ability.


Open the and search for the word "hue" to find any permissions related issues to our hue app.

You can launch the Console app from Spotlight by pressing Command+Space and searching for it, or from the Utilities folder in your Applications directory. (Open Finder and select “Applications” to find it.)