This document details the complete end-to-end setup process for VoltWatch.
- ESP8266 Microcontroller (e.g., NodeMCU v2 or Wemos D1 Mini)
- INA219 High Side DC Current Sensor Breakout
- DS3231 Precision RTC Module
- Appropriate logic level shifters (if your INA219 breakout is strict 5V, though most Adafruit-style boards have 3.3V regulators).
| Module | Pin | ESP8266 Pin |
|---|---|---|
| INA219 | SDA | D2 (GPIO 4) |
| INA219 | SCL | D1 (GPIO 5) |
| DS3231 | SDA | D2 (GPIO 4) |
| DS3231 | SCL | D1 (GPIO 5) |
| Both | VCC | 3.3V |
| Both | GND | GND |
- Python 3.11+
- Arduino IDE (or VSCode with PlatformIO / Arduino CLI)
- Open a terminal in the
backendfolder. - Create the virtual environment:
python -m venv .venv - Activate it:
- Windows:
.\.venv\Scripts\Activate.ps1 - Mac/Linux:
source .venv/bin/activate
- Windows:
- Install dependencies:
pip install -r requirements.txt - Run the server:
python run.py(App starts onhttp://localhost:8000)
- Open a second terminal in the
dashboardfolder. - Create and activate a new virtual environment as above.
- Install dependencies:
pip install -r requirements.txt - Run Streamlit:
streamlit run app.py
- Open
esp-ina219-datalogger.inoin Arduino IDE. - Ensure you have the
esp8266board manager installed. - Install the required libraries via the Library Manager:
Adafruit INA219,Adafruit BusIO,Adafruit GFX Library,Adafruit SSD1306,RTClib,ArduinoJson. - Compile and upload.
- On first boot, connect your phone to the
VoltWatch SetupWi-Fi AP. - Enter your real Wi-Fi credentials and the IP address of your backend server (e.g.,
192.168.1.50).