Sometimes, when your internet is down, it may be your router (or Freebox in France) which has gone crazy. A power cycle sometimes fixes the issue.
The idea is to DIY a reset plug : http://resetplug.com/
The idea here is to use an ESP8266 which pings a website. When ping fails, the ESP8266 uses a relay to power cycle a plug.
Components
1×
ESP8266
The microcontrolle with wifi capacity
1×
AMS1117-3.3V Mini USB 5V/3.3V DC Precise Power Supply Module
to get 3.3 and 5 volts from an USB charger - http://www.ebay.com/itm/351691736361
1×
5V 3.3V FT232RL USB To Serial 232 Adapter Download Cable Module For Arduino
A serial adapter to flash the ESP8266 - http://www.ebay.com/itm/161305918505
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.
3
Step 3
Run the code
To test your code, you’ll need to
disconnect the RST / reset pin
connect GPIO0 to pullup (instead of GND) as explained here,
connect GPIO16 (or XPD) to RST pin to allow deepsleep as explained here.
Opening the serial monitor from arduino, you should be able to view some messages from esp8266.