基于MQTT協(xié)議的智能家居數(shù)據(jù)傳輸系統(tǒng)
打開文本圖片集
摘要:智能家居系統(tǒng)使用STM32單片機(jī)對(duì)SHT20溫濕度模塊和光敏模塊協(xié)議的數(shù)據(jù)進(jìn)行采集、存儲(chǔ),同時(shí)將采集的數(shù)據(jù)通過MQTT傳輸至服務(wù)器[1]。使用QT設(shè)計(jì)的PC端上位機(jī)通過MQTT訪問服務(wù)器,讀取環(huán)境的溫濕度、亮度數(shù)據(jù)并顯示。上位機(jī)也能控制終端的RGB燈、風(fēng)扇等設(shè)備。
關(guān)鍵詞:智能家居;MQTT;數(shù)據(jù)采集;STM32
doi:10.3969/J.ISSN.1672-7274.2023.07.015
中圖分類號(hào):TP 309.7,TU 855 文獻(xiàn)標(biāo)志碼:A 文章編碼:1672-7274(2023)07-00-03
Intelligent Home Data Transmission System Based on MQTT
CHEN Luyao1, LIN Feng1, GUO Qingfeng2
(1. School of Optoelectronics and Communication Engineering, Xiamen Institute of Technology, Xiamen 361000, China; 2. Hennessen (Xiamen) Data Co., Ltd., Xiamen 361000, China)
Abstract: The smart home system uses an STM32 microcontroller to collect and store data from the SHT20 temperature and humidity module and the photosensitive module, while transmitting the collected data to the server through MQTT. The PC terminal host computer designed using QT accesses the server through MQTT, reads and displays ambient temperature, humidity, and brightness data. The upper computer can also control the RGB lights, fans, and other devices of the terminal.
Key words: smart home; MQTT; data collection; STM32
1 研究背景及意義
自智能家居問世以來,人們對(duì)于家居環(huán)境提出了越來越高的要求。(剩余3409字)