Intelligent home control with AngularJS and node.js