I want to build a cloud based application for my home automation product. Individuals must be able to control their home lights/appliances from a mobile app. Can anyone throw some light into what is the best model and how can it be done? Each house will have a gateway which will be having internet access. The goal is to reach up to the gateway, the gateway will take it from there. TIA!