Monitor your home energy consumption with this Grafana dashboard using InfluxDB v2 and Flux queries.
- Emporia Vue 2 - Energy monitoring device (~$100)
- Server/VM - Running HomeAssistant & InfluxDB
Emporia Vue → HomeAssistant → InfluxDB v2 → Grafana
Data Flow:
- Emporia Vue monitors your circuit breaker and sends data to HomeAssistant
- HomeAssistant processes sensor data and writes to InfluxDB
- Grafana queries InfluxDB using Flux and displays the dashboard
- HomeAssistant installed and running
- InfluxDB v2.x installed and running
- Grafana installed (or Grafana Cloud account)
- Emporia Vue 2 device installed on your circuit breaker
Install the Emporia Vue 2 on your circuit breaker panel. Follow the instructions in the Emporia mobile app. The app provides safety guidelines and step-by-step installation instructions.
Safety Warning: Working with electrical panels can be dangerous. If you're not comfortable, hire a licensed electrician.
- Open the Emporia Vue mobile app and set up your device
- In HomeAssistant, go to Settings → Devices & Services → Add Integration
- Search for "Emporia Vue"
- Log in with your Emporia Vue credentials
- Your circuits should now appear as sensors in HomeAssistant
Add the following to your HomeAssistant configuration.yaml:
influxdb:
api_version: 2
host: YOUR_INFLUXDB_HOST # e.g., localhost or 192.168.1.100
port: 8086
token: YOUR_INFLUXDB_TOKEN # Generate in InfluxDB UI
organization: Home # Your InfluxDB org
bucket: HomeAssistant # Your InfluxDB bucket
ssl: false # Set to true if using HTTPS
verify_ssl: false
tags:
source: homeassistant
tags_attributes:
- friendly_name
- device_class
default_measurement: state
include:
entities:
- sensor.power_* # Include all Emporia power sensors
- sensor.*_power_* # Adjust based on your entity namesImportant: Replace the placeholders with your actual InfluxDB connection details.
To get your InfluxDB token:
- Open InfluxDB UI (usually http://your-server:8086)
- Go to Data → Tokens
- Generate a new token with write access to your HomeAssistant bucket
Restart HomeAssistant to activate the InfluxDB integration:
- Settings → System → Restart
- Open InfluxDB UI
- Go to Data Explorer
- Select bucket:
HomeAssistant - You should see measurements like
W,kWh, orstate - Filter by your Emporia sensors to confirm data is being written
- Open Grafana
- Go to Configuration → Data Sources
- Add InfluxDB data source:
- Query Language: Flux
- URL:
http://your-influxdb-host:8086 - Organization:
Home - Token: Your InfluxDB token
- Default Bucket:
HomeAssistant
- Click Save & Test
- Go to Dashboards → Import
- Upload
home-energy-usage-influxdb.json - Select your InfluxDB data source
- Click Import
- Log in to Grafana Cloud
- Add InfluxDB data source with your connection details
- Import the dashboard JSON file
You may need to customize the dashboard based on your sensor names:
-
Find your sensor naming convention:
- Open InfluxDB Data Explorer
- Look at the
friendly_nametag values - Note the naming pattern (e.g., "Total Power 1Mon", "Total Power 1D")
-
Update dashboard queries if needed:
- Edit panels that don't show data
- Modify
friendly_namefilters to match your sensors - See
INFLUXDB_QUERY_GUIDE.mdfor details
-
Adjust electricity rates:
- Edit "Current Month Bill" panel
- Modify the calculation:
r._value * 0.0965(change 0.0965 to your rate per kWh) - Modify the formula to match your utility's billing structure
The dashboard includes:
- Top 5 Devices Currently Running - Real-time power consumption by device
- Current Month Total Power Usage - kWh consumed this month
- Current Month Bill - Estimated electricity bill (customize rate)
- Current Day Power Total - Today's kWh consumption
- Current Day Power Cost - Today's estimated cost
- Month Power Total - Bar gauge showing monthly usage by device
- Hourly Power by Device - Stacked bar chart of hourly consumption
- Top 5 Devices Last Week - Pie chart of biggest energy consumers
- Last 7 Days Power Usage - Daily consumption trend
- Power Spikes This Week - Rate of change to identify unusual usage
-
Check HomeAssistant logs:
Settings → System → Logs Search for "influxdb" -
Verify InfluxDB connection:
- Check that InfluxDB is running
- Verify token has write permissions
- Check network connectivity
-
Check sensor names:
- In HomeAssistant, go to Developer Tools → States
- Search for your Emporia sensors
- Note the exact entity IDs and friendly names
- Update dashboard queries if they don't match
-
Check InfluxDB schema:
import "influxdata/influxdb/schema" schema.measurements(bucket: "HomeAssistant") -
Update queries to match your measurements:
- Replace
Wwith your wattage measurement name - Replace
kWhwith your energy measurement name - See
INFLUXDB_QUERY_GUIDE.mdfor examples
- Replace
- Verify your electricity rate in the cost calculation panels
- Check that sensor values are in expected units (W vs kW, Wh vs kWh)
Default rate: $0.0965/kWh
To change:
- Edit "Current Month Bill" panel
- Find the query:
map(fn: (r) => ({ r with _value: (r._value * 0.0965) * 1.05 + 14.0 })) - Modify:
0.0965- Rate per kWh1.05- Tax/fees multiplier (5% in this example)14.0- Fixed monthly fee
Use the existing queries as templates. See INFLUXDB_QUERY_GUIDE.md for Flux query examples.
home-energy-usage-influxdb.json- Grafana dashboard (InfluxDB/Flux version)home-energy-usage_rev1.json- Original Prometheus dashboard (legacy)configuration.yml- Example HomeAssistant configuration snippetREADME.md- This fileINFLUXDB_QUERY_GUIDE.md- Flux query customization guide
Original Prometheus version concept adapted for InfluxDB v2 with Flux queries.
MIT License - Feel free to use and modify!
For issues related to:
- Emporia Vue: Check Emporia Support
- HomeAssistant: Visit HomeAssistant Community
- InfluxDB: See InfluxDB Documentation
- Grafana: Check Grafana Documentation