Design and Development of Smart Aquaculture System Based on IFTTT Model and Cloud Integration

,


Introduction
Aquaculture is one of the vital factors to support the food needs of the world community, especially in developing countries.The total world fish production, aquaculture production accounted for 40.1 % that is 88.5 % of the world aquaculture production is contributed by Asia.Indonesia is in the 4 th position of the top 20 producers in 2011 [1].The Aquaculture land in Indonesia is about 17 300 km 2 , and the utilization is only about 1 200 km 2 [2].Utilization rate is still far from potential utilization.In the aquaculture cultivation process, water quality is crucial to the success of cultivation.Water quality monitoring can be measured by various variables including physical, chemical and biological aspects.
There are four essential water parameters for aquaculture, those are dissolved oxygen (DO), salinity, water temperature and hydrogen potential (pH).The ideal content for those parameters varies depending on the type of aquaculture and fish species that are the object of cultivation.The priority of those parameters is also different, where the dissolved oxygen (DO) is the highest priority for aquaculture that determines the growth of the fish.Increasing water temperatures can also cause the DO content to decrease as it is unable to hold O 2 [3].However, if dissolved oxygen (DO) is too high it will cause a gas bubble disease that can kill fish.If too low, cause fish easily infected with bacteria.The Ambient temperature also affects the daily fluctuations of dissolved oxygen.The dissolved oxygen is able to be less than 3 mg L -1 in the morning and more than 15 mg L -1 in the afternoon [4].The content of dissolved oxygen must be maintained and stable to support the success of aquaculture.In addition, neutral water also makes aquaculture more productive [5].By increasing the dissolved oxygen content by using the aerator in water.It can purify water by absorbing pollutants, thus keeping the acidity of water in a neutral condition [6] which is necessary for increasing aquaculture productivity.Some of the water quality monitoring systems have been conducted before [7].And there is still no research on cloud system architecture with the If This Then That (IFTTT) [8] model and integrate with smart aerator dynamically for aquaculture.This paper proposes the idea of a real-time monitoring system of aquaculture that integrated with smart aerator using IFTTT rule based on the cloud system.This system is used by traditional farmer, who does not have ability for computer programming.IFTTT helps farmer to customize the aerator system.With IFTTT, the user can set time of working aerator based on his own needs for his pond condition dynamically.The sensors data will be sent to cloud system to be analyzed and processed before published to the client devices.
A further explanation of this paper will be explained as follows.Reviews for previous works from other researchers that have been conducted explained in Section 2. Section 3 presents the detail of our system design including smart sensor module, smart aeration system, local network system and cloud computing system.The result of the experimental implementation of our work will be presented in Section 4. Section 5 presents conclusion and suggest the future work that is able to be conducted for extensions.

Related works
Some works of IoT smart system has been developed various kinds of technology, protocol system and real-time system.This section will describe some works of popular approaches to design a smart system of Internet of Things.One application of IoT technology for broad field implementation has been done by the Italian researcher.A smart city application in the City of Padova, Italy.The application is an example of the application of a relative IoT paradigm to smart cities.The main objective of Padova Smart City is to implement open public data and provide ICT solutions for public administration.The built system works by collecting environmental data and monitoring public street illumination with various types of sensors using wireless nodes.Placement is done on street light poles and connected to the internet in real-time.In such an application, the HTTP protocol is used for communication.There are two developed, mobile and web platforms.Implementation of proxy protocols is also set up to facilitate monitoring of the network coming to IoT devices [9].
An IoT implementation has also been conducted in the fish farming sector, not just for applying in the city.In this paper [10], an IoT intelligent system for fish farming was designed using four sensors, water temperature, pH, dissolved oxygen, and water level.The MSP430 series chip was used In this system.It worked for processing of each sensing node of the core.For communication interface, ZigBee wireless sensing network interface with low-power digital radios was used.In this research, they also used four control devices, RGB light, heaters, inflator, and feeder.By using ZigBee wireless transmission, the power consumption was very significant low.The central system comes with a WIFI transmission module that is able to be used with Android mobile devices that connect directly to enhance overall system timeliness and convenience.
The result of research for big data architecture at under water for water quality monitoring has also been done in several pieces of research [11][12][13].A coral monitoring system was created by having four major subsystems.Those are the underwater camera to take a picture of coral, buoy mechanics, a control unit for running image capture program and the communication unit.By using coaxial cable, signal loss problem on underwater WIFI Camera can also be resolved.For big data analytics, the comparison between Hadoop MapReduce and RDBMS is also conducted.With the use of Hadoop MapReduce proven to provide faster query time than MySQL.In addition, Hadoop distributed server also provides high scale data processing, capable to process unstructured data and high availability as well.
Another point of concern in implementation of IoT technology is a matter of protocol.A study of protocol comparisons has been performed [14].The rapid development of internet technology must be followed by a reliable and energy-efficient communication protocol.In this study, they tested several Internet protocols on various issues, including Constrained Access Protocol (CoAP), Telemetry Transport Message Queue (MQTT) and MQTT-SN (for sensor networks).The experiment was conducted by applying KP-ABE and CP-ABE cryptography algorithms.They also described the security resilience of the schemes they posed under various attacks.In their study also showed that MQTT protocol is very good and suitable for IoT implementation.
A work on the IFTTT model system has been performed [15].The work presented the development of a software framework for home automation systems based on the modified concept of the popular web service IFTTT.This framework consists of two software systems: A stack of software at home automation gates and web applications as a cloud service.The service handles two main functions: An API bridge for web/social network services and automated scripting repository.The simplified core scripts were integrated by the stacked software, a group of trigger and action scripts, and the features that provided by software applications.The main advantage of the framework itself is its simplified design while keeping usability and feasibility.Using IFTTT, the custom triggers can be defined to execute custom actions.From this study, we adopt the IFTTT concept and build on the architecture of IoT in aquaculture.Figure 1 shows the overall system architecture overview of smart aquaculture monitoring and controlling system based on IFTTT Model.The main processing unit uses NodeMCU v3 as the microcontroller which already has the embedded wifi module.The main processor unit NodeMCU v3 collects experimental data from each sensor.The read data from all sensors will be sent using MQTT protocol to the cloud server to be analyzed before visualized it to the client devices.

Smart sensor module
Smart sensor module is a circuit consisting of water sensors, NodeMCU v3, and battery 12 V in order to read the environment data of water condition (Figure 2).The sensor data sent by NodeMCU v3 which already has wifi embedded module via MQTT protocol to the cloud server.

Smart aeration system
Smart aerator is modified diesel machine that gets addition of propeller, motor, battery 12 V, relay and NodeMCU v3 (Figure 3).The motor works to make aerator can be controlled by the microcontroller.There are two relays in smart aeration system.The first relay is connected to the motor.The relay works for turning on or off the motor.The motor works to trigger the diesel machine to be turned on.The second relay is connected to the diesel machine which is working for turning on or off the diesel machine especially for turning off it.

Local network system
Local network system consist of router, modem and battery 12 V (Figure 4) which worked for sending and receiving data packets either from sensors to cloud server or from cloud server to smart aerator using MQTT protocol.MQTT allows devices to send (publish) information about a given topic to a server that functions as an MQTT message broker.The broker then pushes the information out to those clients that have previously subscribed to the client's topic.

Cloud computing system
In cloud computing system, we used Debian GNU/Linux with several applications installed, Mosca MQTT broker, Express JS and MongoDB.We designed a client model system separately either for web or android development.In server side, Express JS framework of Node Js was implemented for creating server application.The Express JS works for handling the RESTful API which is consumed by client devices either web or Android.

Fig. 5. Flow of IFTTT model.
IFTTT rule processing is conducted in server side (Figure 5).IFTTT is containing a set of rules that are set by the user to integrate sensor system with the aerator.IFTTT is divided into two states, IF THIS and THEN THAT.In IF THIS state, the user input the sensors condition which includes three parameters, undervalue, overvalue and time.In THEN THAT state, the user input the actions that will be executed if IF THIS rule is true.There are three parameters in THEN THAT, aerator ID, period and over value.

Client visualization data
The data published by Mosca MQTT broker is read by three clients, smart aeration system, web application and Android application (Figure 6).In web applications, Angular 4 framework is used for developing the web.It is also installed MQTT client in it in order to read data by subscribing to the certain topic or send data by publishing to the certain topic.The application has some features to optimize and support the aquaculture process, real-time statistic data, multi node supported, expandable sensors, smart control aerator and IFTTT rules.

Results and discussion
In this part, we present implementation of the development software and hardware and the results of the experiments performed as well (Figure 7).This test showed how the user can set rules of IFTTT depends on his own needs of his pond condition dynamically.This test also displayed the result of the graphics rate for dissolved oxygen (DO), potential of hydrogen (PH) and water temperature.

Web-based application
Figure 8 is an application screenshot of web-based on the IFTTT view.The web-based application itself has seven main features.They consisted of statistics data, node dashboard, device, schedules system, IFTTT rules, user management and application setting.Statistics data provided the detail of the whole system that user has, such as node location detail, number of sensors and nodes that user have, number of schedules and IFTTT rules that user set.Schedules system provided a service for setting the schedule of working time of the aerator and the sensors.The sensors real-time data were showed on the detail of node dashboard.The sensors were composed of dissolved oxygen, potential of hydrogen, water temperature and ultrasonic sensor.

Android-based application
Beside web-based platform, Android-based platform for the system also provided.Figure 9 is an application screenshot of android-based on the node dashboard view.In user management feature, the user can add the other user that under his authority as well.The detail of devices that user have and set was showed in device feature.There two types of devices, sensor device, and smart aerator device.In Device feature, the user also can add the new device by inputting the unique ID of the device.

The graphics rate of sensors with IFTTT implementation
The following are the results of the performance testing of using IFTTT model for aquaculture monitoring system that integrates with the smart aerator.  1 shows the specification of our working for two experiments.For the first experiment, we just set up for only dissolved oxygen parameter in IF THIS state.And for THEN THAT state, the aerator would be enabled automatically when the condition of dissolved oxygen was below 5 mg L -1 .Due to we did not set the period of working aerator, the aerator would be automatically off when the dissolved oxygen value had been reached more than 10 mg L -1 .Figure 10 shows that when the rate of the dissolved oxygen was under 5 mg L -1 which is the IF THIS state was true, needs to execute the THEN THAT actions.The dissolved oxygen rate value shows the increased data for along 1 199 961 ms or around 33 min because of aeration process.Potential of hydrogen has also been increased when the aeration process was working as shown in Figure 11.Aeration process started with the value of pH was 7 and increase while the aerator worked and stopped in 7.6.In the second experiment, the IF THIS state was set with two parameters of the sensor with the same THEN THAT actions like the first experiment.The first sensor parameter was dissolved oxygen.Figure 13 shows that rate value of dissolved oxygen was increased when aeration process was conducted.The second sensor parameter that used for IF THIS state in the second experiment was potential of Hydrogen (Figure 14).The THEN THAT actions are set with the value of pH was under 6.But it would not automatically enable aerator if the value of dissolved oxygen was not under 5 mg L -1 .Figure 15 shows the graphic rate of water temperature when the aeration process was conducted.The temperature was constantly increased either before the aeration or while aeration process.After the aeration process the water temperature became constant for few minutes.

The latency time between the occurrence of the event of IFTTT trigger and the starting of the smart aerator
Various experiments have been conducted to measure the latency time between the occurrence of the event of IFTTT trigger and the starting of the smart aerator.Figure 16 shows the result for latency time with an average value of 159 ms.From the results obtained that with only 0.15 s the aerator can work automatically if the water condition is not ideal.So it can be concluded that with these results water conditions can increase rapidly and prevent water from becoming unhealthy.

Conclusions
This paper propose an Internet of Things (IoT) to environment conditions monitoring for aquaculture that integrates with the smart aerator using IFTTT model.In the proposed system, the authors use sensor water temperature, dissolved oxygen (DO), potential of Hydrogen (pH) and water level for node sensors and the smart aerator for the control device.Based on the experiment results, IFTTT model makes the aquaculture monitoring system more customizable, expandable and dynamic.By using IFTTT, the user is able to set the ideal condition of water for his pond in any kinds of aquaculture based on its needs through the web or Android application.In the future, the authors want to extend the device functionality, add solar panel resource to lengthen the life of battery resource, integrate with different big data architecture and develop chat bot for the interactive monitoring and controlling system.

Fig. 3 .
Fig. 3.Control device as part of smart aeration system.

Fig. 4 .
Fig. 4. Router and 4G modem as part of local network system.

Fig. 8 .
Fig. 8. Web-based platform shows the view of IFTTT service.

Fig. 9 .
Fig. 9. Android-based platform shows the view of node dashboard.

Figure 12
Figure12displaying the rate of temperature in first experiment.The value of the water temperature was constantly increased before and after aeration process.The THEN THAT actions started when the value of water temperature was 27.5 and got stopped in 28.5.

Fig. 16 .
Fig. 16.Latency time between trigger of IFTTT and starting of aerator.