We also need a function that will return the status of the lights when requested by the client. A basic loop through all the lights returning '1' if On, '2' if Blinking, and '3' if Off will suffice. The number sequence returned can be decoded by the client later.
Another important thing to add is the Access-Control-Allow-Origin: * parameter on the HTTP response header. This tells the server to accept connections from other servers. This is useful because the arduino's memory is limited and it becomes complicated to develop a nice front-end to display all the data. With this option open we can use a secondary server to send and receive all the commands.
Once the functionality of the commands was tested I focused adding some styling to the page. This method is not constrained by the arduino's memory or the utilization of some pins from the SD card.
To keep the wiring more organized I soldered the components to a perfboad- seems to have only helped a bit.
This short video shows the basic functionality of the system. I used my laptop's webcam to show the lights changing and a browser as a client (window on the right). There is a collapsible navigation bar that shows the lights and their status. Because the client is using AJAX to request the status from Arduino server, it will also update the status when they are changed from another client - go to 0:40 for demonstration.
This project was a nice proof of concept and can be further developed to do much more. There are a few more things i'd like to add to this project. To name a few: solid state switches (relays are too loud), a zero cross detection circuit so I can dim the AC lights programatically, photoresistors to sense ambient lighting conditions and adjust light intensity.