IoT Based Smart Greenhouse Framework and Control Strategies for Sustainable Agriculture

In recent years, the Internet of Things (IoT) has become one of the most familiar names creating a benchmark and scaling new heights. IoT an indeed future of the communication that has transformed the objects (things) of the real world into smarter devices. With the advent of IoT technology, this decade is witnessing a transformation from traditional agriculture approaches to the most advanced ones. In perspective to the current standing of IoT in agriculture, identification of the most prominent application of IoT-based smart farming i.e. greenhouse has been highlighted and presented a systematic analysis and investigated the high quality research work for the implementation of greenhouse farming. The primary objective of this study is to propose an IoT-based network framework for a sustainable greenhouse environment and implement control strategies for efficient resources management. A rigorous discussion on IoT-based greenhouse applications, sensors/devices, and communication protocols have been presented. Furthermore, this research also presents an inclusive review of IoT-based greenhouse sensors/devices and communication protocols. Moreover, we have also presented a rigorous discussion on smart greenhouse farming challenges and security issues as well as identified future research directions to overcome these challenges. This research has explained many aspects of the technologies involved in IoT-based greenhouse and proposed network architecture, topology, and platforms. In the end, research results have been summarized by developing an IoT-based greenhouse farm management taxonomy and attacks taxonomy.

the production of food and crop is highly substantial and 23 significant. United Nation of Food and Agriculture Organi-24 zation (FAO) predicted that more cropland and water will 25 be required to encounter the future food demands due to 26 increasing the world population up to 9.73 billion in 2050 [2]. 27 Besides, there are many other farming challenges including 28 The associate editor coordinating the review of this manuscript and approving it for publication was Li Minn Ang . lack of labor, water, and abrupt climate changes spiral the 29 pressure on farmers and agriculturists [3]. Therefore, tra-30 ditional greenhouse farming methods are not enough and 31 needed to change for sustainable food production. Green-32 house farming practice is considered to be the best alternate 33 solution to overcome food crises and ensure sustainability [4]. 34 The first-time greenhouse farming technology was ini-35 tiated in the 19 th century in Netherlands and France [5]. 36 Afterward, the greenhouse farming approach has become a 37 popular and fastest-growing industry [6]. The greenhouse 38 is mainly designed to cultivate crops in any season by 39 adjusting the growing conditions of plants. In   interconnected devices. It provides better decision-making 98 as well as more informed actions with minimum human 99 effort [20]. Bakthavatchalam et al. [21] proposed a model 100 by incorporating IoT technology to predict crop productivity 101 and high accuracy in precision farming. A complete auto-102 mated greenhouse utilizes multiple environmental sensors 103 to track the weather conditions and keep a record of opti-104 mum climatic conditions that are necessary for plant growth. 105 When the required environmental condition is detected then 106 a signal is transmitted to the server immediately by using 107 a microcontroller. In this way, the server will respond back 108 with an appropriate decision to control the unit [22]. With 109 the help of ML techniques, agriculturists can measure the 110 atmospheric patterns and record water consumption for a long 111 period in order to obtain significant results for future bene-112 fits. Farooqui et al. [23] presented an automated greenhouse 113 farming system by embedding ML and artificial intelligence 114 methods to detect early-stage diseases and real-time decision 115 making. Furthermore, the implementation of neural network 116 approaches enables the farmers to keep a record of plant's 117 health status and fruit ripeness. 118 Moreover, the ease of interaction through secure and seam-119 less connectivity across individual farmers, agriculturists, and 120 greenhouse farm managers is an important trend. Figure 1 121 illustrates a schematic greenhouse farming trend, where the 122 IoT enabled greenhouse networks using wireless devices to 123 monitor and control the entire farm. Figure 1 shows that 124 a sensor kit (Autogrow IntelliD & IntelliClimate) has been 125 deployed to monitor and control the weather conditions and 126 irrigation in greenhouse farms. makes the SLR more comprehensive. The SLR was initi-183 ated by conducting a literature review on relevant topics. 184 Defined a search string based on primary, secondary, and 185 additional keywords to choose the relevant research articles 186 for this SLR. Figure 2 shows a complete process of review 187 conduction.

188
A. RESEARCH OBJECTIVES (ROs) 189 With the increased popularity of IoT in the agriculture field, 190 it is imperative to identify how this technology is support-191 ive and challenging in greenhouse farming for interrelated 192 actors such as farmers, agriculturists, and technologists. The 193 primary objective of this SLR is to develop an understanding 194 of all those scenarios involved in IoT deployment to design a 195 smart greenhouse. However, the major objectives of this SLR 196 were the following: 197 RO1: Focused on state-of-the-art IoT-based greenhouse 198 farming applications such as monitoring, controlling predict-199 ing, tracking, and sensing.  The primary objective of this research is to analyze the 222 recent advances in IoT-based greenhouse farming. In addi-223 tion, we implemented Petticrew and Roberts Population, 224 Intervention, Comparison, Outcome, and Context (PICOC) 225 criterion in order to perform all steps that are necessary 226 in SLR. PICOC criterion was implemented to answer the 227 defined research questions with a restricted focus. So, the 228 criterion was as follows: It consists of related terms, keywords, and synonyms with rel-231 evant meanings for greenhouse farming and IoT technology. 232 As a result, we defined search string with different key terms 233 for the relevant studies selection.  The keywords for SLR search were identified and Boolean 269 operators ''AND'' and ''OR'' were implemented to link the 270 selected keywords. The Boolean operator ''OR'' gives further 271 search options however, the ''AND'' operator is another form 272 of a string that concatenates search phrases to identify and 273 develop the best search options to obtain required articles. 274 The designed search string or protocol has seven fragments. 275 The first two fragments define the role of IoT technology in 276 greenhouse farming as well as identify the studies related to 277 IoT-based greenhouse applications and network technologies. 278 Moreover, the next three fragments define how IoT monitor, 279 control, track, and predict multiple greenhouse variables such 280 as humidity, moisture, temperature, light, gases, pest, soil, 281 weather, etc. Besides, the fifth fragment has been imple-282 mented to identify the most commonly used IoT sensors 283 in greenhouse farming. The last two fragments enclose the 284 results by excluding irrelevant search terms such as precision 285 farming and IoT-based livestock farming. The defined search 286 string is shown in mathematical form in equation (1).
(1) 293 In equation (1) Table 4 shows the items included in the form. We ensure that this literature review implements the Pre-337 ferred Reporting Items for Systematic Review and Meta-338 Analysis (PRISMA). The PRISMA is employed in the 339 present study as an investigation to represent detailed infor-340 mation about a total number of selected studies as shown in 341 figure 2. During the screening and selection process, 1267 342 articles were identified from digital libraries. Furthermore, 343 319 studies were selected after reading the title and abstract 344 of each manuscript. Moreover, based on inclusion and exclu-345 sion criteria 115 articles were finalized. In the next phase 346 of screening, 82 articles were removed after reading the 347 manuscript completely. To make research more concrete we 348 have concentrated on the specific information from each 349 paper relevant to greenhouse applications such as monitoring, 350 controlling, predicting, or tracking and finalized 32 articles. 351 We also considered the studies that are showing state-of-the-352 art challenges, security issues, and gaps in smart greenhouse 353 farming. Appraising the methodological quality of selected studies is 356 also a crucial factor in the SLR. As the selected studies were 357 different in terms of design, therefore QA was performed by 358 applying qualitative, quantitative, and mixed-method critical 359 tools. The tool assesses the quality of papers by analyzing 360 data collection, theoretical background, study design, inter-361 pretation, data analysis, and conclusions. To enhance the 362 quality of research, a questionnaire was considered to analyze 363 the quality of identified research articles.

396
In this section, the results of SLR were analyzed and dis-397 cussed based on the search results and RQs a total of 32 arti-398 cles were synthesized systematically in Table 5. These studies  IoT-based greenhouse farming is shown in Figure 5. IoT-enabled smart farming solutions assist the farmers in 457 monitoring multiple plant diseases at a large scale in green-458 houses with minimal labor cost. For example, grapes are a 459 very important fruit crop over the globe and are widely used 460 to make fresh juices and fermented wines. But the quality 461 of grapes has been degraded in the last few years due to 462 several reasons but the major cause is some harmful diseases 463  Different models and algorithms have been proposed based 501 on IoT technology for record-keeping and tracking of the 502 seedling as well as many other agricultural products at 503 the growth stages. González-Amarillo et al. [81] proposed 504 a traceability model to track the greenhouse farming prod-505 ucts from seedling to final production. The designed model 506 enables automated control of the internal environment in the 507 greenhouse by using a temperature control system.  is essential for disease prevention [89]. Some crop diseases 549 such as fungi create a significant loss in extensive rainfall, 550 high temperature, fog, and unexpected climate conditions 551 [90], [91]. The integration of IoT sensors with mathematical 552 models provides an opportunity to growers to take corrective 553 measures before an outbreak. So, the physical internal and 554 external conditions of a greenhouse are analyzed effectively 555 by using required sensors such as temperature, humidity, 556 water, CO2, NH3, pH, etc. Figure 6 shows that the temper-557 ature sensor is a widely used sensor in IoT-based greenhouse 558 farming for optimal growth and production of crops and 559 plants. Furthermore, figure 7 shows how different kinds of 560 sensors are utilized by farmers and researchers for differ-561 ent greenhouse farming applications. This section presents a 562 detailed discussion on widely used IoT sensors in greenhouse 563 farming applications. This sensor measures the moisture content and provides a 566 level of water in the soil and similar variables. However, the 567 water level will be different for different crops which are 568 determined by an agronomist. The moisture sensor contains 569 two large pads which act as a probe for the sensor to detect 570 moisture levels. The analog voltage will be low due to the 571 deficiency of water in the soil and this deficiency increases 572 the conductivity among electrodes in soil changes. This sen-573 sor is ideal for automatic watering in flower plants. Besides The acoustic sensor is used to detect the sound or any 610 unwanted happening in the greenhouse farm [98]. The most 611 common use of this sensor is pest detection in the greenhouse. 612 These sensors have nodes that are mounted at a specific 613 location in the greenhouse and they will generate a sound and 614 report to the farmers its exact location. Pests are the major 615 hindrance that creates damage in the greenhouses and causes 616 plant diseases [99].     challenges shown in Figure 8.  Thus, it is a big challenge to develop a comprehensive secu-857 rity protocol or mechanism which will be ideal for both wired 858 and wireless technologies.

vii) FLEXIBILITY TAMPER RESISTANT PACKAGING 860
In IoT-based greenhouse, physical security is the prime con-861 cern of smart farming devices. The attacker can execute infor-862 mation tempering by hacking sensors/devices and extracting 863 personal information. Although tamper-resistant packaging is 864 the best solution to overcome these issues, but it is not ideal 865 in IoT-based greenhouse farming scenarios [125]. In greenhouse farming IoT devices connect and communicate 868 by utilizing a proprietary network protocol. Same devices 869 also connect with service providers by utilizing internet pro-870 tocol networks. Consequently, it is difficult to design a secu-871 rity mechanism that will be applicable to all kinds of systems 872 with advanced security requirements. Most of the greenhouse products are misplaced or damaged 982 due to imperfect and poor storage systems. Moreover, envi-983 ronmental factors, temperature, and moisture factors affect 984 greatly due to contamination of microorganisms, rodents, 985 food products, and insects [132]. But, IoT technology can 986 assist farmers and agriculturists to improve and advance the 987 storage of greenhouse products [133]. IoT sensors were also 988 implemented to monitor environmental conditions and stor-989 age services. In addition, an alarm system can be activated to 990 alert the farmers about extreme weather conditions or sudden 991 pest attacks in a storage facility. Mishra et al. [134] proposed 992 an IoT-based cloud storage system to facilitate the storage 993 system by controlling temperature. But security should be a 994 major concern while deploying such a system to protect the 995 products from theft.  Explainable artificial intelligence is the top concern in sev-   There is a need to develop a universal platform, not a crop-1064 specific in greenhouse farming to deliver a required solution 1065 for any sort of crop. By implementing a universal platform, 1066 the farmers can shelter their crops and sell them in the market 1067 at a good value.

1068
Security is the most crucial feature in IoT-based smart 1069 farming applications such as greenhouse farming. Therefore, 1070 to secure and protect the data in the network an end-to-end 1071 encryption and decryption algorithm is necessary.

1072
Energy consumption is a highly challenging job in IoT-1073 enabled greenhouse sensors/devices. It is essential to research 1074 in the future how energy can be saved while collecting data 1075 and how data can be transmitted over long distances on time. 1076 It is envisioned that in the future IoT ecosystem will carry 1077 a large number of actuators and sensors for a specific appli-1078 cation in smart farming such as a greenhouse. Therefore, the 1079 intern IC bus and the serial peripheral interface is an effective 1080 approaches to leverage the benefits of edge computing.

1081
A practical approach is required to minimize the loss that 1082 occurs due to the wrong estimation of climate and soil con-1083 ditions. ML and raspberry pi techniques utilize PH sensors, 1084 moisture sensors, and temperature and humidity sensors to 1085 overcome the pre-harvest issues.  Table 7 presents the QA score of all selected studies. There 1088 were approximately about 22% of papers below average, 0% 1089 of papers had an average score, and about 78% of papers 1090 had scores above average. The QA will help the IoT and 1091 agriculture researchers to choose closely related articles.

1093
This section provides a rigorous discussion on IoT-based 1094 greenhouse network infrastructure and presents taxonomies. 1095 After conducting a comprehensive review, we identify the 1096 major component of IoT and proposed an IoT-enabled green-1097 house farm management taxonomy to identify the utilization 1098 of IoT in greenhouse farming. In addition, an attacks tax-1099 onomy was also presented by analyzing the major security 1100 challenges and issues in smart greenhouse farming. 1101 some devices that can't use HTTP protocol directly, the 1134 CoAP protocol act as a bridge to connect such devices [28]. 1135 Further, the MQTT protocol is used to transmit information 1136 towards IoT about different greenhouse parameters such as 1137 humidity, temperature, and length intensity to take preventive 1138 measures [29]. However, AMQP and HTTP protocols are 1139 used for interfacing with the cloud and transmitting the data 1140 over the web such as environmental data [30], [31] The transport layer is mainly responsible to transfer the 1143 collected greenhouse farming data from the data acquisition 1144 layer effectively. This layer contains two protocols includ-1145 ing user datagram protocol (UDP) and transmission control 1146 protocol (TCP). The TCP protocol is responsible to transmit 1147 the data to the server as well as ensure the reliability of 1148 data. However, the UDP protocol transmits the data at a very 1149 high speed. UDP and TCP protocols are used in isolated 1150 applications according to the requirements of the application. 1151 The network layer is responsible to transmit the greenhouse 1153 information to the application layer. This layer has many pro-1154 tocols, but the primary protocols are IPv4 and IPv6. IPv4 is a 1155 leading addressing technology that originates with increasing 1156 the addressable devices. An international organization IANA 1157 that assigns IP addresses over the globe has blocked IPv4 1158 addresses. In turn, an IoT-enabled greenhouse consists of 1159 billions of nodes, each node shall be assigned a unique IP 1160 address. IPv6 has resolved this issue by assigning a unique 1161 address to each node in the entire network architecture [32]. 1162 d: ADAPTATION LAYER 1163 The adaptation layer (AL) ensures interoperability among 1164 different communication technologies and implement com-1165 pression, fragmentation, and reassembly mechanism. Despite 1166 the number of advances in AL layers still, there are many 1167 complexities for IPv6. For example, IoT sensors and devices 1168 use IPv6 for data transmission over the 802. 15.4 protocol. 1169 After that data is replied back through sensor nodes by 1170 using UDP. 6LoWPAN reduces the IPv6 complexities and 1171 is responsible for collecting the sensor data in IoT-enabled 1172 greenhouse farming [33].  of requests as well as dynamically manage the resources. 1210 The platform has been divided into three types of clued ser-1211 vices i.e., Software as a service (SaaS), Platform as a Service 1212 (PaaS), and Infrastructure as a Service (IaaS).

1213
The SaaS component acts as a user interface, in which three 1214 types of users (Greenhouse expert, Greenhouse officer, and 1215 Greenhouse farmer) interact and obtain necessary informa-1216 tion about the farm. Seven types of information for different 1217 applications in the greenhouse have been considered includ-1218 ing crop detail, pest monitoring data, fertilizer information, 1219 yield information, irrigation information, weather details, and 1220 hardware details. The greenhouse expert answers the farmer 1221 queries based on their professional knowledge and updates 1222 the agriculture database according to their applications. Fur-1223 ther agriculture officer provides the latest information about 1224 innovative greenhouse farming policies, rules, and schemes 1225 passed by the government.

1226
Farmer is the primary entity in IoT-based greenhouse farm-1227 ing that can obtain the maximum advantage by taking the 1228 answer to their queries and getting auto-replies after anal-1229 ysis. Users can monitor any greenhouse farm-related data 1230 according to their applications and receive a response without 1231 visiting the greenhouse help center. The received queries from 1232 the user end are transmitted towards the cloud database for 1233 updates and send a response to a particular user based on their 1234 predefined devices (mobile, tablet, laptop).

1235
The PaaS component consists of a data processing unit, 1236 data transformation, greenhouse expert service module, 1237 greenhouse solution reporting service module, and actuator 1238 99412 VOLUME 10, 2022 nodes. The data processing unit is further divided into mul-1239 tiple sub-components i.e. data analysis, data integration, data 1240 mining, data conversion, data reduction, and computation. In this module end-users (Framer/Agriculturists) will interact 1264 through a mobile, tablet, laptop, or computer to share or 1265 collect greenhouse-related information. If the end-user is a 1266 farmer, then he has to share the farmland information includ-1267 ing the total area of the greenhouse and approximate location. 1268 Farmers will also get a suggestion regarding fertilization, 1269 weather and soil conditions, irrigation, and many other crop 1270 diseases. Agriculture marketing agencies are responsible to 1271 purchase harvested crops and fruits from farmers. Therefore, 1272 periodic updates about the changes in cost are necessary to 1273 send. Moreover, agro vendors are also responsible for selling 1274 seeds, pesticides, fertilizer, and other agro equipment. There-1275 fore, agro vendors must share the updated cost and products 1276 to aware the farmers.   Users also set up an automatic monitoring rule for sensed data 1314 through data trigger action. In this way, a specified action will 1315 trigger when temperature or water reaches a certain level.

1316
The data acquisition component consists of 8 IoT protocols 1317 namely COAP, AMQP, ISOBUS, ZigBee, MQTT, SigFox, 1318 CAN, and WIFI to support legacy systems. According to the 1319 applicable nature, one or more protocols can opt for green-1320 house farm data communication. Further, the data acquisition 1321 component defines the collection of data from IoT sensors, 1322 devices, and other systems such as unmanned vehicles, trac-1323 tors, and agri robots.

1324
Data processing units mainly rely on the nature of the 1325 application and consist of data logging, data mining, and a 1326 decision support system. One or more than one features can 1327 be implemented at the same time. However, these process-1328 ing units can be increased or decreased depending upon the 1329 application requirements.

1330
The data visualization feature consists of multiple green-1331 house parameters. These parameters include monitoring, con-1332 trolling, tracking, and predicting greenhouse farm variables. 1333 For example, yield monitoring, humidity monitoring, pres-1334 sure monitoring, weather monitoring, pest monitoring, gas 1335 controlling, light monitoring, and controlling.

1336
The smart gateway component is divided into 3 sub-1337 components including sensor control, actuator control, and 1338 greenhouse facilities control. This module controls the green-1339 house facilities through a local program such as control-1340 ling the pest and irrigation equipment. The sub-component 1341 sensor control consists of multiple sub-features i.e. soil 1342 sensing, weather sensing, water sensing, and light sensing. 1343 The video monitoring feature monitors the greenhouse farm 1344 data gathering, and providing predictions regarding crop 1367 productivity.

1368
A farmer can obtain real-time insights by utilizing AI to 1369 identify the areas where pesticide treatment and fertilization 1370 monitoring are required. Furthermore, these innovative farm-1371 ing approaches enhance food production and quality with 1372 minimum utilization of resources. Users can get high-quality 1373 farm training data to increase profits and harvest quality with 1374 reduced cost.

1375
User center feature generally includes system manage-1376 ment, user management, and authority management to man-1377 age IoT-enabled greenhouse farming Technologies are increasing day by day, therefore the number 1381 of attacks also increasing on the latest technologies with the 1382 passage of time. If we talk about IoT-based greenhouse farm-1383 ing, networking and devices/sensors are the primary concern 1384 of attackers. Security attacks can be found anywhere across 1385 the networks. All attacks are different in nature, some are 1386 tangible, some of them are predictable, and most of them 1387 VOLUME 10, 2022 greenhouse farming namely; 1) information disruption attack, 2) host properties attack, and 3) network properties-based 1390 attack as shown in Figure 14. The attacker will attack on the user side by accessing the 1415 farm devices/sensors and network. After gaining access, the 1416 attacker will disclose sensitive data such as farm records and 1417 user passwords. An invader will outbreak the software side of the deployed 1420 system and fetch the vulnerabilities of the system and soft-1421 ware glitches. After doing this, the devices will go into mal-1422 function or dysfunction states. An adversary will attack physical devices by removing or 1425 fetching the data, and keys, as well as modifying the code 1426 and reprogramming it. Attacker violates or tampers standard protocols by imple-1433 menting security policies such as integrity, message privacy, 1434 authenticity, and service availability. In a network protocol attack, the attacker detects multiple 1437 glitches and forces the layers to implement malicious attacks. 1438

1439
Researchers around the globe have explored multiple tech-1440 nological solutions to maximize the yield of crops and 1441 fruits by mobilizing the potential of IoT. This research 1442 reviews multiple aspects of IoT-enabled greenhouse farming 1443 and presents state-of-the-art IoT-based greenhouse applica-1444 tions i.e., monitoring, controlling, tracking, and predicting. 1445 For deeper insights, into enabling technologies and indus-1446 try trends SLR has synthesized a comprehensive review 1447 on sensors/devices and communication protocols. Further-1448 more, the SLR has presented a comprehensive review on 1449 IoT-based greenhouse farming challenges, security issues, 1450 and major attacks, and discovered future research directions. 1451 This research also presents diverse greenhouse network archi-1452 tecture, platforms, and topologies that facilitate greenhouse 1453 farming data transmission. In order to understand the IoT-1454 based greenhouse architecture profundity, an IoT-enabled 1455 greenhouse farm management taxonomy has been proposed. 1456 In addition, an attacks taxonomy has also been presented after 1457 reviewing various farming challenges and security issues. 1458 The government patronizes IoT technology in smart farming 1459