Grafana dashboard: Hive Data

See here for collection information:

https://github.com/mandalae/hive-data

{
  "__inputs": [
    {
      "name": "DS_INFLUXDB",
      "label": "InfluxDB",
      "description": "",
      "type": "datasource",
      "pluginId": "influxdb",
      "pluginName": "InfluxDB"
    }
  ],
  "__requires": [
    {
      "type": "grafana",
      "id": "grafana",
      "name": "Grafana",
      "version": "6.1.6"
    },
    {
      "type": "panel",
      "id": "graph",
      "name": "Graph",
      "version": ""
    },
    {
      "type": "datasource",
      "id": "influxdb",
      "name": "InfluxDB",
      "version": "1.0.0"
    },
    {
      "type": "panel",
      "id": "singlestat",
      "name": "Singlestat",
      "version": ""
    }
  ],
  "annotations": {
    "list": [
      {
        "builtIn": 1,
        "datasource": "-- Grafana --",
        "enable": true,
        "hide": true,
        "iconColor": "rgba(0, 211, 255, 1)",
        "name": "Annotations & Alerts",
        "type": "dashboard"
      }
    ]
  },
  "editable": true,
  "gnetId": 10188,
  "graphTooltip": 0,
  "id": null,
  "iteration": 1557992646266,
  "links": [],
  "panels": [
    {
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_INFLUXDB}",
      "decimals": null,
      "fill": 1,
      "gridPos": {
        "h": 6,
        "w": 13,
        "x": 0,
        "y": 0
      },
      "id": 11,
      "legend": {
        "alignAsTable": true,
        "avg": false,
        "current": false,
        "max": true,
        "min": false,
        "rightSide": true,
        "show": true,
        "sort": "current",
        "sortDesc": true,
        "total": false,
        "values": true
      },
      "lines": true,
      "linewidth": 1,
      "links": [],
      "nullPointMode": "null",
      "percentage": false,
      "pointradius": 2,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "alias": "$tag_device",
          "groupBy": [
            {
              "params": [
                "1h"
              ],
              "type": "time"
            },
            {
              "params": [
                "device"
              ],
              "type": "tag"
            },
            {
              "params": [
                "null"
              ],
              "type": "fill"
            }
          ],
          "measurement": "hiveData",
          "orderByTime": "ASC",
          "policy": "default",
          "query": "SELECT cumulative_sum(last(\"reportedValue\"))  / 1000 * $pricePerkWh FROM \"hiveData\" WHERE (\"dataType\" = 'powerConsumption' AND \"dataType\" =~ /^$/) AND $timeFilter GROUP BY time(1m), \"device\" fill(null)",
          "rawQuery": false,
          "refId": "A",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "reportedValue"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "last"
              },
              {
                "params": [],
                "type": "cumulative_sum"
              },
              {
                "params": [
                  " / 1000 * $pricePerkWh"
                ],
                "type": "math"
              }
            ]
          ],
          "tags": [
            {
              "key": "dataType",
              "operator": "=",
              "value": "powerConsumption"
            }
          ]
        },
        {
          "alias": "$tag_device",
          "groupBy": [
            {
              "params": [
                "1h"
              ],
              "type": "time"
            },
            {
              "params": [
                "device"
              ],
              "type": "tag"
            },
            {
              "params": [
                "null"
              ],
              "type": "fill"
            }
          ],
          "measurement": "hiveData",
          "orderByTime": "ASC",
          "policy": "default",
          "query": "SELECT cumulative_sum(last(\"reportedValue\"))  / 1000 * $pricePerkWh FROM \"hiveData\" WHERE (\"dataType\" = 'powerConsumption' AND \"dataType\" =~ /^$/) AND $timeFilter GROUP BY time(1m), \"device\" fill(null)",
          "rawQuery": false,
          "refId": "B",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "reportedValue"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "last"
              },
              {
                "params": [],
                "type": "cumulative_sum"
              },
              {
                "params": [
                  " / 60 * 4.8 * $pricePerkWh"
                ],
                "type": "math"
              }
            ]
          ],
          "tags": [
            {
              "key": "dataType",
              "operator": "=",
              "value": "lightState"
            },
            {
              "condition": "AND",
              "key": "device",
              "operator": "=",
              "value": "Laundry_Cupboard"
            },
            {
              "condition": "OR",
              "key": "device",
              "operator": "=",
              "value": "Office_1"
            },
            {
              "condition": "OR",
              "key": "device",
              "operator": "=",
              "value": "Office_2"
            },
            {
              "condition": "OR",
              "key": "device",
              "operator": "=",
              "value": "Office_spot_3"
            }
          ]
        },
        {
          "alias": "$tag_device",
          "groupBy": [
            {
              "params": [
                "1h"
              ],
              "type": "time"
            },
            {
              "params": [
                "device"
              ],
              "type": "tag"
            },
            {
              "params": [
                "null"
              ],
              "type": "fill"
            }
          ],
          "measurement": "hueLightData",
          "orderByTime": "ASC",
          "policy": "default",
          "query": "SELECT cumulative_sum(last(\"reportedValue\"))  / 60 * 6.5 * $pricePerkWh FROM \"hueLightData\" WHERE (\"dataType\" = 'lightState' AND \"device\" =~ /Kitchen.+|Bathroom.+/) AND $timeFilter GROUP BY time(1h), \"device\" fill(null)",
          "rawQuery": true,
          "refId": "C",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "reportedValue"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "last"
              },
              {
                "params": [],
                "type": "cumulative_sum"
              },
              {
                "params": [
                  " / 60 * 4.8 * $pricePerkWh"
                ],
                "type": "math"
              }
            ]
          ],
          "tags": [
            {
              "key": "dataType",
              "operator": "=",
              "value": "lightState"
            },
            {
              "condition": "AND",
              "key": "device",
              "operator": "=",
              "value": "select tag value"
            }
          ]
        },
        {
          "alias": "$tag_device",
          "groupBy": [
            {
              "params": [
                "1h"
              ],
              "type": "time"
            },
            {
              "params": [
                "device"
              ],
              "type": "tag"
            },
            {
              "params": [
                "null"
              ],
              "type": "fill"
            }
          ],
          "measurement": "hueLightData",
          "orderByTime": "ASC",
          "policy": "default",
          "query": "SELECT cumulative_sum(last(\"reportedValue\"))  / 60 * 6 * $pricePerkWh FROM \"hueLightData\" WHERE (\"dataType\" = 'lightState' AND \"device\" =~ /Dining.+|Front_room.+/) AND $timeFilter GROUP BY time(1h), \"device\" fill(null)",
          "rawQuery": true,
          "refId": "D",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "reportedValue"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "last"
              },
              {
                "params": [],
                "type": "cumulative_sum"
              },
              {
                "params": [
                  " / 60 * 4.8 * $pricePerkWh"
                ],
                "type": "math"
              }
            ]
          ],
          "tags": [
            {
              "key": "dataType",
              "operator": "=",
              "value": "lightState"
            },
            {
              "condition": "AND",
              "key": "device",
              "operator": "=",
              "value": "select tag value"
            }
          ]
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "Power Consumption - Price",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "decimals": null,
          "format": "currencyGBP",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        },
        {
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "cacheTimeout": null,
      "colorBackground": false,
      "colorPostfix": false,
      "colorValue": true,
      "colors": [
        "#299c46",
        "rgba(237, 129, 40, 0.89)",
        "#d44a3a"
      ],
      "datasource": "${DS_INFLUXDB}",
      "decimals": 4,
      "format": "currencyGBP",
      "gauge": {
        "maxValue": 10,
        "minValue": 0,
        "show": true,
        "thresholdLabels": false,
        "thresholdMarkers": true
      },
      "gridPos": {
        "h": 6,
        "w": 5,
        "x": 13,
        "y": 0
      },
      "id": 10,
      "interval": null,
      "links": [],
      "mappingType": 1,
      "mappingTypes": [
        {
          "name": "value to text",
          "value": 1
        },
        {
          "name": "range to text",
          "value": 2
        }
      ],
      "maxDataPoints": 100,
      "nullPointMode": "connected",
      "nullText": null,
      "postfix": "",
      "postfixFontSize": "50%",
      "prefix": "",
      "prefixFontSize": "50%",
      "rangeMaps": [
        {
          "from": "null",
          "text": "N/A",
          "to": "null"
        }
      ],
      "sparkline": {
        "fillColor": "#FFCB7D",
        "full": false,
        "lineColor": "#FA6400",
        "show": true
      },
      "tableColumn": "",
      "targets": [
        {
          "alias": "$tag_device",
          "groupBy": [
            {
              "params": [
                "30m"
              ],
              "type": "time"
            },
            {
              "params": [
                "null"
              ],
              "type": "fill"
            }
          ],
          "measurement": "hiveData",
          "orderByTime": "ASC",
          "policy": "default",
          "query": "SELECT cumulative_sum(last(\"reportedValue\"))  / 1000 * $pricePerkWh FROM \"hiveData\" WHERE (\"dataType\" = 'powerConsumption' OR (\"dataType\" = 'lightState' AND \"device\" = 'Office_1' OR \"device\" = 'Office_2' or \"device\" = 'Office_spot_3' OR \"device\" = 'Laundry_Cupboard')) AND $timeFilter GROUP BY time($__interval) fill(null)",
          "rawQuery": false,
          "refId": "A",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "reportedValue"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "last"
              },
              {
                "params": [],
                "type": "cumulative_sum"
              },
              {
                "params": [
                  " / 1000 * $pricePerkWh"
                ],
                "type": "math"
              }
            ]
          ],
          "tags": [
            {
              "key": "dataType",
              "operator": "=",
              "value": "powerConsumption"
            }
          ]
        }
      ],
      "thresholds": "2,5",
      "timeFrom": null,
      "timeShift": null,
      "title": "Power Consumption - Price",
      "type": "singlestat",
      "valueFontSize": "50%",
      "valueMaps": [
        {
          "op": "=",
          "text": "N/A",
          "value": "null"
        }
      ],
      "valueName": "avg"
    },
    {
      "cacheTimeout": null,
      "colorBackground": false,
      "colorValue": true,
      "colors": [
        "#299c46",
        "rgba(237, 129, 40, 0.89)",
        "#d44a3a"
      ],
      "datasource": "${DS_INFLUXDB}",
      "decimals": 4,
      "format": "currencyGBP",
      "gauge": {
        "maxValue": 30,
        "minValue": 0,
        "show": true,
        "thresholdLabels": false,
        "thresholdMarkers": true
      },
      "gridPos": {
        "h": 6,
        "w": 6,
        "x": 18,
        "y": 0
      },
      "id": 9,
      "interval": null,
      "links": [],
      "mappingType": 1,
      "mappingTypes": [
        {
          "name": "value to text",
          "value": 1
        },
        {
          "name": "range to text",
          "value": 2
        }
      ],
      "maxDataPoints": 100,
      "nullPointMode": "connected",
      "nullText": null,
      "pluginVersion": "6.1.0-pre",
      "postfix": "",
      "postfixFontSize": "50%",
      "prefix": "",
      "prefixFontSize": "50%",
      "rangeMaps": [
        {
          "from": "null",
          "text": "N/A",
          "to": "null"
        }
      ],
      "sparkline": {
        "fillColor": "rgba(31, 118, 189, 0.18)",
        "full": false,
        "lineColor": "rgb(31, 120, 193)",
        "show": true
      },
      "tableColumn": "",
      "targets": [
        {
          "groupBy": [
            {
              "params": [
                "$__interval"
              ],
              "type": "time"
            },
            {
              "params": [
                "null"
              ],
              "type": "fill"
            }
          ],
          "measurement": "hiveData",
          "orderByTime": "ASC",
          "policy": "default",
          "refId": "A",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "heatingOn"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "sum"
              },
              {
                "params": [
                  " / 60 * $boilerkWhConsumption * $gaskWhCost"
                ],
                "type": "math"
              }
            ]
          ],
          "tags": [
            {
              "key": "dataType",
              "operator": "=",
              "value": "heatingOn"
            }
          ],
          "tz": "UTC"
        }
      ],
      "thresholds": "10, 20",
      "timeFrom": null,
      "timeShift": null,
      "title": "Heating price",
      "type": "singlestat",
      "valueFontSize": "50%",
      "valueMaps": [
        {
          "op": "=",
          "text": "N/A",
          "value": "null"
        }
      ],
      "valueName": "total"
    },
    {
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_INFLUXDB}",
      "decimals": 0,
      "fill": 1,
      "gridPos": {
        "h": 7,
        "w": 24,
        "x": 0,
        "y": 6
      },
      "id": 7,
      "legend": {
        "alignAsTable": true,
        "avg": false,
        "current": true,
        "max": false,
        "min": false,
        "rightSide": true,
        "show": true,
        "sort": "total",
        "sortDesc": true,
        "total": true,
        "values": true
      },
      "lines": true,
      "linewidth": 1,
      "links": [],
      "nullPointMode": "connected",
      "percentage": false,
      "pointradius": 2,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "alias": "$tag_device",
          "groupBy": [
            {
              "params": [
                "1m"
              ],
              "type": "time"
            },
            {
              "params": [
                "device"
              ],
              "type": "tag"
            },
            {
              "params": [
                "null"
              ],
              "type": "fill"
            }
          ],
          "measurement": "hiveData",
          "orderByTime": "ASC",
          "policy": "default",
          "refId": "A",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "reportedValue"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "last"
              }
            ]
          ],
          "tags": [
            {
              "key": "dataType",
              "operator": "=",
              "value": "powerConsumption"
            }
          ]
        },
        {
          "alias": "$tag_device",
          "groupBy": [
            {
              "params": [
                "1h"
              ],
              "type": "time"
            },
            {
              "params": [
                "device"
              ],
              "type": "tag"
            },
            {
              "params": [
                "null"
              ],
              "type": "fill"
            }
          ],
          "measurement": "hueLightData",
          "orderByTime": "ASC",
          "policy": "default",
          "refId": "B",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "reportedValue"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "last"
              },
              {
                "params": [],
                "type": "cumulative_sum"
              },
              {
                "params": [
                  " / 60 * 6"
                ],
                "type": "math"
              }
            ]
          ],
          "tags": [
            {
              "key": "dataType",
              "operator": "=",
              "value": "lightState"
            }
          ]
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "Power Consumption",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "decimals": 0,
          "format": "watt",
          "label": null,
          "logBase": 10,
          "max": null,
          "min": null,
          "show": true
        },
        {
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_INFLUXDB}",
      "decimals": 0,
      "fill": 1,
      "gridPos": {
        "h": 6,
        "w": 12,
        "x": 0,
        "y": 13
      },
      "id": 6,
      "legend": {
        "alignAsTable": true,
        "avg": false,
        "current": true,
        "max": false,
        "min": false,
        "rightSide": true,
        "show": true,
        "sort": "current",
        "sortDesc": true,
        "total": false,
        "values": true
      },
      "lines": true,
      "linewidth": 1,
      "links": [],
      "nullPointMode": "connected",
      "percentage": false,
      "pointradius": 2,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": true,
      "steppedLine": false,
      "targets": [
        {
          "alias": "$tag_device",
          "groupBy": [
            {
              "params": [
                "1m"
              ],
              "type": "time"
            },
            {
              "params": [
                "device"
              ],
              "type": "tag"
            },
            {
              "params": [
                "null"
              ],
              "type": "fill"
            }
          ],
          "measurement": "hiveData",
          "orderByTime": "ASC",
          "policy": "default",
          "refId": "A",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "reportedValue"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "last"
              }
            ]
          ],
          "tags": [
            {
              "key": "dataType",
              "operator": "=",
              "value": "lightState"
            }
          ]
        },
        {
          "alias": "$tag_device",
          "groupBy": [
            {
              "params": [
                "1m"
              ],
              "type": "time"
            },
            {
              "params": [
                "device"
              ],
              "type": "tag"
            },
            {
              "params": [
                "null"
              ],
              "type": "fill"
            }
          ],
          "measurement": "hueLightData",
          "orderByTime": "ASC",
          "policy": "default",
          "refId": "B",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "reportedValue"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "last"
              }
            ]
          ],
          "tags": [
            {
              "key": "dataType",
              "operator": "=",
              "value": "lightState"
            }
          ]
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "Devices on",
      "tooltip": {
        "shared": false,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "decimals": 0,
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": "-1",
          "show": true
        },
        {
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_INFLUXDB}",
      "decimals": null,
      "fill": 1,
      "gridPos": {
        "h": 6,
        "w": 12,
        "x": 12,
        "y": 13
      },
      "id": 12,
      "legend": {
        "alignAsTable": true,
        "avg": false,
        "current": false,
        "max": true,
        "min": false,
        "rightSide": true,
        "show": true,
        "sort": "current",
        "sortDesc": true,
        "total": false,
        "values": true
      },
      "lines": true,
      "linewidth": 1,
      "links": [],
      "nullPointMode": "null",
      "percentage": false,
      "pointradius": 2,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": true,
      "steppedLine": false,
      "targets": [
        {
          "alias": "$tag_device",
          "groupBy": [
            {
              "params": [
                "1m"
              ],
              "type": "time"
            },
            {
              "params": [
                "device"
              ],
              "type": "tag"
            },
            {
              "params": [
                "null"
              ],
              "type": "fill"
            }
          ],
          "measurement": "hiveData",
          "orderByTime": "ASC",
          "policy": "default",
          "query": "SELECT cumulative_sum(last(\"reportedValue\"))  / 1000 * $pricePerkWh FROM \"hiveData\" WHERE (\"dataType\" = 'powerConsumption' AND \"dataType\" =~ /^$/) AND $timeFilter GROUP BY time(1m), \"device\" fill(null)",
          "rawQuery": false,
          "refId": "B",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "reportedValue"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "last"
              }
            ]
          ],
          "tags": [
            {
              "key": "dataType",
              "operator": "=",
              "value": "lightState"
            },
            {
              "condition": "AND",
              "key": "device",
              "operator": "=",
              "value": "Laundry_Cupboard"
            },
            {
              "condition": "OR",
              "key": "device",
              "operator": "=",
              "value": "Office_1"
            },
            {
              "condition": "OR",
              "key": "device",
              "operator": "=",
              "value": "Office_2"
            },
            {
              "condition": "OR",
              "key": "device",
              "operator": "=",
              "value": "Office_spot_3"
            }
          ]
        },
        {
          "alias": "$tag_device",
          "groupBy": [
            {
              "params": [
                "1h"
              ],
              "type": "time"
            },
            {
              "params": [
                "device"
              ],
              "type": "tag"
            },
            {
              "params": [
                "null"
              ],
              "type": "fill"
            }
          ],
          "measurement": "hueLightData",
          "orderByTime": "ASC",
          "policy": "default",
          "query": "SELECT last(\"reportedValue\")  FROM \"hueLightData\" WHERE (\"dataType\" = 'lightState' ) AND $timeFilter GROUP BY time(1m), \"device\" fill(null)",
          "rawQuery": true,
          "refId": "C",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "reportedValue"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "last"
              },
              {
                "params": [],
                "type": "cumulative_sum"
              },
              {
                "params": [
                  " / 60 * 4.8 * $pricePerkWh"
                ],
                "type": "math"
              }
            ]
          ],
          "tags": [
            {
              "key": "dataType",
              "operator": "=",
              "value": "lightState"
            },
            {
              "condition": "AND",
              "key": "device",
              "operator": "=",
              "value": "select tag value"
            }
          ]
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "Lights on",
      "tooltip": {
        "shared": false,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "decimals": null,
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        },
        {
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "alert": {
        "conditions": [
          {
            "evaluator": {
              "params": [
                7
              ],
              "type": "lt"
            },
            "operator": {
              "type": "and"
            },
            "query": {
              "params": [
                "A",
                "5m",
                "now"
              ]
            },
            "reducer": {
              "params": [],
              "type": "avg"
            },
            "type": "query"
          }
        ],
        "executionErrorState": "alerting",
        "for": "5m",
        "frequency": "1m",
        "handler": 1,
        "message": "Something is wrong with the temperature gauge. Please check the InfluxDB container is running properly, as well as the NodeJS process.",
        "name": "Temperature alert",
        "noDataState": "alerting",
        "notifications": []
      },
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "fill": 1,
      "gridPos": {
        "h": 7,
        "w": 24,
        "x": 0,
        "y": 19
      },
      "id": 4,
      "legend": {
        "alignAsTable": true,
        "avg": false,
        "current": true,
        "max": false,
        "min": false,
        "show": true,
        "total": false,
        "values": true
      },
      "lines": true,
      "linewidth": 1,
      "links": [],
      "nullPointMode": "connected",
      "percentage": false,
      "pointradius": 2,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "alias": "Current temperature",
          "groupBy": [
            {
              "params": [
                "1m"
              ],
              "type": "time"
            },
            {
              "params": [
                "null"
              ],
              "type": "fill"
            }
          ],
          "measurement": "hiveData",
          "orderByTime": "ASC",
          "policy": "default",
          "refId": "A",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "temperature"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "last"
              }
            ]
          ],
          "tags": [
            {
              "key": "dataType",
              "operator": "=",
              "value": "currentTemp"
            }
          ]
        },
        {
          "alias": "Target temperature",
          "groupBy": [
            {
              "params": [
                "1m"
              ],
              "type": "time"
            },
            {
              "params": [
                "null"
              ],
              "type": "fill"
            }
          ],
          "measurement": "hiveData",
          "orderByTime": "ASC",
          "policy": "default",
          "refId": "B",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "temperature"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "last"
              }
            ]
          ],
          "tags": [
            {
              "key": "dataType",
              "operator": "=",
              "value": "targetTemp"
            }
          ]
        }
      ],
      "thresholds": [
        {
          "colorMode": "critical",
          "fill": true,
          "line": true,
          "op": "lt",
          "value": 7,
          "yaxis": "left"
        }
      ],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "Temperature",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": "25",
          "min": "15",
          "show": true
        },
        {
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_INFLUXDB}",
      "decimals": 2,
      "fill": 1,
      "gridPos": {
        "h": 5,
        "w": 24,
        "x": 0,
        "y": 26
      },
      "id": 2,
      "legend": {
        "alignAsTable": true,
        "avg": false,
        "current": false,
        "max": false,
        "min": false,
        "rightSide": false,
        "show": true,
        "total": true,
        "values": true
      },
      "lines": true,
      "linewidth": 1,
      "links": [],
      "nullPointMode": "connected",
      "percentage": false,
      "pointradius": 2,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "alias": "Total minutes",
          "groupBy": [
            {
              "params": [
                "1m"
              ],
              "type": "time"
            },
            {
              "params": [
                "null"
              ],
              "type": "fill"
            }
          ],
          "measurement": "hiveData",
          "orderByTime": "ASC",
          "policy": "default",
          "refId": "A",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "heatingOn"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "last"
              }
            ]
          ],
          "tags": [
            {
              "key": "dataType",
              "operator": "=",
              "value": "heatingOn"
            }
          ]
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "Heating on",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "decimals": null,
          "format": "none",
          "label": null,
          "logBase": 1,
          "max": "2",
          "min": "-1",
          "show": true
        },
        {
          "format": "none",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    }
  ],
  "refresh": "1m",
  "schemaVersion": 18,
  "style": "dark",
  "tags": [],
  "templating": {
    "list": [
      {
        "current": {
          "text": "0.1372",
          "value": "0.1372"
        },
        "hide": 0,
        "label": "Electricity Price / kWh",
        "name": "pricePerkWh",
        "options": [
          {
            "selected": false,
            "text": "0.13",
            "value": "0.13"
          }
        ],
        "query": "0.1372",
        "skipUrlSync": false,
        "type": "textbox"
      },
      {
        "current": {
          "selected": true,
          "text": "0.0306",
          "value": "0.0306"
        },
        "hide": 0,
        "label": "Gas price / kWh",
        "name": "gaskWhCost",
        "options": [
          {
            "selected": true,
            "text": "0.0306",
            "value": "0.0306"
          }
        ],
        "query": "0.0306",
        "skipUrlSync": false,
        "type": "textbox"
      },
      {
        "current": {
          "text": "28.2",
          "value": "28.2"
        },
        "hide": 0,
        "label": "Boiler Consumption / kWh",
        "name": "boilerkWhConsumption",
        "options": [
          {
            "text": "28.2",
            "value": "28.2"
          }
        ],
        "query": "28.2",
        "skipUrlSync": false,
        "type": "textbox"
      }
    ]
  },
  "time": {
    "from": "now-24h",
    "to": "now"
  },
  "timepicker": {
    "refresh_intervals": [
      "5s",
      "10s",
      "30s",
      "1m",
      "5m",
      "15m",
      "30m",
      "1h",
      "2h",
      "1d"
    ],
    "time_options": [
      "5m",
      "15m",
      "1h",
      "6h",
      "12h",
      "24h",
      "2d",
      "7d",
      "30d"
    ]
  },
  "timezone": "",
  "title": "Hive Data",
  "uid": "rEpn_GgRk",
  "version": 13
}