/vuegraf

Populate metrics from your Emporia Vue energy monitoring devices into an InfluxDB

Primary LanguagePythonMIT LicenseMIT

Overview

The Emporia Vue energy monitoring kit allows homeowners to monitor their electrical usage. It monitors the main feed consumption and up to 8 (or 16 in the newer version) individual branch circuits, and feeds that data back to the Emporia API server.

This project, Vuegraf, fetches those metrics from the Emporia Vue API host and stores the metrics into your own InfluxDB. When paired with Grafana you'll be able to:

  • View your energy usage across all circuits on a single graph
  • Create alerts to notify when certain energy usage thresholds are exceeded

This project is not affiliated with emporia energy company.

Dependencies

Required

  • Emporia Vue Account - Username and password for the Emporia Vue system are required.
  • Python 3 - With Pip.
  • InfluxDB - Host, port, and login credentials are required.

Recommended

  • Grafana - Can be used to read metrics from the InfluxDB.

Screenshots

The following screenshots are provided to illustrate the possibilities available after using Vuegraf. These were all taken from a functionaing Grafana installation.

A sample Grafana dashboard is shown below:

Dashboard Example Screenshot

A single graph showing multiple overlayed circuits is shown below:

Graph Example Screenshot

Configuration

The configuration allows for the definition of multiple Emporia Vue accounts. This will only be useful to users that need to pull metrics from multiple accounts. This is not needed if you have multiple Vue devices in a single account. Vuegraf will find multiple devices on its own within each account.

The email address and password must match the credentials used when creating the Emporia Vue account in their mobile app.

Important: Ensure that sufficient protection is in place on this configuration file, since it contains the plain-text login credentials into the Emporia Vue account.

A sample configuration file is provided in this repository, and details are described below.

Minimal Configuration

The minimum configuration required to start Vuegraf is shown below:

{
    "influxDb": {
        "host": "my.influxdb.hostname",
        "port": 8086,
        "user": "root",
        "pass": "root",
        "database": "vue",
        "reset": false
    },
    "accounts": [
        {
            "name": "Primary Residence",
            "email": "my@email.address",
            "password": "my-emporia-password",
        }
    ]
}

Advanced Configuration

To provide more user-friendly names of each Vue device and branch circuit, the following device configuration can be added to the configuration file, within the account block. List each device and circuit in the order that you added them to the Vue mobile app. The channel names do not need to match the names specified in the Vue mobile app but the device names must match.

            "devices": [
                {
                    "name": "Right Panel",
                    "channels": [
                        "Air Conditioner",
                        "Furnace",
                        "Coffee Maker",
                        "Oven",
                        "Pool Vacuum",
                        "Pool Filter",
                        "Refrigerator",
                        "Office"
                    ]
                },
                {
                    "name": "Left Panel",
                    "channels": [
                        "Dryer",
                        "Washer",
                        "Dishwasher",
                        "Water Heater",
                        "Landscape Features",
                        "Septic Pump",
                        "Deep Freeze",
                        "Sprinkler Pump"        
                    ]
                }

Running

Vuegraf can be run either as a host process, or as a container.

Host

Ensure Python 3 and Pip are both installed. Install the required dependencies:

pip install -r requirements.txt

Then run the program via Python, specifying the JSON configuration file path as the only argument:

python vuegraf.py vuegraf.json

Container

A Docker container is provided at hub.docker.com. Refer to the command below to launch Vuegraf as a container.

docker run --name vuegraf -d -v /home/myusername/vuegraf.conf:/opt/vuegraf/conf/vuegraf.json jertel/vuegraf

Grafana

Use Grafana to visualize the data collected by Vuegraf. A sample dashboard.json file is provided with this project, to get started. If you only have one Vue device you should remove the Left/Right panel references.

Refer to the screenshots below for examples on how to define the InfluxDB data source, graphs, and alerts.

Grafana Data Source Screenshot

A graph query is shown below, showing a simple filter to pull data for a specific circuit.

Query Example Screenshot

Grafana also supports alerts, with a number of alert channels, such as Email or Slack.

Alert Example Screenshot

License

Vuegraf is distributed under the MIT license.

See LICENSE for more information.