Smart architectures for smart home gateways