Smart plug that cycle power to your router when net is down
The box is a little bit too small but otherwise, the electronic+code part is completed.
I wasn’t able to make my esp8266 sleep (https://github.com/paulgreg/internet-smart-plug/tree/deepsleep)... So I disable the wifi and made it wait (https://github.com/paulgreg/internet-smart-plug/tree/master).
It works but the case is too small and won’t fit.
I’ll upgrade to a bigger box.
As tweeted here, I made some progress and was able to flash some code to my esp8266.
I’ve followed the mapping explained on https://github.com/esp8266/Arduino/blob/master/doc/boards.md and flash that one https://github.com/esp8266/Arduino/blob/master/libraries/ESP8266WiFi/examples/WiFiClient/WiFiClient.ino
Works great. :-)
Install Arduino IDE and install esp8266 additional board manager as explained here.
Following the minimal hardware setup for bootloading explaining here and using a 3.3V USB To Serial adapter, you should be able to flash the following code to your esp8266 : https://github.com/paulgreg/internet-smart-plug
Please note that USB serial adapater ground need to be connected to ESP8266’s power adapter ground.
You’ll need to copy/paste parameters.h.dist to parameters.h and change your configuration information.
Beware, esp8266 don’t support 5V so be sure to use a power supply and an USB serial adapter which operates at 3.3V !
Doing otherwise will simply destroy your module.
Run the code
To test your code, you’ll need to
Opening the serial monitor from arduino, you should be able to view some messages from esp8266.