Grafana dashboard: Home Energy Usage v2
Description: A dashboard that shows your home energy usage. Using Prometheus, Home Assistant and the Emporia Vue 2.


{
  "__inputs": [
    {
      "name": "DS_PROMETHEUS_(CLOUD)",
      "label": "Prometheus (Cloud)",
      "description": "",
      "type": "datasource",
      "pluginId": "prometheus",
      "pluginName": "Prometheus"
    }
  ],
  "__requires": [
    {
      "type": "panel",
      "id": "bargauge",
      "name": "Bar gauge",
      "version": ""
    },
    {
      "type": "grafana",
      "id": "grafana",
      "name": "Grafana",
      "version": "8.1.5"
    },
    {
      "type": "panel",
      "id": "graph",
      "name": "Graph (old)",
      "version": ""
    },
    {
      "type": "panel",
      "id": "piechart",
      "name": "Pie chart",
      "version": ""
    },
    {
      "type": "datasource",
      "id": "prometheus",
      "name": "Prometheus",
      "version": "1.0.0"
    },
    {
      "type": "panel",
      "id": "stat",
      "name": "Stat",
      "version": ""
    },
    {
      "type": "panel",
      "id": "timeseries",
      "name": "Time series",
      "version": ""
    }
  ],
  "annotations": {
    "list": [
      {
        "builtIn": 1,
        "datasource": "-- Grafana --",
        "enable": true,
        "hide": true,
        "iconColor": "rgba(0, 211, 255, 1)",
        "limit": 100,
        "name": "Annotations & Alerts",
        "showIn": 0,
        "target": {
          "limit": 100,
          "matchAny": false,
          "tags": [],
          "type": "dashboard"
        },
        "type": "dashboard"
      }
    ]
  },
  "description": "A dashboard that shows your home energy usage. Using Prometheus, Home Assistant and the Emporia Vue 2.",
  "editable": true,
  "gnetId": 18129,
  "graphTooltip": 0,
  "id": null,
  "links": [],
  "panels": [
    {
      "cacheTimeout": null,
      "datasource": "${DS_PROMETHEUS_(CLOUD)}",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "light-orange",
                "value": 300
              },
              {
                "color": "dark-orange",
                "value": 500
              },
              {
                "color": "dark-red",
                "value": 1000
              }
            ]
          },
          "unit": "watt"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 5,
        "w": 12,
        "x": 0,
        "y": 0
      },
      "id": 28,
      "interval": null,
      "links": [],
      "options": {
        "colorMode": "background",
        "graphMode": "none",
        "justifyMode": "center",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "text": {},
        "textMode": "auto"
      },
      "pluginVersion": "8.1.5",
      "targets": [
        {
          "exemplar": true,
          "expr": "(topk(5,(homeassistant_sensor_power_w{friendly_name!~\".*Total.*\"} > 5)))",
          "instant": true,
          "interval": "",
          "legendFormat": "{{friendly_name}}",
          "refId": "A"
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "Top 5 Devices Currently Running",
      "transformations": [],
      "type": "stat"
    },
    {
      "datasource": "${DS_PROMETHEUS_(CLOUD)}",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "light-orange",
                "value": null
              }
            ]
          },
          "unit": "kwatth"
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "power_kwh{domain=\"sensor\", entity=\"sensor.power_freels_vue_123_1mon\", friendly_name=\"Total Power 1Mon\", instance=\"192.168.2.233:8123\", job=\"homeassistant\"}"
            },
            "properties": [
              {
                "id": "unit",
                "value": "kwatth"
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 5,
        "w": 6,
        "x": 12,
        "y": 0
      },
      "id": 9,
      "options": {
        "colorMode": "value",
        "graphMode": "none",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "text": {},
        "textMode": "auto"
      },
      "pluginVersion": "8.1.5",
      "targets": [
        {
          "exemplar": true,
          "expr": "homeassistant_sensor_energy_kwh{friendly_name=\"Freels Vue Balance 1MON\"}",
          "interval": "",
          "legendFormat": "",
          "refId": "A"
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "Current Month Total Power Usage",
      "type": "stat"
    },
    {
      "datasource": "${DS_PROMETHEUS_(CLOUD)}",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          }
        },
        "overrides": [
          {
            "matcher": {
              "id": "byType",
              "options": "number"
            },
            "properties": [
              {
                "id": "decimals",
                "value": 2
              },
              {
                "id": "unit",
                "value": "currencyUSD"
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 5,
        "w": 6,
        "x": 18,
        "y": 0
      },
      "id": 11,
      "options": {
        "colorMode": "value",
        "graphMode": "none",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "text": {},
        "textMode": "value"
      },
      "pluginVersion": "8.1.5",
      "targets": [
        {
          "exemplar": true,
          "expr": "(homeassistant_sensor_energy_kwh{friendly_name=\"Total Power 1Mon\"} * .0965 ) * 1.05 + 14",
          "interval": "",
          "legendFormat": "",
          "refId": "A"
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "Current Month Bill ",
      "transformations": [],
      "type": "stat"
    },
    {
      "datasource": "${DS_PROMETHEUS_(CLOUD)}",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "semi-dark-orange",
                "value": null
              }
            ]
          }
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "power_kwh{domain=\"sensor\", entity=\"sensor.power_freels_vue_123_1d\", friendly_name=\"Total Power 1D\", instance=\"192.168.2.233:8123\", job=\"homeassistant\"}"
            },
            "properties": [
              {
                "id": "unit",
                "value": "kwatth"
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 5,
        "w": 6,
        "x": 0,
        "y": 5
      },
      "id": 18,
      "options": {
        "colorMode": "value",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "horizontal",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "text": {},
        "textMode": "auto"
      },
      "pluginVersion": "8.1.5",
      "targets": [
        {
          "exemplar": true,
          "expr": "homeassistant_sensor_energy_kwh{friendly_name=\"Total Power 1D\"}",
          "interval": "",
          "legendFormat": "",
          "refId": "A"
        }
      ],
      "timeFrom": "now/d",
      "timeShift": null,
      "title": "Current Day Power Total",
      "type": "stat"
    },
    {
      "datasource": "${DS_PROMETHEUS_(CLOUD)}",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "decimals": 2,
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "currencyUSD"
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "power_kwh{domain=\"sensor\", entity=\"sensor.power_freels_vue_123_1d\", friendly_name=\"Total Power 1D\", instance=\"192.168.2.233:8123\", job=\"homeassistant\"}"
            },
            "properties": [
              {
                "id": "unit",
                "value": "kwatth"
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 5,
        "w": 6,
        "x": 6,
        "y": 5
      },
      "id": 39,
      "options": {
        "colorMode": "value",
        "graphMode": "none",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "text": {},
        "textMode": "auto"
      },
      "pluginVersion": "8.1.5",
      "targets": [
        {
          "exemplar": true,
          "expr": "homeassistant_sensor_energy_kwh{friendly_name=\"Total Power 1D\"} * .0965",
          "interval": "",
          "legendFormat": "",
          "refId": "A"
        }
      ],
      "timeFrom": "now/d",
      "timeShift": null,
      "title": "Current Day Power Cost",
      "type": "stat"
    },
    {
      "datasource": "${DS_PROMETHEUS_(CLOUD)}",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "#EAB839",
                "value": 60
              },
              {
                "color": "red",
                "value": 100
              }
            ]
          },
          "unit": "kwatth"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 9,
        "w": 12,
        "x": 12,
        "y": 5
      },
      "id": 6,
      "options": {
        "displayMode": "lcd",
        "orientation": "horizontal",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "showUnfilled": true,
        "text": {}
      },
      "pluginVersion": "8.1.5",
      "targets": [
        {
          "exemplar": true,
          "expr": "homeassistant_sensor_energy_kwh{friendly_name=~\".*1M.*\"} and homeassistant_sensor_energy_kwh{friendly_name!~\".*Total.*|.*Power.*|.*Freels.*|.*Bedroom #2.*\"}",
          "interval": "",
          "legendFormat": "{{friendly_name}} ",
          "refId": "A"
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "Month Power Total",
      "transformations": [],
      "type": "bargauge"
    },
    {
      "datasource": "${DS_PROMETHEUS_(CLOUD)}",
      "description": "",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "bars",
            "fillOpacity": 100,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineInterpolation": "linear",
            "lineWidth": 1,
            "pointSize": 5,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "never",
            "spanNulls": true,
            "stacking": {
              "group": "A",
              "mode": "normal"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "mappings": [],
          "min": 0,
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "watt"
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "Time"
            },
            "properties": [
              {
                "id": "displayName"
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 9,
        "w": 12,
        "x": 0,
        "y": 10
      },
      "hideTimeOverride": false,
      "id": 23,
      "interval": "1h",
      "options": {
        "legend": {
          "calcs": [],
          "displayMode": "list",
          "placement": "bottom"
        },
        "tooltip": {
          "mode": "single"
        }
      },
      "pluginVersion": "8.1.2",
      "targets": [
        {
          "exemplar": true,
          "expr": "avg_over_time(homeassistant_sensor_power_w{friendly_name!~\".*Total.*\"}[60m]) /4",
          "format": "time_series",
          "interval": "",
          "legendFormat": "{{friendly_name}}",
          "refId": "A"
        }
      ],
      "timeFrom": "now/d",
      "timeShift": null,
      "title": "Hourly Power by Device",
      "transformations": [],
      "type": "timeseries"
    },
    {
      "cacheTimeout": null,
      "datasource": "${DS_PROMETHEUS_(CLOUD)}",
      "description": "",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            }
          },
          "decimals": 0,
          "mappings": [],
          "unit": "kwatth"
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "AC #2 1D"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "AC #2"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Living Room 1D"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "Living Room"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Gas Furnance 1D"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "Gas Furnace"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Water Heater 1D"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "Water Heater"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Office 1D"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "Office"
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 6,
        "w": 12,
        "x": 12,
        "y": 14
      },
      "id": 38,
      "interval": "",
      "libraryPanel": {
        "description": "",
        "meta": {
          "connectedDashboards": 1,
          "created": "2021-09-22T13:57:16Z",
          "createdBy": {
            "avatarUrl": "/avatar/0a4681ae246ecd08e0b2668dd3498a23",
            "id": 57,
            "name": "austin.freels@grafana.com"
          },
          "folderName": "Austin",
          "folderUid": "_2FmsBLMk",
          "updated": "2021-09-22T13:57:16Z",
          "updatedBy": {
            "avatarUrl": "/avatar/0a4681ae246ecd08e0b2668dd3498a23",
            "id": 57,
            "name": "austin.freels@grafana.com"
          }
        },
        "name": "Top 5 Devices Last Week",
        "type": "piechart",
        "uid": "UpRgYDHnk",
        "version": 1
      },
      "links": [],
      "options": {
        "displayLabels": [],
        "legend": {
          "calcs": [],
          "displayMode": "table",
          "placement": "right",
          "values": [
            "value"
          ]
        },
        "pieType": "pie",
        "reduceOptions": {
          "calcs": [
            "sum"
          ],
          "fields": "",
          "values": false
        },
        "text": {},
        "tooltip": {
          "mode": "single"
        }
      },
      "pluginVersion": "7.3.7",
      "targets": [
        {
          "exemplar": true,
          "expr": "topk(5,sum by (friendly_name) (increase(homeassistant_sensor_energy_kwh{friendly_name!~\".*Total.*|.*Mon.*\"}[7d] )) )",
          "instant": true,
          "interval": "",
          "legendFormat": "{{friendly_name}}",
          "refId": "A"
        }
      ],
      "timeFrom": "7d",
      "timeShift": null,
      "title": "Top 5 Devices Last Week",
      "transformations": [],
      "type": "piechart"
    },
    {
      "aliasColors": {},
      "bars": true,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_PROMETHEUS_(CLOUD)}",
      "description": "",
      "fieldConfig": {
        "defaults": {},
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "Time"
            },
            "properties": [
              {
                "id": "displayName"
              }
            ]
          }
        ]
      },
      "fill": 1,
      "fillGradient": 0,
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 0,
        "y": 19
      },
      "hiddenSeries": false,
      "hideTimeOverride": false,
      "id": 37,
      "interval": "24",
      "legend": {
        "avg": false,
        "current": false,
        "max": false,
        "min": false,
        "show": true,
        "total": false,
        "values": false
      },
      "lines": false,
      "linewidth": 1,
      "maxDataPoints": 7,
      "nullPointMode": "null",
      "options": {
        "alertThreshold": true
      },
      "percentage": false,
      "pluginVersion": "8.1.5",
      "pointradius": 2,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": true,
      "steppedLine": false,
      "targets": [
        {
          "exemplar": true,
          "expr": "homeassistant_sensor_energy_kwh{friendly_name=\"Total Power 1D\"} ",
          "format": "time_series",
          "interval": "",
          "legendFormat": "{{friendly_name}}",
          "refId": "A"
        }
      ],
      "thresholds": [],
      "timeFrom": "7d",
      "timeRegions": [],
      "timeShift": null,
      "title": "Daily Power Usage ",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "transformations": [],
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": false,
        "values": []
      },
      "yaxes": [
        {
          "$$hashKey": "object:151",
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        },
        {
          "$$hashKey": "object:152",
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "datasource": "${DS_PROMETHEUS_(CLOUD)}",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 61,
            "gradientMode": "none",
            "hideFrom": {
              "graph": false,
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineInterpolation": "smooth",
            "lineWidth": 1,
            "pointSize": 5,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "never",
            "spanNulls": true,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "short"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 7,
        "w": 12,
        "x": 12,
        "y": 20
      },
      "id": 25,
      "options": {
        "graph": {},
        "legend": {
          "calcs": [],
          "displayMode": "list",
          "placement": "bottom"
        },
        "tooltip": {
          "mode": "single"
        }
      },
      "pluginVersion": "7.4.0",
      "targets": [
        {
          "exemplar": true,
          "expr": "rate(homeassistant_sensor_energy_kwh{friendly_name=\"Total Power 1D\"}[1h])",
          "interval": "",
          "legendFormat": " Rate of Power",
          "refId": "A"
        }
      ],
      "timeFrom": "now/w",
      "timeShift": null,
      "title": "Power Spikes This Week",
      "type": "timeseries"
    }
  ],
  "refresh": false,
  "schemaVersion": 30,
  "style": "dark",
  "tags": [],
  "templating": {
    "list": []
  },
  "time": {
    "from": "now-5m",
    "to": "now"
  },
  "timepicker": {
    "hidden": false,
    "nowDelay": "",
    "refresh_intervals": [
      "5s",
      "10s",
      "30s",
      "1m",
      "5m",
      "15m",
      "30m",
      "1h",
      "2h",
      "1d"
    ]
  },
  "timezone": "",
  "title": "Home Energy Usage v2",
  "uid": "_nyxoAfMk3",
  "version": 16
}