The development of Internet of Things technology has profoundly affected people's daily life.In order to improve the safety and convenience of home,the Internet of Things communication and smart home were studied,and a smart home control system based on Message Queuing Telemetry Transport(MQTT)was designed.The design idea is to use the STM32 microcontroller as the core to control a variety of sensors to obtain environmental information data such as temperature,humidity,and smoke in the environment.The ESP8266 is used as the gateway to send relevant data to the cloud platform through the MQTT protocol.With the help of WeChat applets,real-time indoor environment information is displayed,and indoor lights and windows and other furniture and equipment are controlled.The test results show that the design can prevent the occurrence of dangerous situations and meet the basic needs of smart home control.