Application of Internet of Things (IoT) for Optimized Greenhouse Environments