Giter Club home page Giter Club logo

esp32-web-interface-port's Introduction

ESP32 Web Interface Port

This fork is a port of the OpenInverter esp8266-web-interface for the ESP32.

At this time SWD upload functionality is not available.
All other features are available however, and should work as you're used to.

Configuration

There are a few simple configurable options - if so needed - for your use case.

Inverter

You can change the default port for communication with the inverter:

#define INVERTER_SERIAL_PORT [ Interface ]

Interface can be any object derived from Print (like Serial, Serial2, SoftwareSerial).
Interface must be derived from HardwareSerial (like Serial, Serial1, Serial2).

inverter.cpp

Here you can change baud rates and page sizes.
Note: Unless you're using your own implementation of the OpenInverter firmware, don't change these!
Note 2: The buffer for the print interface is set at 2048 bytes. It's way over the top, I know.

WiFi

You can change the default softAP SSID and password by modifying the definitions like so:

char *ssid_AP =      (char*)"--DEFUALT SSID--";
char *password_AP =  (char*)"--DEFUALT PASSWORD--";

You can also define credentials for station mode, which will try connect on boot:

#define USE_PRESET_WIFI_CRED true
char *ssid_STA =      (char*)"--PRESET SSID HERE--";
char *password_STA =  (char*)"--PRESET PASSWORD HERE--";

Web Server

The web server port can be changed with:

#define SERVER_PORT [PORT NUMBER]

The server index file can be defined with:

#define SERVER_INDEX F(["--PATH TO INDEX FILE--"])

Currently the contents of the SPIFFS filesystem is "cached", I plan to change this soon but for now if you need more then 48 files in your filesystem image you can change the cache size with:

#define MAX_NUMBER_OF_FILES [ Number ]

Extras

If you want to be able to communicate with multiple inverters across multiple ports you can create a new instance of the Inverter class:

Inverter inverter( PrintInterface );

Note that the website doesn't support this use case and therefore the webserver doesn't either, but the option is there if you want to build a more custom solution for your inverter interface needs.
One possible way to do this is to create a new RequestHandler derived class that will handle all requests sent with a chosen prefex.

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.