Esp8266 Starter System -
A Self-contained starter system for development of ESP8266 based projects
System includes the following base capabilities
- WiFi support, including using WiFiManager to save credentials
- A simple LittleFS based preferences system with web edit/save of configuration file (for non-wifi settings)
- A fully functioning system control website with
1) a system status view
2) a view/edit settings capability
3) an event history (logging) capability
4) some basic system controls (reset, clear WiFi settings, send email msg, etc)
- Code to send email using smt2go.com smtp services as well as integration of email settings into preferences system
- A simple event history system that records event messages strings along with a timestamp of when event happened
- Misc date and time utilities to help with displaying current date and time and elapsedmillis timestamps
Dependencies
ESP8266WiFi, DNSServer, ESP8266WebServer, WiFiManager, NTPClient, WiFiClient, LittleFS, time.h, TZ.h ElapsedMillis
All of these are likely available through the Arduino IDE Library Manager, but some may need to be installed by.zip files downloaded from github. I seem to have downloaded.zips for wifimanager, ntpclient, and elapsedmillis but I think they're all available through library manager now.
This project was developed on a NodeMCU 1.0 ESP-12E module using the Arduino IDE 1.8.15, with this additional board manager: http://arduino.esp8266.com/stable/package_esp8266com_index.json
The project implements a web control panel for management of the system
All of the pages of the control website include a left-side button panel with buttons that either link to other pages of the system or invoke operations.
Button Function
--------- -----------------
Home Displays basic operational status
History Links to a page with the Event History (see eventHistory.ino)
Settings Links to edit/save settings file page
Restart Calls soft restart function to init counters, timers, etc
Send Mail 1 Calls sendmail(1) through a helper function in Esp8266Starter.ino
Send Mail 2 Calls sendmail(2) through a helper function in Esp8266Starter.ino
Erase WiFi Calls WiFiManager.resetSettings() then ESP.reset() (after confirm popup)
Hard Reset Calls ESP.reset() (after confirm popup)
Next, there's an event history page
Finally, here's a sample email that was sent by the ESP8266 system:
To: me@gmail.com
From: someone.else@emailserver.com
Subject: ESP8266 Monitor Alert: System event 1 has occurred
Message-Id: <A1mz-wSE-OF@message-id.smtpcorp.com>
Date: Sat, 17 Jul 2021 17:35:39 +0000
This likely means that something has happened.
Most Recent Events
Entry 1: Sat Jul 17 13:35:35 Email 2 message was sent successfully
Entry 2: Sat Jul 17 13:35:22 Configuration settings were saved
Entry 3: Sat Jul 17 13:35:13 Soft restart completed
This e-mail was sent by the ESP8266 System Monitor Program.
Comments