1. Trang chủ
  2. » Luận Văn - Báo Cáo

Hệ thống điều khiển trực tuyến cho bể thủy sinh

99 1 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 99
Dung lượng 3,58 MB

Nội dung

The thesis Online monitoring system for aquariums will focus on creating the application layer for the IoT system. The application layer consists of a selfdeveloped IoT Platform and a mobile application. The IoT Platform is designed for general IoT device management and data collection, whereas the mobile application is tailormade to enable users to interact with their aquarium hardware.

VIETNAM NATIONAL UNIVERSITY, HANOI UNIVERSITY OF ENGINEERING AND TECHNOLOGY Nguyen Thanh Cong ONLINE MONITORING SYSTEM FOR AQUARIUMS (HỆ THỐNG ĐIỀU KHIỂN TRỰC TUYẾN CHO BỂ THỦY SINH) UNDERGRADUATE THESIS FOR CLC TT23 PROGRAM Major: Electrical and Telecommunication Engineering HA NOI – 2023 VIETNAM NATIONAL UNIVERSITY, HANOI UNIVERSITY OF ENGINEERING AND TECHNOLOGY Nguyen Thanh Cong ONLINE MONITORING SYSTEM FOR AQUARIUMS (HỆ THỐNG ĐIỀU KHIỂN TRỰC TUYẾN CHO BỂ THỦY SINH) UNDERGRADUATE THESIS FOR CLC TT23 PROGRAM Major: Electrical and Telecommunication Engineering Supervisor: Dr Nguyen Ngoc An HA NOI - 2023 Abstract Abstract: Over a prolonged period, aquariums have maintained their position as a popular decoration in numerous households and spaces However, ensuring the aquatic species’ health and maintaining the aquarium’s best ecological condition might be tedious and time-consuming tasks for owners Especially in the busy world nowadays, not many people have time to monitor and take care of their aquariums This raises the need for a new system that can support owners in monitoring and taking care of the health of those aquatic species However, there are limited products that support that in the Vietnamese market As a result, an IoT system to solve these difficulties is meaningful from a market perspective In this scenario, our IoT system provides users with the ability to monitor critical environmental parameters that are essential for maintaining the fish's health The system measures parameters such as water temperature, pH levels, and TDS levels and allows users to regulate the water temperature Moreover, by gathering data from the aquarium hardware, the IoT system generates valuable recommendations regarding the optimal environmental conditions for the fish The thesis "Online monitoring system for aquariums" will focus on creating the application layer for the IoT system The application layer consists of a self-developed IoT Platform and a mobile application The IoT Platform is designed for general IoT device management and data collection, whereas the mobile application is tailor-made to enable users to interact with their aquarium hardware Keywords: IoT system, IoT application, monitoring system, aquarium Promise I commit that the thesis “Online monitoring system for aquariums” is a research work I carried out and has not been used for any academic or educational purpose at any university or institution The contents and results presented in this thesis are truthful, accurate, and obtained through practical experience, with full references to all cited sources I take full responsibility for this commitment Ha Noi, May 5th, 2023 Student, Nguyen Thanh Cong Dedication First of all, I would like to express my sincere gratitude to Dr Nguyen Ngoc An for his dedicated guidance, instruction, and motivation, which have directed me throughout the process of conducting this thesis His standard of professionalism and ethical conduct has been a source of inspiration for me to emulate, ultimately leading to the completion of this project I would also like to thank Mr Nguyen Thanh Dat (K63R) and Mr Le Duc (K65DACLC) for collaborating with me on this project Nguyen Thanh Dat and Le Duc built and installed the hardware of the smart aquarium that my software integrates with Lastly, I would like to extend my most profound appreciation to my family, my friends in myLab laboratory, as well as teachers at the Faculty of Electronics and Telecommunications at the University of Engineering and Technology - Vietnam National University, Hanoi, for creating the best possible conditions for me to focus on completing this thesis Although I have made every effort, the thesis may still have some shortcomings, and I would appreciate any feedback from my advisors and colleagues to improve it Contents Contents List of figures List of tables 11 List of abbreviations 13 Chapter 1: Introduction 14 1.1 Background 14 1.2 The aquarium hardware monitoring system’s hardware 15 1.3 Thesis contents 16 Chapter 2: The architectural design and primary use cases of the IoT application system 17 2.1 Identifying actors 17 2.2 Specification requirements 17 2.2.1 Functional requirements 17 2.2.2 Non-functional requirements 18 2.3 The overall design of the system 18 2.4 Use case diagram for each component 20 2.5 Primary use case of the system 22 2.5.1 Monitor the aquarium environment 23 2.5.2 Customizing the control settings of the aquarium 25 2.5.3 Provide analysis suggestions for the aquarium environment 27 Chapter 3: The applications on the web server 29 3.1 The IoT Platform 29 3.1.1 Preparation for the hosting environment 29 3.1.2 The architecture of the IoT Platform 30 3.1.3 Models 32 3.1.4 Views 35 3.1.5 Controllers 38 3.2 Ideal Fish Environment Application 42 3.2.1 Models 42 3.2.3 Views 45 3.2.2 API Controllers 45 Chapter 4: The mobile application 48 4.1 Reasons for choosing Android as the platform for development 48 4.2 The architecture of the mobile application 48 4.3 Models 49 4.4 Activities 50 4.4.1 Main Activity 50 4.4.2 Fish Selection Activity 56 4.5 Services 58 4.5.1 Rest API Client Service 58 4.5.2 Bluetooth Service 60 Chapter 5: Evaluation criteria and quality analyses 61 3.1 Evaluation criteria 61 3.2 Functional suitability quality analysis 61 3.2.1 Functional completeness 62 3.2.2 Functional correctness 62 3.2.2 Performance efficiency 64 3.2.2.1 Time behavior 65 3.2.2.2 Resource utilization 67 3.2.2.3 Capacity 68 3.2.3 Reliability 68 3.2.4 Portability 69 3.2.4.1 Adaptability 69 3.2.4.2 Installability 70 Chapter 6: Conclusions 71 References 72 Appendix 73 Use cases of the IoT Platform for developers 73 Register 73 Login 74 Create new device 74 Get device details 75 Update device details 76 Delete device 77 Show all devices of a developer 78 Delete sent data of a device 78 Monitor sent data of a device 79 Use cases of the IoT Platform for other web-based applications 80 Get sensor data from a device 80 Get device details 81 Update device details 82 Use cases of the IoT Platform for the IoT devices 83 Send data to the IoT Platform 83 Send keep connection message 84 Get device details 85 Use cases of the Ideal Fish Environment Application for the mobile application 85 Get an aquarium by name 85 Create new aquarium 86 Get all fish types and their ideal environment parameters 87 Get the fish types that inhabit an aquarium 88 Update the fish types that inhabit an aquarium 89 Use cases of the mobile application for the end-users 90 Show the list of Bluetooth-connected devices 90 Show aquarium details 91 WiFi setup for the aquarium 92 Monitor the aquarium environment 93 Customizing the control settings of the aquarium 93 Show the list of fish 93 Select the types of fish that inhabit the aquarium 94 Provide analysis suggestions for the aquarium environment 95 List of figures Figure 1: A mini koi fish pond 14 Figure 2: The minimum representation of the aquarium hardware 15 Figure 3: The overall design of the system 19 Figure 4: The IoT Platform use cases for developers 20 Figure 5: Use cases of the IoT Platform for other web-based applications 21 Figure 6: IoT Platform use cases for IoT devices 21 Figure 7: Mobile application use cases for end-users 22 Figure 8: Monitor the aquarium environment use case 23 Figure 9: Customizing the control settings of the aquarium use case 25 Figure 10: Provide analysis suggestions for the aquarium environment use case 27 Figure 11: Applications for hosting environments 29 Figure 12: IoT Platform UI 30 Figure 13: The IoT Platform’s architecture 31 Figure 14: IoT Platform Models 32 Figure 15: Device model in JSON format 35 Figure 16: Sensor data model in JSON Format 35 Figure 17: Device management UI 36 Figure 18: Device’s details UI 36 Figure 19: Create a new device UI 36 Figure 20: Edit device information UI 37 Figure 21: Edit device twin UI 37 Figure 22: Monitor sent data of a device UI 37 Figure 23: Login UI 38 Figure 24: Register UI 38 Figure 25: The Models of Ideal Fish Environment Application 42 Figure 26: Fish ideal environment model in JSON Format 43 Figure 27: List of fishes’ ideal environment in JSON Format 44 Figure 28: Aquarium model in JSON Format 45 Figure 29: Fish data Management view 45 Figure 30: Mobile operation system market share worldwide (by Statcounter) 48 Figure 31: The architecture of the Mobile application 49 Figure 32: “Show the list of Bluetooth-connected devices” use case flow chart 51 Figure 33: User interaction for “Show the list of Bluetooth-connected devices” (1) 51 Figure 34: User interaction for “Show the list of Bluetooth-connected devices” (2) 52 Figure 35: User interaction for “Show aquarium details” use case 53 Figure 36: Widgets in the UI Control fragment 53 Figure 37: User interaction for “WiFi setup for the aquarium” use case 54 Figure 38: User interaction for “Monitor the aquarium environment” use case 55 Figure 39: User interaction for “Customizing the control settings of the aquarium” use case 55 Figure 40: User interaction for “Provide analysis suggestions for the aquarium environment” use case 56 Figure 41: User interaction for “Show the list of fish” use case 57 Figure 42: User interaction for “Select the types of fish that inhabit the aquarium” use case 58 Figure 43: Software product quality attributes (from iso25000.com) 61 Figure 44: Percentage of quality factor coverage in 443 papers (Ashouri et al.) 61 Figure 45: Percentage of success and errors in the “WiFi setup for the aquarium” use case test 64 Figure 46: Percentage of success and errors in the “Monitor the aquarium environment” use case test 64 Figure 47: Resource utilization of the host 68 10 If the device sends another message before the 20 seconds have elapsed, the system responses with a try to again message after the time has elapsed Alternative flows If the device identity is invalid, the system returns an HTTP status code of 404 (Not Found) and an error message in the response body If the device sends an invalid or incomplete request, the system sends an error response to the device (e.g., missing device identity) Exceptions Suppose a technical issue prevents the device from the device connection status In that case, the system returns an HTTP status code of 500 (Internal Server Error) and an error message in the response body Get device details This use case is the “Get device details” use case The device can retrieve its details on the IoT Platform by calling the same API Use cases of the Ideal Fish Environment Application for the mobile application Get an aquarium by name Table 44: “Get an aquarium by name” use case details Use case name Get an aquarium by name Actors Other web-based applications Description The web-based application Environment Application to information by its unique name requests retrieve the an Ideal Fish aquarium’s Pre-conditions The web-based application has access to the Ideal Fish Environment Application and knows the name of the aquarium Post-conditions The other web-based application receives the response containing the information about the requested aquarium, including aquarium identity, name, and description 85 Normal flows The web-based application sends a request to the Ideal Fish Environment Application with the name of the desired aquarium The Ideal Fish Environment Application receives the request and checks the name's validity The Ideal Fish Environment Application retrieves information about the specified aquarium The Ideal Fish Environment Application sends the information back to the web-based application The web-based application receives the information and displays it Alternative flows If the aquarium identity is invalid, the system returns an HTTP status code of 404 (Not Found) and an error message in the response body If the requester sends an invalid or incomplete request, the system sends an error response to the device (e.g., missing aquarium identity or type of fish identity) Exceptions Suppose a technical issue prevents the actor from retrieving the data In that case, the system returns an HTTP status code of 500 (Internal Server Error) and an error message in the response body Create new aquarium Table 45: “Create new aquarium” use case details Use case name Create new aquarium Actors Other web-based applications Description The other web-based applications request the Ideal Fish Environment Application to create a new aquarium with the provided information, including name and description Pre-conditions The web-based application has access to the Ideal Fish Environment Application and knows the ID of the aquarium Post-conditions The Ideal Fish Environment Application creates a new aquarium with the provided information 86 Normal flows The other web-based application sends a request to create a new aquarium, including a name and description The Ideal Fish Environment Application verifies the provided information The Ideal Fish Environment Application creates a new aquarium with the provided information The Ideal Fish Environment Application sends a response to the other web-based application confirming the creation of the new aquarium Alternative flows If the requester sends an invalid or incomplete request, the system sends an error response to the requester (e.g., missing parameters such as name and description) If the aquarium with the requested name already exists, the system sends an error response to the requester Exceptions Suppose a technical issue prevents the actor from creating the data In that case, the system returns an HTTP status code of 500 (Internal Server Error) and an error message in the response body Get all fish types and their ideal environment parameters Table 46: “Get all fish types and their ideal environment parameters” use case details Use case name Get all fish types and their ideal environment parameters Actors Other web-based applications Description The web-based application requests the Ideal Fish Environment Application to retrieve all fish types and their ideal environment parameters Pre-conditions The Ideal Fish Environment Application must be available and accessible to other web-based applications Post-conditions The other web-based application receives the response containing all fish types and their ideal environment parameters, including “temperature,” “pH,” and “TDS.” 87 Normal flow The web-based application sends an HTTPS GET request to the Ideal Fish Environment Application The Ideal Fish Environment Application receives the HTTP request and validates it The Ideal Fish Environment Application retrieves all fish types and their ideal environment parameters from the database The Ideal Fish Environment Application sends the response containing the retrieved data in the response body to the requester Alternative flows If the HTTP request is invalid, the Ideal Fish Environment Application sends an error response to the requester Exceptions Suppose a technical issue prevents the actor from getting the data In that case, the system returns an HTTP status code of 500 (Internal Server Error) and an error message in the response body Get the fish types that inhabit an aquarium Table 47: “Get the fish types that inhabit an aquarium” use cases details Use case name Get the fish types that inhabit an aquarium Actors Other web-based application Description The web-based application receives the list of fish types that inhabit the specified aquarium Pre-conditions The Ideal Fish Environment Application must be available and accessible to other web-based applications Post-conditions The web-based application receives the list of fish types that inhabit the specified aquarium Normal flow The web-based application sends a request to the Ideal Fish Environment Application to get the list of fish types that inhabit a specific aquarium with the aquarium identity 88 The Ideal Fish Environment Application receives the request and validates the request of the web-based application The Ideal Fish Environment Application retrieves the list of fish types that inhabit the specified aquarium from its database The Ideal Fish Environment Application sends the list of fish types to the web-based application The web-based application receives the list of fish types and can use for further processing Alternative flows If the aquarium identity is invalid, the system returns an HTTP status code of 404 (Not Found) and an error message in the response body If the requester sends an invalid or incomplete request, the system sends an error response to the device (e.g., missing aquarium identity) Exceptions Suppose a technical issue prevents the actor from getting the data In that case, the system returns an HTTP status code of 500 (Internal Server Error) and an error message in the response body Update the fish types that inhabit an aquarium Table 48: “Update the fish types that inhabit an aquarium” use case details Uses cases name Update the fish types that inhabit an aquarium Actors Other web-based application Description The web-based application updates the list of fish types that inhabit the specified aquarium Pre-conditions The web-based application has access to the Ideal Fish Environment Application and knows the ID of the aquarium and the list of the type of fish Post-conditions The web-based application updates the list of fish types that inhabit the specified aquarium 89 Normal flow The web-based application requests the Ideal Fish Environment Application to update the fish types list that inhabits a specific aquarium with the aquarium identity and the types of fish identities The Ideal Fish Environment Application receives the request and validates the request of the web-based application The Ideal Fish Environment Application updates the list of fish types that inhabit the specified aquarium on its database The Ideal Fish Environment Application sends the updated list of fish types to the web-based application The web-based application receives the list of fish types and can use for further processing Alternative flows If the aquarium or type of fish identity is invalid, the system returns an HTTP status code of 404 (Not Found) and an error message in the response body If the requester sends an invalid or incomplete request, the system sends an error response to the device (e.g., missing aquarium identity or type of fish identity) Exceptions Suppose a technical issue prevents the actor from updating the data In that case, the system returns an HTTP status code of 500 (Internal Server Error) and an error message in the response body Use cases of the mobile application for the end-users Show the list of Bluetooth-connected devices Table 49: “Show the list of Bluetooth-connected devices” use case details Use case name Show the list of Bluetooth-connected devices Actors End-user Description The end-user can have a list of Bluetooth-connected devices, including their aquariums 90 Pre-conditions The end-user must first grant Bluetooth connection permission to the mobile application and then manually connect the aquarium device through the Bluetooth settings on their Android device Post-conditions The end-user sees a list of their existing Bluetooth-connected devices Normal flow The end-user opens the mobile application The mobile application checks if Bluetooth is on The mobile application checks if the application is granted Bluetooth access permission The mobile application retrieves available Bluetoothconnected devices connected to the user’s mobile phone The mobile application displays a list of available Bluetooth-connected devices in the “Bluetooth devices” UI Alternative flows 2a If the mobile application’s Bluetooth isn’t turned on, the application will show a dialog to notify the user to turn on Bluetooth 3a If the user doesn’t grant the Bluetooth connection permission to the mobile application, there will be a message to ask the user for grant permission 5a No devices will be displayed if no Bluetooth-connected devices are found Exceptions The mobile application displays an error message indicating that the Bluetooth connection cannot be established Show aquarium details Table 50: “Show aquarium details” use case details Use case name Show aquarium details Actors End-users Description End-users can view the details of their aquarium and perform any necessary actions 91 Pre-conditions The end-user selects the aquarium from the Bluetoothconnected devices list Post-conditions The end-user can view the details of their aquarium and perform any necessary actions Normal flow The user navigates to the “Bluetooth devices” UI The user selects the aquarium they want to view The system displays the aquarium details in the “UI Control” UI and starts other related use cases Alternative flows 3a The devices list will be empty if users don’t connect to other Bluetooth devices Exceptions The mobile application displays an error message indicating that any exceptions happened during the use case WiFi setup for the aquarium Table 51: “WiFi setup for the aquarium” use case details Use case name WiFi setup for the aquarium Actors End-users Description The end-user setups a WiFi connection for the aquarium hardware Pre-conditions The end-user has entered the “UI Control” UI, and the mobile device must connect to the aquarium hardware via Bluetooth Post-conditions The aquarium hardware connects to the Internet through WiFi Normal flow The end-user clicks the gear icon, which is on the top right corner of the UI Control The user types the WiFi SSID and password The end-user clicks the “Xác nhận” button The mobile application sends a message to the aquarium hardware with the WiFi SSID and password The aquarium hardware tries to connect to WiFi with the given SSID and password 92 The aquarium hardware responses the connection status back to the mobile application The mobile application displays the connection status to the user Alternative flows 3a The mobile application will display an error message if the smartphone’s connected to the aquarium hardware 5a If the aquarium hardware cannot connect to WiFi because of the incorrect SSID or password, it will send an error message back to the mobile application to display to the user Exceptions Suppose a technical issue prevents the mobile application from showing the list In that case, the mobile application will display an error message and prompt the end-user to try again later Monitor the aquarium environment - The details of this use case are in section 2.5.1 Monitor the aquarium environment Customizing the control settings of the aquarium - The details of this use case are in section 2.5.2 Customizing the control settings of the aquarium Show the list of fish Table 52: “Show the list of fish” use case details Use case name Show the list of fish Actors End-users Description The mobile application shows a list of fish to the user Pre-conditions The end-user has entered the “UI Control” UI, and the mobile device must connect to the Internet Post-conditions The mobile application shows the list of fish types in the aquarium with the selected fish types, which is the “Fish Selection” UI Normal flows The end-user clicks the “Chọn loại cá” button 93 The mobile application retrieves all the fish types from the Ideal Fish Environment Application The mobile application retrieves the aquarium identity from the Ideal Fish Environment Application The mobile application retrieves all the types of fish that inhabit the aquarium from the Ideal Fish Environment Application (This use case requires the aquarium ID) The mobile application displays a list of available fish options, and checkboxes with the previously selected ones are checked Related smaller use Step 2: “Get all fish types and their ideal environment” use cases case Step 3: “Get an aquarium by name” use case Step 4: “Get the fish types that inhabit an aquarium” use case Alternative flows 3a If the aquarium doesn’t exist on the Ideal Fish Environment Application In that case, the mobile application will create a new one with the given Bluetooth device name using the “Create new aquarium” use case Exceptions Suppose a technical issue prevents the mobile application from showing the list In that case, the mobile application will display an error message and prompt the end-user to try again later Select the types of fish that inhabit the aquarium Table 53: “Select the types of fish that inhabit the aquarium” use case details Use case name Select the types of fish that inhabit the aquarium Actors End-users Description The user selects the types of fish that inhabit the aquarium Pre-conditions The end-user has entered the “Select fishes” UI, and the mobile device must connect to the Internet 94 Post-conditions The system has updated the list of fish types in the aquarium with the selected fish types Normal flow The mobile application shows the list of fish The end-user selects the fish types that inhabit the aquarium by checking the corresponding checkboxes The end-user saves the selected fish types by clicking the “Xác nhận” button The mobile application updates the fish types that inhabit the specified aquarium The mobile application displays the user an update successfully message Related smaller use Step 1: “Show the list of fish” use case in “Use cases of the cases Ideal Environment Application.” Steps to 5: “Update the fish types that inhabit an aquarium” use cases in “Use cases of the Ideal Environment Application.” Alternative flows If there is an error during the “Update the fish types that inhabit an aquarium” or “Show the list of fish” use cases, the mobile application will display an error message and prompt the end-user to try again later Exceptions Suppose a technical issue prevents the end-user from updating the information In that case, the mobile application will display an error message and prompt the end-user to try again later Provide analysis suggestions for the aquarium environment The details of this use case are in section 2.5.3 Provide analysis suggestions for the aquarium 95 Online monitoring system for aquariums Undergraduate thesis for regular program Faculty of Electronics and Telecommunications, UET - VNU Nguyen Thanh Cong Chapter 1: Introduction Maintaining aquatic species’ health and ensuring the aquarium’s best ecological conditions can be tedious and time-consuming for many owners, especially in the busy world nowadays Therefore, this raises a need for a new system to assist owners in this problem However, there are limited products that support this in the Vietnamese market To address this issue, an Internet of Things (IoT) system is proposed to monitor critical environmental parameters such as water temperature, pH, and TDS levels and provide optimal environmental condition recommendations This thesis focuses on creating the application layer of the IoT system, consisting of a self-developed IoT Platform and a mobile application for users to interact with their aquarium hardware Chapter 2: The architectural design and primary use cases of the IoT application system smartphone application is responsible for providing a graphical user interface to endusers who use the aquarium hardware and mobile application, allowing them to directly monitor their aquarium’s environment and settings according to their preferences Finally, the Ideal Fish Environment Application acts as a data provider of the ideal environment of the fish, including the minimum and maximum pH, temperature, and TDS for the mobile application to generate suggestions for the enduser Regarding the primary application protocol, although there are many suitable protocols for IoT, for instance, MQTT, CoAp, etc However, HTTP (HTTPS) has been chosen as the primary protocol due to its versatility, maturity, and compatibility with various devices and platforms, making it an inevitable choice [1, 4] Following this, the primary use case of this system is presented to comprehend the understanding of this system Those are illustrated from Fig to Fig The system comprises two primary actors: developers and end-users Developers are responsible for integrating the IoT Platform into their IoT ecosystem, while the end-user interacts with the smart aquarium using the mobile application Fig illustrates the system’s architecture, considering the requirements of each actor In this case, the IoT Platform is the central block for data exchange between the aquarium hardware and the mobile application, while the Figure 1: The overall design of the system thesis being on the former The website of the IoT Platform is aqua-iot.pro, while the other one is aqua-iot.xyz Figure 2: Monitoring the aquarium environment use case Figure 5: IoT Platform website Figure 6: Ideal Fishes Environment website Figure 3: Customizing the control settings of the aquarium Figure 4: Provide analysis suggestions for the aquarium environment Chapter 3: The applications on the web server The web server hosts two main applications: the IoT Platform and the Ideal Fish Environment Application, with the focus of this The architecture of the IoT Platform is illustrated in Fig 7, and both applications have been designed using the Model-ViewController (MVC) architectural pattern The models represent the data, while views are the interfaces that display the data and receive user inputs Controller process input and interact with the models and database, sending updated data to the view for display However, mobile applications and IoT devices cannot interact with views like humans in a web browser As a result, a different type of response data is needed to support these devices and applications, known as JSON documents Essentially, these documents are strings that store information that can be manipulated by the application or IoT devices This data representation serves as the response of the API controller, while the Web controllers act as the views In this system, users have multiple devices, and each device has various sensor data records, all managed by the corresponding controller The web controllers provide device and sensor data management for developers through the interface, whereas the API controllers offer services to IoT devices and web-based applications, such as storing and fetching sensor data and updating device control settings Additionally, the Ideal Fish Environment Application provides information on optimal TDS, pH, and temperature levels based on the type of fish in the aquarium through a web service Its architecture is similar to the IoT Platform, with one view for fish data management (Fig 6) and an API controller offering services to the mobile application for generating insightful suggestions for the enduser user interfaces of the Main activity is shown in Fig Figure 8: The Architecture of the mobile application Figure 7: The Architecture of the IoT Platform Chapter 4: The mobile application The mobile application architecture comprises three components: models, activities, and services, illustrated in Fig The model’s function is similar to that of the MVC architecture, whereas the activity assumes the roles of views and controllers for the user interface The services layer handles the underlying tasks of the application Regarding the activities, The Main activity covers the application’s primary use cases, while the Fish Selection activity enables users to choose the fish in their aquarium One of the Figure 9: The Main activity user interface The Rest API Client Service facilitates communication with web servers, and the Bluetooth Service communicates with the aquarium hardware through Bluetooth The mobile application’s models are sourced directly from web server applications to represent the data from the web server’s response Chapter 5: Evaluation criteria and quality analyses The IoT software development criteria were based on ISO/IEC 25010 standards, but only a few were considered, including functional suitability, performance efficiency, reliability, and portability [2, 3] occurred, they might not recover without intervention In terms of functional suitability, the IoT application system has successfully fulfilled its initial functional requirements However, there is a lack of reports and statistical tools in the system Additionally, it is noted that most of the application’s use cases will always function as expected if the preconditions are met Despite this, there were minor errors in some mobile application use cases Finally, concerning portability, the necessary software for the IoT Platform is cross-platform compatible Still, the Linux environment is optimal due to specific settings, while the mobile application is only compatible with Android version or higher To evaluate the performance efficiency of the IoT Platform, a server load benchmark was conducted with the CPU temperature kept under 50°C, recording the number of connections, requests, response latency, and errors The results in Table indicate that the number of concurrent connections affects the server’s response time as the server’s average response latency increases following the concurrent requests The system’s hardware is another critical factor as it limits its ability to handle more requests, currently limited to around 130 to 150 per second, although there aren’t any settings that restrict this in the application Table 1: Summary of the Benchmark on the IoT Platform Number of connections per worker Total requests Average response latency (s) Average requests handle per second Request errors 100 200 300 4605.4 3964.3 3966.2 0.475 1.211 1.1618 154.546 130.572 30.7 50.7 30.7 1055.2 Reliability is also essential in IoT software development The IoT Platform and the mobile application only halt their operation when they meet fatal errors However, if a critical error Chapter 6: Conclusions In conclusion, this thesis has successfully developed a new application system for smart aquariums, which achieved its initial goal Additionally, the system’s IoT platform can be a valuable educational tool to teach students about IoT and its application Also, it enhances control capabilities, reduces operational costs, and eliminates risks and overheads associated with third-party platforms With its unique features and immense commercial and application potential, this system stands out in the market and offers opportunities for further development in the future References [1] David Hanes, Gonzalo Salgueiro, et al., IoT Fundamentals: Networking Technologies, Protocols, and Use Cases for the Internet of Things, 1st edition, Cisco Press [2] Ashouri, M., Davidsson, P., & Spalazzese, R (2021) Quality attributes in edge computing for the Internet of Things: A systematic mapping study Internet of Things, 13, 100346 [3] ISO/IEC 25010 quality model [4] Bayılmış, C., Ebleme, M A., ầavuolu, ĩ., Kỹỗỹk, K., & Sevin, A (2022) A survey on communication protocols and performance evaluations for Internet of Things Digital Communications and Networks, 8(6), 1094-1104

Ngày đăng: 17/07/2023, 14:06

TÀI LIỆU CÙNG NGƯỜI DÙNG

TÀI LIỆU LIÊN QUAN

w