stanleyondrus / RelayControl_ESP8266

Websocket interface with manual control and 24-hour scheduler for ESP8266 controlled 4-channel relay.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Features

  • Hybrid operation mode (STA & AP)
  • WebSocket-based GUI
  • Concurrent multi-user support
  • Automatic time synchronization over NTP
  • Time zone selection
  • 24h on/off scheduler
  • 4-channel relay switch

Manual relay control

Scheduler

Installation

This project is designed to work with 4-channel relay module, which uses an onboard MCU that controlls the relays according to the commands received from ESP-01 over UART.

  1. Make sure that ESP8266 Core is installed in your Arduino IDE.
  2. Open src\RelayControl\RelayControl.ino
  3. Customize SSID and PWD for STA mode:
wifiMulti.addAP("ssid_from_AP_1", "your_password_for_AP_1");
wifiMulti.addAP("ssid_from_AP_2", "your_password_for_AP_2");
wifiMulti.addAP("ssid_from_AP_3", "your_password_for_AP_3");
  1. Customize SSID and PWD for AP mode:
const char *ssid = "RelayControl";
const char *password = "RelayControl2020";
  1. Set board settings

  1. Compile and upload the code
  2. Upload webserver to SPIFFS using Tools/ESP8266 Sketch Data Upload

Credits

About

Websocket interface with manual control and 24-hour scheduler for ESP8266 controlled 4-channel relay.


Languages

Language:C++ 91.8%Language:HTML 4.2%Language:JavaScript 3.1%Language:CSS 0.9%