Controlling Philips Hue with XQuery

Feb 03, 2013    

Playing around with a set of Philips Hue light bulbs.  Turns out you can control them with simple REST calls.

l-mlhue.xqy library on github

Simple Controller:

xquery version "1.0-ml";

import module namespace lh = "http://derickson/lib/l-mlhue"
  at "/lib/l-mlhue.xqy";

for $i in (1 to 10)
for $state in (
  $lh:RED, $lh:MAGENTA, $lh:PURPLE, 
  $lh:BLUE, $lh:GREEN, $lh:YELLOW, 
return (
  lh:put-all-state( $state ),


Thanks to: and