mirror of
https://github.com/cedev-1/esp-homelab.git
synced 2026-09-16 17:41:55 +00:00
AdGuard monitor for ESP32
- Python 100%
| main.py | ||
| README.md | ||
| ui_pack.py | ||
ESP Homelab Dashboard
A MicroPython-based dashboard for displaying homelab information on a 2.8" TFT screen (240x320 pixels). Currently integrates with AdGuard Home to show DNS query statistics and ad blocking metrics.
Features
- Real-time display of AdGuard Home statistics
- DNS queries count
- Blocked ads count
- Percentage of blocked queries with visual progress bar
- UI with rounded cards and progress bars
Hardware Requirements
- ESP-WROOM-32 microcontroller
- 2.8" TFT LCD display (ILI9341 controller, 240x320 resolution)
- Appropriate wiring connections (SPI interface)
Software Requirements
- MicroPython firmware for ESP32
- Thonny IDE for development and flashing
- Required libraries:
ili9341.pyfrom rdagger/micropython-ili9341
Setup Instructions
-
Flash MicroPython on ESP32:
- Use Thonny IDE to flash MicroPython firmware onto your ESP-WROOM-32
-
Create Project Structure:
- Create
boot.py(default file created by MicroPython) - Copy
main.pycontent intoboot.py(or keep as separate files if preferred) - Create
ui_pack.pywith the UI components - Download and copy
ili9341.pyfrom the repository linked above
- Create
-
Configure Settings:
- Edit the variables in
main.py:WIFI_SSIDandWIFI_PASSfor WiFi connectionADGUARD_IP,ADGUARD_PORT,ADGUARD_USER,ADGUARD_PASSfor AdGuard Home API access- Set
DEBUG = Truefor console output during development
- Edit the variables in
-
Hardware Connections:
- Connect the TFT display to ESP32 pins as specified in the code comments:
- CS: D15
- RESET: D4
- DC: D2
- SDI(MOSI): D23
- SCK: D18
- LED: 3V
- SDO(MISO): D19
- VCC: 3V
- GND: GND
- Connect the TFT display to ESP32 pins as specified in the code comments:
-
Upload Files:
- Use Thonny to upload
main.py,ui_pack.py, andili9341.pyto the ESP32
- Use Thonny to upload
Usage
Once powered on, the ESP32 will:
- Connect to WiFi
- Display the dashboard with static elements
- Continuously fetch and update AdGuard Home statistics every 5 seconds
- Show a red indicator in the bottom-right if API calls fail
TODO
- Create blog post (full tuto)
- Create reusable UI components library
- Add more homelab service integrations (e.g., Jellyfin, Pi-hole, Docker stats, system monitoring)
- Implement different dashboard layouts/modes
- Add touch input support for interactive features
- Create 3D printed enclosure model
- Add configuration menu for WiFi and API settings
- Add more visual indicators and alerts
- Battery/power management features