Coder Social home page Coder Social logo

iawells / wificonfig Goto Github PK

View Code? Open in Web Editor NEW

This project forked from snakeye/wificonfig

0.0 0.0 0.0 546 KB

ESP8266 Wifi connection and configuration manager.

License: MIT License

HTML 65.10% C++ 20.75% JavaScript 4.85% Vue 8.34% CSS 0.97%

wificonfig's Introduction

WiFi configuration manager

Known Vulnerabilities

Wifi connection and configuration manager for ESP8266 and ESP32.

Based on ConfigManager library. The major difference is that the full configuration is provided by the device and configuration form is built dynamically by JavaScript application.

This library was made to ease the complication of configuring Wifi and other settings on an ESP8266 or ESP32. It is roughly split into two parts, Wifi configuration and REST variable configuration.

Requires

Quick Start

Installing

Arduino

You can install through the Arduino Library Manager. The package name is WiFiConfig.

PlatformIO

Library name is WiFiConfig

Usage

Include the library in your sketch

#include <ConfigManager.h>

Initialize a global instance of the library

ConfigManager configManager;

Initialize a global instance of the configuration object

struct Config
{
    bool enabled = false;
    char server[128] = {0};
    int port = 0;
} config;

In your setup function define required parameters and start the manager.

configManager.setAPName("Config Demo");

configManager.addParameterGroup("mqtt", new Metadata("MQTT Configuration", "Configuration of MQTT connection"))
    .addParameter("enabled", &config.enabled, new Metadata("Enabled"))
    .addParameter("server", config.server, 128, new Metadata("Server"))
    .addParameter("port", &config.port, new Metadata("Port", "Default value 1883"));

configManager.begin(config);

In your loop function, run the manager's loop

configManager.loop();

Upload frontend files

Upload the index.html file found in the data directory into the SPIFFS. Instructions on how to do this vary based on your IDE. Below are links instructions on the most common IDEs:

ESP8266

ESP32

Configure the device

Connect the device from the browser using IP address http://<ip addres>. The configuration form will be generated automatically by the JavaScript application.

Things TODO / Roadmap

  • Eliminate parallel HTTP requests
  • Proper WiFi connection handling
  • HTTP Authentication

Documentation

wificonfig's People

Contributors

snakeye avatar nrwiersma avatar aovcharov-influencerdb avatar per1234 avatar jonsilver avatar baphled avatar boneskull avatar ivankravets avatar mfalkvidd avatar robertoostenveld avatar dadone89 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.