CLAMLIGHT basic idea: * control screens remotely for lighting and display effects * screens are pure slaves * each screen independently controllable * v1: solid color expressed as RGB for whole screen * vN: various animations (flash, animated gf, &c) architecture * each lamp announces who it is * polls a REST api to discover what it should do * periodic polling * use Comet later URL Structure Slave request display: http://api.clamlight.com//lamp//status www.clamlight.com/api?session_id=&lamp_id=&action="status" returns json structure like: {"lamp_id": , "active":"1" , "rgb":"#rrggbb"} Master request all status http://api.clamlight.com//controller/status www.clamlight.com/api?session_id=&action="status" { "lamps" : [ { "lamp_id" : , "active":1, "rgb":"#rrggbb"},... } set status http://api.clamlight.com//controller/setstatus POST like: {"lamp_id": , "active":"1" , "rgb":"#rrggbb"} www.clamlight.com/api?session_id=&lamp_id=&action="setstatus"&rgb=#rrggbb Next features save scene http://api.clamlight.com//controller/savescene POST like: {"savescene":} get available scenes GET http://api.clamlight.com//controller/getscenes {scenes: [ scenes] } database schema "lhf" stands for "Last Heard From" SESSION_TABLE session_id session_name session_lhf LAMPS_TABLE lamp_id session_id lamp_name lamp_rgb lamp_lhf SCENES_TABLE scene_id session_id scene_name SCENE_LAMPS_TABLE scene_id session_id lamp_id lamp_rgb