A comprehensive IoT sensor platform built on ESP32 for monitoring temperature, humidity, light levels, and ambient sound in your home or office. The system features ESP32 sensor nodes that transmit data to a central Raspberry Pi server with a 7-inch touchscreen display.
- Multi-Sensor Support: Temperature, humidity, light intensity, and audio level monitoring
- WiFi Connectivity: Send sensor data from multiple ESP32 nodes to a Raspberry Pi server via HTTP
- Centralized Dashboard: Raspberry Pi with 7-inch display running touch-friendly web interface
- Multiple Device Support: Monitor sensors from different rooms on a single display
- Real-Time Updates: Live sensor readings with 10-second auto-refresh
- Data Logging: Automatic logging of all sensor readings
- Modular Architecture: Separate firmware options for different sensor configurations
- Arduino IDE Compatible: Easy to flash and modify
- ESP32-D Development Board (one or more)
- 4MB Flash Memory
- WiFi 2.4GHz capability
- Raspberry Pi 3B+ or 4
- 7-inch HDMI touchscreen display
- MicroSD card (16GB+)
- Power supply
- DHT22 - Temperature and Humidity Sensor (GPIO4)
- BH1750 - Digital Light Sensor (I2C: SDA=GPIO21, SCL=GPIO22)
- MAX4466 - Electret Microphone Amplifier (GPIO35)
ESP32-D Connections:
┌─────────────────────────────────────┐
│ GPIO4 ──────────── DHT22 (Data) │
│ GPIO35 ──────────── MAX4466 (Out) │
│ GPIO21 ──────────── BH1750 (SDA) │
│ GPIO22 ──────────── BH1750 (SCL) │
│ 3.3V ──────────── Sensor VCC │
│ GND ──────────── Sensor GND │
└─────────────────────────────────────┘
Install these libraries via Arduino IDE Library Manager:
- DHT sensor library by Adafruit (v1.4.6+)
- Adafruit Unified Sensor by Adafruit (v1.1.14+)
- BH1750 by Christopher Laws (v1.3.0+)
- ArduinoJson by Benoit Blanchon (v6.21.0+) (for WiFi version only)
- Raspberry Pi OS (Bullseye or later)
- Python 3.x
- Flask (
pip3 install flask) - Chromium browser (for kiosk mode)
File: HomePOD_Sensor_Firmware.ino
Standalone firmware that reads all sensors and outputs data to Serial Monitor. Perfect for testing and development.
Features:
- All sensor support
- Serial output every 2 seconds
- No WiFi required
File: HomePOD_WiFi_Sensor_Firmware.ino
Full-featured firmware with WiFi connectivity to send data to a Raspberry Pi server.
Features:
- All sensor support
- WiFi connectivity
- HTTP POST to Raspberry Pi
- Auto-reconnect on WiFi disconnect
- JSON data format
- Sends data every 10 seconds
Setup Guide: See WIFI_SETUP_GUIDE.md
File: HomePOD_Env_Node/HomePOD_Env_Node.ino
Specialized firmware focusing on temperature and humidity monitoring.
Features:
- DHT22 sensor only
- Optimized for environmental monitoring
- Lower power consumption
File: HomePOD_Light_Node/HomePOD_Light_Node.ino
Dedicated light level monitoring with advanced features.
Features:
- BH1750 sensor only
- Light condition categorization (Dark, Dim, Normal, Bright, Very Bright)
- Configurable measurement modes
- Connect sensors to ESP32 according to wiring diagram above
- Connect ESP32 to computer via USB
-
Install Arduino IDE
-
Add ESP32 board support:
- Go to File → Preferences
- Add to "Additional Board Manager URLs":
https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json - Go to Tools → Board → Boards Manager
- Install "esp32 by Espressif Systems"
-
Install required libraries (see Software Requirements above)
- Open desired
.inofile in Arduino IDE - Select Board: ESP32 Dev Module
- Select your COM Port
- Click Upload
- Open Serial Monitor at 115200 baud
- Edit
HomePOD_WiFi_Sensor_Firmware.ino:- Update WiFi SSID and password
- Set Raspberry Pi IP address
- Set up Raspberry Pi server (see WIFI_SETUP_GUIDE.md)
- Upload firmware and monitor connection
================================
HomePOD Sensor Firmware
ESP32-D Initialization
================================
I2C initialized on SDA=21, SCL=22
Initializing sensors...
[OK] Microphone on GPIO35
[OK] DHT sensor on GPIO4
[OK] Light sensor (BH1750) on I2C
Sensor initialization complete!
Starting sensor readings...
=== HomePOD Sensor Readings ===
Temperature: 23.5°C
Humidity: 45.2%
Light Level: 234.5 lux
Audio Level: 120 (Peak: 450)
================================
The Raspberry Pi server receives data from all ESP32 sensor nodes and displays it on a 7-inch touchscreen. Access the dashboard at http://<raspberry-pi-ip>:5000 or http://localhost:5000 on the Pi itself.
Features:
- Touch-friendly UI optimized for 7-inch HDMI displays
- Real-time sensor readings from multiple ESP32 nodes with 10-second auto-refresh
- Multiple built-in apps:
- Weather - Current conditions and 5-day forecast with OpenWeatherMap integration
- To-Do List - Task management with add, complete, and delete functionality
- Timers - Multiple countdown timers with real-time updates and alerts
- Notes - Quick note-taking with timestamps
- Music Player - Queue management with playback controls
- System Stats - Raspberry Pi monitoring (CPU temp, usage, memory, disk, uptime)
- Persistent data storage - all app data saves to JSON files
- Room grouping for organizing multiple sensor nodes
- Emoji icons for visual room/weather identification
- JSON API endpoints for integration with other systems
To run the dashboard in full-screen kiosk mode on boot:
-
Install emoji font support:
sudo apt install fonts-noto-color-emoji -y
-
Create autostart entry:
sudo nano ~/.config/lxsession/LXDE-pi/autostartAdd:
@xset s off @xset -dpms @chromium-browser --kiosk --noerrdialogs http://localhost:5000 -
Set up server to start on boot:
sudo nano /etc/systemd/system/homepod.service
Add:
[Unit] Description=HomePOD Dashboard Server After=network.target [Service] ExecStart=/usr/bin/python3 /home/pi/HomePOD/homepod_server_v3.py WorkingDirectory=/home/pi/HomePOD User=pi Restart=always [Install] WantedBy=multi-user.target
Enable:
sudo systemctl enable homepod.service -
Reboot:
sudo reboot
GET /- Web dashboardGET /latest- Latest data from all devices (JSON)GET /latest/<device_name>- Latest data from specific devicePOST /sensor-data- Endpoint for ESP32 data submission
{
"device_name": "HomePOD-Living-Room",
"timestamp": 45230,
"sensors": {
"temperature": 23.5,
"humidity": 45.2,
"light": 234.5,
"audio_level": 120,
"audio_peak": 450
},
"status": {
"wifi_rssi": -45,
"uptime_ms": 45230
}
}Edit in the firmware to customize:
// Temperature/Humidity ranges
#define TEMP_MIN -40.0f
#define TEMP_MAX 80.0f
#define HUMIDITY_MIN 0.0f
#define HUMIDITY_MAX 100.0f
// Light level thresholds (lux)
#define LIGHT_DARK 10.0f
#define LIGHT_DIM 50.0f
#define LIGHT_NORMAL 300.0f
#define LIGHT_BRIGHT 1000.0f
// Audio settings
#define AUDIO_SAMPLES 64
#define AUDIO_NOISE_FLOOR 100
// Timing intervals (milliseconds)
#define SENSOR_READ_INTERVAL 2000
#define WIFI_SEND_INTERVAL 10000- Check wiring connections
- Verify sensor power (3.3V)
- Ensure I2C pull-up resistors if using long wires
- Check sensor I2C address (BH1750 default: 0x23)
- Verify WiFi is 2.4GHz (ESP32 doesn't support 5GHz)
- Check SSID and password are correct
- Ensure ESP32 is within WiFi range
- Check Serial Monitor for detailed error messages
- DHT22 requires 2 seconds stabilization time
- BH1750 needs 180ms for first measurement
- Verify sensor voltage (3.3V for ESP32)
HomePOD/
├── HomePOD_Sensor_Firmware.ino # Basic all-sensor firmware
├── HomePOD_WiFi_Sensor_Firmware.ino # WiFi-enabled firmware
├── HomePOD_Env_Node/ # Environmental monitoring node
│ └── HomePOD_Env_Node.ino
├── HomePOD_Light_Node/ # Light monitoring node
│ └── HomePOD_Light_Node.ino
├── raspberry_pi_server.py # Basic Python server
├── homepod_server_v2.py # Enhanced server with weather & to-do
├── homepod_server_v3.py # Full-featured server with multiple apps
├── WIFI_SETUP_GUIDE.md # WiFi setup instructions
├── src/ # PlatformIO source files
├── include/ # PlatformIO headers
└── README.md # This file
The HomePOD system consists of:
- ESP32 Sensor Nodes: One or more ESP32 devices with sensors placed in different rooms
- Raspberry Pi Display Server: Central server receiving data via WiFi and displaying on 7-inch touchscreen
- Web Dashboard: Touch-friendly interface with sensor readings and multiple productivity apps
The system supports multiple ESP32 sensor nodes reporting to the same Raspberry Pi server. Each device should have a unique DEVICE_NAME configured in the firmware to identify different rooms or locations.
Configure the Raspberry Pi server to start automatically on boot using systemd. See WIFI_SETUP_GUIDE.md for instructions.
All sensor data is logged to sensor_data.log on the Raspberry Pi in JSON format, ready for analysis or import into other tools.
- MQTT support for Home Assistant integration
- Mobile app for iOS/Android
- Database storage (SQLite/InfluxDB)
- Grafana dashboard integration
- Alert notifications (email/SMS)
- Battery power optimization
- Deep sleep mode
- OTA (Over-The-Air) firmware updates
Feel free to submit issues, fork the repository, and create pull requests for any improvements.
This project is open source and available for personal and educational use.
Authors: Ryan Li, Gary Sun, Ryan Wang, Ryan Giang Repository: https://github.com/sharkmet/HomePOD
For issues, questions, or suggestions:
- Open an issue on GitHub
- Check the WIFI_SETUP_GUIDE.md for setup help
Built with:
- ESP32-D Microcontroller
- Arduino Framework
- Adafruit Sensor Libraries
- Flask Web Framework