Client-server master-slave architecture to control home automation devices