IoT Prototype (Qt + QML)

IoT prototype is a project which we tried to connect smart home devices through local area network. Each devices may support different commands, we tried to design an admin server with flexibility to recognize the device commands as a plugin instead of predefined classified devices to lower the couplings among devices and server.

IoT Prototype 物聯網雛型是一個嘗試以區域網路的方式串聯智慧家庭的裝置,考慮到不同裝置支援的指令不同,我們希望建立一個管理端的伺服器,但是又不以傳統的分類方式定義裝置。希望將裝置支援的指令作為外掛方式附加在伺服器端,減低伺服器與裝置之間的耦合。

In this project, the server broadcasts signals repeatedly through UDP. Once the device receive the signal and return its info to server. The server then establishes TCP connection and interacts with device such as supported commands, sending or bypassing commands. The data is encoded in json format but also provided DES encryption/decryption with OpenSSL library. This project is mainly developed with Qt and QML.

在這個專案裡,伺服器會一直透過 UDP 的方式廣播訊號,而裝置接收到訊號則回傳相關資訊給伺服器,伺服器再進一步與裝置建立 TCP 連線傳送指令集和其他指令下達與傳遞。資料傳遞是以json格式溝通,也提供了使用OpenSSL將資料使用DES演算法加密。主要以Qt和Qml實作。

We prepared an Arduino YUN with a temperature/humidity sensor and a 3-digit seven segments display. This device provided temperature adjustment and shows the temperature and humidity level on the display. Once the device starts, it will detect the broadcast from server and start to interchange the info. We can set the temperature through server. Besides, the server also provided some commands which allowed interactions among devices through server.

在這個專案裡面我們也使用了 Arduino YUN 搭配溫溼度感測計和三位數七段顯示器,這個裝置本身提供設定溫度的功能並在顯示器上顯示現在的溫溼度。而裝置開啟後伺服器可以馬上偵測到並交換資料,我們即可透過伺服器的操作介面來設定裝置的溫度。此外伺服器也提供一些指令讓裝置跟裝置之間可以透過伺服器互動。

Virtual device using Arduino YUN/使用Arduino製作的虛擬裝置