Module Architecture
The WiFi module is organized into several functional categories:Connection Management
WiFiModule, WiFiHandler V1/V2, and WiFiManager provide flexible WiFi connectivity with auto-reconnection
Firebase Integration
Three generations (V1, V2, V3) supporting Realtime Database, Firestore, Storage, and Messaging
MQTT Communication
Full-featured MQTT client with auto-reconnection, QoS support, and JSON publishing
Cloud Services
Google Sheets, Telegram, and WhatsApp bot integrations for data logging and notifications
Available Modules
WiFi Connection (4 modules)
| Module | Description | Use Case |
|---|---|---|
WiFiModule | Basic WiFi connectivity | Simple connection management |
WiFiHandler | Legacy WiFi handler with callbacks | V1 projects |
WiFiHandlerV2 | Modern WiFi handler with AP mode | Advanced WiFi features |
WiFiManager | Web-based WiFi configuration | User-friendly setup |
Firebase Services (15 modules)
Firebase V1 - Legacy Implementation
Firebase V1 - Legacy Implementation
Complete featured wrapper using Firebase ESP Client library:
firebase-handler.h- Main Firebase handler with comprehensive callbacks- Full CRUD operations with sync/async support
- FCM messaging and Firestore document operations
- Note: Contains hardcoded credentials - security risk for production
Firebase V2 - Service-Specific Classes
Firebase V2 - Service-Specific Classes
Simplified modular approach using FirebaseClient library:
firebase-rtdbv2.h- Realtime Database operationsfirebase-firestorev2.h- Firestore document managementfirebase-storagev2.h- Cloud Storage file operationsfirebase-messagingv2.h- Firebase Cloud Messaging- Type-safe API with real-time streaming support
Firebase V3 - Singleton Architecture
Firebase V3 - Singleton Architecture
Modern enterprise-ready implementation:
firebase-applicationv3.h- Centralized authenticationfirebase-rtdbv3.h- Enhanced Realtime Databasefirebase-firestorev3.h- Advanced Firestore with batch operationsfirebase-storagev3.h- Storage with OTA supportfirebase-messagingv3.h- FCM with platform-specific config- Service account authentication and database administration
Cloud Integrations (4 modules)
| Module | Description | Authentication |
|---|---|---|
mqtt-manager.h | MQTT client with auto-reconnection | Username/password |
google-sheets.h | Google Sheets API integration | Service account |
telegram-bot.h | Telegram bot for notifications | Bot token |
whatsapp-bot.h | WhatsApp messaging via API | API key |
Time Synchronization (2 modules)
| Module | Description | Features |
|---|---|---|
datetime-ntp.h | Basic NTP client | Time synchronization |
datetime-ntpv2.h | Enhanced NTP with timezones | Timezone support, formatting |
Platform Support
All WiFi modules require ESP32 or ESP8266. They use conditional compilation and will not build on AVR platforms.
Quick Start
Enable WiFi Modules
Add module definitions to your project before including Kinematrix:Basic WiFi Connection
Module Selection Guide
WiFi Connection
WiFiModule
Use for: Simple projects needing basic connectivityBasic connection with auto-reconnect
WiFiHandlerV2
Use for: Advanced WiFi featuresAP mode, dual mode, scanning, callbacks
WiFiManager
Use for: End-user productsWeb-based configuration portal
Firebase Version
Firebase V2
Applications needing real-time streaming and simplified APIRecommended for most projects
Dependencies
WiFi modules require additional libraries in yourplatformio.ini:
Best Practices
Common Use Cases
IoT Data Logging
- Connect using WiFiHandlerV2
- Store data in Firebase Realtime Database (V2/V3)
- Send alerts via Telegram bot
- Log to Google Sheets for analysis
Remote Monitoring
- Use MQTT for real-time communication
- Subscribe to control topics
- Publish sensor data periodically
- Implement last-will-and-testament for status
Smart Home Control
- WiFiManager for easy setup
- MQTT for device communication
- Telegram bot for notifications
- Firebase for configuration storage
Memory Considerations
ESP8266 has limited RAM (80KB). Consider:
- Using only required modules
- Reducing buffer sizes
- Implementing memory-efficient patterns
- Monitoring heap usage during development
- 520KB RAM allows multiple cloud services
- Can run Firebase + MQTT simultaneously
- Supports larger JSON documents
Next Steps
WiFi Manager
Learn about advanced WiFi connection management
Firebase Integration
Explore Firebase V2 and V3 implementations
MQTT Communication
Set up MQTT for real-time messaging
Cloud Integrations
Connect to Google Sheets, Telegram, and WhatsApp