Home

Awesome

zenircbot-hue

Provides Philips Hue light service for a ZenIRCBot

Installation & Configuration

<pre> npm install node-hue-api </pre> <pre> { "services": ["semantics.js", "zenircbot-hue/hue.js"] } </pre> <pre> 23:20:37 < bschlief> hue locate 23:20:38 <@rms-bot> bschlief: locating hue bridges... 23:20:44 <@rms-bot> bschlief: bridges found -- [{"host":"192.168.1.135","port":"80"}] </pre> <pre> hue #ff00ff time=10 hue #00ff00 time=2 @2 hue hsl=(230,65535,100) @all hue group odd_lights=(1,3) hue rgb=(128,0,128) @odd_lights </pre>

Light Commands

Any ZenIRCBot that implements the hue service will have the following commands available:

<pre> hue @1 rgb=(255,0,0) #=> This command sets light 1 to red hue @2 rgb=(0,255,0) #=> This command sets light 2 to green hue @1 rgb=(0,0,255) #=> This command sets light 3 to blue hue rgb=(255,0,255) array=(1,2,3) shift #=> This command sets light 1 (the first # light in the array) to purple, then # takes the vaue of red out of light 1, # and shifts it into light 2, then takes # the value of green out of light 2 and # shifts it into light 3. If the array # had been specified as (3,2,1) instead # it would happen in the opposite order. # Without the shift modifier, all lights # would be purple. </pre>

Groups

The Philips Hue API does have a concept of groups, but the zenircbot-hue service doesn't make use of them. Instead, you may define a group of lights to apply a state to, using a <code>array=(1,2,3)</code> syntax.