Skip to content

unknow1192/RemotePinControl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ESP32 Remote GPIO Control and Scheduler

Basics

This program allows you to remotely control a device hooked up to one of the GPIO pins on an ESP board as well as scheduling its work. Everything is controlled through a web interface which allows to switch between different working modes (manual or automatic), managing the pin state when in manual, scheduling automatic on and off turns and setting WiFi credentials.

Features

  • Easy-to-use web panel
  • Manual and automatic GPIO control
  • Schedule-based automation
  • WiFi and clock fallbacks
  • NTP time synchronization with manual time fallback
  • Configuration files in persistent storage (LittleFS)

Installation

  1. Clone repository
git clone https://github.com/unknow1192/RemotePinControl
  1. Open folder in Visual Studio Code, make sure that Platform IO extension is installed
  2. You can adjust few things in source code
    1. Pin that you want to control, form src/pin_controller.cpp
    #define CONTROL_PIN D10 // Choose which GPIO pin to control
    1. Timezone in src/time_manager.cpp
    setenv("TZ", "CET-1CEST,M3.5.0/2,M10.5.0/3", 1); // Default timezone is GMT+2 (Poland)
    1. ESP board model in platformio.ini (default one is Xiao ESP32C3)
    2. WiFi credentials in /data/settings.json. These can be changed later from Web UI. When unable to connect to an existing WiFi board will start its own wireless network:
    SSID: ESP32-PinControl
    Password: 12345678
    
    Then after logging into that network and going to 192.168.0.1 address you can put or change your WiFi credentials as well as boards own credentials when in access point mode.
  3. Connect your ESP to your computer, click on Platform IO tab -> Build Filesystem Image -> Upload Filesystem Image -> Build -> Upload
  4. Open the board's IP address in your web browser, then configure schedules or control the GPIO manually.

System behavior

After starting program automatically tries to connect to WiFi and get time data from NTP server. If unable to connect to WiFi as client after 10 seconds it enters access point mode. After that it is usually unable to get time info so it automatically locks scheduled actions, only operates in manual mode. Same thing happens when able to connect to WiFi but unable to get time info. To allow to do scheduled tasks you need to enter time data manually. It can be done in Settings section. After saving new WiFi credentials board will reboot itself and try to connect to new network on boot.

Precautions

To minimize the number of operations on ESP some of the validation happens in JavaScript on client-side. It is advised not to use this app in open networks, "in production" or anywhere else, where third parties have access to the control panel. Some testing was done on a Xiao ESP32C3, but not every case has been tested, and only on that one board. Author does not take any responsibility of potential damage caused.

License

MIT License

Copyright (c) 2026 unknow1192

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

ESP32 web-based GPIO controller with scheduling, WiFi fallback and NTP synchronization.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors