First of all,
I had done the prototype of this project as early as the time when the ESP8266 solicitation was issued. At that time, I felt that there were too many repeated projects, and I didn't publish it because I didn't have any other highlights. Then I picked it up again when I was doing my graduation project, and optimized it again. The shell and PCB were referenced from 520world. Click here to visit the original project. Of course, it would be a bit disappointing if the graduation project only made one socket. The graduation project made a relatively complete home system, with temperature and humidity environmental sensors, power controllers (220VAC, 5VDC) and mini main controllers. The socket this time is the 220VAC in it. Of course, the graduation project did not use remote control, but simply formed an esp8266 local area network, and then the systems cooperated with each other according to UDP. This time I open sourced it because I changed my computer. It would be a pity if this project was saved on my hard drive, so I modified the functions and open sourced it. I'll leave the things here first, and I'll slowly fill in the holes in this article...
Function
introduction Due to limited technology, the socket is not designed with power statistics, only a simple power switch function. The following is
the remote control of the smart socket switch through the Dian Deng Technology App
. Import the Dian Deng Technology device through Mijia, and use Xiao Ai's voice to control the smart socket switch.
Control the smart socket switch through the local button switch.
Instructions for
use First complete the hardware proofing. The thickness of the main control proofing here should be less than 1mm, otherwise it will not fit in. It is recommended to be 0.8mm. Then purchase the socket mold step-down module to complete the physical assembly of the hardware. After installation, don't rush to seal the shell. Burn the program first, and then seal the shell and
burn the software after debugging. This project uses the Arduino IDE So after opening the IDE, you need to modify
the device keys in several parameter codes when opening the project . You need to create a device in the Dian Deng Technology App, and then fill in
the hotspot information in the code with the key for networking after power-on. Generally, you can change it to the parameters of your home router. It doesn’t matter if you don’t change it. You can directly connect to the hotspot of "A_OUTLET" and then jump to the hotspot configuration, which means that it supports smart network distribution. It is recommended not to modify it. It is mainly to prevent you from making mistakes.
The libraries needed in the project are in the attachments. You can compile it directly after adding them in the IDE. If you have any questions in actual use, you can leave a message. It may be because I missed some libraries. Put them in the attachments.
After the burning is successful, just use the Dian Deng Technology App To debug with Mijia, Dian Deng Technology needs to import the interface I designed first, configure it in the attachment, and directly copy the text to the App to update it. To debug with Mijia, you need to synchronize the Dian Deng Technology devices first, and then add a new training plan in Xiao Ai.
After debugging, you can seal the shell happily. I used 502 glue, which I tested to be able to stick firmly.
Some
new devices in the Dian Deng Technology App have not been introduced yet.
The import interface configuration has not been introduced yet.
After the import is completed, the device power-on interface is as shown in the figure.

Click the "Refresh Status" button to synchronize the actual data, as shown in the figure. Some imports of Mijia devices in

the Mijia App have not been introduced. Creating a training plan has not been introduced. After creating a training plan, shout "Xiao Ai, turn on the socket" to turn on the socket