InqPortal 5.0 IoT Server Library Released – Catch It Now

InqPortal is an Arduino IDE based library to create your own IoT, Web, Application Server. It supports the Espressif ESP8266 line of processor boards including: NodeMCU, Wemos, ESP-01, ESP-07 and all other flavors of the ESP-12x It is the quickest way to get your Arduino Sketch based project, up on your local network, ready to monitor and control. Just three lines of code will get you where you can see windows like these… showing you the InqPortal Admin giving performance metrics on your app RIGHT NOW. Another half dozen lines of Sketch code and you’ll be able to monitor and adjust your Sketch variables from any browser client. Three more mouse clicks in the InqPortal Admin and you’ll have a custom Starter page of your own client application specific to your Sketch project… ready for you to enhance wherever your creative abilities lead you.

This is a huge update and we’re excited about this new version 5.0. Most of the sub-systems have been re-written. Instead of using generalized libraries, we have written the InqPortal library closer to the metal for the specific needs of an IoT Application server. It is now optimized for performance and code size. Benefits include:

  1. Manage the built-in (SoftAP) Access Point and multiple LAN (Station) Access Points so you do not have to hard-code your personal router’s credentials when you deploy your ESP8266 project.
  2. Scan for stations – Find your available Access Points and their relative strengths.
  3. Fail-over if a Station Access Point goes down or you move outside of its range just like any good smartphone or laptop.
  4. Dedicated File management using an optimized file system supporting flash memory wear leveling.
  5. Management of the file system via a UI mimicking Windows File Explorer with Drag & Drop capability.
  6. Binary OTA upgrading of the Sketch. Compile your Sketch, then drag and drop the bin file on the server even when it is high in a tree or under the floor in a basement or halfway across the globe.
  7. Performance metrics to monitor and quantify your IoT server’s health.
  8. Debugger style Watch Variables and logging supports runtime disabling and remote viewing of messages from any browser Admin.
  9. Customizable, Windows style Task Manager type histogram that can also be used for your IoT application’s custom published variables.
  10. Custom high-performance API using WebSockets for responsive and high-rate communications between browser clients and your ESP8266 IoT server.
  11. Admin provides client Starter App generation to kick-start your custom, end-user facing GUI.
  12. Add your favorite browser based graphics libraries like dashboards, dials and gauges to flesh out your own UI.
  13. Write the client once, run on any device… Windows, Mac, Linux, Android, iPhone tablets and phones.

Changes from Version 4.0

  1. New WebServer – Version 4 and some earlier versions of InqPortal used the ESPAsyncWebServer. This is a very good, but generalized web server library meant to handle any and many different kinds of tasks. InqPortal 5.0 now uses our own custom WebServer engine dedicated to the performance and binary code size needs of an InqPortal IoT Application server.
    1. Even though Version 5 added many new features, the FirstPortal sample application dropped over 50 KB in size and saved over 1 KB of static variables. It can now easily support usable projects on a 1MB version ESP-01 and still support OTA upgrades and a small file system.
    2. Far higher rate of file serving. Web server host testing uses a 1.7 MB test website with over 40 html, css, js, fonts and image files. In our abusive test, we subjected a NodeMCU to serving nine browsers the same page at the same time. Once fully loaded and displayed, it would request the same page over… ad nauseam. 100 hours and 180 GB later, we closed the test as a success. The average rate was 3.5 seconds for displaying the page. In version 4 (that could not complete a 1 hour test) the same page download took almost 10 seconds to display the page.
  2. New WebSocket Engine – Version 5 now uses our own performance optimized WebSockets subsystem. The previous version was very fast, but when pushed to its limits, it might fail with exceptions and/or dropped data. Although, not perfect yet, the version 5 WebSockets appears to be bullet proof in the sustained 30 KB/second range and is showing great promise up to a sustained 135 KB/second. When asked to do more than the ESP8266 is capable, it will drop data, but it also keeps an Admin exposed counter that will let you know exactly how much data was lost. It’s far better to drop data and know it than to just re-boot.
  3. Browser Caching – Web page serving now supports browser caching headers. Although the InqPortal 5.0 server is far faster than previous versions, utilizing browser caching makes your Application just pop (the second time-around) because, it’s already at your browser.
  4. Gzip File Serving – Canned files (Admin Page and support files) have been Gzipped for several versions to save on storage. Now, user files can also be pre Gzipped and uploaded to the InqPortal server. This greatly increases the size of the web content you can store on the typical 3MB “hard disk“… thus supporting more pages, JavaScript libraries and other cosmetic enhancements.
  5. Access Point Engine – Version 5 now has a new Access Point engine. Espressif’s storage methodology does not support “forgetting” a Station Access Point. To overcome this, we only use their single access point call and do all the bookkeeping ourselves. While at it, when disconnected by the router going down or out of range, we added the ability to re-scan and automatically connect to another of your pre-configured Access Points. A maximum of five Access Points can be stored. It now behaves more like a laptop or phone by snagging another known AP. Now your project can travel between locations.
  6. New File System – In version 3.0, InqPortal used SPIFFs to supply file services. Due to it being deprecated, we switched to LittleFS. In InqPortal, version 5, we have written our own that incorporates Flash memory wear leveling. It also supports setting the flash memory sector limits. We have more plans for future versions of InqPortal. InqFS also has a manual defragmentation procedure that is exposed in the Admin. We felt it was more important to know exactly when a long pause was necessary for clean-up duties than to have it automatic. This way you can run a “disk” defragmentation when you are doing uploads and readily know the server is in an administrative phase. Although not quantified, we suspect that some of the performance gains of the WebServer are due to the read rate of InqFS. File timestamps were added in Version 5 so you can quickly identify a version of a file. The timestamp is not based on load time to InqPortal, but of the modified time stamp on the sending computer. ie. The timestamp reported in InqPortal will be the same as in the Windows Explorer you dragged and dropped the file from.
  7. New Persist Engine – InqPortal, version 5 uses our own EEPROM equivalent. It supports multiple instances and configurable sector location and size. (We have future plans). It also supports wear leveling.
  8. New Published Variable Engine – Listening to users, we have added some enhancements to the publishing sub system. It now supports server-side validation and server-side events that were fired by the clients. Overall, it has also been streamlined to be even simpler to implement. We often have to remind ourselves that the browser is not actually running on the ESP8266… it is so tightly bound and so lightning quick.
  9. Client Improvements –
    1. During development compiling or if something causes the server to reboot, the client reconnects faster.
    2. The Histogram no longer clears on a re-connect. If your Sketch should reboot during one of those long overnight tests, the graph will show the before and after. We have also added MIN and MAX functions to the already existing averaging ability.
    3. The client API has been simplified, yet has gained flexibility. Its so lean now, an un-initiated web developer will be hard pressed to see anything odd in the markup that stands out being specific to InqPortal.
    4. A huge addition to jump start your client side application – The Admin now has the ability to stub-out a working webpage with all of your Sketch’s published variables. It is the perfect working tutorial using your variables. Take the page and trim, add and modify to make your own work of art.
    5. Although not fully fleshed out on this InqOnThat.com website (yet) the InqPortal Admin has full context sensitive help. Links jump to pages here just like the Arduino IDE. The on-line help is heavily crossed linked between references, tutorials and examples projects.

For further information and to get started…