The Internet of Things (IoT) is highly important in today's rapidly digitizing world (Rose et al., 2015). IoT technologies help physical objects exchange data with remote servers or locally based servers by establishing connections between them and larger systems. The spread of this technology has led to revolutionary changes in many fields ranging from production to health services, agriculture, and smart cities (Nassereddine and Khang, 2024). For example, while industrial IoT applications make production processes more efficient and sustainable, in the healthcare sector, IoT-based devices continuously monitor patients' conditions, enabling early interventions (Domingo, 2012). In addition, the IoT in smart cities enhances quality of life through better traffic management, energy conservation, and public safety, among other methods (Nassereddine and Khang, 2024). Such innovations provided by the IoT maximize technology's social and economic benefits by improving efficiency, safety, and user experience. Thus, the adoption and development of the IoT play critical roles in the digital transformation processes of modern societies.
The terms smart and precision agriculture are two concepts that have recently become widespread with the development of technology. Smart agriculture is an innovative approach that aims to increase agricultural productivity and use resources efficiently with advanced technologies such as sensors, drones, and artificial intelligence (AI) (AP et al., 2021). This method can help farmers make more informed decisions by collecting data such as data on soil moisture, plant health, and weather conditions. On the other hand, precision agriculture uses these data to optimize agricultural operations such as irrigation, fertilization, and spraying on a plant or field basis, thereby increasing productivity and reducing environmental impacts (Piliai, 2022). Recently, smart agriculture and precision agriculture approaches, supported by IoT technologies, have offered revolutionary innovations and applications for various issues, such as sustainability in the agricultural sector (Adesh et al., 2024; Hasan et al., 2023). The IoT enables the collection of data from agricultural fields through sensors, drones, and other connected devices. These data include critical information such as plant health, soil moisture, weather conditions, and pest status. By analyzing these data, smart agriculture can help farmers make more informed and efficient decisions. For example, irrigation systems can be automatically adjusted with data from soil moisture sensors to save water (Adesh et al., 2024). On the other hand, precision agriculture makes it possible to tailor agricultural operations to a specific area or plant via these data. Thus, the use of fertilizers and pesticides can be optimized, reducing environmental impacts and lowering costs. Integrating IoT into smart and precision agriculture applications not only offers significant advantages in terms of sustainability and resource efficiency but also increases agricultural productivity (Sweta et al., 2024).
Recently, the use of AI, an innovative technology, in agriculture has also become widespread (Vincent et al., 2019). However, an AI method requires a large amount of data to produce results in the right direction that are fit for purpose. In this context, with the use of IoT technologies in agriculture, data obtained from sensor technologies can be obtained in real-time and stored on remote servers. In this direction, IoT-generated data for AI in smart agriculture play a critical role in increasing the efficiency and accuracy of agricultural processes (Qazi et al., 2022). IoT devices collect various data, such as soil moisture, temperature, weather, plant health, and pest distribution data, through sensors, drones, and other connected devices in agricultural fields. These data are collected in large quantities and in real-time and are used to train and optimize AI algorithms. By analyzing these data, AI helps automate agricultural processes, create early warning systems, and assist farmers in making more effective and data-driven decisions. Thus, the integration of agricultural IoT applications and AI increases agricultural productivity, reduces costs, and supports environmental sustainability (Liu, 2016).
Greenhouses have long been a crucial component of modern agriculture, offering a controlled environment for cultivating a diverse range of crops. However, the advent of smart greenhouse technology has ushered in a new era of precision and efficiency in agricultural production (Athukorala et al., 2016). Gone are the days when environmental factors were manually adjusted within a greenhouse; smart greenhouses now leverage cutting-edge agricultural IoT systems to meticulously monitor and regulate key microclimate variables, such as temperature, humidity, and soil moisture (Bersani et al., 2020; Karanisa et al., 2022). At the heart of a smart greenhouse lies a sophisticated network of sensors and control mechanisms that work harmoniously to create optimal conditions for plant growth. Recently, advancements in IoT-based greenhouse management and automation systems have been steadily increasing (Naeem et al., 2024; Shirsath et al., 2017; Vimal and Shivaprakasha, 2023).
One of the primary benefits of smart greenhouses is their ability to improve energy efficiency and sustainability. By utilizing advanced metering, communication, and management systems via IoT technologies, smart greenhouses can precisely regulate resource consumption, minimize waste, improve product yield at low costs, and reduce the environmental impact of agricultural production (Rayhana et al., 2020). Rapid advancements in sensor technology and the emergence of IoT have revolutionized the agricultural sector, paving the way for smart greenhouses and precision farming.
In this context, this paper addresses the critical need for sustainable and efficient agricultural practices by proposing a comprehensive IoT-driven framework tailored for greenhouse operations. Greenhouses are pivotal in addressing challenges such as food security, resource optimization, and environmental sustainability. However, traditional greenhouse management approaches often fall short of achieving precision and scalability. To tackle these issues, the proposed framework leverages sensor technology to enhance the efficiency and sustainability of greenhouse operations in precision agriculture. Web, mobile, and desktop applications have been developed using the proposed framework, focusing on smart and precision agricultural applications. These applications enable real-time monitoring and control, offering a scalable and user-friendly solution to the growing demands of modern agriculture. The development process of these applications is detailed, emphasizing their role in bridging the gap between conventional practices and advanced IoT-based solutions. The main contributions of this study to the literature can be summarized as follows:
Development of an IoT-based greenhouse management framework enabling real-time monitoring and control of environmental parameters.
Integration of sensor data with cloud computing technology to enhance local and remote accessibility for greenhouse operations.
Provision of multi-platform access support through web, desktop, and mobile applications, offering a user-friendly interface and operational flexibility.
Contribution to sustainable agricultural practices by optimizing resource usage and minimizing environmental impact.
Validation of the proposed framework through prototype implementation, demonstrating its practical applicability.
Offering a cost-effective, accessible solution that overcomes the limitations of traditional greenhouse automation systems.
In this paper, Section 2 presents an overview of the proposed framework and a description of the materials and methods used for it. Section 3 describes the development process of web, desktop, and mobile applications developed via the proposed framework. Section 4 presents the software applications developed in the context of the proposed framework and a conclusion summarizing all the results obtained from this paper.
The flow diagram of the development of the IoT framework proposed in this study is given in Figure 1 and detailed below.

Flow diagram of the proposed IoT-based framework. IoT, Internet of Things.
The IoT-based framework developed for smart greenhouses includes four basic stages. The first stage includes sensors placed in various areas of the greenhouse to monitor outdoor parameters such as temperature and humidity, and control actors for the operational management of the greenhouse on a microcontroller containing IoT technology. The data obtained from these sensors are then collected and controlled by the microcontroller. In the next step, a microcontroller with IoT technology is connected to the Google Firebase database, an easy and free-to-use IoT platform and the data obtained from the greenhouse are transferred to this platform. Afterward, the data transferred on the IoT platform are analyzed and made suitable for processing on the platform. As the last step, greenhouse operations are managed by means of real-time or delayed data collected through an application developed with the integration of an IoT platform and sensor technologies. In this context, in this study, three different applications using the IoT framework, namely, web, desktop, and mobile applications, have been developed, and an example of the use of the IoT framework has been demonstrated. Details about the developed application and the sensor technologies used are explained in the following subsections.
In this study, essential parameters for the operational management of smart greenhouses and plant growth were identified, including temperature, air humidity, carbon dioxide, soil moisture, air quality, and control actuators such as pumps and valve elements (Farooq et al., 2022). These parameters were monitored using selected sensors integrated into an IoT framework, based on examples from existing smart greenhouse monitoring systems. The Arduino platform, chosen for its ease of programming, was initially used to develop and program the sensors (Kumar et al., 2022). To attain enhanced capabilities, the ESP32 microcontroller board, featuring IoT technology and multiple analog and digital ports, was adopted. A visual representation of the ESP32 microcontroller is shown in Figure 2.

ESP32 microcontroller.
As seen in Figure 2, the ESP32 is a versatile and cost-effective microcontroller developed by Espressif Systems, specifically designed for IoT applications (Kumar et al., 2022). Its standout feature is the integration of Wi-Fi and Bluetooth connectivity, eliminating the need for external communication modules and simplifying system design. Its dual-core processor, running at up to 240 MHz and supported by 520 KB of Static Random-Access Memory (SRAM), allows it to handle complex tasks such as sensor data processing and actuator control. Moreover, its energy-efficient design, including deep sleep modes, ensures low power consumption, which is crucial for long-term IoT deployments. Compared to alternatives like the Arduino Uno or ESP8266, the ESP32 offers superior connectivity, higher processing capabilities, and better adaptability to IoT-based systems. These qualities make it an indispensable component for the efficient management of greenhouse environments.
In this study, appropriate sensors and control elements were chosen to monitor and control the identified greenhouse parameters effectively. The selected sensors were evaluated based on their detection sensitivity, technical characteristics, comparative advantages over similar sensors, and adaptability to the proposed IoT system. The following components were included: AHT10 for temperature and humidity, CJMCU-811 for carbon dioxide levels, a capacitive hygrometer for soil moisture, and MQ-135 for air quality. For actuation, a 5V fan was chosen for ventilation, and a mini submersible pump was selected for irrigation control. These components, compatible with both the Arduino platform and the ESP32 microcontroller, are depicted in Figure 3.

Sensor and control actuators with the ESP32 microcontroller used for the proposed IoT framework: (A) AHT10, (B) CJMCU-811, (C) hygrometer, (D) MQ135, (E) fan, and (F) mini pump. IoT, Internet of Things.
The sensors selected for this study were evaluated and chosen to meet the specific requirements of precision monitoring and control within the greenhouse system. The following explains the rationale for their selection:
The AHT10 was chosen for its high detection sensitivity and accuracy, with a temperature measurement range of ±0.3°C and humidity accuracy of ±2%. Its low power consumption and communication via the I2C protocol make it a reliable and efficient choice for IoT applications (Widjanarko et al., 2023). Compared to similar sensors like the DHT22, the AHT10 offers a faster response time and a smaller physical footprint, making it ideal for space-constrained environments.
The CJMCU-811 measures CO2 levels with high precision (400–8,192 ppm) and detects total volatile organic compounds (TVOCs). Its low energy consumption and digital communication capabilities simplify integration with the ESP32 (Zhao et al., 2023). Compared to older models like the MG-811, it is more compact and offers broader detection capabilities, aligning well with the IoT framework.
A capacitive hygrometer was selected for its ability to measure soil moisture levels without direct electrical contact, minimizing issues such as corrosion. Its analog output is compatible with the ESP32's Analog-to-Digital Converter (ADC) input, ensuring seamless data collection. Compared to resistive sensors, the capacitive hygrometer is more durable and requires less maintenance, making it a suitable choice for long-term greenhouse applications.
The MQ-135 was chosen for its ability to detect a range of gases, including carbon dioxide, methane, and ammonia, as well as volatile organic compounds (Easterline et al., 2024). Its broad detection range and high sensitivity make it ideal for monitoring air quality in greenhouses. While alternatives like the MQ-9 focus on fewer gases, the MQ-135's versatility provides comprehensive environmental monitoring at a competitive cost.
A 5V DC fan was selected for ventilation due to its low power consumption and compatibility with the ESP32. Similarly, a mini submersible pump was chosen for irrigation, providing precise control over water distribution. Both components were selected for their compact size and efficient operation, ensuring adaptability to the IoT framework.
The smart greenhouse system integrates a carefully selected set of sensors and actuators, to meet the specific needs of greenhouse monitoring with a focus on detection sensitivity, technical features, and seamless integration within the IoT framework. The AHT10 temperature and humidity sensor, CJMCU-811 CO2 concentration sensor, MQ135 air quality sensor, and hygrometer (soil moisture sensor) col-lectively provide a complete understanding of the greenhouse environment. These sensors, working in an interconnected manner, enable precise monitoring and automated control. For instance, high temperature and humidity levels detected by the AHT10 sensor coupled with increased CO2 levels from the CJMCU-811 sensor may trigger ventilation fans to regulate the climate. Similarly, low soil moisture identified by the hygrometer activates the irrigation pump to maintain optimal soil conditions, while the MQ135 sensor ensures harmful gases are controlled through ventilation. To support this interconnected functionality, appropriate code was developed on the Arduino platform and subsequently optimized for the ESP32 microcontroller. This enhancement allows for accurate and reliable data acquisition and transmission to the IoT platform for real-time monitoring and management. The system not only balances greenhouse conditions to ensure optimal plant growth but also enhances resource efficiency and sustainability through its seamless integration and automation capabilities.
IoT is a technology that enables physical objects to connect and exchange data with each other and larger systems via the internet (Kopetz and Steiner, 2022). These objects collect and analyze environmental data through sensors, actuators, and other digital devices and transmit these data to a server or a cloud-based platform, making it possible to make data-driven decisions and automate processes.
ESP32 is a low-cost and powerful microcontroller with a sleep mode which is widely used in IoT projects. With wireless connectivity features such as Wi-Fi and Bluetooth, ESP32 is easily integrated with various sensors and devices. In summary, ESP32 is an ideal platform for effectively managing data collection, processing, and transmission processes in IoT projects by integrating sensors and actuators. In this context, ESP32 is preferred for the use of IoT technology in this study because of its advantages as stated above. In this direction, ESP32's codes for data transfer on the Arduino platform were prepared and made ready for data transfer. As a result, the sensor parameters obtained from the greenhouse were transferred from ESP32 to the remote server via IoT technology.
Google Firebase is a free database application provided by Google to support cloud computing (Li et al., 2022). In this context, developing an IoT project using ESP32 and Google Firebase is a powerful combination that enables data collected from devices to be stored and managed in the cloud. In this direction, IoT technology through ESP32 can send data to Firebase servers or retrieve data from the Firebase database via the internet. In this study, the parameters obtained from the greenhouse are transferred to Google Firebase in real-time via ESP32. In this database, the data obtained are stored instantly and can be analyzed instantly according to the parameters in certain columns in the database.
In this study, web, mobile, and desktop applications have been developed via the proposed IoT framework, which is based on sensors and control actors placed in greenhouses for smart greenhouses, and software-based sample applications for the use of the proposed framework have been demonstrated.
With the proposed IoT framework, software applications were developed using C# and.NET for desktop applications, flutter technology for mobile applications, and Java technology for web applications. Details and visualizations of the development processes of these software applications are given in the next section.
First, a prototype of a smart greenhouse with sensors deployed for presenting the proposed IoT framework is prepared and shown in Figure 4.

Prepared smart greenhouse prototype.
As shown in Figure 4, the electronic circuit systems created with the ESP32 microcontroller, which uses temperature, humidity, carbon dioxide, soil moisture, and air quality sensors and control elements (fan and submersible pump), were integrated into the prepared greenhouse prototype. The electronic software of the smart greenhouse was developed on the ESP32 board with the Arduino platform and made ready for IoT-supported real-time monitoring applications. Finally, a real-time monitoring system was created by transferring all sensor data collected on the ESP32 microcontroller to Firebase. A visual representation of the real-time data flow created on Firebase is shown in Figure 5.

Sensor values obtained from sensors used in the Smart Greenhouse Prototype, displayed on Google Firebase (Units of each sensor values: Air Temperature [°C], Air Humidity [%], CO2 Level [ppm], Soil Moisture [% Volumetric Water Content (VWC)], Air Quality [ppm], Fan On/Off [True/False], Mini Pump On/Off [True/False]).
In conclusion, as shown in Figure 5, the sensor data obtained from the prototype are transmitted to the Firebase database in real-time via ESP32. Using this data flow, web, desktop, and mobile applications based on the IoT framework have been developed to manage the operations of the smart greenhouse, and the operational processes of the greenhouse have been monitored.
In this study, the C# programming language, developed by Microsoft and used with the.NET framework, was chosen for developing the desktop application. In this context, a desktop application was developed in C# via the IoT framework and integrated with the Firebase database. A visual representation of the developed desktop application, which includes various login and sensor data monitoring interfaces, is shown in Figure 6.

Developed desktop application and its interfaces: (A) Login interface, (B) monitoring interface.
To enhance access for a farmer or user via both web environments and mobile devices, a web application was also developed via the IoT framework in this study. Java technology was utilized in the development of this web application because of its ability to provide dynamic and fast solutions. The developed web application was subsequently integrated with Firebase. The screen captures of the different interfaces designed for the Java-based web application developed for the smart greenhouse prototype prepared in this study are shown in Figures 7 and 8, respectively. Additionally, the developed web application has been published under the domain https://digital.sdaprojecteu.com/ as part of the Erasmus+ funded Smart and Digital Agriculture European Union project, making it accessible to users.

Login interface of the developed Java-based web application.

Sensor value-based monitoring interface of the developed Java-based web application.
In this study, Flutter, an open-source UI toolkit and framework developed by Google, was chosen for mobile application development. Flutter allows the creation of fast and interactive mobile applications via the DART programming language. Additionally, Flutter stands out as a cross-platform framework that operates on a single codebase running on both the iPhone Operating System (iOS) and Android platforms. In this context, a mobile application was developed using the proposed IoT framework via Flutter, and details related to the developed login, registration, monitoring, and control actuator interfaces are shown in Figures 9 and 10.

Login and registration screens of the developed mobile application.

Monitoring (a), and fan and valve control (b-c) screens of the developed mobile application.
This study introduces an IoT-driven framework designed for smart greenhouses to address challenges in modern agriculture. The framework integrates advanced sensor technologies, cloud computing, and user-friendly applications to enable efficient monitoring and control. With sensors such as AHT10, CJMCU-811, MQ135, and hygrometers paired with an ESP32 microcontroller, the system automates critical processes like temperature and humidity regulation, CO2 management, and precision irrigation. Data visualization and actuator control are achieved through real-time integration with Google Firebase, offering users actionable insights and accessibility. This approach exemplifies a practical, scalable solution for sustainable precision agriculture.
Compared to existing greenhouse automation systems, the proposed framework demonstrates notable advancements. Traditional approaches, as highlighted in studies by Ardiansah et al. (2020) and Shirsath et al. (2017), primarily utilized Arduino-based setups with Global System for Mobile Communications (GSM) modules for monitoring and control. These systems often rely on Short Message Service (SMS)-based commands for actuator management, which can be less efficient and require consistent human intervention. Contrarily, the current framework employs ESP32 microcontrollers with integrated Wi-Fi and Bluetooth capabilities, facilitating real-time, cloud-based automation. This enables proactive management of environmental parameters, reducing delays and enhancing efficiency. Additionally, the implementation of edge computing addresses key limitations of network-dependent systems discussed in the literature. For instance, studies such as Vimal and Shivaprakasha (2017) outlined the reliance on centralized cloud processing, which can lead to latency issues and vulnerability during connectivity disruptions. By integrating edge computing, the proposed framework ensures that critical sensor data is processed locally, maintaining operational functionality even in areas with unstable internet access. This hybrid approach combines the advantages of edge and cloud computing, delivering a robust and adaptive system. Previous works, including that of Naeem et al. (2024), emphasized IoT's potential to reduce resource consumption in agriculture. Our framework builds on these insights by integrating AI-driven climate control and soil moisture-based irrigation. These features minimize water and energy waste while supporting sustainable farming practices. This adaptability aligns with modern demands for eco-friendly agricultural solutions that also optimize yield and resource efficiency.
In this study, another key strength of the proposed framework lies in its user accessibility. Unlike earlier systems, which often require technical expertise for operation, this study provides an intuitive interface compatible with web, mobile, and desktop platforms. This ensures broad usability, addressing accessibility barriers faced by farmers in resource-limited settings. The combination of real-time control and easy-to-use applications promotes adoption among diverse user groups. The evaluations from this study highlight the transformative potential of integrating IoT and AI into greenhouse management. By leveraging advanced sensors, real-time cloud computing, and AI analytics, the framework provides a significant step forward in achieving precision agriculture goals. The successful prototype implementation validates its feasibility and effectiveness, setting a benchmark for future innovations in sustainable agricultural systems. Despite its contributions, the framework has certain limitations. Its reliance on stable power sources restricts deployment in remote or off-grid areas. Future versions could incorporate renewable energy solutions, such as solar panels, to enhance autonomy. Additionally, the initial costs of IoT hardware and cloud services may pose barriers for small-scale farmers. Exploring affordable hardware and open-source software options could mitigate this challenge. Lastly, while the framework performs effectively on a small scale, its scalability for larger and more complex greenhouse setups requires further testing. Future research should focus on evaluating scalability and incorporating advanced AI models for optimizing multiple variables in diverse environments.
This study introduces a comprehensive IoT-driven framework designed to manage smart greenhouse operations by integrating advanced sensor technologies and cloud computing. The framework optimizes environmental conditions for plant growth while prioritizing sustainability, efficiency, and accessibility. A key contribution of this study is the development of a robust IoT-based system that enables real-time monitoring and automated control of critical environmental factors such as temperature, humidity, soil moisture, and CO2 levels. By incorporating web, desktop, and mobile applications, the framework ensures ease of use and operational flexibility, making it accessible to a wide range of users, including those with minimal technical expertise. Implemented in a smart greenhouse prototype, the framework contributes to efficient resource utilization by promoting effective water and energy management. The IoT-driven automation reduces manual intervention and fosters the adoption of sustainable agricultural practices, helping achieve operational efficiency and consistent results.
Future studies will focus on collecting long-term data using the proposed IoT framework in a con-trolled greenhouse environment. These datasets will be used to develop and refine AI-based methodologies for anomaly detection, predictive maintenance, and environmental optimization. Such efforts aim to enhance decision-making processes and improve the efficiency and sustainability of greenhouse operations.
In summary, this framework bridges the gap between traditional farming practices and modern technological solutions, offering a scalable, practical, and environmentally friendly approach to greenhouse management. By addressing critical challenges, this study supports sustainable agriculture and provides a foundation for continued advancements in IoT and AI-driven farming technologies.