https://github.com/pantryf/energy_meter.esp32
ESP32 code for 3-phase realtime energy metering device to MQTT server through WiFi.
https://github.com/pantryf/energy_meter.esp32
3pahse energy esp esp32 idf meter mqtt wifi
Last synced: 11 months ago
JSON representation
ESP32 code for 3-phase realtime energy metering device to MQTT server through WiFi.
- Host: GitHub
- URL: https://github.com/pantryf/energy_meter.esp32
- Owner: pantryf
- License: mit
- Created: 2019-06-21T08:53:10.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2025-04-10T19:52:06.000Z (about 1 year ago)
- Last Synced: 2025-04-26T17:51:27.044Z (about 1 year ago)
- Topics: 3pahse, energy, esp, esp32, idf, meter, mqtt, wifi
- Language: C
- Homepage:
- Size: 191 KB
- Stars: 5
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
ESP32 code for 3-phase realtime energy metering device to MQTT server through WiFi.
```text
includePath:
/home/wolfram77/esp/esp-idf/components/**
```
## situation
- World population growing, moving to cities
- Urban density & complexity increasing
- Energy consumption increasing substatially
- Climate is changing, prepare for future climates
- Slow change in developed countries
- Buildings are becoming complex
- Building integrated photovoltaics
- Sustainable built environment
- Higher comfort demands
- Healthy buildings
## conserve
- Natural lighting & ventilation
- Upgrade to energy efficient appliances
- Device usage statistics (geyser, fridge, AC)
- Reduce reliance on appliances (candlelight, water cooler)
- Unplug devices when not in use
- Batch tasks (baking all in one go)
- Use renewable energy
## features
- Voltage: RMS, pk-pk, FFT, quality, indicate peak load times
- Current: RMS, pk-pk, FFT, usage, indicate internal load
- Power: inst., apparent, true, bill usage rate monthly, sense device
- Sense: temp., humidity, VOC, CO, CO2, PM, electric sound (devices)
- Control: room supply, mode setup
- More: state, district bill rate chart, predict bill, zero usage
- More: incentive non peak load, new home device recommendations
- More: shared info distribution, zero energy, device efficiency
Prepare features:
- Calculate time by fetching from NTP
- Show energy use graph
- Predict energy use based on current usage
- Predict bill based on current use
- Server size storage and analytics
- Enable configuration, price chart fetching
- Indicate energy source (coal, nuclear)
- Indicate savings
- Multiple access passwords
- Skill to ask for energy bill (ga, alexa)
- Previous month electricity bill, usage
- Prepaid mode?
- Reading averager
- Use watchdog to make more self resets
- Throughout day energy use
- Room wise energy use (/ac)
- Instruct fridge, ac?
- Hacker prevention
## device
- NVS partition generation
### http
- To write http apis here
### reference
```text
ESP32 ---> WiFi BT 2 cores peripherals
(40mm) (2.4Ghz) (4.2) (+ULP)
```
[ESP-IDF](https://github.com/espressif/esp-idf)
### setup
```bash
# enable access to serial port (TTY)
sudo usermod -a -G dialout $USER
# environment variables
$ESPPORT, $ESPBAUD, $MONITORBAUD
```
### flash
```bash
make menuconfig # application configuration
make -j8 # build application
make flash # flash to device
make monitor # monitor device logs
```
## mqtt
```bash
# kill process using a port
lsof -i :1883
kill -9
# start MQTT server and client
mosquitto
mosquitto_sub -h test.mosquitto.org -t "#" -v
```
