Grafana dashboard: EMS-ESP
Description: ESP32 v3  firmware 

This uses mosquitto MQTT and Influx2 with build in telegraf config.
The dashboard has been updated for V3  firmware of EMS-ESP. [https://github.com/emsesp/EMS-ESP32]()

Ensure the following settings are configured correctly in EMS-ESP: 

[BBQ kees wiki](https://bbqkees-electronics.nl/wiki/gateway/configuring-mqtt.html)

- **Topic/Payload Format** should be **As individual topics**
- **Boolean Format** should be **1/0**

See the telegraf config above, Influx should have a bucket called ems and an api token generated.

{
  "__inputs": [
    {
      "name": "DS_INFLUXDB",
      "label": "InfluxDB",
      "description": "Use Influx2 with Flux query language",
      "type": "datasource",
      "pluginId": "influxdb",
      "pluginName": "InfluxDB"
    }
  ],
  "__elements": [],
  "__requires": [
    {
      "type": "panel",
      "id": "bargauge",
      "name": "Bar gauge",
      "version": ""
    },
    {
      "type": "panel",
      "id": "gauge",
      "name": "Gauge",
      "version": ""
    },
    {
      "type": "grafana",
      "id": "grafana",
      "name": "Grafana",
      "version": "8.4.2"
    },
    {
      "type": "datasource",
      "id": "influxdb",
      "name": "InfluxDB",
      "version": "1.0.0"
    },
    {
      "type": "panel",
      "id": "stat",
      "name": "Stat",
      "version": ""
    },
    {
      "type": "panel",
      "id": "state-timeline",
      "name": "State timeline",
      "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)",
        "name": "Annotations & Alerts",
        "target": {
          "limit": 100,
          "matchAny": false,
          "tags": [],
          "type": "dashboard"
        },
        "type": "dashboard"
      }
    ]
  },
  "editable": true,
  "fiscalYearStartMonth": 0,
  "graphTooltip": 0,
  "id": null,
  "links": [],
  "liveNow": false,
  "panels": [
    {
      "collapsed": false,
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 0
      },
      "id": 10,
      "panels": [],
      "title": "Stats",
      "type": "row"
    },
    {
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "continuous-BlYlRd"
          },
          "mappings": [],
          "max": 80,
          "min": -20,
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "dark-blue",
                "value": 20
              },
              {
                "color": "#6ED0E0",
                "value": 30
              },
              {
                "color": "#EAB839",
                "value": 40
              },
              {
                "color": "red",
                "value": 50
              }
            ]
          },
          "unit": "celsius"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 3,
        "w": 6,
        "x": 0,
        "y": 1
      },
      "id": 16,
      "options": {
        "displayMode": "lcd",
        "orientation": "horizontal",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "showUnfilled": true,
        "text": {}
      },
      "pluginVersion": "8.4.2",
      "targets": [
        {
          "datasource": {
            "type": "influxdb",
            "uid": "${DS_INFLUXDB}"
          },
          "query": "from(bucket: v.defaultBucket)\n  |> range(start: v.timeRangeStart, stop:v.timeRangeStop)\n  |> filter(fn: (r) =>\n    r.topic == \"ems-esp/boiler_data_ww\" and\n    r._field == \"wwcurtemp2\"\n  )\n  |>drop(columns: [\"host\", \"topic\"])\n  |>map(fn: (r) => ({ r with _field: \"warm warm temperatuur\"}))\n  |> aggregateWindow(every: 5m, fn: mean)",
          "refId": "A"
        }
      ],
      "title": "Water Temperature",
      "type": "bargauge"
    },
    {
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "continuous-BlYlRd",
            "seriesBy": "last"
          },
          "custom": {
            "axisLabel": "Temperatuur",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 0,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineInterpolation": "smooth",
            "lineStyle": {
              "fill": "solid"
            },
            "lineWidth": 1,
            "pointSize": 5,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "never",
            "spanNulls": false,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "mappings": [
            {
              "options": {
                "retTemp": {
                  "color": "dark-blue",
                  "index": 0,
                  "text": "Retour vloerverwarming"
                }
              },
              "type": "value"
            }
          ],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "celsius"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 7,
        "w": 8,
        "x": 6,
        "y": 1
      },
      "id": 4,
      "options": {
        "legend": {
          "calcs": [],
          "displayMode": "list",
          "placement": "right"
        },
        "tooltip": {
          "mode": "multi",
          "sort": "none"
        }
      },
      "targets": [
        {
          "datasource": {
            "type": "influxdb",
            "uid": "${DS_INFLUXDB}"
          },
          "query": "from(bucket: v.defaultBucket)\n  |> range(start: v.timeRangeStart, stop:v.timeRangeStop)\n  |> filter(fn: (r) =>\n    r.topic == \"ems-esp/boiler_data\" and\n    r._field == \"curflowtemp\"\n  )\n  |>drop(columns: [\"host\", \"topic\", \"_measurement\"])\n  |>map(fn: (r) => ({ r with _field: \"Aanvoer\"}))\n  |> aggregateWindow(every: 5m, fn: mean)",
          "refId": "Current Flow Temperature"
        },
        {
          "datasource": {
            "type": "influxdb",
            "uid": "${DS_INFLUXDB}"
          },
          "hide": false,
          "query": "from(bucket: v.defaultBucket)\n  |> range(start: v.timeRangeStart, stop:v.timeRangeStop)\n  |> filter(fn: (r) =>\n    r.topic == \"ems-esp/boiler_data\" and\n    r._field == \"rettemp\"\n  )\n  |>drop(columns: [\"host\", \"topic\",\"_measurement\"])\n  |>map(fn: (r) => ({ r with _field: \"Retour\"}))\n  |> aggregateWindow(every: 5m, fn: mean)",
          "refId": "Retour temperatuur"
        }
      ],
      "title": "Verwarming Flow temperatures",
      "transformations": [],
      "type": "timeseries"
    },
    {
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisLabel": "Temperature",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 0,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineInterpolation": "linear",
            "lineStyle": {
              "fill": "solid"
            },
            "lineWidth": 1,
            "pointSize": 5,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "never",
            "spanNulls": false,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "celsius"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 7,
        "w": 5,
        "x": 14,
        "y": 1
      },
      "id": 23,
      "options": {
        "legend": {
          "calcs": [],
          "displayMode": "list",
          "placement": "bottom"
        },
        "tooltip": {
          "mode": "single",
          "sort": "none"
        }
      },
      "targets": [
        {
          "datasource": {
            "type": "influxdb",
            "uid": "${DS_INFLUXDB}"
          },
          "query": "from(bucket: v.defaultBucket)\n  |> range(start: v.timeRangeStart, stop:v.timeRangeStop)\n  |> filter(fn: (r) =>\n    r.topic == \"ems-esp/boiler_data\" and\n    r._field == \"outdoortemp\"\n  )\n  |>drop(columns: [\"host\", \"topic\", \"_measurement\"])\n  |>map(fn: (r) => ({ r with _field: \"Outdoor Temp\"}))\n  |> aggregateWindow(every: 5m, fn: mean)",
          "refId": "A"
        }
      ],
      "title": "Environment Temperatures",
      "type": "timeseries"
    },
    {
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "percent"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 7,
        "w": 5,
        "x": 19,
        "y": 1
      },
      "id": 27,
      "options": {
        "orientation": "vertical",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "showThresholdLabels": false,
        "showThresholdMarkers": true
      },
      "pluginVersion": "8.4.2",
      "targets": [
        {
          "datasource": {
            "type": "influxdb",
            "uid": "${DS_INFLUXDB}"
          },
          "query": "from(bucket: v.defaultBucket)\n  |> range(start: v.timeRangeStart, stop:v.timeRangeStop)\n  |> filter(fn: (r) =>\n    r.topic == \"ems-esp/mixer_data_hc1\" and\n    r._field == \"valvestatus\"\n  )\n  |>drop(columns: [\"host\", \"topic\",\"_measurement\"])\n  |>map(fn: (r) => ({ r with _field: \"Boven\"}))\n  |> aggregateWindow(every: 1m, fn: last)",
          "refId": "Boven"
        },
        {
          "datasource": {
            "type": "influxdb",
            "uid": "${DS_INFLUXDB}"
          },
          "hide": false,
          "query": "from(bucket: v.defaultBucket)\n  |> range(start: v.timeRangeStart, stop:v.timeRangeStop)\n  |> filter(fn: (r) =>\n    r.topic == \"ems-esp/mixer_data_hc2\" and\n    r._field == \"valvestatus\"\n  )\n  |>drop(columns: [\"host\", \"topic\",\"_measurement\"])\n  |>map(fn: (r) => ({ r with _field: \"Beneden\"}))\n  |> aggregateWindow(every: 1m, fn: last)",
          "refId": "Beneden"
        }
      ],
      "title": "Valves",
      "type": "gauge"
    },
    {
      "fieldConfig": {
        "defaults": {
          "color": {
            "fixedColor": "dark-blue",
            "mode": "fixed"
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          },
          "unit": "pressurebar"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 4,
        "w": 3,
        "x": 0,
        "y": 4
      },
      "id": 21,
      "options": {
        "colorMode": "value",
        "graphMode": "none",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "textMode": "value"
      },
      "pluginVersion": "8.4.2",
      "targets": [
        {
          "datasource": {
            "type": "influxdb",
            "uid": "${DS_INFLUXDB}"
          },
          "query": "from(bucket: v.defaultBucket)\n  |> range(start: v.timeRangeStart, stop:v.timeRangeStop)\n  |> filter(fn: (r) =>\n    r.topic == \"ems-esp/boiler_data\" and\n    r._field == \"syspress\"\n  )\n  |>drop(columns: [\"host\", \"topic\"])\n  |>map(fn: (r) => ({ r with _field: \"pressure\"}))\n  |> aggregateWindow(every: 5m, fn: last)",
          "refId": "A"
        }
      ],
      "title": "CV Pressure",
      "type": "stat"
    },
    {
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "continuous-GrYlRd"
          },
          "decimals": 0,
          "mappings": [
            {
              "options": {
                "0": {
                  "index": 0,
                  "text": "Off"
                }
              },
              "type": "value"
            }
          ],
          "max": 100,
          "min": 0,
          "thresholds": {
            "mode": "percentage",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "#505050",
                "value": 0
              },
              {
                "color": "dark-green",
                "value": 100
              }
            ]
          },
          "unit": "percent"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 4,
        "w": 3,
        "x": 3,
        "y": 4
      },
      "id": 17,
      "options": {
        "orientation": "horizontal",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "showThresholdLabels": false,
        "showThresholdMarkers": true
      },
      "pluginVersion": "8.4.2",
      "targets": [
        {
          "datasource": {
            "type": "influxdb",
            "uid": "${DS_INFLUXDB}"
          },
          "query": "from(bucket: v.defaultBucket)\n  |> range(start: v.timeRangeStart, stop:v.timeRangeStop)\n  |> filter(fn: (r) =>\n    r.topic == \"ems-esp/boiler_data\" and\n    r._field == \"curburnpow\"\n  )\n  |>drop(columns: [\"host\", \"topic\"])\n  |>map(fn: (r) => ({ r with _field: \"power\"}))\n  |>aggregateWindow(every: 1m, fn: last)",
          "refId": "A"
        }
      ],
      "title": "Brander power",
      "type": "gauge"
    },
    {
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "continuous-GrYlRd"
          },
          "custom": {
            "fillOpacity": 63,
            "lineWidth": 0,
            "spanNulls": false
          },
          "mappings": [
            {
              "options": {
                "0": {
                  "color": "#E0B400",
                  "index": 3
                },
                "1": {
                  "color": "#37872D",
                  "index": 2
                },
                "null": {
                  "color": "transparent",
                  "index": 1,
                  "text": "N/A"
                }
              },
              "type": "value"
            },
            {
              "options": {
                "result": {
                  "color": "dark-yellow",
                  "index": 0,
                  "text": "N/A"
                }
              },
              "type": "range"
            }
          ],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "short"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 4,
        "w": 24,
        "x": 0,
        "y": 8
      },
      "id": 19,
      "options": {
        "alignValue": "left",
        "legend": {
          "displayMode": "list",
          "placement": "bottom"
        },
        "mergeValues": true,
        "rowHeight": 0.9,
        "showValue": "never",
        "tooltip": {
          "mode": "single",
          "sort": "none"
        }
      },
      "targets": [
        {
          "$$hashKey": "object:81",
          "aggregation": "Last",
          "alias": "Heating",
          "datasource": {
            "type": "influxdb",
            "uid": "${DS_INFLUXDB}"
          },
          "decimals": 2,
          "displayAliasType": "Warning / Critical",
          "displayType": "Regular",
          "displayValueWithAlias": "Never",
          "query": "from(bucket: v.defaultBucket)\n  |> range(start: v.timeRangeStart, stop:v.timeRangeStop)\n  |> filter(fn: (r) =>\n    r.topic == \"ems-esp/boiler_data\" and\n    r._field == \"heatingactive\"\n  )\n  |>drop(columns: [\"host\", \"topic\", \"_measurement\"])\n  |>map(fn: (r) => ({ r with _field: \"Heating\"}))\n  |> aggregateWindow(every: 1m, fn: last)",
          "refId": "Heating Active",
          "units": "none",
          "valueHandler": "Number Threshold"
        },
        {
          "$$hashKey": "object:81",
          "aggregation": "Last",
          "alias": "Heating",
          "datasource": {
            "type": "influxdb",
            "uid": "${DS_INFLUXDB}"
          },
          "decimals": 2,
          "displayAliasType": "Warning / Critical",
          "displayType": "Regular",
          "displayValueWithAlias": "Never",
          "hide": false,
          "query": "from(bucket: v.defaultBucket)\n  |> range(start: v.timeRangeStart, stop:v.timeRangeStop)\n  |> filter(fn: (r) =>\n    r.topic == \"ems-esp/boiler_data_ww\" and\n    r._field == \"wwactive\"\n  )\n  |>drop(columns: [\"host\", \"topic\", \"_measurement\"])\n  |>map(fn: (r) => ({ r with _field: \"Warm Water\"}))\n  |> aggregateWindow(every: 1m, fn: last)",
          "refId": "Warm water",
          "units": "none",
          "valueHandler": "Number Threshold"
        }
      ],
      "title": "Status",
      "type": "state-timeline"
    },
    {
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic",
            "seriesBy": "last"
          },
          "custom": {
            "axisLabel": "Temperatuur",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 5,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineInterpolation": "stepAfter",
            "lineWidth": 1,
            "pointSize": 5,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "never",
            "spanNulls": false,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "decimals": 0,
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "celsius"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 6,
        "w": 12,
        "x": 0,
        "y": 12
      },
      "id": 14,
      "options": {
        "legend": {
          "calcs": [],
          "displayMode": "table",
          "placement": "right"
        },
        "tooltip": {
          "mode": "single",
          "sort": "none"
        }
      },
      "targets": [
        {
          "datasource": {
            "type": "influxdb",
            "uid": "${DS_INFLUXDB}"
          },
          "hide": false,
          "query": "from(bucket: v.defaultBucket)\n  |> range(start: v.timeRangeStart, stop:v.timeRangeStop)\n  |> filter(fn: (r) =>\n    r.topic == \"ems-esp/boiler_data_ww\" and\n    r._field == \"wwsettemp\"\n  )\n  |>map(fn: (r) => ({ r with _field: \"wanted temperature\"}))\n  |>drop(columns: [\"host\", \"topic\",\"_measurement\"])\n  |> aggregateWindow(every: 5m, fn: mean)",
          "refId": "Warm Water temps"
        },
        {
          "datasource": {
            "type": "influxdb",
            "uid": "${DS_INFLUXDB}"
          },
          "hide": false,
          "query": "from(bucket: v.defaultBucket)\r\n  |> range(start: v.timeRangeStart, stop:v.timeRangeStop)\r\n  |> filter(fn: (r) =>\r\n    r.topic == \"ems-esp/boiler_data_ww\" and\r\n    r._field == \"wwcurtemp2\" \r\n  )\r\n  |>map(fn: (r) => ({ r with _field: \"actual boiler temperature\"}))\r\n  |>drop(columns: [\"host\", \"topic\",\"_measurement\"])\r\n\r\n  |> aggregateWindow(every: 5m, fn: mean)",
          "refId": "A"
        }
      ],
      "title": "Warm water temperatures",
      "type": "timeseries"
    },
    {
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisLabel": "Percent",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 0,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineInterpolation": "stepAfter",
            "lineWidth": 1,
            "pointSize": 5,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "never",
            "spanNulls": false,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "percent"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 6,
        "w": 12,
        "x": 12,
        "y": 12
      },
      "id": 2,
      "options": {
        "legend": {
          "calcs": [],
          "displayMode": "list",
          "placement": "bottom"
        },
        "tooltip": {
          "mode": "single",
          "sort": "none"
        }
      },
      "targets": [
        {
          "datasource": {
            "type": "influxdb",
            "uid": "${DS_INFLUXDB}"
          },
          "hide": false,
          "query": "from(bucket: v.defaultBucket)\n  |> range(start: v.timeRangeStart, stop:v.timeRangeStop)\n  |> filter(fn: (r) =>\n    r.topic == \"ems-esp/boiler_data\" and\n    r._field == \"curburnpow\"\n  )\n  |>drop(columns:[\"host\",\"topic\",\"_measurement\"])\n  |>map(fn: (r) => ({r with _field: \"Brander actief\"}))\n  |> aggregateWindow(every: 1m, fn: mean)",
          "refId": "warm water"
        }
      ],
      "title": "Burner",
      "type": "timeseries"
    },
    {
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisLabel": "Klep opening",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 0,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineInterpolation": "linear",
            "lineWidth": 1,
            "pointSize": 5,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "never",
            "spanNulls": false,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "percent"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 6,
        "w": 12,
        "x": 0,
        "y": 18
      },
      "id": 25,
      "options": {
        "legend": {
          "calcs": [],
          "displayMode": "table",
          "placement": "right"
        },
        "tooltip": {
          "mode": "single",
          "sort": "none"
        }
      },
      "targets": [
        {
          "datasource": {
            "type": "influxdb",
            "uid": "${DS_INFLUXDB}"
          },
          "query": "from(bucket: v.defaultBucket)\n  |> range(start: v.timeRangeStart, stop:v.timeRangeStop)\n  |> filter(fn: (r) =>\n    r.topic == \"ems-esp/mixer_data_hc2\" and\n    r._field == \"valvestatus\"\n  )\n  |>drop(columns: [\"host\", \"topic\",\"_measurement\"])\n  |>map(fn: (r) => ({ r with _field: \"Beneden\"}))\n  |> aggregateWindow(every: 1m, fn: mean)",
          "refId": "Beneden"
        },
        {
          "datasource": {
            "type": "influxdb",
            "uid": "${DS_INFLUXDB}"
          },
          "hide": false,
          "query": "from(bucket: v.defaultBucket)\n  |> range(start: v.timeRangeStart, stop:v.timeRangeStop)\n  |> filter(fn: (r) =>\n    r.topic == \"ems-esp/mixer_data_hc1\" and\n    r._field == \"valvestatus\"\n  )\n  |>drop(columns: [\"host\", \"topic\",\"_measurement\"])\n  |>map(fn: (r) => ({ r with _field: \"Boven\"}))\n  |> aggregateWindow(every: 1m, fn: mean)",
          "refId": "Boven"
        }
      ],
      "title": "Valves",
      "type": "timeseries"
    },
    {
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "continuous-BlYlRd"
          },
          "custom": {
            "axisLabel": "Aanvoertemperatuur",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 11,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineInterpolation": "linear",
            "lineWidth": 1,
            "pointSize": 5,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "never",
            "spanNulls": false,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "celsius"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 6,
        "w": 12,
        "x": 12,
        "y": 18
      },
      "id": 12,
      "options": {
        "legend": {
          "calcs": [],
          "displayMode": "list",
          "placement": "bottom"
        },
        "tooltip": {
          "mode": "single",
          "sort": "none"
        }
      },
      "targets": [
        {
          "datasource": {
            "type": "influxdb",
            "uid": "${DS_INFLUXDB}"
          },
          "query": "from(bucket: v.defaultBucket)\n  |> range(start: v.timeRangeStart, stop:v.timeRangeStop)\n  |> filter(fn: (r) =>\n    r.topic == \"ems-esp/mixer_data_hc2\" and\n    r._field == \"flowtemphc\"\n  )\n  |>drop(columns: [\"host\", \"topic\",\"_measurement\"])\n  |>map(fn: (r) => ({ r with _field: \"Beneden\"}))\n  |> aggregateWindow(every: 5m, fn: mean)",
          "refId": "Warm Water flow"
        },
        {
          "datasource": {
            "type": "influxdb",
            "uid": "${DS_INFLUXDB}"
          },
          "hide": false,
          "query": "from(bucket: v.defaultBucket)\n  |> range(start: v.timeRangeStart, stop:v.timeRangeStop)\n  |> filter(fn: (r) =>\n    r.topic == \"ems-esp/mixer_data_hc1\" and\n    r._field == \"flowtemphc\"\n  )\n  |>drop(columns: [\"host\", \"topic\",\"_measurement\"])\n  |>map(fn: (r) => ({ r with _field: \"Boven\"}))\n  |> aggregateWindow(every: 5m, fn: mean)",
          "refId": "A"
        }
      ],
      "title": "Flow",
      "type": "timeseries"
    },
    {
      "collapsed": false,
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 24
      },
      "id": 8,
      "panels": [],
      "title": "Temperaturen",
      "type": "row"
    }
  ],
  "refresh": "",
  "schemaVersion": 35,
  "style": "dark",
  "tags": [],
  "templating": {
    "list": []
  },
  "time": {
    "from": "now-1h",
    "to": "now"
  },
  "timepicker": {},
  "timezone": "",
  "title": "EMS-ESP",
  "uid": "-QFQnIP7k",
  "version": 77,
  "weekStart": "",
  "gnetId": 15940,
  "description": "ESP32 v3  firmware "
}