This project uses a CT sensor and ESP8266 to capture electricty consumption of any live wire and store it in a database or view its live value through a flask webserver.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
- Python 3.7
- Local MQTT Broker (Websockets Enabled)
- Flask
- MySQL DB
- MYSQL Python Connector
- Flask Table
- Python Date Time Lib
- CT Sensor
- Node MCU(Esp8266)
- Laptop/ RPi
- WiFi enabled envioronment
- [Install python 3.7 (https://www.python.org/downloads/)]
- [Install Mosquitto Broker (https://mosquitto.org/download/)]
- Install Python packages through pip, run: pip install Flask Flask-Table
- [Install MySQL DB with python connector enabled (https://www.mysql.com/downloads/)]
- Enter borker's IP address in MQTT.py
- Enter correct DB details in both MQTT.py and app.py
- Run MQTT.py and app.py
- Make connections as shown in PCB design in "PCB Printing resources" or [follow (https://learn.openenergymonitor.org/electricity-monitoring/ctac/how-to-build-an-arduino-energy-monitor)]
- Run mosquiito broker and MySQL DB.
- Launch MQTT.py and app.py script
- Open up local web browser to see login page
- Default login username: admin, Password: admin
This project is licensed under the MIT License - see the LICENSE.md file for details
- This projected was developed at National Council for Cement and Building Materials
- This project was completed under PS-1 of BITS Pilani