automatically control smart IoT devices