Font Size: a A A

Smart Home Monitoring And Linkage System Based On MQTT And ESP-NOW

Posted on:2024-03-09Degree:MasterType:Thesis
Country:ChinaCandidate:Q F WangFull Text:PDF
GTID:2542306926454874Subject:Electronic information
Abstract/Summary:PDF Full Text Request
A smart home system is a home automation system that connects home appliances and devices,and can be controlled and managed through the Internet or home network,and the emergence of smart homes has met people’s demand for high quality home life.In order to effectively cope with the traditional WiFi smart home relies on cloud control and excessive power consumption,a set of smart home monitoring and linkage system based on MQTT and ESP-NOW is designed.The design idea is to domestic Wi-Fi chip ESP32 and ESP8266 as the main control,for the development of IoT nodes,device-side data acquisition nodes,linkage control nodes and smart gateway can communicate wirelessly through ESP-NOW protocol and realize the local linkage of the device,As the hub of the entire system,the smart gateway can send monitoring data to the cloud server through MQTT and receive remote control instructions issued by users.The main work done in this article is as follows:Design and implement ESP-NOW gateway.Aiming at the problem of co-channel inteference between Wi-Fi and ESP-NOW in the 2.4GHZ band and the incompatibility of the message format between MQTT and ESP-NOW,ESP8266 is used as the gateway host controller,Wi-Fi data is processed through channel 11 in Station mode and ESP-NOW data is processed through channel 1 in AP mode,and JSON is used as the intermediate format for data exchange,which realizes the protocol conversion between MQTT and ESP-NOW.A sensor outlier processing algorithm is proposed,which is deployed to the data acquisition node for sensor outlier processing to ensure the reliability of the monitoring data.ESP32 is used as the main controller of the data acquisition node,the outliers are identified by the box plot method,the detected outliers are regarded as missing values,and then the cubic spline interpolation method is used to correct the overall data more reasonably.The combination of cubic spline interpolation and boxplot directly replaces outliers and results in a smoother and more continuous data set,which helps analyze the data more accurately.A low-power optimization strategy is designed and implemented.In actual development,only the smart gateway needs to connect to Wi-Fi,the terminal node is not connected to the Internet,and a low-power wireless LAN is built on the device side through ESP-NOW.The system dynamically adjusts the peripheral bus(APB)frequency and CPU frequency according to the needs of the application,And configure the chip to automatically switch to sleep mode after each data transfer,which can reduce the power consumption of the application as much as possible.The test results show that the system has comprehensive monitoring content,stable performance,voice interaction,remote alarm,weather forecast and other functions,and can realize device linkage without connecting to Wi-Fi,and the proposed outlier value processing algorithm can effectively reduce the waste of system energy consumption caused by sensor outliers,and has certain practical application value.
Keywords/Search Tags:MQTT, ESP-NOW, smart home, protocol conversion, outlier handling
PDF Full Text Request
Related items