Contents

Simple LIFX HTTP API Status Checker for Imperihome

Contents

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 https://github.com/chendo/lifx-http.

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: http://www.penguintutor.com/linux/light-webserver).

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!

https://cdrumblog.s3.amazonaws.com/wp-content/uploads/2014/10/2014-10-27-2B20.41.png