IoT-enabled environmental monitoring and control gateway