Simple LIFX HTTP API Status Checker for Imperihome


I wanted to add a widget to my Imperihome set-up telling me if my LIFX API was still running. If you check my earlier post, you’ll see that I am running the unofficial Ruby LIFX HTTP API from

I decided to write something simple in php and run it also on the Raspberry pi. But first, I need an http server. I decided to go for lighttpd (following directions from this page:

Quick Steps:

  1. sudo apt-get install lighttpd
  2. sudo apt-get install php5-common php5-cgi php5
  3. sudo lighty-enable-mod fastcgi-php
  4. sudo service lighttpd force-reload
  5. sudo chown www-data:www-data /var/www
  6. sudo chmod 775 /var/www
  7. sudo usermod -a -G www-data pi

Write a bit of code and place it in /var/www:

And there we are!