Skip to content

Latest commit

 

History

History
117 lines (72 loc) · 3.53 KB

README-en-us.md

File metadata and controls

117 lines (72 loc) · 3.53 KB

RemotePC-PowerSwitch

RemotePC-PowerSwitch is a remote computer power control system based on ESP8266 and a relay module. Using a simple web interface, you can easily power on or force shutdown your computer remotely, without the need for additional software or hardware.

Features

  • Remote Power On: Power on your computer via a web button.
  • Force Shutdown: Simulates holding the power button for 8 seconds to force shutdown.
  • Wi-Fi Control: No additional software required, just ensure the devices are on the same network.
  • Web Interface: Simple and intuitive, compatible with phones, computers, and other devices.
  • Power-On Auto: Start: Prevent issues with dynamic public IP changes after a power outage, ensuring remote access remains possible.

Hardware Requirements

  1. ESP8266 Development Board

    • Recommended to use NodeMCU or similar boards.
      ESP8266
  2. Relay Module

    • Used to connect to the computer's power button.
      Relay Module
  3. Connection Wires

    • Used to connect ESP8266 and the relay module.

Software Requirements

  1. Arduino IDE

    • Used to write and upload code to the ESP8266.
  2. Required Libraries

    • ESP8266WiFi.h: Manages Wi-Fi connections.
    • ESP8266WebServer.h: Hosts a simple web server.

Wiring Instructions

ESP8622 --------------- Relay Module

GPIO5 ------------------> IN

GND ------------------> GND

3.3V/5V -----------------> VCC

Relay Module ---------- Computer Power Button COM

COM ------------------> Power Button Pin 1

NO ------------------> Power Button Pin 2

Usage Instructions

1. Configure the Code

Fill in the following details in the code:

  • Wi-Fi Name (SSID)
  • Wi-Fi Password (password)
  • Username
  • Password
  • Relay control pin (default is GPIO5 or D1)

2. Upload the Code

Upload the code to the ESP8266 using Arduino IDE.

3. Get the IP Address

After uploading, open the serial monitor in Arduino IDE and check the IP address of the ESP8266 (e.g., 192.168.0.2).

4. Access the Web Page

Enter the IP address in your browser (e.g., http://192.168.0.2). The web page contains two buttons:

  • Power On: Click to power on the computer.
  • Force Shutdown: Click to simulate holding the power button for 8 seconds and force shutdown.

Notes

  1. Relay Selection
  • Ensure the relay module's voltage and current meet the requirements of both ESP8266 and your computer's power button.
  1. Power Supply
  • Use a stable power source for the ESP8266 and relay module.
  1. Network Environment
  • Ensure the controlling device and ESP8266 are on the same Wi-Fi network.
  1. Security
  • Since the web interface is accessed via the local network, avoid using insecure public Wi-Fi networks.

Example Screenshot

Example Interface


License

This project is licensed under the MIT License. You are free to modify and distribute the code but must retain the original author's information.


Contributing

Feel free to submit Issues or Pull Requests to improve this project. If you have questions, contact us through GitHub.


Disclaimer

This project is for personal learning and entertainment purposes only. Ensure compliance with relevant laws and regulations when using it.