Finished integrating iPhone app with back end. Now just to relay on/off commands from back end to hardware! (And messages from hardware to backend to update outlet database state...)
Refactored to easily change base url from local to amazon ec2. Tested on amazon ec2 and it works!