It's still work in progress, but in case anyone is looking for
something to run devices off and is programmed in Pike.
I bought some equipment from www.hapcan.com and then
programmed a hapcanmonitor daemon.
The system is successfully running my house.
A quick rundown on the source:
+ hapcanmonitor.pike (40 KB), the full hapcan core communication driver.
+ www/x/wildcard.pike (7 KB), the REST/JSON api to the core communication driver.
- spike (55 KB), the webserver daemon.