Absolutely . I can structure this as a complete final-year/major IoT + AI project document covering the ESP32 hardware, Smart Mirror, AI health recommendation layer, n8n agentic automation, Telegram voice alerts, Google Sheets logging, ThingSpeak dashboard, webpage, circuit schematic, data-flow diagrams, and source code.
Proposed project title
AI Smart Mirror with Health Recommendation System
Agentic IoT using ESP32 + AI Agent + n8n Automation + Telegram Voice Alerts + Google Sheets + ThingSpeak
1. Project overview
The proposed system is an AI-powered IoT smart mirror built around an ESP32. The mirror collects environmental and user-related measurements from sensors, displays useful information on a web interface/mirror display, sends sensor data to the cloud, and uses an AI agent to generate contextual recommendations.
The automation layer is implemented using n8n.
The overall system can:
-
Read temperature and humidity.
-
Monitor air-quality-related parameters.
-
Measure ambient light.
-
Optionally measure heart rate/SpO₂ using a suitable sensor.
-
Detect the user's presence.
-
Display sensor information on the Smart Mirror.
-
Send sensor data from ESP32 to an IoT/web server.
-
Store historical measurements in Google Sheets.
-
Publish measurements to ThingSpeak.
-
Trigger n8n workflows.
-
Pass relevant data to an AI agent.
-
Generate health/wellness-oriented recommendations.
-
Send notifications through Telegram.
-
Convert notification text into a voice message where a TTS service is used.
-
Provide an AI-assisted webpage/dashboard.
-
Maintain an event/history log.
Important: The health component should be presented as a wellness/recommendation system, not a medical diagnostic device. Sensor readings can be inaccurate and recommendations should not be represented as medical diagnoses.
2. High-level architecture
┌───────────────────────────┐
│ SMART MIRROR │
│ │
│ Display + Web Interface │
└─────────────┬─────────────┘
│
│
┌────────▼────────┐
│ ESP32 │
│ IoT Controller │
└───┬───┬───┬────┘
│ │ │
┌──────────────┘ │ └──────────────┐
│ │ │
┌──────▼──────┐ ┌──────▼──────┐ ┌──────▼──────┐
│ Temperature │ │ Air Quality │ │ Health Sensor│
│ + Humidity │ │ Sensor │ │ HR / SpO2* │
└─────────────┘ └─────────────┘ └─────────────┘
│
▼
Wi-Fi / HTTP
│
▼
┌──────────────────┐
│ n8n Workflow │
│ Automation Layer │
└────────┬─────────┘
│
┌──────────────┼─────────────────┐
│ │ │
▼ ▼ ▼
┌──────────┐ ┌─────────────┐ ┌─────────────┐
│ AI Agent │ │Google Sheets│ │ ThingSpeak │
└────┬─────┘ └─────────────┘ └─────────────┘
│
▼
┌──────────────┐
│ Recommendation│
│ Engine │
└──────┬───────┘
│
▼
┌───────────────┐
│ Telegram │
│ Notification │
└──────┬────────┘
│
▼
┌───────────────┐
│ Voice Alert / │
│ Voice Message │
└───────────────┘
3. Main components
Hardware
| Component | Purpose |
|---|---|
| ESP32 | Main IoT controller |
| DHT22/DHT11 | Temperature and humidity |
| MQ-135 or equivalent | Air-quality indication |
| MAX30102 | Heart-rate/SpO₂ sensing* |
| LDR/BH1750 | Ambient-light measurement |
| PIR sensor | Presence detection |
| OLED/TFT/LCD/display | Information display |
| Relay module | Optional appliance control |
| Buzzer | Local warning |
| LED strip | Mirror lighting |
| 5V/USB power supply | Power |
| Two-way mirror/acrylic mirror | Smart mirror |
| Raspberry Pi/mini PC | Optional display/web host |
*If using physiological sensors, the project should clearly state that the measurements are experimental/non-clinical unless the complete device has been appropriately validated.
4. Software architecture
┌─────────────────────────────────────────────────────────┐
│ USER / SMART MIRROR │
└─────────────────────────┬───────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────┐
│ ESP32 FIRMWARE │
│ │
│ Sensor acquisition │
│ Wi-Fi │
│ HTTP/MQTT │
│ JSON │
│ Local display │
│ Device control │
└─────────────────────────┬───────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────┐
│ n8n │
│ │
│ Webhook → Validate → Store → Analyze → AI Agent │
│ │ │ │
│ ▼ ▼ │
│ Google Sheets Recommendation │
│ │ │
│ ▼ │
│ Telegram │
└─────────────────────────┬───────────────────────────────┘
│
┌─────────┴──────────┐
▼ ▼
┌──────────────┐ ┌──────────────┐
│ ThingSpeak │ │ Web Dashboard│
└──────────────┘ └──────────────┘
5. How the complete system works
Step 1 — Sensor measurement
The ESP32 periodically reads the connected sensors.
Example:
{
"device_id": "SMART_MIRROR_01",
"temperature": 29.4,
"humidity": 62,
"air_quality": 245,
"heart_rate": 78,
"spo2": 97,
"light": 430,
"presence": true
}
Step 2 — ESP32 preprocessing
The ESP 32 checks whether the sensor readings are valid.
For example:
Temperature = 29.4 °C
Humidity = 62 %
Heart Rate = 78 BPM
SpO2 = 97 %
The ESP32 then creates a JSON packet.
Step 3 — Internet transmission
ESP32 connects to Wi-Fi and sends the packet using HTTP.
ESP32
│
│ HTTP POST
▼
n8n Webhook
Step 4 — n8n receives the data
The n8n Webhook node receives the JSON.
Webhook
↓
Validate Data
↓
Normalize Data
↓
Store Data
Step 5 — Google Sheets
The workflow records historical data.
Example:
| Timestamp | Temp | Humidity | HR | SpO₂ | Air Quality |
|---|---|---|---|---|---|
| 20:01 | 29.4 | 62 | 78 | 97 | 245 |
| 20:02 | 29.5 | 63 | 80 | 97 | 251 |
| 20:03 | 29.6 | 63 | 81 | 96 | 263 |
This gives the project a simple historical database.
6. ThingSpeak integration
ThingSpeak can be used as the IoT visualization layer.
For example:
Field 1 → Temperature
Field 2 → Humidity
Field 3 → Heart Rate
Field 4 → SpO2
Field 5 → Air Quality
Field 6 → Light
Conceptually:
ESP32
│
├──────────────► ThingSpeak
│ │
│ ▼
│ Graphs/Charts
│
└──────────────► n8n
│
▼
AI Agent
7. n8n automation workflow
A practical workflow can be designed as follows:
┌──────────────┐
│ ESP32 Device │
└──────┬───────┘
│
▼
┌───────────────┐
│ Webhook Trigger│
└───────┬───────┘
│
▼
┌───────────────┐
│ Validate JSON │
└───────┬───────┘
│
▼
┌─────────────┐
│ Code/Set │
│ Node │
└──────┬──────┘
│
┌─────────┼─────────┐
│ │ │
▼ ▼ ▼
Google Sheets ThingSpeak AI
│ │ │
│ │ ▼
│ │ ┌────────────┐
│ │ │ AI Agent │
│ │ └─────┬──────┘
│ │ │
│ │ ▼
│ │ Recommendation
│ │ │
└─────────┴──────────┤
▼
IF Alert Needed
/ \
YES NO
│ │
▼ ▼
Telegram Finish
│
▼
Voice Alert
8. AI agent
The AI agent should not simply receive raw sensor values.
Instead, n8n should provide structured context.
Example:
{
"temperature": 31.2,
"humidity": 72,
"air_quality": 390,
"heart_rate": 92,
"spo2": 97,
"presence": true,
"time": "20:10"
}
The AI agent can then generate a response such as:
Current environment:
Temperature: 31.2°C
Humidity: 72%
Air-quality indicator: elevated
Recommendation:
Consider improving ventilation and reducing indoor heat.
Stay hydrated according to your normal needs.
Physiological readings are informational only and are not a medical diagnosis.
The important design principle is:
Sensor data
↓
Rules / validation
↓
AI contextualization
↓
Human-readable recommendation
rather than:
Sensor data → AI → medical diagnosis
9. Agentic behavior
The "agentic IoT" component can be implemented as a controlled decision loop.
┌───────────────┐
│ Sensor Event │
└───────┬───────┘
▼
┌───────────────┐
│ Analyze State │
└───────┬───────┘
▼
┌───────────────┐
│ Select Action │
└───────┬───────┘
▼
┌─────────────┼─────────────┐
▼ ▼ ▼
Log Data Notify User Control Device
│ │ │
└─────────────┼─────────────┘
▼
Observe Again
For example:
IF air-quality value is elevated
↓
Create recommendation
↓
Send Telegram notification
↓
Log event
↓
Wait
↓
Read sensor again
10. Telegram notification
Example workflow:
n8n
│
▼
AI Agent
│
▼
Generate message
│
▼
Telegram Bot
│
▼
User's phone
Example:
Smart Mirror Alert
Indoor air-quality indicator has increased.
Consider improving ventilation.
For voice alerts:
AI Agent
↓
Text recommendation
↓
TTS service
↓
Audio file
↓
Telegram Bot
↓
User
Telegram therefore becomes both a notification channel and a remote interaction interface.
11. Telegram conversational control
The system can also be made bidirectional.
USER
│
"Give me today's data"
│
▼
Telegram
│
▼
n8n
│
▼
AI Agent
│
┌────────┴────────┐
▼ ▼
Google Sheets ThingSpeak
│ │
└────────┬────────┘
▼
AI response
│
▼
Telegram
Example commands:
/status
/today
/temperature
/humidity
/health
/airquality
/recommendation
You can also implement natural-language questions:
User:
"How was the temperature today?"
↓
Telegram → n8n → Google Sheets → AI Agent
↓
Telegram:
"The recorded temperature ranged from
28.4°C to 32.1°C during the available
measurements."
12. Smart Mirror webpage
The web interface can contain:
┌─────────────────────────────────────────────┐
│ SMART MIRROR │
│ │
│ Tuesday, 29 September 2026 │
│ 20:40 │
│ │
│ Temperature 29.4 °C │
│ Humidity 62 % │
│ Air Quality 245 │
│ Heart Rate 78 BPM │
│ SpO₂ 97 % │
│ │
│ ─────────────────────────────────────────── │
│ │
│ AI Recommendation │
│ "Environment is relatively warm. │
│ Consider ventilation and hydration." │
│ │
│ ● System Online │
└─────────────────────────────────────────────┘
13. Suggested webpage architecture
Browser
│
▼
HTML / CSS / JavaScript
│
├── Current measurements
├── Charts
├── AI recommendation
├── Device status
└── Alert history
│
▼
REST API
│
▼
Backend
│
▼
Database
For a simple prototype, the ESP32 itself can serve a lightweight webpage.
For a larger system:
ESP32
↓
n8n/API
↓
Database
↓
Web application
is preferable.
14. Hardware block diagram
+----------------+
| ESP32 |
| |
| Wi-Fi |
| GPIO |
| ADC |
+---+---+---+----+
| | |
+-------------+ | +-------------+
| | |
▼ ▼ ▼
+---------+ +---------+ +---------+
| DHT22 | | MAX30102| | MQ-135 |
| Temp/RH | | HR/SpO2 | | Air |
+---------+ +---------+ | Quality |
+---------+
|
|
▼
+-----------+
| BH1750/ |
| LDR |
+-----------+
ESP32
│
┌───────┴────────┐
▼ ▼
Display Wi-Fi
│
▼
n8n
15. Example electrical schematic
A basic ESP32 sensor arrangement can be represented as:
ESP32
┌─────────────────┐
│ │
3V3 ───┤ 3V3 │
GND ───┤ GND │
│ │
DHT DATA ────┤ GPIO 4 │
│ │
MQ OUT ──────┤ GPIO 34 / ADC │
│ │
PIR OUT ─────┤ GPIO 27 │
│ │
│ GPIO 21 ────────┼──── SDA
│ GPIO 22 ────────┼──── SCL
│ │
└─────────────────┘
│
│ I²C
┌─────────┴──────────┐
│ │
▼ ▼
MAX30102 BH1750
Power considerations
Do not connect arbitrary 5 V sensor outputs directly to ESP32 GPIO pins.
ESP32 GPIO is generally a 3.3 V logic environment, so the voltage levels and power requirements of each sensor/module must be checked before wiring.
16. ESP32 firmware structure
The firmware should be divided into functions:
setup()
│
├── initializeSerial()
├── initializeSensors()
├── connectWiFi()
└── initializeWebServer()
loop()
│
├── readSensors()
├── validateReadings()
├── updateDisplay()
├── sendData()
├── handleWebRequests()
└── delay()
17. Example ESP32 code
Below is a starting firmware architecture using an ESP32 and DHT sensor.
#include <WiFi.h>
#include <HTTPClient.h>
#include <ArduinoJson.h>
#include <DHT.h>
#define DHT_PIN 4
#define DHT_TYPE DHT22
DHT dht(DHT_PIN, DHT_TYPE);
const char* WIFI_SSID = "YOUR_WIFI";
const char* WIFI_PASSWORD = "YOUR_PASSWORD";
const char* N8N_WEBHOOK =
"https://YOUR_N8N_SERVER/webhook/smart-mirror";
unsigned long lastSend = 0;
const unsigned long SEND_INTERVAL = 30000;
void connectWiFi()
{
WiFi.begin(WIFI_SSID, WIFI_PASSWORD);
Serial.print("Connecting");
while (WiFi.status() != WL_CONNECTED)
{
delay(500);
Serial.print(".");
}
Serial.println();
Serial.println("WiFi connected");
Serial.println(WiFi.localIP());
}
void setup()
{
Serial.begin(115200);
dht.begin();
connectWiFi();
}
void sendSensorData(float temperature,
float humidity)
{
if (WiFi.status() != WL_CONNECTED)
return;
HTTPClient http;
http.begin(N8N_WEBHOOK);
http.addHeader("Content-Type", "application/json");
StaticJsonDocument<512> doc;
doc["device_id"] = "SMART_MIRROR_01";
doc["temperature"] = temperature;
doc["humidity"] = humidity;
doc["timestamp"] = millis();
String json;
serializeJson(doc, json);
int responseCode = http.POST(json);
Serial.print("HTTP response: ");
Serial.println(responseCode);
http.end();
}
void loop()
{
if (millis() - lastSend >= SEND_INTERVAL)
{
lastSend = millis();
float temperature = dht.readTemperature();
float humidity = dht.readHumidity();
if (isnan(temperature) || isnan(humidity))
{
Serial.println("Sensor read failed");
return;
}
Serial.print("Temperature: ");
Serial.println(temperature);
Serial.print("Humidity: ");
Serial.println(humidity);
sendSensorData(temperature, humidity);
}
}
This is intentionally a foundation, rather than pretending one sketch can cover every hardware configuration. MAX30102, MQ-series sensors, displays, secure authentication, OTA updates, and production error handling should be added according to the actual hardware selected.
18. n8n workflow design
A practical n8n workflow:
[Webhook]
│
▼
[Code: Validate]
│
▼
[Set: Normalize Data]
│
├───────────────┐
│ │
▼ ▼
[Google Sheets] [ThingSpeak]
│
▼
[AI Agent]
│
▼
[IF]
┌──┴──┐
YES NO
│ │
▼ ▼
[Telegram] [End]
│
▼
[TTS]
│
▼
[Telegram Audio]
19. Example n8n validation code
A Code node could perform basic validation:
const data = $json;
const required = [
"device_id",
"temperature",
"humidity"
];
for (const field of required) {
if (data[field] === undefined) {
throw new Error(`Missing field: ${field}`);
}
}
return [{
json: {
device_id: String(data.device_id),
temperature: Number(data.temperature),
humidity: Number(data.humidity),
heart_rate:
data.heart_rate !== undefined
? Number(data.heart_rate)
: null,
spo2:
data.spo2 !== undefined
? Number(data.spo2)
: null,
air_quality:
data.air_quality !== undefined
? Number(data.air_quality)
: null,
received_at: new Date().toISOString()
}
}];
20. Rule engine before AI
A strong project design is to combine deterministic rules + AI.
Example:
const d = $json;
let alerts = [];
if (d.temperature > 35) {
alerts.push("High environmental temperature");
}
if (d.humidity > 80) {
alerts.push("High humidity");
}
if (d.air_quality > 400) {
alerts.push("Elevated air-quality sensor reading");
}
return [{
json: {
...d,
alerts,
alert_required: alerts.length > 0
}
}];
The AI then converts the structured event into understandable language.
This is more controllable than allowing the AI to make unrestricted decisions directly from raw sensor values.
21. AI Agent prompt
A suitable system prompt can be structured like this:
You are the AI assistant for an IoT smart mirror.
Your job is to interpret sensor information and provide
short, understandable wellness/environment recommendations.
Rules:
1. Never claim to diagnose a disease.
2. Never claim that a sensor reading is medically definitive.
3. Treat physiological measurements as informational.
4. Clearly distinguish environmental information from
physiological information.
5. If a reading appears unusual, recommend appropriate
caution and, where appropriate, professional advice.
6. Do not invent sensor values.
7. Do not modify the numerical readings.
8. Use only the data provided to you.
9. Keep Telegram alerts concise.
10. Mention when sensor reliability or measurement context
may affect interpretation.
Input:
Temperature: {{$json.temperature}}
Humidity: {{$json.humidity}}
Air Quality: {{$json.air_quality}}
Heart Rate: {{$json.heart_rate}}
SpO2: {{$json.spo2}}
Generate:
- Current status
- Relevant observation
- Practical recommendation
- Safety note when appropriate
22. Google Sheets database design
Create columns such as:
timestamp
device_id
temperature
humidity
air_quality
heart_rate
spo2
light
presence
alert
ai_recommendation
Example:
2026-09-29 20:40:12
SMART_MIRROR_01
29.4
62
245
78
97
430
true
false
"Environment is warm..."
This provides a simple historical record for demonstrations and analysis.
23. ThingSpeak channel
A possible channel structure:
ThingSpeak Channel
Field 1 → Temperature
Field 2 → Humidity
Field 3 → Heart Rate
Field 4 → SpO2
Field 5 → Air Quality
Field 6 → Light Level
Field 7 → Presence
Dashboard:
┌─────────────────────────────────────────┐
│ SMART MIRROR DASHBOARD │
├───────────────────┬─────────────────────┤
│ Temperature │ Humidity │
│ 📈 │ 📈 │
├───────────────────┼─────────────────────┤
│ Heart Rate │ SpO2 │
│ 📈 │ 📈 │
├───────────────────┴─────────────────────┤
│ Air Quality │
│ 📈 │
└─────────────────────────────────────────┘
24. Complete data flow
SENSOR LAYER
│
▼
ESP32 ADC/
GPIO/I²C/UART
│
▼
Data validation
│
▼
JSON creation
│
▼
Wi-Fi
│
▼
n8n Webhook
│
┌───────┼─────────┐
│ │ │
▼ ▼ ▼
Sheets ThingSpeak Rule Engine
│
▼
AI Agent
│
┌─────────┴─────────┐
▼ ▼
Recommendation Alert decision
│
▼
Telegram
│
┌─────────┴─────────┐
▼ ▼
Text Voice
25. Sequence diagram
User Smart Mirror ESP32 n8n AI Telegram
│ │ │ │ │ │
│─────────────►│ │ │ │ │
│ │ │ │ │ │
│ │──────────────►│ │ │ │
│ │ Read sensors │ │ │
│ │ │ │ │ │
│ │ │─────────►│ │ │
│ │ │ JSON │ │ │
│ │ │ │ │ │
│ │ │ │────────►│ │
│ │ │ │ Sensor │ │
│ │ │ │ data │ │
│ │ │ │ │ │
│ │ │ │◄────────│ │
│ │ │ │ recommendation │
│ │ │ │ │ │
│ │ │ │────────────────────►│
│ │ │ │ alert │
│◄─────────────│◄──────────────│ │ │ │
│ │ │ │ │ │
26. State diagram
┌──────────────┐
│ START │
└──────┬───────┘
▼
┌──────────────┐
│ Initialize │
│ Sensors │
└──────┬───────┘
▼
┌──────────────┐
│ Connect WiFi │
└──────┬───────┘
│
┌─────▼─────┐
│ Connected?│
└──┬─────┬──┘
NO│ │YES
│ ▼
│ Read Sensors
│ │
│ ▼
│ Validate
│ │
│ ▼
│ Send Data
│ │
│ ▼
│ Display
│ │
│ ▼
└── Reconnect
27. Physical Smart Mirror construction
A typical construction is:
FRONT
──────────────────────────────
│ │
│ TWO-WAY MIRROR │
│ │
│ ┌────────────────┐ │
│ │ LCD/Monitor │ │
│ │ behind mirror │ │
│ └────────────────┘ │
│ │
──────────────────────────────
BACK
┌──────────────────────────────┐
│ Display / Monitor │
│ │
│ ESP32 │
│ Sensor modules │
│ Power supply │
│ Optional Raspberry Pi │
│ Cable management │
└──────────────────────────────┘
The display is positioned behind the two-way mirror so that white/light UI elements are visible through the mirror surface.
28. Recommended webpage UI
Header
AI SMART MIRROR
Connected ●
Environmental card
🌡 Temperature
29.4 °C
💧 Humidity
62 %
🌫 Air Quality
245
Wellness card
❤️ Heart Rate
78 BPM
🫁 SpO₂
97 %
AI card
🤖 AI Recommendation
The current environment is warm.
Consider improving ventilation and
maintaining normal hydration.
System card
ESP32 ONLINE
Wi-Fi CONNECTED
n8n ONLINE
ThingSpeak ONLINE
Telegram READY
29. Security architecture
This part is important for a good project report.
Do not hard-code sensitive production credentials into publicly shared source code.
Use:
ESP32
│
│ HTTPS
▼
n8n
│
├── Credentials
├── API keys
├── Telegram token
└── AI provider credentials
Recommended protections:
-
HTTPS where supported.
-
Authentication on webhook endpoints.
-
Secret/API-key validation.
-
Separate development and production credentials.
-
No Telegram bot token in GitHub.
-
No Wi-Fi password in published source.
-
Restrict n8n access.
-
Validate all incoming sensor data.
-
Rate-limit public endpoints.
-
Avoid sending unnecessary personal information to external AI services.
30. Fault handling
The project should explicitly handle:
Wi-Fi failure
Wi-Fi lost
↓
Reconnect
↓
If unavailable
↓
Continue local operation
Sensor failure
Sensor read
↓
Invalid?
/ \
YES NO
| |
Error Continue
n8n unavailable
ESP32 → n8n
↓
Connection failure
↓
Store/retry locally
↓
Send when connection returns
AI unavailable
The system should still be capable of:
Sensor → Rule Engine → Basic Alert
without depending completely on the AI service.
31. Project modules
For your documentation, divide the project into these modules:
Module 1 — Smart Mirror
Responsible for:
-
Display
-
Clock
-
Sensor information
-
AI recommendations
Module 2 — ESP32 IoT controller
Responsible for:
-
Sensor acquisition
-
Wi-Fi
-
JSON generation
-
Device communication
Module 3 — Cloud/automation
Responsible for:
-
n8n
-
Webhook
-
Data processing
-
Workflow execution
Module 4 — AI Agent
Responsible for:
-
Contextual interpretation
-
Recommendation generation
-
Natural-language response
Module 5 — Data logging
Responsible for:
-
Google Sheets
-
Historical records
-
ThingSpeak visualization
Module 6 — Notification
Responsible for:
-
Telegram messages
-
Voice notifications
-
Alert events
Module 7 — Web dashboard
Responsible for:
-
Live sensor information
-
Charts
-
System status
-
AI recommendations
32. Project objectives
The project's main objectives are:
-
Develop an ESP32-based IoT smart mirror.
-
Integrate multiple sensors into a single IoT platform.
-
Collect and transmit sensor data wirelessly.
-
Develop an n8n automation pipeline.
-
Integrate an AI agent for contextual recommendations.
-
Store sensor information in Google Sheets.
-
Visualize historical IoT data using ThingSpeak.
-
Develop Telegram notification functionality.
-
Implement Telegram voice alerts.
-
Develop a web-based Smart Mirror interface.
-
Demonstrate agentic decision-making using sensor events.
-
Implement appropriate security and fault handling.
33. Advantages
-
Low-cost prototype architecture.
-
ESP32 provides Wi-Fi and substantial GPIO/I²C capabilities.
-
n8n makes the automation workflow visually understandable.
-
Google Sheets makes historical data easy to inspect.
-
ThingSpeak provides IoT visualization.
-
Telegram provides remote notification.
-
AI makes raw sensor information easier to understand.
-
The architecture can be extended with additional sensors and actuators.
34. Limitations
A good academic report should explicitly mention these:
-
Consumer-grade sensors have measurement limitations.
-
MQ-series sensors are not equivalent to calibrated professional air-quality instruments.
-
MAX30102-based measurements can be affected by movement, contact, skin characteristics, sensor placement, and other factors.
-
Internet connectivity may be required for cloud/AI features.
-
AI-generated recommendations can be incorrect.
-
The system should not be used for medical diagnosis.
-
Smart-mirror display visibility depends on mirror/display construction.
-
Cloud services may have usage limits or service dependencies.
35. Future enhancements
Possible future versions can include:
Face recognition
↓
Personalized dashboard
↓
User-specific preferences
Other extensions :
-
Voice interaction.
-
Local/offline AI.
-
More environmental sensors.
-
UV sensor.
-
CO₂ sensor.
-
Noise monitoring.
-
Calendar integration.
-
Weather integration.
-
Exercise/activity integration.
-
Home automation.
-
Smart lighting.
-
Medication reminders.
-
Personalized wellness history.
-
Mobile application.
-
Edge AI on ESP32/companion computer.
-
Predictive anomaly detection.
36. Final system architecture
┌─────────────────────┐
│ USER │
└──────────┬──────────┘
│
Smart Mirror
│
┌──────────▼──────────┐
│ WEB INTERFACE │
└──────────┬──────────┘
│
▼
┌─────────────────────┐
│ ESP32 │
│ │
│ Wi-Fi + Processing │
└─────┬───┬───┬───────┘
│ │ │
┌────────────┘ │ └────────────┐
▼ ▼ ▼
DHT22 MAX30102 Air Sensor
Temp/Humidity HR/SpO2 MQ/CO2
│ │ │
└────────────────┼────────────────┘
│
▼
Internet/Wi-Fi
│
▼
┌─────────────────────┐
│ n8n │
│ Automation Engine │
└─────┬───┬───┬───────┘
│ │ │
┌─────────────┘ │ └─────────────┐
▼ ▼ ▼
Google Sheets ThingSpeak AI Agent
│
▼
Recommendation
│
▼
Telegram
│
┌────────┴────────┐
▼ ▼
Text Alert Voice Alert
37. Suggested project report structure
For a full academic/project documentation, use:
1. Abstract
2. Introduction
2.1 Background
2.2 Problem Statement
2.3 Proposed Solution
2.4 Objectives
2.5 Scope
3. Literature/Technology Review
4. System Requirements
4.1 Hardware
4.2 Software
4.3 Cloud Services
5. System Architecture
6. Hardware Design
6.1 ESP32
6.2 Sensors
6.3 Display
6.4 Power Supply
6.5 Smart Mirror Construction
7. Circuit Design
7.1 Circuit Diagram
7.2 Pin Configuration
7.3 Wiring
8. Software Design
8.1 ESP32 Firmware
8.2 Web Interface
8.3 n8n
8.4 AI Agent
8.5 Telegram
8.6 Google Sheets
8.7 ThingSpeak
9. Workflow Design
10. AI Recommendation Engine
11. Agentic IoT Architecture
12. Database/Data Logging
13. Security
14. Testing
14.1 Sensor Testing
14.2 Wi-Fi Testing
14.3 API Testing
14.4 n8n Testing
14.5 Telegram Testing
14.6 AI Testing
15. Results
16. Limitations
17. Future Scope
18. Conclusion
19. References
20. Appendix
A. ESP32 Code
B. n8n Workflow
C. Web Code
D. Wiring
Recommended implementation order
Build it in this order rather than trying to construct everything simultaneously:
1. ESP32
↓
2. Temperature/humidity sensor
↓
3. Wi-Fi
↓
4. JSON data
↓
5. n8n Webhook
↓
6. Google Sheets
↓
7. ThingSpeak
↓
8. Telegram text alerts
↓
9. AI Agent
↓
10. Telegram voice
↓
11. Web dashboard
↓
12. Smart Mirror display
↓
13. Additional health/environment sensors
↓
14. Complete integration
↓
15. Testing + documentation
This staged approach makes debugging much easier because each layer can be verified independently before the next one is added.
Summary
AI Smart Mirror with Health Recommendation System is an IoT project that combines ESP32 + sensors + Smart Mirror display + n8n automation + AI Agent + Telegram + Google Sheets + ThingSpeak.
Core workflow
Sensors
↓
ESP32
↓
Wi-Fi / HTTP
↓
n8n
├──→ Google Sheets
├──→ ThingSpeak
└──→ AI Agent
↓
Recommendation
↓
Telegram
├── Text Alert
└── Voice Alert
Main hardware
-
ESP32
-
DHT22/DHT11 — temperature & humidity
-
MQ-series or appropriate air-quality sensor
-
MAX30102 — experimental heart-rate/SpO₂ monitoring
-
LDR/BH1750 — light measurement
-
PIR — presence detection
-
Display/monitor behind a two-way mirror
-
Optional buzzer, LEDs and relay
Main software
-
ESP32 Arduino/C++ firmware
-
Web dashboard using HTML/CSS/JavaScript
-
n8n automation
-
AI Agent
-
Google Sheets
-
ThingSpeak
-
Telegram Bot
-
Text-to-Speech service for voice alerts
AI/agentic function
The system collects sensor data, validates it, analyzes the current state, and generates a human-readable recommendation.
Sensor Data
↓
Validation / Rules
↓
AI Agent
↓
Recommendation
↓
Notification / Dashboard
The AI should provide wellness/environment recommendations, not medical diagnoses.
Key project features
-
Real-time Smart Mirror information
-
IoT sensor monitoring
-
Cloud data logging
-
Historical graphs
-
AI-generated recommendations
-
Automated n8n workflows
-
Telegram notifications
-
Telegram voice alerts
-
Web dashboard
-
Fault handling
-
Security/authentication
-
Expandable agentic IoT architecture
Documentation chapters
-
Abstract
-
Introduction
-
Objectives and problem statement
-
Hardware requirements
-
Software requirements
-
System architecture
-
Circuit/schematic design
-
ESP32 programming
-
Webpage development
-
n8n workflow
-
AI Agent
-
Telegram integration
-
Google Sheets
-
ThingSpeak
-
Agentic IoT operation
-
Testing
-
Results
-
Security
-
Limitations
-
Future scope
-
Conclusion
-
Complete source code and appendix
In one sentence:
The
project turns an ESP32-based Smart Mirror into an AI-assisted IoT platform that senses the environment/user-related measurements, processes them through n8n, logs and visualizes the data, generates contextual recommendations, and automatically delivers Telegram text/voice alerts.
AI Smart Mirror — Project Mind Map
┌───────────────────────────────┐
│ AI SMART MIRROR + IoT │
│ Health Recommendation System │
└──────────────┬────────────────┘
│
┌────────────────────────────────┼────────────────────────────────┐
│ │ │
▼ ▼ ▼
┌──────────────┐ ┌──────────────┐ ┌──────────────┐
│ HARDWARE │ │ SOFTWARE │ │ AI AGENT │
└──────┬───────┘ └──────┬───────┘ └──────┬───────┘
│ │ │
├─ ESP32 ├─ Arduino IDE ├─ Sensor analysis
├─ DHT22 ├─ HTML/CSS/JS ├─ Context analysis
├─ MAX30102 ├─ n8n ├─ Recommendations
├─ Air-quality sensor ├─ Google Sheets ├─ Alert decision
├─ LDR/BH1750 ├─ ThingSpeak └─ Natural language
├─ PIR └─ Telegram
├─ Display
├─ Two-way mirror
└─ Power supply
│
▼
┌──────────────────┐
│ DATA FLOW │
└────────┬─────────┘
│
┌─────────────┼─────────────┐
▼ ▼ ▼
Sensors ESP32 Wi-Fi
│ │ │
└─────────────┴─────────────┘
│
▼
n8n Webhook
│
┌────────┼────────┐
▼ ▼ ▼
Validate Store Analyze
│ │ │
│ │ ▼
│ │ AI Agent
│ │ │
▼ ▼ ▼
┌──────────┐ ┌────────┐ ┌──────────┐
│ Sheets │ │Thing- │ │ Telegram │
│ │ │Speak │ │ Alerts │
└──────────┘ └────────┘ └────┬─────┘
│
┌─────┴─────┐
▼ ▼
Text Alert Voice Alert
┌────────────────────────────────┼────────────────────────────────┐
│ │ │
▼ ▼ ▼
┌──────────────┐ ┌──────────────┐ ┌──────────────┐
│ SMART MIRROR │ │ n8n │ │ DASHBOARD │
└──────┬───────┘ └──────┬───────┘ └──────┬───────┘
│ │ │
├─ Clock ├─ Webhook ├─ Temperature
├─ Sensor values ├─ Data validation ├─ Humidity
├─ AI recommendation ├─ Data transformation ├─ Heart rate
├─ System status ├─ Google Sheets ├─ SpO₂
└─ Alerts ├─ ThingSpeak ├─ Air quality
├─ AI Agent ├─ Charts
└─ Telegram └─ AI recommendation
┌──────────────────────────────┐
│ SECURITY & SAFETY │
└──────────────┬───────────────┘
│
├─ HTTPS
├─ API authentication
├─ Secret credentials
├─ Input validation
├─ Fault handling
└─ No medical diagnosis
┌──────────────────────────────┐
│ FUTURE SCOPE │
└──────────────┬───────────────┘
│
├─ Voice assistant
├─ Face recognition
├─ Personalized profiles
├─ Offline/edge AI
├─ Home automation
├─ Mobile application
├─ More environmental sensors
└─ Predictive analytics
Simplified mind map
AI SMART MIRROR
│
├── Hardware
│ ├── ESP32
│ ├── DHT22
│ ├── MAX30102
│ ├── Air Quality
│ ├── Light
│ ├── PIR
│ └── Display + Mirror
│
├── IoT
│ ├── Wi-Fi
│ ├── HTTP/JSON
│ ├── n8n
│ └── Cloud
│
├── AI
│ ├── Data analysis
│ ├── Context
│ ├── Recommendations
│ └── Agentic decisions
│
├── Automation
│ ├── Webhook
│ ├── Google Sheets
│ ├── ThingSpeak
│ └── Telegram
│
├── Notifications
│ ├── Text
│ └── Voice
│
├── Dashboard
│ ├── Live data
│ ├── Historical charts
│ ├── System status
│ └── AI recommendation
│
├── Security
│ ├── HTTPS
│ ├── Authentication
│ ├── API keys
│ └── Data validation
│
└── Future Scope
├── Voice AI
├── Face recognition
├── Mobile App
├── Edge AI
└── Smart Home

No comments:
Post a Comment