The Magic Behind Home Automation