Internet of Things (IoT)-based indoor plant care system
Abstract
The list of Sustainable Development Goals created by the United Nations include good health and well-being as one of its primary objectives. Pollution is a concern worldwide, and pollution levels inside buildings (homes or workplaces) can be higher than outdoors. To alleviate this problem and improve air quality, ornamental plants can be used. This paper presents the application of Internet of Things (IoT) technologies to develop a system called P4L, an acronym for “Plants for Life”. The objective of P4L is the automated care of potted plants to improve air quality and make the indoor environments of a building healthier. This IoT-based system (IoTS) has been developed through low-cost Arduino-compatible components. In addition, the Test-Driven Development Methodology for IoT-based Systems (TDDM4IoTS) has been used to guide P4L development. In fact, this article shows the result of the application of this methodology (phase by phase), with the help of the Test-Driven Development Tool for IoT-based Systems (TDDT4IoTS), which supports the aforementioned methodology, to develop P4L. To validate the methodology, we conducted a survey among developers that have used it, the results of which show that it is efficient and covers all aspects of IoTS development.
1.Introduction
The United Nations (UN) listed in 2015 a set of 17 Sustainable Development Goals (SDGs) to be achieved by 2030 [32], including a target primary goal of good health and well-being (SDG3). In that sense, since the emergence of the term Internet of Things (IoT) in a presentation made by Kevin Ashton in 1999 [1], IoT-based systems (IoTSs) have been gradually bringing great technological changes that can contribute to SDG3 by helping people and making their lives easier and more comfortable through a series of applications. IoTSs have an undeniable utility, as they can be implemented to be applied in various fields, such as [18,19]: education, medicine [4], industry, transportation, governance, mining, agriculture, smart cities, and smart homes, to mention just a few. Another application domain of IoT is environmental monitoring and control, which has particularly been applied to monitor pollution and reduce it [25]. From the perspective of sustainability, this is of great significance, since one specific goal mentioned by UN to be able to achieve SDG3 is to monitor and control air pollution, considering that this problem causes around 7 million deaths per year due to exposure to hazardous fine particles.
In households worldwide, the use of ornamental plants is quite common [9], and many people use them as a hobby or pastime to decorate indoor environments. They also help to maintain a more relaxed and less polluted environment [27]. In areas where climatic conditions are more extreme, i.e., where temperatures are too low (below −5°C), people choose to keep plants inside buildings (houses or offices, factories, etc.), while where temperatures are too high, they keep them in the shade (sometimes indoors). Pollution is a concern at both local [6] and global level [5], so ornamental plants, in addition to serving as decoration, help to improve air quality and decontaminate the environment.
Environmental pollution is considered one of the main drawbacks to people’s health, due to both its negative influence on the quality of the air individuals breathe and its mortality rate [20,23]. Air pollution is caused by human beings themselves due to certain advances (means of transport, industry, heating in homes, etc.) in an attempt to lead a better lifestyle. However, society has become aware of this problem and has started to react, demanding the right to have clean air to breathe. It has been proven that pollution, in addition to affecting people’s health, decreases their performance at work. Although Industry 4.0 is being adopted by certain industries in different sectors, there is a lack of application of these technologies in favour of occupational health and safety [26]. Therefore, systems for monitoring the concentration levels of pollutant gases [7], in conjunction with the use of ornamental plants can help to alleviate this concern. However, in factories or companies, plants may be neglected when there is no staff dedicated to their care, and they are also sometimes neglected in households by their owners, especially when these must leave their usual residence, due to either their multiple activities or (business or holiday) travel.
To help alleviate this problem, some systems for automated plant care have been developed. For example, Zhang et al. [36] have designed a robot for irrigation of ornamental plant cultivation over wide areas. Banda-Chavez et al. [3] present a system for watering potted plants, but they do not care about the water supply, i.e., they do not indicate where the system takes water from, nor does the system detect whether there is enough water to irrigate. Azhar et al. [2] propose a system capable of supplying the necessary water and fertiliser to the plants, as well as refilling the water tank from which the water is supplied to the plants; however, its performance is at the user’s discretion, via a mobile application.
None of the related systems proposed in the literature are concerned with measuring indoor pollution levels in buildings (regardless of their purpose: workplace or dwelling). To overcome the disadvantages of the IoTSs proposed for the care of potted plants that we have analysed, this paper presents an IoTS, called P4L (Plants for Life), which is able to keep plants healthy, especially indoors, by providing adequate watering and light when needed. In addition, the system can notify the inhabitants of the house or workers in the office (or company) of the presence of gases, such as carbon dioxide (CO2), ammonium (NH4), alcohol, and toluene (C6H5CH3), which represent a poor air quality [20], and alert them to inadequate or even dangerous levels for people’s health. In this way, the aim is to avoid the inconvenience caused by indoor pollution. At the same time, the level of decontamination of the environment will depend on the quality of the plant(s) placed in the pot(s). At this point, it should be noted that the main problem addressed in this article and for which a solution is proposed is the automation of the care of potted plants, with the solution also contributing to the improvement of indoor air quality in the building in question (office, factory, home, etc.).
Moreover, the work here presented is directly related to UN’s SDG3 and intends to contribute to improve indoor air quality, trying to reduce the emission of polluting gases from indoors to outdoors, with the aim of achieving a cleaner and healthier environment [28]. In fact, what good would a city with all the characteristics of a smart city [4,18] be if pollution is the norm there? In many countries, populations are settled around large industries. This may be due to the lack of government regulations to determine the distance between the population and the area where the industrial plants are going to be installed, or because the populations grow and expand towards the industrial zones. These populations are directly affected by air pollution regardless of whether it is produced by industries or inside buildings.
To select the methodology for the development of P4L, the results of the literature review on development methodologies for IoTSs presented by Guerrero-Ulloa et al. [15] have been considered. Such results allow us to conclude that, according to the ISO/IEC/IEEE 15289:2019 [16] international standard, the only methodology that covers the largest number of stages of the system/software life cycle is TDDM4IoTS (Test-Driven Development Methodology for IoT-based Systems) [13]. Therefore, it has been chosen for the development of P4L, with the aim of validating this methodology and evaluating its application. In this paper, we apply not only the TDDM4IoTS methodology but also the Test-Driven Development Tool for IoTSs (TDDT4IoTS) [12], which have been created to support this methodology, to the development of the proposed IoTS, with the aim of assessing the benefits they provide for IoTS developers.
In summary, this paper presents two main contributions: (1) the validation and evaluation of the TDDM4IoTS methodology that we have created to develop IoTSs; and (2) the development of the P4L IoTS, using this methodology and presenting the results of the application of each of the development phases considered in it. P4L has three main objectives: (1) to decrease time devoted to care ornamental plants by their owners, (2) to inform its users about the indoor air quality in their environments, and (3) to improve the air quality in them.
The rest of the article is organised as follows: Section 2 presents an analysis of related research retrieved from the main scientific databases. Section 3 describes the proposed system in more detail, while Section 4 shows the results of the application of the methodology followed for its development in each of the phases set out in the methodology. Section 5 deals with the validation of the methodology, presenting the results of a survey conducted among IoTS developers. Finally, Section 6 outlines the conclusions and future work.
2.Related work
Among the works that have been presented to provide a solution for the care of ornamental plants planted in pots, we can mention the one carried out by Yuan et al. [35], who studied several of the factors affecting plant growth, proposing an IoT-based framework that allows scientists to collect data on environmental factors (such as temperature, light intensity, and CO2 concentration) in order to understand their impact on plant growth. One of the concerns about indoor plant care is addressed by Theparod et al. [29], who tried to supply the light needed for plants to grow by means of an IoT device with light emitting diodes. Another need plants have is water. Ting et al. [30] presented a system to control plant irrigation based on environmental parameters, such as soil moisture, air humidity, environmental temperature, and light intensity. Banda-Chavez et al. [3] monitored soil moisture and environmental temperature factors and, depending on the values of these parameters, activated or not a pump to wet the soil of the plants. Likewise, Azhar et al. [2] provided the necessary water and fertiliser to the plants, according to the detected values of environmental temperature and humidity, as well as the soil moisture and temperature. However, none of the aforementioned papers presenting a contribution to plant care that combines water and fertilizer supply, lighting and alert the users when the indoor air quality is poor or dangerous for their health.
Potted ornamental plants can be used to decontaminate indoor environments, since they can help to reduce indoor pollution levels, though their care may be a challenge for their owners. In some cases, indoor pollution levels can be up to 100 times higher than outdoor pollution levels [24]. Indoor pollution can be caused by the entry of vehicles either to load or unload goods in factories, workshops, or warehouses, or simply to park them in garages when these are inside homes [21]. One of the fields of application of IoTS is the monitoring of the concentration levels of pollutant gases using sensors [7,11,22] and, as mentioned above, one of the practices that have been implemented to help decontaminate indoor air and improve its quality is the use of ornamental plants [2,6,37]. These two practices, i.e., technology-based surveillance and the use of ornamental plants, can be combined and complement each other. This allows people who are (working or living) in that indoor space to breathe better quality air, thanks to the production of oxygen and the reduction of pollutants, benefits provided by the photosynthesis process of the plants, with the added advantage of hardly having to worry about their care, if their owners so wish.
According to the papers retrieved in our study of the state of the art, works proposing solutions for the care of potted plants and those proposing systems for pollution monitoring are divorced. Nonetheless, some authors, such as Guerrero-Ulloa et al. [11] propose a system that not only monitors and alerts about pollution levels but also tries to decrease pollution by turning on fans and opening windows automatically. Therefore, our proposal, which is described in the following section, tries to overcome the limitations of the analysed systems. P4L allows not only the care of potted plants, providing them with sufficient water and fertiliser, but also the monitoring of the levels of pollutant gases in the environment. In addition, P4L will be able to send notifications to the user via its mobile application, according to the concentration levels of pollutant gases in the environment and inform the user about the state of the plant.
Moreover, the indoor pollution monitoring solutions on the market represent very specific standardised equipment (for one or very few gases), and they are costly [26], which often makes them difficult to acquire. Although a possible advantage of such standardised equipment is the accountability that manufacturers can provide for periodic calibration and validation, they may not be suitable for long-term monitoring (8, 12 or 24/7, uninterrupted), as they are limited to the time of their battery life [17]. The cost of such a device increases if you add the cost of a system for the care of indoor potted plants. This is why we present a low-cost solution that covers these two fields (automated plant care and pollutant gas monitoring), and provides better quality air to breathe, which will benefit the health of the people in the space or environment in which the system we propose is placed.
3.Proposed system
As stated above, one of the main contributions of this paper is the development of the IoTS called P4L. With it, we intend to achieve three objectives: (1) to automate the ornamental houseplant care so that their owners can reduce the time spent in this task, if they wish so; (2) to allow its users to know the quality levels of the indoor air they breathe, and (3) to provide a less polluted indoor environment in homes, offices, factories, or any other space or building in which it is installed.
Plant care can be a problem, for example: people may find it difficult to leave their home or workplace for a long period of time, whether for work, holidays, or any other reason, when there is no one to look after their houseplants in their absence. To try to overcome this problem, people often resort to looking on websites for tips on how to care for plants in their absence, which are not always applicable and often not always sufficient.
The biggest concern for people who have potted plants is to provide them with sufficient moisture and light. That is why the main objective of P4L is to is to try to ensure the good health of potted plants in indoor environments, even in the absence of their owners. This achieves a second objective: to ensure good air quality and a healthy environment for the people in the space (within their home or workplace) where such plants are located. To do this, P4L will be able to, depending on the moisture level of the potting soil, pour the water (with diluted fertiliser) necessary to maintain the plant between its optimal levels of moistness and food. However, there are no standard values for the parameters considered to determine the state of the plant, such as humidity, temperature, light intensity, CO2 concentration, among others, since they depend on the type of plant being cultivated [8]. In this study, we have considered average values according to the climate in which the study was being done. This study was carried out in the city of Quevedo, which has a sub-humid-tropical climate and is located at altitudes between 60 and 110 meters above sea level. In Quevedo, during the year, the temperature generally varies from 22°C to 31°C and rarely drops below 21°C or rises to more than 34°C [33]. Indoor CO2 levels were considered good for concentrations between 300 and 500 ppm (parts per million). Concentrations of 1000 ppm and above are considered a potential problem. The lowest humidity is 33% (11.2 days) in September and the highest humidity is 99% (30.7 days) in March. The comfort level for humidity is rated as sultry, oppressive or unbearable for at least 49% of the time, spread over 7.8 months, from December 4 to July 30 [28].
In factories with 24-hour working hours, pollution levels are much higher, thus the need for decontamination mechanisms becomes necessary and the use of plants provides an excellent alternative. For this purpose, when ambient lighting is insufficient, P4L provides the light necessary for the plant’s photosynthesis process, i.e., the process by which plants manage to reduce carbon dioxide levels while producing oxygen.
Finally, P4L allows the user to be kept informed about the indoor air quality level, the concentration levels of those pollutants that the plants have not been able to reduce and that are being monitored, environment temperature and humidity, the state of the plants (including their soil moisture level) and the water level in the container that feeds the pump. The user will receive the corresponding notifications via the mobile application when the values of these parameters vary drastically, and more frequently when they reach dangerous levels.
4.Development methodology applied
The TDDM4IoTS methodology [13], which is specifically designed to guide developers in each of the activities to be performed in the different phases of the development of an IoTS, has been followed for the development of the system proposed in this paper. In addition, the TDDT4IoTS tool [12] has been used, which is being developed to specifically support the application of this methodology. This tool enables the automatic generation of the platform-independent models, and part of the platform-specific models for the web and mobile applications, as well as part of the Arduino code for the hardware configuration of the device.
As recommended in the aforementioned methodology, four roles should be established: user/client (who commissions the system to be developed), project facilitator, developer, and counsellor. For the development of the IoTS presented here, the user/client was a person closely related to one of the project team members, who provided the environment for analysis and subsequent deployment of the system. An expert in IoTS development was the project facilitator. The development team consisted of three developers, all with the same level of expertise. Therefore, each of them played the role of counsellor according to their mastery of the corresponding activity or development phase.
4.1.Development stages covered by TDDM4IoTS
TDDM4IoTS [13] contemplates or distinguishes eleven development stages, which are: (1) Preliminary analysis, (2) Technology layer design, (3) Detailed requirement analysis, (4) Model generation and adaptation, (5) Test generation, (6) Software generation, (7) Model refinement, (8) Software refinement, (9) Hardware and software deployment, (10) Deliverable assessment and (11) Maintenance. The first three development stages were the most time-consuming for the project team, who used the TDDT4IoTS [12] tool to carry them out. The stages that could have proven to be the most difficult for the development team, namely stages 4, 5 and 6, turned out to be the easiest and fastest thanks to the use of TDDT4IoTS. Requirement specification, whether preliminary or detailed, together with refinement and tuning (of models, tests, and software) are very important stages, and require a great deal of effort on behalf of the project team (and more specifically, the development team, with the direct participation of the client or end-user).
4.2.Results of applying TDDM4IoTS and TDDT4IoTS to each development stage
This section details the results of applying each of the stages considered in the TDDM4IoTS methodology to the development of P4L, showing some of the results obtained directly from the TDDT4IoTS tool.
4.2.1.Preliminary analysis
The objective of this stage is to obtain a feasibility study of the complete system. To do so, first the P4L requirements had to be obtained and specified, for which end-user interviews were carried out to find out their expectations of the system to be developed. Three deliverables were determined: (1) mobile application, (2) web application and (3) device. However, these three deliverables encompass a series of tasks (which, using the terminology used in agile methodologies, should be developed over a series of sprints). Mobile and web applications have several common tasks, such as logging in, displaying real-time data, and producing reports and notifications, among others, although they require additional effort to be implemented on both platforms. Regarding the device, some of the tasks it performs are: detecting humidity levels, temperature and gas concentrations, as well as pouring water, emitting light, and playing notifications, among others. These coarse-grained functional requirements were captured in a use case diagram, which is shown in Fig. 1.
Fig. 1.
The system will be deployed inside a building (office, factory, home, …) where there are some potted plants. One of these plants is close to a window, on the wall of which is installed a socket that can be used for power supply. Alternatively, the system can be battery-powered so that it does not rely exclusively on the main power supply and can be deployed anywhere in the building where there are plants. As the customer has contracted internet service via Wi-Fi, this will be used by the device to exchange information with the web and mobile applications.
As outlined in the TDDM4IoTS methodology [13], each of the aspects considered for the feasibility study of the IoTS to be developed were analysed, and it was determined that the project was viable and its development feasible.
Regarding the hardware, Arduino-compatible hardware was used. Some of the hardware components were already available to the project team, and the others were easily acquired, at reasonably low prices [28].
As for the software required for the development of this IoTS, both for the design and configuration of the device and for the implementation of the web and mobile applications, free tools have been used, which available on the web for direct use or, where appropriate, for download. The tools chosen to be used in the different phases of the development of this project were:
TDDT4IoTS [12]: Requirement specification, class diagram generation (software architecture), test generation and software generation (device configuration, web and mobile applications).
NetBeans as IDE (Integrated Development Environment) and Java: Test and software refinement, compilation, and file generation of WAR (Web Application Resource) files for the web application.
IDE Android Studio: Creation of the mobile application interfaces, software refinement and generation of the APK (Android Application Package) file, which will be downloaded and installed.
Arduino IDE: Refinement of the software for hardware configuration and software recording on the Arduino development board and NodeMCU ESP8266.
PostgreSQL: Database management system.
A hosting company is required to provide web application deployment and data storage services. The mobile application must be installed on an Android device, which must have internet service via Wi-Fi, or mobile data, to be able to use the internet from any location with signal coverage. It was also determined that the IT staff had sufficient experience and expertise to successfully develop the P4L system, both in terms of meeting its functional requirements and in terms of the time available for its delivery.
4.2.2.Technology layer design
The overall system architecture and software architecture were determined in this phase, in which all project members, including the user, participated. The P4L architecture is service oriented, as shown in Fig. 2. Sensors send data to the cloud via the Wi-Fi network. The applications publish the data in real time, thanks to the WebSockets that are implemented, with a WebSocket Server in the cloud and the applications acting as WebSocket Clients. The rest of the operations are performed using the implemented RESTful web services.
One of the differences between IoTS and traditional information systems (IS) is that, in the former, both software and hardware are deployed. The design of the P4L device is shown in Fig. 3, where it can be seen that the following has been used: (a) a lamp that provides light to the plant, (b) a relay module that transmits electricity to turn on the lamp, (c) an ultrasonic sensor (HC-SR04) that is used to measure the water level in the tank, (d) an Arduino Uno R3 development board that programs data captured from each of the sensors and the actions performed by the actuators, (e) a Mini motor 3v DC that irrigates of the plant, (f) a relay module that provides current flow to control the ignition of the mini motor, (g) a 16X2 LCD display with i2C to show the status of the plant, (h) an NodeMCU ESP8266 Wi-Fi module to send data to the cloud with Wi-Fi connection, which feed the web and mobile applications, (i) an MQ-135 sensor to capture the CO2 concentration in the environment, (j) a DHT11 sensor to measure environmental humidity and temperature, (k) an LDR module to capture the light received by the plant, and (l) an HL-69 sensor to capture the moisture of the soil in the pot.
Fig. 2.
Fig. 3.
4.2.3.Detailed requirement analysis
An extended use case format was used to obtain the most accurate requirements. The level of detail with which use cases are written will help generate the other IoTS models using the TDDT4IoTS tool. In this case, the models obtained for P4L were very close to those required by the client or end user.
As TDDT4IoTS is in the evaluation stage, the development of this IoTS (i.e., P4L) served to evaluate this development tool and provide feedback for its suitability to the needs of its users, which are the IoTS developers. In our case, the P4L developers were very specific in eliciting the client’s requirements and, based on these requirements, they wrote the unit and acceptance tests that the system had to pass. These tests were compared with the tests that the tool generated automatically. All the automatically generated tests were useful and needed to be run together with the software to ensure that the latter meets the requirements. The tests that the application generates are the unit tests. However, it was necessary to create some additional unit tests that TDDT4IoTS was not able to generate. Logically, when system requirements are better specified and written, the better the models, tests and code automatically generated by the tool will be.
The template of the extended use cases that the tool provides is presented in a semi-structured format, as shown in Table 1, so that the developer writes each of the aspects that have been detailed in it, according to the information provided by the stakeholders. The extended use cases must be written using a custom-designed symbol-based language, which is specified in the TDDT4IoTS tool [12]. This language defines a symbol or set of symbols for each type of element used for the generation of the class diagram. Developers must use these symbols to mark the elements to be included in the class diagram when writing the uses cases.
Table 1
Use case: | Determine plant status |
Actors: | Environment |
Purpose: | Report on the state of the plant, according to the values of temperature, soil moisture, carbon dioxide and surrounding light. |
Summary: | It determines whether the plant is in a favourable state, that is, if the values of temperature, soil moisture, carbon dioxide and surrounding light are good or bad. |
Type: | Primary |
Preconditions: | None |
Normal course of events | |
Actor reaction | System reaction |
1. This use case starts when the environment is monitored. | |
2. Detect carbon dioxide, ammonium, alcohol, and toluene. | |
3. Send data collected about carbon dioxide, ammonium, alcohol, and toluene. | |
4. Detect environment humidity, temperature, light intensity, and soil moisture. | |
5. Send environment humidity, temperature, light intensity, and soil moisture to the local processing board. | |
6. Calculate concentration levels of carbon dioxide, ammonium, alcohol, and toluene. | |
7. Calculate the percentage of environmental humidity. | |
8. Calculate the temperature in degrees Celsius. | |
9. Calculate the light intensity. | |
10. If the values are NOT within the appropriate ranges, then | |
10.1. The condition of the plant is not good and “I feel bad” is displayed. | |
10.2. Issue notifications. | |
11. If all values are within the appropriate ranges, then the condition of the plant is good and “I feel fine” is displayed. | |
Postconditions: | The status message is displayed. |
Alter flow | |
None | |
Use cases includes: | Detect gas, Determine pollution, Determine environment temperature and humidity levels, Issue alert. |
4.2.4.Generation of models, tests and software
The level of completeness of the generated model depends on the previous phase. In this case, a platform-independent model (PIM) was generated, as a class diagram (see Fig. 4). The tests that the software must pass during the improvement process were generated based on this PIM. The software or platform-specific model (PSM) generated was used 100% in the construction of the web application and a large part of the mobile application. Likewise, the software generated for the configuration of the P4L device was used in its entirety.
4.2.5.Adaptation and refinement of models, tests and software
Model adaptation and refinement is a very important and necessary stage, as it ensures that the model perfectly covers the needs expressed by the client. The TDDT4IoTS tool was used to develop P4L, which made this stage effortless for the development team. The PIM for P4L was conceptually and logically complete, and the developers only had to add the odd complementary method and attribute.
After adapting the PIM, the tests were adapted to check that all the needs expressed by the client were covered. When the tests were ready, the PSM was adapted to meet the requirements. Although 100% of the generated software was used, the necessary software had to be written for some of the methods to fulfil their function. It should be emphasised that the TDDT4IoTS tool generated a large part of the PSM, as well as additional software, which is necessary for the management and exchange of data (entity classes and web services) and the operations of manipulation and monitoring of the attributes of the classes (getters and setters methods), although they are not specified in the PIM.
Fig. 4.
TDDM4IoTS encourages the direct involvement of the user in the development of the corresponding IoTS; in our case, P4L. The user is the main decision-maker in the development stages (9) Hardware and Software Deployment and (10) Deliverable Assessment, as well as in the analysis stages. In stage (9), the user must decide on final aspects for the deployment of the system, such as hosting the web application, publishing and downloading the mobile application, and the location of the device, among others. In the case of P4L, they must decide on the location for each of the plants, together with the corresponding P4L device (see Fig. 5), as well as, if desired, the type of installation (e.g., own domain or hosting) of web and mobile applications, among other things. Both (web and mobile) applications are designed to support several devices deployed in one or several buildings (either homes or workplaces), so one or several users can be registered in these applications.
Figure 5 shows a photo of the device in operation next to a pot in which a plant is grown and maintained using P4L. Figure 6 shows two screenshots of the P4L (mobile and web) applications. In fact, Fig. 6 (a) displays a screenshot of the mobile application presenting the options offered to an authenticated user, while Fig. 6 (b) shows a screenshot of the web application that presents the data taken in real time by the P4L device about the plant status and the pollution levels of the indoor environment in which it is deployed.
Fig. 5.
Fig. 6.
In stage (10), once the system has been deployed, the user must issue the acceptance criteria for the system. In our case study, in order for the user to accept the P4L system, first of all, the location of the implemented device was changed several times, placing it in various pots, to test different plants. Thus, depending on the detected soil moisture value of the respective pot, the system decided whether to turn on the pump to water the plant until the soil in the pot was at the ideal moisture level.
To test how the system behaves in response to temperature variations, the temperature rise was simulated by bringing a hot iron close to the sensor. In this way, it was verified that the system picked up the temperature rise perfectly and displayed it, while when the iron was removed from the sensor, it also detected and displayed the corresponding decrease in temperature. Given these values, users will be able to make the best decisions to ensure a healthy and comfortable environment for themselves and the rest of the people (and plants) present in that indoor area. To test the operation of the light level sensor, the lights in the room were switched off and the device was additionally covered with a dark blanket. Therefore, when the light intensity was reduced, the device turned on the lamp to provide the brightness that the plant required. The gas detection test was performed manually, with the use of a lighter that works with liquid gas to burn paper and other materials near the sensor, thus generating the gases to be detected by the P4L system and obtaining the values of the gas concentrations according to expectations. In addition, with the sensor tests, it was possible to corroborate the frequency of sending and receiving notifications in the mobile application, and the publication of data in real time using both (web and mobile) applications. The results of all the tests were adequate and expected by the user (i.e., our client), who approved the deployed system.
4.2.6.Maintenance
System downtime due to maintenance should reduce as much as possible to make sure that the system is always operational. In the case of P4L, the system will be powered by the main power supply and can also be powered by battery. In case the system must be powered only by battery, it must be considered that the power consumption will depend on the alerts it issues and the data it must transmit. The estimated power consumption for each of the P4L devices with a normal workload (i.e., considering that the mini pump will be activated once every two or three days, and that it will not work in a highly polluted place all the time) would be around 100 watts per year [34].
Changing or replacing sensors or any other components of the device should be done by a professional. Replacement of a particular sensor should be performed when it fails or at the end of its useful life. The lifespan of individual components may vary and will depend especially on the number or intensity of data acquisition/sending/playback and even more on the climatic conditions (humidity and temperature, among others) of the environment in which they are operating [14,31].
5.Validation of the development methodology
Several IoTSs were developed for the validation of the methodology, forming several project teams (one team per system). All members of these teams were Systems Engineering students. Of the project teams formed, 5 of them used the TDDM4IoTS methodology, while the other 5 used another development methodology chosen by each group. Both groups had the same: time for development, level of knowledge, experience in IoTS development, complexity in the requirements of the systems to be developed and guiding teacher. Only 4 out of 5 student teams who did not use TDDM4IoTS completed the implementation of the functionalities of their respective systems. The one which did not achieve it perhaps was due to the development methodology chosen. Moreover, the results of the work developed by the other 4 teams that did not use TDDM4IoTS were less satisfactory than the ones developed by the student teams who did use TDDM4IoTS, according to the marks obtained for this assignment by each team.
The evaluation indicators of the work developed by the developers were mainly the system (i.e., its functionalities and design, including the appearance and size of the device and both mobile and web application interfaces), although the quality of the software code, the software documentation [10] and the project documentation [31] provided, as well as just-in-time delivery, were also considered. At the end of the development period, they achieved varying degrees of compliance, as reflected in the continuous evaluations of the deliverables that resulted from the development of the assigned systems. Among the development teams that applied TDDM4IoTS was the team that developed P4L. The graph representing the average score or mark obtained by the developers belonging to each team (those who used TDDM4IoTS versus those who did not) is shown in Fig. 7.
Fig. 7.
For a more focused evaluation, the developers of the teams that applied TDDM4IoTS were asked to answer a survey assessing the TDDM4IoTS methodology. The survey was voluntary and completely anonymous. As it was about the TDDM4IoTS methodology, it was filled out only by the members of the project teams which used it. In addition, this survey was answered by other more experienced students who also used the methodology (in previous academic years). The total number of developers who used the methodology and answered the survey was 14. One of the questions asked was the degree of acceptance of each of the TDDM4IoTS stages. The graph shown in Fig. 8 presents the answers obtained for this question.
Fig. 8.
According to the developers who used TDDM4IoTS in the survey, the most important stages of the methodology include Preliminary analysis and Software generation, followed by Technology layer design, Detailed requirement analysis, Hardware and software deployment and Deliverable assessment. The stage considered least important by developers is the Model refinement stage, followed by the Software refinement stage. The reason why the developers surveyed downplayed the importance of these stages may be because they have developed systems such as an IoT-based smart medicine dispenser to control and monitor medication intake [14] and an IoTS for indoor air quality control (called IdeAir) [11], in which refinement work on both (platform-independent) models and software was not necessary, because these were small projects whose requirements were very clearly established from the beginning with the client/end-user. However, they do not consider it completely unnecessary. Additionally, they were asked whether they consider that TDDM4IoTS has discarded any stages that should be present in an IoTS development methodology, to which all but one respondent answered no (i.e., the discarded stage was not specified by the respondent).
Regarding the roles played by the members of the IoTS development project team, the 14 respondents could rate each role with a value between 4 (maximum) and 0 (minimum, which means “I do not think it is important at all”). All respondents, having the same level of knowledge, consider the role of counsellor/advisor/mentor/guide to be the least important (rating with an importance value of 1), even more than 64% (rating with an importance value of zero) do not consider it important, while the role of customer/end-user is considered important by the highest number of respondents (rating with an importance value of 4), followed by the role of developer and project facilitator. Figure 9 shows the project team roles established in the methodology and the level of importance assigned by the surveyed developers. Developers selected each of the roles in order of importance (selected first = 4, not selected = 0). In addition, we also asked whether TDDM4IoTS had left out any important roles, to which 12 of them answered no, one responded that TDDM4IoTS had left out the role of tester and another that the forgotten role was the role of supervisor.
Fig. 9.
The overall satisfaction level of TDDM4IoTS expressed by the surveyed developers is shown in Fig. 10. All of them stated a positive level of satisfaction regarding the use of this methodology.
Fig. 10.
6.Conclusions and future work
P4L, which is an IoTS, has been presented as a possible solution to two issues: the automated care of houseplants grown in pots and, at the same time, the reduction of pollution in indoor environments, whether they are homes or workplaces (offices, factories, warehouses, etc.). P4L is an interesting solution for people who cannot take care of their indoor plants, whether due to lack of time or other issues. In fact, it can help them to water, fertilize (fertilizer diluted in water) and light their plants, leaving that responsibility to the system. In addition, it informs its users when the indoor air quality could be dangerous for their health. In fact, this system also intends to contribute to sustainability, particularly to UN’s SDG3 for good health and well-being. To the best of our knowledge, none of the existing solutions to care houseplants combine all these aspects in a single system.
The use of the TDDM4IoTS methodology and the TDDT4IoTS tool for the development of P4L may ensure a cleaner and faster development. The most innovative and relevant aspects of both methodology and tool are: (1) they are specifically designed to develop IoTSs; (2) the major workload for the project team was focused on the analysis-related activities, as well as on the adaptation and refinement of models, tests and software and the deployment stages; (3) they are based on a custom-designed symbol-based language to annotate the main elements to be considered at design level in the extended use cases; and (4) these use cases are taken as the starting point for the automated generation of models, tests and software snippets. Additionally, the participation of the client/end-user was very relevant in the stages in which the developers made their work. It was also determined that the activities of the model (both PIM and PSM) refinement stage are not important in small projects and/or when the problem domain is in the domain of the developers. Regarding the roles defined in the methodology, it can be concluded that the most important roles for developers are client/end-user and developer, while the least important one is counsellor. As the members of the development teams that have validated and evaluated the methodology had the same level of knowledge, 64.28% of those surveyed did not consider the role of counsellor to be important. In addition, the application of a more specific methodology for IoTS development can result in higher quality products compared to products obtained using less specialised methodologies.
As future work, P4L intends to implement the automatic recognition of the type of soil in the pot and the type of plant that is planted in it, so that the system will be able to pour the water properly, considering these two additional parameters. Another improvement to be incorporated into the proposed system is to connect a water hose directly from a faucet in the building to the plant. Therefore, for irrigation purposes, it would only be necessary to control the opening or closing of the water flow through the hose, instead of having to turn on and off the pump that provides the mixture of water and fertilizer deposited in a container, as is the case in the proposal presented in this paper. This will make it possible to dispense with the container or tank, which is one of the bulkiest elements of the current device, although it will entail having to implement the functionality of pouring the fertiliser into the plant in another way. Moreover, an interesting future line of research would be to devise a mechanism to detect and control plant diseases and incorporate it into the system presented.
Acknowledgements
This research was funded by the Spanish Ministry of Science and Innovation (State Research Agency), grant number PID2019-109644RB-I00, and Junta de Andalucía (Andalusian Regional Government), grant number B-TIC-320-UGR20.
Conflict of interest
None to report.
References
[1] | K. Ashton, That ‘Internet of Things’ thing, RFID journal 22: (7) ((2009) ), 97–114. |
[2] | F.C. Azhar, B. Irawan and R.E. Saputra, Controlling and monitoring ornamental plants care remotely using Android application, in: Proceedings of IEEE Asia Pacific Conference on Wireless and Mobile – APWiMob 2017, Institute of Electrical and Electronics Engineers Inc., Bandung, Indonesia, pp. 12–18. doi:10.1109/apwimob.2017.8283993. |
[3] | J.M. Banda-Chávez, J.P. Serrano-Rubio, A.O. Manjarrez-Carrillo, L.M. Rodriguez-Vidal and R. Herrera-Guzman, Intelligent wireless sensor network for ornamental plant care, in: Proceedings of 44th Annual Conference of the IEEE Industrial Electronics Society – IECON 2018, Institute of Electrical and Electronics Engineers Inc., Washington, DC, USA, pp. 2723–2728. doi:10.1109/iecon.2018.8591644. |
[4] | S. Barra, A.S. Podda, L. Ismail and R. Buyya, Artificial intelligence applications and self-learning 6G networks for smart cities digital ecosystems: Taxonomy, challenges, and future directions, Sensors 22: (15) ((2022) ), 5750–5768. doi:10.3390/s22155750. |
[5] | C. Brunel and E.P. Johnson, Two birds, one stone? Local pollution regulation and greenhouse gas emissions, Energy Economics 78: ((2019) ), 1–12. doi:10.1016/j.eneco.2018.10.011. |
[6] | S. Chauhan, Manisha, B. Bhargava, K.C. Kandpal and A. Kumar, Analyzing preferred indoor ornamental potted plants for their air pollution tolerance ability, Pol J Environ Stud 31: (3) ((2022) ), 2019–2027. doi:10.15244/pjoes/140291. |
[7] | J.C. Chen, C.C. Chen, C.H. Shen and H.W. Chen, User integration in two IoT sustainable services by evaluation grid method, IEEE Internet Things J 9: (3) ((2022) ), 2242–2252. doi:10.1109/JIOT.2021.3091688. |
[8] | M. Chowdhury, S. Kiraga, M.N. Islam, M. Ali, M.N. Reza, W.H. Lee and S.O. Chung, Effects of temperature, relative humidity, and carbon dioxide concentration on growth and glucosinolate content of kale grown in a plant factory, Foods 10: (7) ((2021) ), 1524–1542. doi:10.3390/foods10071524. |
[9] | M. Diaz-Celaya, G. Rodríguez-Alvarado, H.V. Silva-Rojas, M.E. Pedraza-Santos, R. Salgado-Garciglia and S.P. Fernández-Pavía, Identification of Pythium species isolated from ornamental plants, Rev Mex De Cienc Agric 2: ((2011) ), 431–443, https://www.scielo.org.mx/scielo.php?pid=S2007-09342011000900003&script=sci_abstract. |
[10] | B. Gezici and A.K. Tarhan, Systematic literature review on software quality for AI-based software, Empir Softw Eng 27: (3) ((2022) ), 1–65. doi:10.1007/s10664-021-10105-2. |
[11] | G. Guerrero-Ulloa, A. Andrango-Catota, M. Abad-Alay, M.J. Hornos and C. Rodríguez-Domínguez, Development and assessment of an indoor air quality control IoT-based system, Electronics 12: (3) ((2023) ), 608–628. doi:10.3390/electronics12030608. |
[12] | G. Guerrero-Ulloa, D. Carvajal-Suarez, A. Pachay-Espinoza and G. Brito-Casanova, TDDT4IoTS: Test-driven development tool for IoT-based system, Retrieved May 25, 2022 from http://www.tddt4iots.tech/. |
[13] | G. Guerrero-Ulloa, M.J. Hornos and C. Rodríguez-Domínguez, TDDM4IoTS: A test-driven development methodology for Internet of Things (IoT)-based systems, in: Applied Technologies. ICAT 2019. Communications in Computer and Information Science, M. Botto-Tobar, M. Zambrano Vizuete, P. Torres-Carrión, S. Montes León, G. Pizarro Vásquez and B. Durakovic, eds, Springer, Cham, Switzerland, (2020) , pp. 41–55. doi:10.1007/978-3-030-42517-3_4. |
[14] | G. Guerrero-Ulloa, M.J. Hornos, C. Rodríguez-Domínguez and M.M. Fernández-Coello, IoT-based smart medicine dispenser to control and supervise medication intake, in: Proceedings of Ambient Intelligence and Smart Environments, IOS Press, Madrid, Spain, (2020) , pp. 39–48. doi:10.3233/aise200021. |
[15] | G. Guerrero-Ulloa, C. Rodríguez-Domínguez and M.J. Hornos, Agile methodologies applied to the development of Internet of Things (IoT)-based systems: A review, Sensors 23: (2) ((2023) ), 790–824. doi:10.3390/s23020790. |
[16] | IEEE Standards Association, Systems and software engineering – content of life-cycle information items (documentation), ISO/IEC/IEEE 15289:2019, 2019, 1–94. doi:10.1109/ieeestd.2019.8767110. |
[17] | L.N. Johannessen, H.J. Grimstad, J.E. Skjetne, I.N. Myklebust and K.V.H. Svendsen, Embedded systems and the Internet of things: Can low-cost gas sensors be used in risk assessment of occupational exposure?, Journal of Occupational and Environmental Hygiene 17: (10) ((2020) ), 495–503. doi:10.1080/15459624.2020.1798453. |
[18] | M. Kumar and A. Singh, Probabilistic data structures in smart city: Survey, applications, challenges, and research directions, J Ambient Intell Smart Environ 14: (4) ((2022) ), 229–284. doi:10.3233/AIS-220101. |
[19] | S. Madakam, R. Ramaswamy and S. Tripathi, Internet of Things (IoT): A literature review, Journal of Computer and Communications 3: (5) ((2015) ), 164–173. doi:10.4236/jcc.2015.35021. |
[20] | A.F.Y. Mohammed, S.M. Sultan, S. Cho and J.Y. Pyun, Powering UAV with deep Q-network for air quality tracking, Sensors 22: (16) ((2022) ), 6118–6134. doi:10.3390/s22166118. |
[21] | M.A. Mondal, Z. Rehena and M. Janssen, Smart parking management system with dynamic pricing, J Ambient Intell Smart Environ 13: (6) ((2021) ), 473–494. doi:10.3233/AIS-210615. |
[22] | T. Montanaro, I. Sergi, M. Basile, L. Mainetti and L. Patrono, An IoT-aware solution to support governments in air pollution monitoring based on the combination of real-time data and citizen feedback, Sensors 22: (3) ((2022) ), 1000–1019. doi:10.3390/s22031000. |
[23] | G. Sahoo, A.M. Wani, S.L. Swamy, S. Rout and S. Gupta, Indoor pollution and human health, AIP Conf Proc 2385: (1) ((2022) ), 30001–30017. doi:10.1063/5.0070902. |
[24] | J. Saini, M. Dutta and G. Marques, Indoor air quality prediction systems for smart environments: A systematic review, J Ambient Intell Smart Environ 12: (5) ((2020) ), 433–453. doi:10.3233/AIS-200574. |
[25] | F. Salamone, M. Masullo and S. Sibilio, Wearable devices for environmental monitoring in the built environment: A systematic review, Sensors 21: (14) ((2021) ), 4727–4768. doi:10.3390/s21144727. |
[26] | S. Sun, X. Zheng, J. Villalba-Díez and J. Ordieres-Meré, Indoor air-quality data-monitoring system: Long-term monitoring benefits, Sensors 19: (19) ((2019) ), 4157–4164. doi:10.3390/s19194157. |
[27] | R. Symoneaux, N. Segond and A. Maignant, Sensory and consumer sciences applicated on ornamental plants, in: Woodhead Publishing Series in Food Science, Technology and Nutrition, Nonfood Sensory Practices, Woodhead Publishing, pp. 291–311. doi:10.1016/b978-0-12-821939-3.00007-5. |
[28] | M. Taştan, A low-cost air quality monitoring system based on Internet of Things for smart homes, J Ambient Intell Smart Environ 14: (5) ((2022) ), 351–374. doi:10.3233/AIS-210458. |
[29] | T. Theparod and S. Harnsoongnoen, Narrow-band light-emitting diodes (LEDs) effects on sunflower (Helianthus annuus) sprouts with remote monitoring and recording by Internet of things device, Sensors 22: (4) ((2022) ), 1503. doi:10.3390/s22041503. |
[30] | L. Ting, M. Khan, A. Sharma and M.D. Ansari, A secure framework for IoT-based smart climate agriculture system: Toward blockchain and edge computing, Journal of Intelligent Systems 31: (1) ((2022) ), 221–236. doi:10.1515/jisys-2022-0012. |
[31] | C. Treude, J. Middleton, N. Carolina and T. Atapattu, Beyond accuracy: Assessing software documentation quality, in: Proceedings of the 28th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering – ESEC/FSE 2020, pp. 1509–1512. doi:10.1145/3368089. |
[32] | United Nations Development Programme, What are the sustainable development goals?, 2022, Retrieved September 29, 2022 from https://www.undp.org/sustainable-development-goals. |
[33] | Weather Spark, Climate and average weather throughout the year in Quevedo, Ecuador (Spanish), 2022, Retrieved September 23, 2022 from https://es.weatherspark.com/y/19356/Clima-promedio-en-Quevedo-Ecuador-durante-todo-el-a%C3%B1o. |
[34] | WIFI weather station, WIFI weather station. Arduino + ESP8266-01 + ThingsPeak.com, 2019, Retrieved April 8, 2022 from https://arduproject.es/estacion-meteorologica-wifi-arduino-esp8266-01-thingspeak-hardware/. |
[35] | S. Yuan, H. Tang, L.J. Fu, J.L. Tan, G. Govindjee and Y. Guo, An open Internet of Things (IoT)-based framework for feedback control of photosynthetic activities, Photosynthetica 60: (special issue) ((2022) ), 79–87. doi:10.32615/ps.2021.066. |
[36] | M. Zhang, W. Guo, L. Wang, D. Li, B. Hu and Q. Wu, Modeling and optimization of watering robot optimal path for ornamental plant care, Comput Ind Eng 157: ((2021) ), 107263–107273. doi:10.1016/j.cie.2021.107263. |
[37] | W. Zheng, Y. Chen and Y. Huang, Purification of indoor formaldehyde using ornamental plant of Kafirlily, Adv Mat Res 550–553: ((2012) ), 1473–1476. doi:10.4028/www.scientific.net/amr.550-553.1473. |