Wednesday, July 1, 2015

Esp8266 - My Experimental WebServer

I have been developing an Esp8266 Experimental WebServer (see previous posts).

There are many issues that had to be over come, and still more that will be worked on in the future. At one point I was just about to give-up on this effort, but my friend Jeff - KO7M has helped with some very sticky issues.
 
Currently my WebServer is about 2500 lines of Arduino IDE code, and compiles to about 300K bytes.

The WebServer provides three major web pages; Home, Help and Admin. Some of these pages are "contrived" to be large (e.g., ~30Kb), to push the limits of; Memory, Heap, and WIFI data transfers. Many issues had to be solved to allow this to all work. Heap and Memory Management has always been an issue. For String Constants, I use a P() and Pn() functions throughout (see code). For graphics, I have used SVG.

Here is a list of current features:

 
/*
 * This Program Provides the following for the Esp8266 as a WebServer:
 *      Home Page Dashboard
 *      Help Page
 *      Admin Page, with WiFi Scan and Network Selection
 *      Page Navigator and Resource Links
 *      Raw Data Query
 *      NTP Network Time (Unix Epoch)
 *      mDNS Service/Client
 *      Optional Page AutoRefresh
 *      Auto AP Timeout
 *      Implements SVG 12/24 Hour Clock
 *      Implements SVG Gauge for FreeMem and Vdd
 *      Implements and uses Html "meter" function
 * 
 */



This WebServer is a little slow, but tests indicate that it will support several browser connections, although only one will be actively be transferring data.

I am going to post my work to GitHub for others to use and/or provide feedback, I will provide the Link here when it is setup.

This WebServer is some what "contrived", and which I will use as a Template for my future Esp8266 projects. Normally, an Esp8266 would be used for data collection or control, but I wanted at least a simplified Stand alone Dashboard and with easy data access and I/O control, I think my implementation fits the requirements.

Here are a few of the graphic elements that are implemented, all of which are sourced directly by the Esp8266:

Esp8266 Dashboard
(home page)


An SVG Graphic


Admin Wifi Scan Page


Occasionally, I will make one of my Esp8266 WebServer available online at: dc02.ebcon.com:8160

There are still more functions and ideas that I want to implement. And, there is lots-of-room for optimization, but I want this effort to be as dynamic and free of limitations as possible.

I will continue to develop this and try to keep the GitHub code up-to-date.


-- Home Page: https://WA0UWH.blogspot.com

4 comments: