Skip to content

Latest commit

 

History

History
39 lines (28 loc) · 2.54 KB

README.md

File metadata and controls

39 lines (28 loc) · 2.54 KB

ESP8266 Computer Monitor

ESP8266 Arduino sketch to monitor Computer reachability

Introduction

The Arduino sketch is intended to run on a ESP8266 based ESP-12E board.

There are 3 components in this project -

  1. Computer that we want to monitor
  2. ESP-12E board
  3. IFTTT enabled smart switch (Eg. D-Link Smart Plug) that is used to power both the computer and the ESP-12E board.

All the three components are connected to internet.

The ESP-12E is used to monitor the computer. When the computer is switched off, the ESP-12E switches off the power to the computer and to itself via the IFTTT enabled smart switch.

The ESP-12E uses periodic ICMP pings to determine if the computer is up. On startup, the ESP-12E periodically polls the computer and once the computer is found to be reachable, it considers itself as armed. In armed state, the ESP-12E will continue to periodically poll the computer and if the computer goes down, it will switch off the power supply by sending a command to a DLink Smart Plug via a IFTTT Webhook.

Dependencies

  1. ESP8266 Arduino Core - Install in Arduino IDE by going to Preferences and adding http://arduino.esp8266.com/stable/package_esp8266com_index.json in Additional Board Manager URLs field and then installing the pacakge by going to Sketch -> Include Library -> Manage Library. More details here.
  2. TaskScheduler - Install in Arduino IDE by going to Sketch -> Include Library -> Manage Library.
  3. ESP8266Ping - Download the ZIP file and install in Arduino IDE by going to Sketch -> Include Library -> Add .ZIP Library.

Configuration

Configure the sketch to suit the run environment. Parameters that must be configured by editing the sketch file -

  1. SSID
  2. PASSWORD
  3. MONITOR_IP
  4. MONITOR_DURATION_MS
  5. FAIL_THRESHOLD
  6. CONTROL_SERVER
  7. OFF_URL

Useful Links