Notifications
Clear all

InqPortal - An ESP8266 IoT, Application, Web Server

96 Posts
8 Users
23 Reactions
9,114 Views
Inq
 Inq
(@inq)
Member
Joined: 3 years ago
Posts: 1904
Topic starter  

This only works on ESP8266.  An ESP32 version is in the works.

InqPortal is free and royalty free.  My support will also be free.  I'm retired and want to give back to people like myself from an Engineering and Software Development career that has been very good to me.

I would like to offer up a library InqPortal that can be found in the Arduino IDE Library Manager for your consideration.  Starting back in 2017, it was for my own use as I was tired of re-writing boilerplate for client-server applications.  Specifically having an I/O interface that was not hardware based, and connected to my limited number of pins.  I wanted to press a button on my cell-phone and the ESP8266 application to respond RIGHT NOW!  It has steadily improved stability and features over the years.  I now use it teaching classes in Arduino / IoT type projects at my local library and community college.

The goal of this project has always been to make other project developers job's easier.

Working with students of all ages from pre-teens to senior citizens, I've found, almost without exception, all are keenly interested in getting their hardware projects up and running as quick as possible. The excitement factor of seeing their own hardware project come to life is an adrenalin rush.

Logistics - That hateful word is the bane of existence for that Inquisitive student dying for that first heart-beat of robot life. Often, they don't want to fiddle with wiring digital displays to see results and pots to control their projects. The steep learning curve of building any reliable communications system, much less... a fast and reliable web server out of the generalized libraries we currently have access has killed the enthusiasm of many a student.  And even if free from reboots and dropped connections, there is still the tedium of handling every... single... transaction from a variable in the Sketch to and from the client. A student, no... even an expert can easily spend ten times the amount of time on the logistics of interacting with their project than the hardware wiring and core logic of their project.  You probably heard of the 90/10 rule - "It takes 10% of the time to do 90% of the project.  The last 10% takes 90% of the time."  I felt there has to be a better way.

InqPortal is meant to make those logistics simply go away.  That last 10% now takes almost no time.

What InqPortal Is

  1. A generalized webserver running on an ESP8266 - Think... Nginx, Apache or IIS.
  2. Includes a built-in, browser based Admin - Think… cPanel or IIS Explorer.
  3. A trivially simple Application API to allow you to write Client-Server Arduino Sketches quickly and easily.

1) Web Server Includes:

  • HTTP server, serving files like any other webserver - In a 100 hour test, against nine different browsers requesting a webpage with over a megabyte of content.  Once rendered, it would re-request the same page. After 100 hours, InqPortal served 180 GB of data for an average rate better than 473 KB/sec => 3.7 Mbits/sec!
  • File System using a custom implementation that does Flash Memory wear leveling.
  • Persist System using a custom EEPROM class offering Flash Memory wear leveling.  It is simple to use - Simply create a C++ struct with your list of variables you need stored and hand it to InqPortal.  From then on, you will not have to save or load them.  It is all done automatically, transparently.  The run-time changed values will be there ready for you to use the next time the ESP8266 boots up.
  • High-speed web socket bi-directional communications between your ESP8266 InqPortal server and your browser clients - Over a 15 hour non-stop period the InqPortal server delivered over 11 GB of data at a rate over 200 KB/sec! This was achieved with a data send frequency of 1000 Hz – Yes, 1 message sent every 1 millisecond to four browser clients. This was done with no lost data. (optimum conditions - long distances or WiFi congestion WILL reduce throughput)

2) Browser Based Admin

  • A GUI that is optimized to work equally well on a 4K screen or cell phone.
  • An Access Point Manager to configure your Built-In Access Point (SoftAP) or your LAN Access Points (StationAP).  This includes scanning ability to find the access points and storage for up to five sets of credentials.  Your InqPortal project can act like your cellphone.  When it is moved outside the range of its LAN connection, it will automatically scan for any pre-configured access points.  If more than one is found, it will connect to the strongest.
  • System Information Metrics - one tab of the Admin shows connection information, connection status, boot count, boot reason, file system utilization and status, Loop frequency (used like CPU utilization on a computer), client connections and data transfer rates.  All good metrics that can be used to diagnose and debug your project without having to add one line of code.
  • A GUI File Manager.  Files can be dragged and dropped from your Windows, Mac or Linux server onto the Admin's File Manager.  It is similar to the Windows File Manager with file size and timestamp.  Timestamp is the same timestamp as the "Date Modified" on Windows File Explorer, not when it was created on the InqPortal server.  This way you can quickly confirm which version is on both.
  • Drag and Drop OTA of your Sketch bin file onto the same File Manager for remote upgrades of your ESP8266 server.
  • A Logs Manager that works just like the Serial Monitor with the extra benefits that it shows System events as well as any of your custom output.  It also can be filtered at run-time so you can eliminate your debug messages without having to recompile.
  • Along with logging of data, you can also set up traditional debugger "Watch" variables that are updated on the Admin when you change them in the Sketch.
  • A Histogram that acts like the Windows Task Manager Performance graph.  The default will have your Loop Frequency, Available Heap Memory and if configured, your Supply Voltage.  All useful information to help identify overworking segments of code use, memory leaks and brown-out reboots.  In addition, your own application numeric outputs can be added and plotted real-time with or without the default curves. Time durations and rates can also be configured.

3) Application API

  • What really sets InqPortal apart from custom generalized web server libraries is the Application API.
  • With one line of code, a variable can be published.  This includes any global variable and/or any of your persisted variables.  All variable types are supported except the Arduino String variable.  Fixed size C style char arrays are supported.
  • Published variables are variables that can be seen by the browser client.  They can be configured to be Read-Only by the client or Read-Write.  
  • Custom get and set events can be optionally added for any custom generation or validation.
  • The InqPortal Admin automatically shows these published variables and allows you to change the values of Read-Write ones.  In this way, you can do most of your building and testing of your server without having to write one line of client code.
  • When you do want to start writing your client, the Admin provides an automatic code generator to build a webpage with all your published variables giving you a template that can then be cosmetically changed with your style sheets or programmatically with JavaScript files.
  • Simply drag and drop the edited files back on your server and browse to them from anywhere.

What InqPortal Is Not - Full Disclosure

  • It is not a generalized WiFi library.  It does not expose TCP or UDP to do your own custom connection type projects.  It is simply a browser client / web application server.
  • It is not open-source.  It is however, free and royalty free if you want to create a product using it.

What I Hope Its Good For

  • As mentioned in the introduction, it frees the beginner or the expert from having to deal with any web server logistics. 
  • You can concentrate on your hardware and core logic and let InqPortal handle all the I/O to and from the client. 
  • It will handle all your persisted values.
  • It will handle all your client-side web content files.
  • It will handle you server upgrades.
  • It will handle all the communications.
  • In short - all the hateful logistics.

Please give it a try and give me some feedback... Is it useful?  Does it get your project done faster and/or better?  Where can it improve?  What features are still needed?

I hope you'll give it a try by starting with the "Quickest Start Guide" link below.

3 lines of code = InqPortal = Complete IoT, App, Web Server w/ GUI Admin Client, WiFi Manager, Drag & Drop File Manager, OTA, Performance Metrics, Web Socket Comms, Easy App API, All running on ESP8266...
Even usable on ESP-01S - Quickest Start Guide


   
robotBuilder reacted
Quote
Inq
 Inq
(@inq)
Member
Joined: 3 years ago
Posts: 1904
Topic starter  

I'm used to most forums allowing one to edit their own posts... forever.  I guess I've gotten lazy.  I hate it when I leave grammatical mistakes. 😉 

3 lines of code = InqPortal = Complete IoT, App, Web Server w/ GUI Admin Client, WiFi Manager, Drag & Drop File Manager, OTA, Performance Metrics, Web Socket Comms, Easy App API, All running on ESP8266...
Even usable on ESP-01S - Quickest Start Guide


   
robotBuilder reacted
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 4 years ago
Posts: 7695
 

@inq Normally you can, I think you might be limited until you are no longer a newbie here. I am also sending you a message, not sure if it will go through yet.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.


   
ReplyQuote
Will
 Will
(@will)
Member
Joined: 3 years ago
Posts: 2585
 

@inq 

I believe there is also a time limit involved during which you can edit or even delete posts. Afterwards, they're untouchable.

Anything seems possible when you don't know what you're talking about.


   
ReplyQuote
Inq
 Inq
(@inq)
Member
Joined: 3 years ago
Posts: 1904
Topic starter  
Posted by: @will

@inq 

I believe there is also a time limit involved during which you can edit or even delete posts. Afterwards, they're untouchable.

I think that is what I ran into.  I did edit it three times soon after posting.  It's strange how re-reading in the different format of the post versus the editor made my errors jump out at me. 🤔 

3 lines of code = InqPortal = Complete IoT, App, Web Server w/ GUI Admin Client, WiFi Manager, Drag & Drop File Manager, OTA, Performance Metrics, Web Socket Comms, Easy App API, All running on ESP8266...
Even usable on ESP-01S - Quickest Start Guide


   
ReplyQuote
Will
 Will
(@will)
Member
Joined: 3 years ago
Posts: 2585
 
Posted by: @inq

I think that is what I ran into.  I did edit it three times soon after posting.  It's strange how re-reading in the different format of the post versus the editor made my errors jump out at me. 🤔 

After you finish typing your post, you can click on the eye icon at the bottom of the box labelled Preview and it will show you a view of what your post will look like when formatted. If you need to make any changes, you need to do that in the original postng box and then click Preview again to show the repaired post.

Anything seems possible when you don't know what you're talking about.


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 4 years ago
Posts: 7695
 

@inq Did you not see the preview button at the bottom of the reply box?

Can still edit a few minutes later but not 4 hrs

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.


   
ReplyQuote
Inq
 Inq
(@inq)
Member
Joined: 3 years ago
Posts: 1904
Topic starter  

Thank guys!  🤣 

I saw it... but I hate writing.  I'd rather write C++ than English.  I can often write it far faster than English.  Heck! the compiler tells me if I make spelling or grammatical mistakes.  At least we get red-squiggles now for spelling.  That alone improved my English 100%.  After proof reading that War and Peace several times and editing, I was sure it was right and skipped that very important step.  Hubris... That dog will BITE youuuu.

3 lines of code = InqPortal = Complete IoT, App, Web Server w/ GUI Admin Client, WiFi Manager, Drag & Drop File Manager, OTA, Performance Metrics, Web Socket Comms, Easy App API, All running on ESP8266...
Even usable on ESP-01S - Quickest Start Guide


   
ReplyQuote
Will
 Will
(@will)
Member
Joined: 3 years ago
Posts: 2585
 

@inq 

Yeah, it's also tempting to put a large calibre bullet into the brain of the auto-correct feature as well 🙂

Anything seems possible when you don't know what you're talking about.


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 4 years ago
Posts: 7695
 

@will @inq Big difference between spellcheck and auto-correct. Gotta have the first, NEVER want the second. Many folks think they are the same, and many folks have only auto-correct. Bad idea. If you are a real nut about it, get grammarly. Very cool but I am cutting down on software expense. What ever happened to the $0.99 apps Jobs touted so many years ago anyway?

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.


   
ReplyQuote
Will
 Will
(@will)
Member
Joined: 3 years ago
Posts: 2585
 
Posted by: @zander

What ever happened to the $0.99 apps Jobs touted so many years ago anyway?

Hell, I'm still waiting for the flying cars they promised us in the '50s 🙂 🙂

Anything seems possible when you don't know what you're talking about.


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 4 years ago
Posts: 7695
 

@will Do you really want to see (certain group of people) try to drive in 3D space when they can't master 2D. I once watched one try to park. She kept turning the wheel the wrong way and retraced her tire marks at least several dozen times before her boyfriend came out and rescued her. My gut was hurting from laughing so much!

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 4 years ago
Posts: 7695
 

@inq I could maybe look this up, but why not get the answer from the author.

I have a BME280 which as you likely know does Hum/Temp/Pres. The pins are labelled a little different, but my magic decoder thinks it goes like this.

BME280 to ESP8266

Vin to 3.3V

G to G

SCK to D1

SDO to D2

Does that make sense?

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.


   
ReplyQuote
Will
 Will
(@will)
Member
Joined: 3 years ago
Posts: 2585
 
Posted by: @zander

@will Do you really want to see (certain group of people) try to drive in 3D space when they can't master 2D.

Mr Charles Darwin assures me that that problem will solve itself 🙂

Anything seems possible when you don't know what you're talking about.


   
ReplyQuote
byron
(@byron)
No Title
Joined: 5 years ago
Posts: 1183
 

@inq  - That looks to be a very interesting library and a good use for some of my ESP8266 boards I seem to have accumulated.  I'll give it a whirl sometime soon 👍 

 

Posted by: @zander

BME280 to ESP8266  Does that make sense?

Yes your wiring pins makes sense if you are communication via i2c.  On my wemos ESP8266 D1 is the clock and D2 is the data for its default i2c pins.
 
If you are communicting via SPI then its 
clock (SCLK) D5
MISO         D6
MOSI     D7
CS     D8
+ the 3.3v and Ground of course.

   
ReplyQuote
Page 1 / 7