First of all, the overall circuit is actually composed of an ESP8266 module + a 4-way relay module, but I combined them together.
So the circuit principle is actually very simple. Everyone should be familiar with the relay module. The relay used here is a 3.3v relay, and the low level is pull-in. In fact, you can also use a 5v relay, and a 3.3V signal can also control the relay to close. The rest of the protection circuit and drive circuit are designed according to the relay module.
Then there is the ESP8266 module. It is actually very easy to get started if you are new to this module. After all, it is an open source. You can find a lot of learning materials online. Here I will mainly explain some issues to pay attention to when downloading. The following is what I found online. A GPIO port status problem.

Pay attention to the problem of GPIO0 here. GPIO0 is low level when downloading and high level when running. Here I used a triode to make an automatic switch. It is low level when downloading and high level when running. The second is reset, the principle is the same as the GPIO port.
A switch control is added to allow manual control of the relay when there is no wifi.
Program part: The program is written using arduino. Here are the main points to note:
Because it was originally designed to achieve network control, Xiao Ai can do it, but Xiao Ai is mainly controlled based on voice, so I also added a mobile phone for network control. Yes, it is Dian Deng Technology. Dian Deng Technology can be directly linked to Xiao Ai, so voice commands and your manual control can be synchronized.
The secret key to this place is in Lighting Technology, and there will be tutorials later here.
"" inside is the value of the button to be set. This can be set casually. There are 5 set in the program. The 4 buttons correspond to 4 relays respectively. There is also a master switch that can turn off all relays.
Software that needs to be downloaded: Xiaoai Speaker, Lighting Technology, Mijia APP.

This is currently the first generation. Some layout and circuits will be optimized later. Is this the first time to upload a relatively complete project? If there are any errors, please point them out. Come on, thank you.