Chatting with Plants (Orchids) in Automated Smart Farming using IoT, Fuzzy Logic and Chatbot
Volume 4, Issue 5, Page No 163-173, 2019
Author’s Name: Samruan Wiangsamut, Phatthanaphong Chomphuwiset, Suchart Khummaneea)
View Affiliations
Department of Computer Science, Faculty of Informatics, Mahasarakham University, 44150, Thailand
a)Author to whom correspondence should be addressed. E-mail: suchart.k@msu.ac.th
Adv. Sci. Technol. Eng. Syst. J. 4(5), 163-173 (2019); DOI: 10.25046/aj040522
Keywords: Automated smart farming, Internet of Things (IoT), Fuzzy logic, Chatbot
Export Citations
Plants are living organisms that can hear and recognize the environment around them but cannot communicate to inform their needs. Thus, in the past, humans thought that it was impossible to communicate with plants. However, in this modern era, humans can be able to communicate with these plants. In this paper, we propose a model that can interact (Chat) with plants cultivated in the automated farm system based on Internet of Things (IoT) and Fuzzy Logic. According to the communication of plants and humans, we apply a chatbot algorithm for sending/receiving messages between users and automated smart farming. The messages are processed by the natural language processing (NLP) to parse and interpret the meaning of the conversation. The experimented plant in this paper is orchid, namely Dendrobium Sonia (Bomjo). The result from the evaluation shows that the average accuracy (Harmonic mean) of een the user and the orchid is equal to 0.71, the precision and recall 0.75 and 0.6 respectively.
Received: 16 August 2019, Accepted: 25 September 2019, Published Online: 10 October 2019
1. Introduction
What happens if we can talk to trees or plants? The answer is that we can know what they want, which will help us to respond to their needs accurately and precisely. For example, if the temperature rises, the moisture in the soil is decreased; as a result, plants need more water. If they are not watered at the right time, they will gradually wilt and eventually die. Besides, there is another exciting thing about plants, that is, the sound waves of different frequencies can affect the growth of different trees [1, 2]. Fahmi Huda et al. [3], for instance, discovered that acoustic waves could help stimulate the absorption of plant nutrients more efficiently, resulting in height, leaf area, stomatal opening, chlorophyll content, absorption of nitrogen, etc. of mustard Pakchoy are also higher.
The basic principle of chatting between plants and humans is applied and derived from the communication between ordinary and voiceless people. The deaf-mute can perceive various environments by looking, hearing, taste and touching, except for pronunciation, which is similar to the nature of plants. In fact, plants can recognize the various dangers that are approaching them, but they cannot response to aggressors. For example, the Mimosa pudica will shut their leaves if they are vibrated, or Morning glory flows will bloom or fold as the light intensity, etc. Therefore, we have adapted the principles mentioned above to apply to our chatting technique. Several researchers contributed methods for controlling and ordering various devices using the chat method via chatbots. Cyril Joe Baby et al. [4], for example, proposed a way to control various electrical devices in homes using a chatbot, working with IoT, that allow users to control devices within their house in a manual only. The system has not yet evaluated the errors regarding conversations via a chatbot and is not yet automated. Similar to Cyril’s method, Muslih [5] introduced techniques for controlling electrical appliances in the workplace with IoT via Telegram Chatbot program in a smartphone. They claimed that the system can handle appliances correctly and also reduce the energy used, but they did not show the pros and cons that occurred from the communication between the IoT controller and the chatbot program. Besides, Angeline et al. [6] apply a chatbot implemented by Python to chat with customers when they need to buy goods in supermarkets, but it is only an extension, not an essential part of the system. Chatbots are applied to several ways [7], for example, Kaed et al. [8] developed an integrated system which collects data obtained from multiple IoT platforms running in the background, with a chatbot acting as a communication against the users in the foreground. Such a system is an intermediary that allows different IoT platforms to communicate with each other via a chatbot.
In this paper, we propose techniques to chat with plants
(Orchids) cultivated in the automated smart farming. The proposed techniques are based on IoT and Fuzzy logic using natural language processing (NLP) via the Python chatbot program. This paper is an extension of work initially presented in 2018 International Conference on Information Technology (InCIT) [9].
The rest of the paper is organized as follows: Section 2 depicts the background and related work. We articulate our methodology in section 3. The performance evaluation shows in the section 4. The system development is described in section 5. Section 6 shows our experimental results, and the last is the summary of this paper.
2. Background and Related Work
2.1 Stimulation and Recognition of Plants
Naturally, plants can recognize the stimulus from both inside and outside their bodies, which is a mechanism that occurs from the functioning of hormones or the various mechanisms of cells to make plants grow [10]. The stimuli influence the response of plants, which can be divided into two groups: external and internal stimuli. Plant’s responses are different depending on these factors, such as the duration of stimulation of stimuli, the age and cell types that the sensory unit
(Receptor), and the amount or concentrations of stimuli, etc. When plants are stimulated by stimuli, they can respond in several ways, such as movement, chemical release and tissue changes. For example, the leaves of Mimosa will be folded if there is a vibration near their leaves, as shown in Figure 1 (a). In this research, we are only interested in orchids because they are economic crops and have a high export value. Orchids (Dendrobium shown in Figure 1 (b)) can grow well if the natural stimulation factors: sunlight is 60 percent, the temperature is between 25 – 35 degrees Celsius, the relative humidity is between 60 – 70 percent and soil moisture is in the range of 60 – 70 percent [9].
Figure 1: Specimens of Mimosa and Orchid
2.2 Smart Farming with IoT
Smart farming is modern agriculture, which works with new technologies (IoT), robots, machines, etc. It has high accuracy for resolving problems of farmers by being friendly to the environment, being safe for consumers and using resources efficiently. For instance, Anukit and et al. [11] developed an alternative electric power supply from solar energy for a smart agricultural greenhouse, called the smart photovoltaic system, which is applied to the Lingzhi mushroom farm for saving energy costs. Besides, they [9, 12] used IoT to control the environment for the growth of orchids inside a smart farm due to unstable weather conditions, which allows farmers to plan production precisely. Hydroponics is another popular method today because farmers can get vegetables that are safe and easy to grow. Boonnam et al. [13] proposed a method of growing vegetables on a hydroponic farm controlled by IoT via mobile phones. The overall evaluation result from users’ confidence in their system is higher than 70%. Next, farmers can make accurate decision making while undesirable events occur inside their farms based on real-time data using AgriIoT [14] running on the semantic web technologies. IoT is not only restricted to use for crops, but it is also used for animal farms. For example, Memo et al. [15] adapted IoT to monitor various environments inside an animal farm, such the animal’s waste, fire, water, animal’s behaviours and others via a smartphone. The interesting researches related to IoT and the smart farming: [16, 17, 18].
2.3 Automatic Smart Farming with Fuzzy Logic
The automatic smart farm is a farm which can control various environments to suit each plant within the farm by itself without human intervention. For example, orchids grow well at a relative humidity (humid) ranging from 60 to 70% If humid around the farm is now 59%, therefore, the automatic smart farm must control the humid back to 60 to 70% by fogging automatically. To make any farm to be automated, there are a variety of methods, for a prevalent method, that is Fuzzy Logic (FL) [19]. Because of FL can explain ambiguous information so that humans can understand, especially the various environment information of plants. For example, three farmers choose unequal orchid growing temperatures, such as 25 – 30◦C, 26 – 32◦C and 25 – 32◦C respectively. Therefore, these ambiguous data will be calculated using Fuzzy Logic. As a result, the appropriate temperature data range for orchid cultivation is 25 – 30◦C. The output evaluated by the FL from multiple input levels is finite. There are four steps, as shown in Figure 2.
- Fuzzification translates inputs, called crisp inputs into Fuzzy sets, and splits each crisp input into multiple levels, i.e., five levels = NH (Negative High), NL (Negative Low), Z (Zero), PL (Positive Low) and PH (Positive High) or three levels = L (Low), M (Medium) and H (High),
- Knowledgebase creates rules that correspond to the problems being considered in the IF-THEN format, for example, IF humidpresent=L AND humidTarget=M THEN Fogging,
- Inference engine simulates human reasoning by using Fuzzy inference and knowledge base in conjunction with inputs,
- Defuzzification transforms the Fuzzy set acquired from inference engine into a crisp output.
Figure 2: Fuzzy Logic workflow
2.4 Chatbots
A chatbot or virtual assistant is an artificial intelligence program [4, 7] which can simulate a conversation (Chat) with a user in natural language through messaging applications, websites or smartphones. Chatbot’s structure consists of two parts: user request analysis and returning the response, as shown in Figure 3. Generally, chatbots work on three classification methods:
- Pattern Matching: chatbots use a pattern matching method to group messages and create relevant responses from users. Artificial intelligence Markup language (AIML) is a standard structured model to create an interface which can be easily understood by humans response to users with the appropriate format, as shown in Figure 4.
- Natural Language Understanding (NLU): NLU is a subset of Natural Language Processing (NLP) which examines the group of texts or speeches (Sentences) and interprets the meaning specified. For example, a query for asking temperature inside Orchid smart farming on the 20th of July. NLU algorithm breaks down the query something like this: Orchid [intent] / need: temperature [intent] / inside farm [location] / July 20th [date].
- Natural Language Processing (NLP): NLP uses algorithms to analyze text so that the machine understands how humans speak. It is commonly used for text mining, machine translation, and automated question answering. NLP uses the machine learning algorithms which has the following steps: Tokenization, Sentiment Analysis, Normalization, Named Entity Recognition and Dependency Parsing, respectively [20].
3. Proposed Methodology
Figure 5 illustrates the research procedures in order to build a chatbot for automated smart farming of Orchids. There are eight steps (1 to 8) as:
3.1 Collect information about orchid cultivation from farmers
Farmer | Environment variables | |||
Temperature (T) |
Humidity (H) |
Soil moisture (S) |
Sunlight (L) |
|
F1 | 25-30◦C | N/A | N/A | N/A |
F2 | 25-35◦C | 60-80% | 60-80% | 60-70% |
F3 | 25-35◦C | 60-80% | 60-80% | 50-60% |
F4 | N/A | 60-80% | N/A | N/A |
F5 | 25-35◦C | N/A | N/A | N/A |
F6 | 25-35◦C | 50-70% | 50-70% | N/A |
F7 | N/A | N/A | N/A | 50-60% |
F8 | 25-30◦C | N/A | N/A | 50-70% |
The first step (1), we collect as much information as possible about the environments which are used to plant orchids from farmers including temperature (T), humidity (H) soil moisture (S) and sunlight (L). Information collected from orchid farmers in this research has eight sources listed in Table 1. Table 1: Information on orchid cultivation from Orchid farmers
Where Fi as any farmer, and N/A is unavailable.
According to Table 1, the first farmer (F1) recorded only temperature (T) ranging from 25 to 30 degrees Celsius. Other information, the farmer does not record (N/A). In contrast, the farmer F2 and F3 recorded all the information of the environment variables: T ranges from 25 – 35 ◦C, H and S are between 60 – 80%, L is in the range of 60 – 70% and 50 –
60% respectively. Each type of information is calculated to determine membership values by the intersection operator (∩), except the N/A as follows.
[25,35] ∩ [25,30] = [25,30] Tm is an intersection result of TFi, where i ∈ [1, 8].
Figure 5: Block diagram for research methodologyHm, Sm and Lm are the intersection results of HFi, SFi and LFi, respectively.
3.2 Translate crisp inputs to Fuzzy sets
The second phase (2), crisp inputs are converted to Fuzzy sets, which are obtained from the first step. Theoretically, crisp inputs can be multiple levels, but in this research, only three levels are selected: T, H, S and L ∈ {LOW, MEDIUM, HIGH} because orchids are not very sensitive to climate changes. The membership functions are used to map crisp inputs to Fuzzy sets. They quantify linguistic term and demonstrate Fuzzy set graphically. A membership function for a Fuzzy set T on the universe of discussion X is defined as µT:X −→ [0, 1]. Here, each element of X is mapped to a value between 0 and 1. Each membership function of T, H, S and L are illustrated in Figure 6 (a to d) respectively.
3.3 Create knowledge base rules
Next step, we map each membership function from the second step to a matrix, which is determined how we proceed if environment variables in smart farming occur in different situations. For example, from Figure 6 (a), if a current temperature (Tcurrent) inside a smart farm is now equal to 24◦C, but a target temperature (Ttarget) for planting orchids is in the middle (T ∈ [25, 30◦C] = M); thus, the system needs to immediately reduce the current temperature to be the middle level (M) as shown in Table 2.
Another example, if the current relative humidity (Hcurrent) is low about 58%, but the humidity suitable (H target) for orchid planting is 60 – 80% (Middle). Therefore, the system will have to carry out fogging (Fog) to increase the humidity at an appropriate level immediately shown in Table 3. For other environment variables as S and L are mapped into a matrix, shown in Table 4 and 5 respectively.
Next, we build a set of rules of T, H, S and L of each matrix in order to build the knowledge base in the form of IF-THEN structure like in Table 6. According to Table 6 rule No. 4, if the current humidity in the farm is high (H) and the orchids need moderate humidity (M), the system must turn on lamps to reduce the humidity inside the farm, and order the fans to suck moisture away from the farm simultaneously.
Figure 6: Membership function of each crisp input
Table 2: The decision matrix of temperature
Ttarget | Tcurrent | ||
Low | Medium | High | |
Low | No change | Cool | Cool |
Medium | Heat | No change | Cool |
High | Heat | Heat | No change |
Ttarget = target temperature for planting orchids, Tcurrent = current temperature inside a smart farming
Table 3: The decision matrix of humidity
Htarget | Hcurrent | ||
Low | Medium | High | |
Low | No change | Heat/Fan | Heat/Fan |
Medium | Fog | No change | Heat/Fan |
High | Fog | Fog | No change |
Htarget = target humidity for planting orchids, Hcurrent = current humidity inside a smart farming
Table 4: The decision matrix of soil moisture
Starget | Scurrent | ||
Low | Medium | High | |
Low | No change | No water | No water |
Medium | Water | No change | No water |
High | Water | Water | No change |
Starget = target soil moisture for planting orchids, Scurrent = current soil moisture in planting pots
Table 5: The decision matrix of sunlight
Ltarget | Lcurrent | ||
Low | Medium | High | |
Low | No change | Curtain | Curtain |
Medium | Lighting | No change | Curtain |
High | Lighting | Lighting | No change |
Ltarget = target lighting for planting orchids, Lcurrent = current lighting inside a smart farming
3.4 Simulate human reasoning
Fuzzy set operations evaluate rules created in the previous step
(Section 3.3). AND (∧) and OR (∨) are used for describing a minimum (MIN) and a maximum value (MAX) respectively. Combine all results of the evaluation to form a final result, called a Fuzzy value. For example, the membership function of temperature shown in Figure 7 has three output Fuzzy sets: “Low”, “Medium” and “High”. Assuming that the temperature in the current orchid farm is equal to 23 ◦C, thus the membership value of the Fuzzy set “Low, Medium and High” are 0.35, 0.75 and 0, respectively. The Fuzzy set value is 0.35 ∨ 0.75 ∨ 0 = 0.75 (MAX). As a result, the Fuzzy value is Medium (M).
3.5 Transform the Fuzzy sets into a crisp output
Fuzzy set transformation to a crisp number is commonly called Defuzzification. It is a procedure that converts a Fuzzy set or Fuzzy number into a crisp value or number. The weighted average method (z∗) is the most popular used in fuzzy applications since it is one of the more computationally efficient methods and valid for symmetrical output membership functions. The algebraic expression gives z∗:
Where c1, c2, …, cn are the output Fuzzy sets, and (xi) is the value where the middle of each symmetric membership of the Fuzzy set ci is observed.
Table 6: Fuzzy rule base of T, H, S and L
|
Figure 7: Fuzzy defuzzification
In Figure 7, if µci(xi) = 1, xLow = 10◦C, xMedium = 27.5◦C and xHigh = 45◦C, we can estimate a crisp output of the temperature by using the z∗ as follows: z◦C
Also, the crisp output of humidity, soil moisture and sunlight: 65%, 65% and 60% respectively.
3.6 Control actuators
After the defuzzification process is executed successfully, the Fuzzy set value and crisp output will be used to control the actuators inside an orchid farm. For example, if the environment variables inside the orchid farm are now: Tcurrent = 21 ◦C (L
= Low), Hcurrent = 54% (L), Scurrent = 54% (L) and Lcurrent = 66% (H = High), the equipment (Actuators) inside the orchid farm must carry out the following tasks: Light bulbs = on (Heat), Fogs = on (Water), Sprinkles = on (Water) and Curtain = on (Sheltered greenhouse). The overview of the demonstration farm for orchid cultivation is shown in Figure 8. The methods of controlling the system can be done in two ways: allowing the system to operate automatically or manually via the Blynk software [21] on the mobile phone.
3.7 Loop control
The system is designed to work automatically, based on the knowledge that has been created from the previous steps, but users can still control the system by manual handling. The system reads various environmental data from the sensors in the fourth step and then uses such data to evaluate a Fuzzy value in the fourth step and a crisp value in the fifth step. The Fuzzy value will be calculated with the appropriate knowledge based rules (IF-THEN rules from the third step) for orchid planting. After that, the result will be taken to control actuators inside the smart orchid farming. The system works in a continuous loop without interruption.
Figure 8: Overview of demo orchid farming
3.8. Chat to Orchids (OrchidChatbot)
At the last phase (8), we design and create a chatbot to be used for talking to orchids to inquire about how healthy orchids are. The overview of chatbot’s work is shown in Figure 9. According to Figure 9 (A), we use ChatterBot [22] running on Python version 3.7 to chat with orchids, which are grown inside the farm (D), through Blynk servers on the cloud (B), which act as intermediaries for communication. Communication between our chatbot (OrchidChatbot) and the Blynk servers to retrieve the environment information of the orchid farm, we use the Blynk library for Python [23]. OrchidChatbot starting from the smart farm control system (D) sends a Fuzzy value of the temperature (T), humidity (H), soil the moisture (S) and sunlight (L) to store in the Blynk servers by using Blynk libraries (C), these Fuzzy values must be evaluated by Fuzzy Logic already (C). Next, OrchidChatbot retrieves environment information (T, H, S and L) from Blynk serves for processing natural language like Figure 3 together with the Orchid corpus as shown in Figure 10. The format of the ChatterBot corpus explains in Table 7, and OrchidChatbot program, which is coded in Python, is shown in algorithm 1.
Referring to the chatbot program in algorithm 1, the first line loads Blynk libraries to a chatbot for communicating against Blynk servers on the cloud. Line number 2 is importing the Chatbot module from the chatterbot library to build our chatbot program. The user authentication to Blynk servers by a key is shown in the line number 3. Creating virtual pins to send/receive the temperature, humidity, soil moisture and light between our chatbot and the Blynk servers shows in the line 4 to 7 respectively. Next, the line number 8 and 9 creates a chatbot and trainer object; and the line 10 points to the address of the Orchid corpus for training data. The chatbot retrieves the environment values from the Blynk servers from the line number 13 to 16. Last, line number 17 to 30 are used to respond between users and the chatbot; and when users want to leave the chat, type “bye” (line number 31 – 33).
Figure 10: Examples of Orchid corpus
4. Performance evaluation
The performance evaluation in this research is divided into three components: 1) growth rate of orchid inflorescence length (cm./a week) planing inside the smart farming for ten weeks; 2) satisfaction from users who control and view the information via smartphones by the average (x¯); and the accuracy of the conversation between the users, chatbot and the orchids by Dialogue specification and Harmonic mean, which the equations are shown as follows:
The average (x¯):
Where x1,x2,…,xn are the observed values of the sample testers, x¯ is the mean value of these observations, and n is the number of observations in the sample. In this research, the number of testers (n) is thirty.
Algorithm 1 OrchidChatbot
1: import Blynk libraries 2: import ChatBot libraries 3: SET auth_token by ’AuthToken’ 4: SET Temperature by Blynk_virtual_pin(1) 5: SET Humidity by Blynk_virtual_pin(2) 6: SET Soil_moisture by Blynk_virtual_pin(3) 7: SET Sunlight by Blynk_virtual_pin(4) 8: Create a chatbot object from ChatBot module 9: Create a trainer object from ChatterBotCorpusTrainer 10: SET the Orchid corpus path directory (namely orchid.yml) 11: Training Orchid corpus 12: while True: |
||
13: | Temp ←− get temperature from Blynk server | |
14: | Humid ←− get Humidity from Blynk server | |
15: | Soil ←− get Soil_moisture from Blynk server | |
16: | Light ←− get Sunlight from Blynk server | |
17: | message = input(’you:’) | |
18: | if message.strip()!=’bye’: | |
19: | if Temp != NULL: | |
20: | reply = chatbot.get_response(message+Temp) | |
21: | print(’ChatBot :’, reply) | |
22: | if Humid != NULL: | |
23: | reply = chatbot.get_response(message+Humid) | |
24: | print(’ChatBot :’, reply) | |
25: | if Soil != NULL: | |
26: | reply = chatbot.get_response(message+Soil) | |
27: | print(’ChatBot :’, reply) | |
28: | if Light != NULL: | |
29: | reply = chatbot.get_response(message+Light) | |
30: | print(’ChatBot :’, reply) | |
31: | if message.strip()==’bye’: | |
32: | print(’ChatBot: bye’) | |
33: | break | |
The Dialogue specification: | ||
Where wcj are the words that chatbot answered correctly, and wai are all the words that chatbot answered.
The harmonic mean:
Where x1,x2,…,xn are positive real numbers. For example, suppose that the user and chatbot chat together, as shown in
Table 8, the results from the calculation with equation 7 and
Table 8: Examples of conversation between the user and chatbot
User asked | Chatbot answered | Possible answers in Corpus |
How are you? | I am cold. |
I am feeling cold. I am feeling warm. I’m feeling hot. |
Are you hot? | Yes, I am hot |
No, I am so happy. Yes, I am very hot. No, I am so so. |
The dialogue specification of question 1 and 2 are equal to 1.0 because the chatbot can answer both questions correctly. The harmonic mean of both questions:
Figure 9: The working process of chatbot in Orchid demo farm
Table 7: The format of ChatterBot corpus
Syntax | Description | Example |
categories: | Category of questions |
categories: – health |
conversations: | Start the conversation of each question category |
conversations: – – How is your health? – I’m fine. |
– – the question[?] | Questions that users ask to Chatbot | – – Hello – – How are you? |
– the answer[.] | The answers which the Chatbot replies to the users |
– Hi – I’m also good. |
[X:Y] | Fuzzy value of each environment variable |
– [T:L] – [H:M] |
We also use the precision and recall methods, which are the classic techniques to evaluate a chatbot chatting. We create a total of 60 questions (Orchid corpus) in the discussion between users and orchids in this research listed in Table 10.
5. System development
5.1 Hardware for smart orchid farming
The devices such as sensors and actuators used in the orchid farm are as follows. Arduino Mega 2560 and Esp8266 module is used to control the entire system of automated smart farming. According to the sensors: the temperature and humidity (DHT11), soil moisture and LDR photo-resistor sensor as illustrated in Figure 11. The actuators are water pumps (12V DC), cooling fan (220V 50Hz), light bulbs (220V 50W), motors (12V DC), LED bulbs (220V 400 lumen), fogs and sprinkles as illustrated in Figure 12.
Figure 11: Arduino Mega, ESP8266 and sensors
Figure 12: Actuators working in smart farm
5.2 Software for smart orchid farming
Orchid smart farming is controlled by a software developed from Blynk [21] application. It can be configured in two modes: the automatic and manual mode. According to the manual mode, orchid farmers can command the system via a smartphone by themselves. Another mode can operate automatically by itself. The sample interfaces of Blynk represent in Figure 13. For example, Figure 13 (a) displays the information in the Guage style, the operation buttons of various devices are shown in Figure 13(b) and Figure 13(c) shows usage statistics in the graph style.
5.3 Orchid Chat Bot hardware and software
The hardware and software on the chatbot side consist of the Linux operating system running on the Raspberry PI, Python 3.7, Blynk libraries for Python and ChatterBot for Python as illustrated in Figure 9 (A). The OrchidChatBot algorithm is explained in Algorithm 1.
Figure 13: Blynk software for controlling the orchid farming
6. The experimental results
The results of the system evaluation are divided into three parts:
6.1 Results of system control via a mobile
Controlling smart orchid farming via mobile phones has been tested against 30 users. The results from the following tests shown in Table 9. Overall, the control system developed from Blynk has an average above 4.5 almost every item because the interfaces are developed to be exciting and easy to use.
Table 9: Satisfaction evaluation of users
Topic of evaluation |
Satisfaction value (x¯) |
System design satisfaction | |
1. Interesting system | 4.8 |
2. Modernization of the system | 4.7 |
3. Easy to use and easy to understand | 4.9 |
4. System simulation is appropriate | 4.4 |
Satisfaction in using the system | |
1. Accuracy of the system | 4.7 |
2. Appropriate to needs of users | 4.6 |
6.2 Results of orchids planting inside the smart farming
The orchid farm is tested for a total of eight weeks from April to May 2018. We evaluate the growth of the inflorescence length of the orchids inside the farm every day. At night, the lighting system stops working to allow the orchids to get rid of the carbon dioxide. The growth statistics obtained from the experiments are shown in Figure 14. According to the line chart, the growth rate of the inflorescence length under a traditional farm is not stable because orchids proliferate during the rainy season. The length of the inflorescence increases by an average of 34.3 centimeters (cm.) within ten weeks. In contrast, orchids are grown under an automatic smart farm; the growth rate is relatively constant at about 27.38 cm. only. Although in the overall, the growth rate of orchids inflorescence length raised in a traditional farm is higher than automated smart farm, the steady growth rate inside an automated smart farming can control the yield of orchids better than in practice. Since farmers can evaluate the production of orchids more precisely.
Figure 14: Comparison of the growth rate of the orchids inside the traditional farm against an automated smart farming
6.3 Results of chatting between orchids and our chatbot
The conversation between the orchids and chatbot is carried out through the command-line interface of Python shell, shown in Figure 15. Messages used to chat are related to the health of the orchids based on the information that the sensors can detect. Examples of questions and possible answers used in this research listed in Table 10.
The conversation is evaluated using the dialogue specification [24] and harmonic mean in the equation (7, 8). The average accuracy (Harmonic mean) of chatting between the user and the orchid is equal to 0.71, the precision = 0.75 and recall = 0.6 respectively.
7. Conclusion and future work
In this paper, we propose a chatbot which is used to chat with orchids planting inside the automated smart farming controlled by IoT and Fuzzy Logic, namely OrchidChatBot. The results of the system testing are divided into three parts: the average satisfaction of users using the mobile application to control an automated smart farming is equal to 4.68, the average growth rate of orchid inflorescence cultivated in the smart farm is 27.38 cm., and the average accuracy of the conversation between the chatbot and orchids are 0.71 (harmonic mean), 0.75 (precision) and 0.6 (recall) respectively. Besides, the significant advantages of automatic smart farming are reducing fertilizer, water, chemicals, insects, and yield control.
Figure 15: Chatting between Orchids and the chatbot by the command- line interface
Table 10: Examples of questions and possible answers
Question | Possible answers |
How are you? |
I am feeling cold. I am feeling warm. I’m feeling hot. I am feeling dry. I am feeling cool, being good. I am feeling wet. I am feeling that my roots are dry. I feel that my roots are fine. I feel that my roots are too wet. |
Can I help you? |
Yes, I want the warm weather. No, it is already warm. Yes, I want you to fog to reduce my heat. Yes, I want more heat. No, I am already invigorating. Yes, I want a blanket to increase warmth. |
How do you feel now? |
I feel that I’m going to be cold. I feel that I’m very comfortable. I feel that the weather is getting hotter. |
Do you need more? |
Yes, I want more sunlight. No, I do not more. Yes, I want to reduce the sunshine. |
… | … |
Are you hot? |
No, I am so happy. Yes, I am very hot. No, I am not hot, it is quite cool. No, I am so so. |
Moreover, chatting with orchids will help farmers to recognize the health of orchids, and to resolve problems that will occur with orchids more accurately.
In the future, we will enhance the conversation between the chatbot and orchids by using voice instead the command-line interface.
- Anindita Roy Chowdhury and Anshu Gupta, “Effect of Music on Plants – An Overview” International Journal of Integrative Sciences,Innovation and Technology (IJIIT)., 4(6), 30 – 34, 2015.
- Munasinghe, D. S. P, Weerakoon, S. R, Somaratne, S, “The ef- fect of Buddhist pirith chanting and Western pop music on growth performance of “Pranajeewa”, Codariocalyx motorius (Houtt.) H. Ohashi” Ceylon Journal of Science, 47(4), 357–361 2018, DOI: http://doi.org/10.4038/cjs.v47i4.7553
- F. H. Zakariya, M. Rivai and N. Aini, “Effect of automatic plant acoustic frequency technology (PAFT) on mustard pakcoy (Bras- sica rapa var. parachinensis) plant using temperature and humidity parameters,” 2017 International Seminar on Intelligent Technology and Its Applications (ISITIA), Surabaya, 2017, pp. 334-339. doi: 10.1109/ISITIA.2017.8124105
- C. J. Baby, F. A. Khan and J. N. Swathi, “Home automation using IoT and a chatbot using natural language processing,” 2017 Innova- tions in Power and Advanced Computing Technologies (i-PACT),
Vellore, 2017, pp. 1-6. doi: 10.1109/IPACT.2017.8245185 - M. Muslih et al., “Developing Smart Workspace Based IOT with Ar- tificial Intelligence Using Telegram Chatbot,” 2018 International Con- ference on Computing, Engineering, and Design (ICCED), Bangkok,
Thailand, 2018, pp. 230-234. doi: 10.1109/ICCED.2018.00052 - R. Angeline, T. Gaurav, P. Rampuriya and S. Dey, “Supermarket Automation with Chatbot and Face Recognition Using IoT and AI,” 2018 3rd International Conference on Communication and Electron- ics Systems (ICCES), Coimbatore, India, 2018, pp. 1183-1186. doi: 10.1109/CESYS.2018.8723978
- B. Kohli, T. Choudhury, S. Sharma and P. Kumar, “A Platform for Human-Chatbot Interaction Using Python,” 2018 Second Inter- national Conference on Green Computing and Internet of Things (ICGCIoT), Bangalore, India, 2018, pp. 439-444. doi: 10.1109/ICG-
CIoT.2018.8753031 - C. E. Kaed, A. Ponnouradjane and D. Shah, “A Semantic Based Multi-Platform IoT Integration Approach from Sensors to Chatbots,” 2018 Global Internet of Things Summit (GIoTS), Bilbao, 2018, pp. 1-6. doi: 10.1109/GIOTS.2018.8534520
- S. Khummanee, S. Wiangsamut, P. Sorntepa and C. Jaiboon, “Au- tomated Smart Farming for Orchids with the Internet of Things and Fuzzy Logic,” 2018 International Conference on Information Technology (InCIT), Khon Kaen, 2018, pp. 1-6. doi: 10.23919/IN-
CIT.2018.8584881 - Chamovitz, D., What a Plant Knows: A Field Guide to the Senses, Scientific American, 2013.
- A. Saokaew, O. Chieochan and E. Boonchieng, “A smart photo- voltaic system with Internet of Thing: A case study of the smart agricultural greenhouse,” 2018 10th International Conference on Knowledge and Smart Technology (KST), Chiang Mai, 2018, pp. 225-230. doi: 10.1109/KST.2018.8426071
- F. A. Rafi, A. Kowanda, N. S. Salahuddin and T. Saptriani, “Design of Orchid Monitoring System Based on IoT,” 2018 Third Interna- tional Conference on Informatics and Computing (ICIC), Palembang, Indonesia, 2018, pp. 1-6. doi: 10.1109/IAC.2018.8780419
- N. Boonnam, J. Pitakphongmetha, S. Kajornkasirat, T. Horanont,
D. Somkiadcharoen, J. Prapakornpilai, “Optimal Plant Growth in Smart Farm Hydroponics System using the Integration of Wireless Sensor Networks into Internet of Things”, Advances in Science, Tech- nology and Engineering Systems Journal, vol. 2, no. 3, pp. 1006-1012 (2017). - A. Kamilaris, F. Gao, F. X. Prenafeta-Boldu and M. I. Ali, “Agri- IoT: A semantic framework for Internet of Things-enabled smart farming applications,” 2016 IEEE 3rd World Forum on Internet of Things (WF-IoT), Reston, VA, 2016, pp. 442-447. doi: 10.1109/WF-
IoT.2016.7845467 - M. H. Memon, W. Kumar, A. Memon, B. S. Chowdhry, M. Aamir and P. Kumar, “Internet of Things (IoT) enabled smart animal farm,” 2016 3rd International Conference on Computing for Sus- tainable Global Development (INDIACom), New Delhi, 2016, pp. 2067-2072.
- R. C. Andrew, R. Malekian and D. C. Bogatinoska, “IoT solu- tions for precision agriculture,” 2018 41st International Conven- tion on Information and Communication Technology, Electronics and Microelectronics (MIPRO), Opatija, 2018, pp. 0345-0349. doi: 10.23919/MIPRO.2018.8400066
- N. Putjaika, S. Phusae, A. Chen-Im, P. Phunchongharn and K. Akkarajitsakul, “A control system in an intelligent farming by using arduino technology,” 2016 Fifth ICT International Student Project Conference (ICT-ISPC), Nakhon Pathom, 2016, pp. 53-56. doi: 10.1109/ICT-ISPC.2016.7519234
- Suakanto, V. J. L. Engel, M. Hutagalung and D. Angela, “Sensor networks data acquisition and task management for decision support of smart farming,” 2016 International Conference on Information Technology Systems and Innovation (ICITSI), Bandung, 2016, pp. 1-5. doi: 10.1109/ICITSI.2016.7858233
- Melin P., Castillo O., Kacprzyk J., Reformat M., Melek W., Fuzzy Logic in Intelligent System Design, Springer International Publishing, 2018.
- Sudhir K. Mishra, Artificial Intelligence and Natural Language Processing, Cambridge Scholars Publisher, 2018.
- Blynk. (2018, 12 Oct). The mobile app for the IOT. [Online]. Avail- able: https://www.blynk.cc/
- ChatterBot. (2019, 10 Aug). How ChatterBot Works. [Online]. Avail- able: https://chatterbot.readthedocs.io/en/stable/
- Python client for Blynk. (2019, 10 Aug). Blynk library for Python 2, Python 3, and MicroPython. [Online]. Available: https://github.com/vshymanskyy/blynk-library-python
- S. Ghose and J. J. Barua, “Toward the implementation of a topic specific dialogue based natural language chatbot as an un- dergraduate advisor,” 2013 International Conference on Informat- and Vision (ICIEV), Dhaka, 2013, pp. 1-5. doi:
09/ICIEV.2013.6572650