I’ve been working hard on a YouTube project lately, which I’ll blog about later. For now, I’m pleased to announce that I’ve opened up the source code for Nitrogen Logic’s Depth Camera Controller browser-based UI, called knc.
knc is a Ruby- and EventMachine-based service that serves a dynamic browser-based UI (HTML, CSS, JS) for controlling Nitrogen Logic automation systems and Philips Hue lights using the Kinect.
What knc does
knc talks to my previously released knd for Kinect camera support, and provides xAP protocol and Philips Hue support. The xAP protocol allows common DIY automation systems like Homeseer to respond to 3D presence events, using knc. knc also serves the frontend UI over http.
Check out the project’s README file for more information.
In addition to knc itself, some C-based extensions were released as gems, and new versions of existing gems were released:
- nl-fast_png configures libpng for the fastest possible 8-bit grayscale encoding of depth images, allowing the UI to run well on the limited hardware in the original Nitrogen Logic controllers.
- nl-knd_client uses some C functions from nlutils to accelerate parsing of zone data from knd.
- nlhue provides the EventMachine-based interface to Philips Hue lights.
- xap_ruby provides xAP protocol support.
Running and using
Then you visit
http://localhost:8089 in your browser to see the UI:
You can use the state of zones you create in the main UI to control Philips Hue lights using simple if/then rules. Especially useful if you don’t have a Nitrogen Logic Automation Controller.