Automation of an IoT hub using artificial intelligence techniques