基于私有云的智能家居控制系统的设计
2022-07-21王亚东

摘要:在当今社会,随着科技进步,网络的应用已经逐渐进入人们的生活。例如,人们在手机上通过网络进行远距离与跨时间的交流。人们驾驶的汽车也已经可以随时联网导航、播放音乐等。所以,现在的人们对于家居的需求也不仅只在家居本身的舒适度、价格方面。人们更希望在外面也可以对家里的状况进行掌控。于是智能家居的概念出现在了人们的视野之中。智能家居让人们感受到了便利,例如,人们即使不在家里,也可以通过智能家居来进行烧水等活动。本文将对人们在远端控制并了解家居的系统的实现进行说明。智能家居控制系统主要包括用户端、采集端和云端3个方面,其中,云端又包括数据库、MQTT、UDP、HTTP这4个方面。此系统采用Python和Django开发,通过对智能家居控制系统的需求进行分析,对系统功能进行设计,并且用Python语言进行实现。此系统采用Pycharm作为主要的开发工具,后台数据库采用MySQL。
关键词:MQTT协议;Esp8266;物联网技术;Django
Design of Smart Home Control System Based on
Private Cloud
WANG Yadong
(Heilongjiang Institute of Technology, Harbin, Heilongjiang Province, 150001 China)
Abstract:In today's society, with the progress of science and technology, the application of network has gradually entered people's life. For example, people communicate long-distance and cross time through the network on mobile phones. People can play music and car navigation at any time. Therefore, people's demand for home now is not only in the comfort and price of home itself. People prefer to be able to control the situation at home outside. So the concept of smart home appears in people's vision. Smart home makes people feel convenient. For example, people can cook water and other activities through smart home even if they are not at home. This paper will explain the implementation of the system that people control and understand the home remotely. Smart home control system mainly includes three aspects: user end, acquisition end and cloud end. Among them, cloud end also includes four aspects: database, MQTT, UDP and HTTP. The system is developed by Python and Django. Through the analysis of the requirements of the smart home control system, the system functions are designed and implemented in Python language. This system uses pychar as the main development tool, and the background database uses MySQL.
Key Words: Message Queuing Telemetry Transport;ESP8266; Internet of things technology; Django
智能家居已逐漸从实验室进入到了人们的日常生活中。应运而生的智能家居技术也日益成熟。系统分为3个部分用户端、采集端和云端,采用ESP8266作为采集端即智能网关,搭建包含UDP服务器、数据库服务器、MQTT服务器、HTTP服务器的云端私有服务器。让用户通过web端实现数据的显示、查询和阈值配置等动能。
1 常用技术简介
1.1 ESP8266
ESP8266是一款其内部集成了Wi-Fi模块、数据透传以及串口AT指令控制等功能的Wi-Fi解决方案,是一款低成本低功耗串口Wi-Fi模块。在本设计中ESP8266担任智能网关的角色,起到数据采集、接收配置信息、控制继电器等功能。……
