隨著時間的流逝,物聯網(Internet of Things)已被應用於許多領域。但是,大多數物聯網系統都是針對特定應用而客制化來設計的。例如,我們的實驗室在2019年提出了一種電流監控系統[12],可以用來測量不同地方的迴路電流。如果需要為新應用都需要開發一套物聯網系統,這將會是非常耗時的工作。因此,本論文提出了一種通用型物聯網系統的設計,用以承載我們當前使用的一些感測器,包括溫度感測器、濕度感測器、氣壓感測器、照度感測器、數字電表、PH感測器、ORP感測器、EC感測器等等。基於新設計的數據庫架構,我們處理利用MQTT協定傳送過來的感測數據並將其存儲在相應的資料表中。我們新設計的網頁可以提供使用者介面來顯示各種不同類型的感測器,並可視覺化相對應的歷史數據資料。此外,我們設計了專案的功能,讓使用者可以根據特定目的把不同的異質感測器群組起來,即使它們是連接到不同的控制器上,這個功能讓使用者同時看到有意義的數據曲線,有助於從不同方面解釋數據含義。最後,基於Wifi介面的智慧開關也整合到我們的系統當中,讓使用者能夠觀測並控制遠端連接到某個智慧開關上的任何電器。
Over time, the Internet of Things (IoT) has been applied in many fields. However, most IoT systems are customized for specific applications. For example, a current monitoring system was proposed by our laboratory [12] in 2019 to measure loop currents at different spots. It will be time consuming if one needs to develop an IoT system for a new application. As a result, this thesis proposes the design of a general-purpose IoT system to accommodate sensors we currently use, including temperature sensors, humidity sensors, air-pressure sensors, illumination sensors, digital power meters, PH sensors, ORP sensors, EC sensors, etc. Based on the newly designed database schema, we process the sensed data delivered by the Message Queuing Telemetry Transport (MQTT) protocol and store them in the corresponding database tables. The newly designed web pages can present different types of sensors and visualize the corresponding historical data. The project function is introduced to group interesting heterogeneous sensors according to a specific purpose even when they are attached to different controllers. This helps a lot in interpreting the data meaning from different aspects. Finally, smart switches, based on the Wifi interface, are integrated in our system, allowing a use to remotely control any electrical appliance attached to a smart switch.