Grafana dashboard: PDMA - Gestão
Description: PDMA manager dashboard


{
  "__inputs": [
    {
      "name": "DS_INFLUXDB",
      "label": "InfluxDB",
      "description": "",
      "type": "datasource",
      "pluginId": "influxdb",
      "pluginName": "InfluxDB"
    }
  ],
  "__requires": [
    {
      "type": "panel",
      "id": "alertlist",
      "name": "Alert List",
      "version": ""
    },
    {
      "type": "panel",
      "id": "gauge",
      "name": "Gauge",
      "version": ""
    },
    {
      "type": "grafana",
      "id": "grafana",
      "name": "Grafana",
      "version": "6.4.2"
    },
    {
      "type": "panel",
      "id": "graph",
      "name": "Graph",
      "version": ""
    },
    {
      "type": "datasource",
      "id": "influxdb",
      "name": "InfluxDB",
      "version": "1.0.0"
    },
    {
      "type": "panel",
      "id": "singlestat",
      "name": "Singlestat",
      "version": ""
    },
    {
      "type": "panel",
      "id": "text",
      "name": "Text",
      "version": ""
    }
  ],
  "annotations": {
    "list": [
      {
        "builtIn": 1,
        "datasource": "-- Grafana --",
        "enable": true,
        "hide": true,
        "iconColor": "rgba(0, 211, 255, 1)",
        "limit": 100,
        "matchAny": true,
        "name": "Annotations & Alerts",
        "showIn": 0,
        "tags": [],
        "type": "dashboard"
      }
    ]
  },
  "description": "PDMA manager dashboard",
  "editable": true,
  "gnetId": 11814,
  "graphTooltip": 0,
  "id": null,
  "iteration": 1603454629212,
  "links": [],
  "panels": [
    {
      "dashboardFilter": "",
      "dashboardTags": [],
      "datasource": "${DS_INFLUXDB}",
      "folderId": null,
      "gridPos": {
        "h": 8,
        "w": 4,
        "x": 0,
        "y": 0
      },
      "id": 26,
      "limit": 10,
      "nameFilter": "",
      "onlyAlertsOnDashboard": false,
      "options": {},
      "show": "current",
      "sortOrder": 1,
      "stateFilter": [],
      "timeFrom": null,
      "timeShift": null,
      "title": "Panel Title",
      "type": "alertlist"
    },
    {
      "cacheTimeout": null,
      "colorBackground": false,
      "colorValue": false,
      "colors": [
        "#299c46",
        "rgba(237, 129, 40, 0.89)",
        "#d44a3a"
      ],
      "datasource": "${DS_INFLUXDB}",
      "format": "celsius",
      "gauge": {
        "maxValue": 100,
        "minValue": 0,
        "show": false,
        "thresholdLabels": false,
        "thresholdMarkers": true
      },
      "gridPos": {
        "h": 2,
        "w": 3,
        "x": 4,
        "y": 0
      },
      "id": 23,
      "interval": null,
      "links": [],
      "mappingType": 1,
      "mappingTypes": [
        {
          "name": "value to text",
          "value": 1
        },
        {
          "name": "range to text",
          "value": 2
        }
      ],
      "maxDataPoints": 100,
      "nullPointMode": "connected",
      "nullText": null,
      "options": {},
      "pluginVersion": "6.2.3",
      "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": false
      },
      "tableColumn": "",
      "targets": [
        {
          "groupBy": [
            {
              "params": [
                "$__interval"
              ],
              "type": "time"
            },
            {
              "params": [
                "null"
              ],
              "type": "fill"
            }
          ],
          "measurement": "sensor_data_1",
          "orderByTime": "ASC",
          "policy": "default",
          "refId": "A",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "temperature_2"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "last"
              }
            ]
          ],
          "tags": [
            {
              "key": "gateway_mac",
              "operator": "=~",
              "value": "/^$gateway_mac$/"
            },
            {
              "condition": "AND",
              "key": "sensor_name",
              "operator": "=~",
              "value": "/^$pme_sensor_name$/"
            },
            {
              "condition": "AND",
              "key": "sensor_mac",
              "operator": "=~",
              "value": "/^$pme_sensor_mac$/"
            },
            {
              "condition": "AND",
              "key": "gateway_name",
              "operator": "=~",
              "value": "/^$gateway_name$/"
            }
          ]
        }
      ],
      "thresholds": "",
      "timeFrom": null,
      "timeShift": null,
      "title": "Temperatura",
      "transparent": true,
      "type": "singlestat",
      "valueFontSize": "80%",
      "valueMaps": [
        {
          "op": "=",
          "text": "N/A",
          "value": "null"
        }
      ],
      "valueName": "current"
    },
    {
      "cacheTimeout": null,
      "colorBackground": false,
      "colorValue": false,
      "colors": [
        "#299c46",
        "rgba(237, 129, 40, 0.89)",
        "#d44a3a"
      ],
      "datasource": "${DS_INFLUXDB}",
      "format": "none",
      "gauge": {
        "maxValue": 100,
        "minValue": 0,
        "show": false,
        "thresholdLabels": false,
        "thresholdMarkers": true
      },
      "gridPos": {
        "h": 3,
        "w": 6,
        "x": 7,
        "y": 0
      },
      "id": 7,
      "interval": null,
      "links": [],
      "mappingType": 2,
      "mappingTypes": [
        {
          "name": "value to text",
          "value": 1
        },
        {
          "name": "range to text",
          "value": 2
        }
      ],
      "maxDataPoints": 100,
      "nullPointMode": "connected",
      "nullText": null,
      "options": {},
      "postfix": "",
      "postfixFontSize": "50%",
      "prefix": "",
      "prefixFontSize": "50%",
      "rangeMaps": [
        {
          "from": "0.1",
          "text": "Indutivo",
          "to": "9999999999999999999999999999999999999999999999999999999999999999999"
        },
        {
          "from": "-99999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999",
          "text": "Capacitivo",
          "to": "-0.1"
        },
        {
          "from": "0",
          "text": "N/A",
          "to": "0"
        }
      ],
      "sparkline": {
        "fillColor": "rgba(31, 118, 189, 0.18)",
        "full": false,
        "lineColor": "rgb(31, 120, 193)",
        "show": false
      },
      "tableColumn": "",
      "targets": [
        {
          "groupBy": [
            {
              "params": [
                "$__interval"
              ],
              "type": "time"
            },
            {
              "params": [
                "null"
              ],
              "type": "fill"
            }
          ],
          "measurement": "sensor_data_1",
          "orderByTime": "ASC",
          "policy": "default",
          "refId": "A",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "reactive_power_phase_1"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "last"
              }
            ]
          ],
          "tags": [
            {
              "key": "gateway_mac",
              "operator": "=~",
              "value": "/^$gateway_mac$/"
            },
            {
              "condition": "AND",
              "key": "sensor_name",
              "operator": "=~",
              "value": "/^$pme_sensor_name$/"
            },
            {
              "condition": "AND",
              "key": "sensor_mac",
              "operator": "=~",
              "value": "/^$pme_sensor_mac$/"
            },
            {
              "condition": "AND",
              "key": "gateway_name",
              "operator": "=~",
              "value": "/^$gateway_name$/"
            }
          ]
        }
      ],
      "thresholds": "",
      "timeFrom": null,
      "timeShift": null,
      "title": "Tipo de carga",
      "transparent": true,
      "type": "singlestat",
      "valueFontSize": "80%",
      "valueMaps": [
        {
          "op": "=",
          "text": "N/A",
          "value": "null"
        }
      ],
      "valueName": "current"
    },
    {
      "cacheTimeout": null,
      "colorBackground": true,
      "colorValue": false,
      "colors": [
        "#37872D",
        "#E0B400",
        "#C4162A"
      ],
      "datasource": "${DS_INFLUXDB}",
      "decimals": 2,
      "format": "watt",
      "gauge": {
        "maxValue": 100,
        "minValue": 0,
        "show": false,
        "thresholdLabels": false,
        "thresholdMarkers": true
      },
      "gridPos": {
        "h": 3,
        "w": 3,
        "x": 13,
        "y": 0
      },
      "id": 14,
      "interval": null,
      "links": [],
      "mappingType": 1,
      "mappingTypes": [
        {
          "name": "value to text",
          "value": 1
        },
        {
          "name": "range to text",
          "value": 2
        }
      ],
      "maxDataPoints": 100,
      "nullPointMode": "connected",
      "nullText": null,
      "options": {},
      "pluginVersion": "6.2.3",
      "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": false
      },
      "tableColumn": "",
      "targets": [
        {
          "alias": "",
          "groupBy": [
            {
              "params": [
                "$__interval"
              ],
              "type": "time"
            },
            {
              "params": [
                "null"
              ],
              "type": "fill"
            }
          ],
          "measurement": "sensor_data_1",
          "orderByTime": "ASC",
          "policy": "default",
          "query": "SELECT last(\"p_apparent_1\")  + last(p_apparent_2) + last(p_apparent_3) FROM \"sensor_data_01\" WHERE (\"host\" =~ /^$host$/ AND \"sensor_mac\" =~ /^$equipamento$/) AND $timeFilter GROUP BY time($__interval) fill(0)",
          "rawQuery": false,
          "refId": "A",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "active_power_phase_1"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "last"
              },
              {
                "params": [
                  " + last(active_power_phase_2) + last(active_power_phase_3)"
                ],
                "type": "math"
              }
            ]
          ],
          "tags": [
            {
              "key": "gateway_mac",
              "operator": "=~",
              "value": "/^$gateway_mac$/"
            },
            {
              "condition": "AND",
              "key": "sensor_name",
              "operator": "=~",
              "value": "/^$pme_sensor_name$/"
            },
            {
              "condition": "AND",
              "key": "sensor_mac",
              "operator": "=~",
              "value": "/^$pme_sensor_mac$/"
            },
            {
              "condition": "AND",
              "key": "gateway_name",
              "operator": "=~",
              "value": "/^$gateway_name$/"
            }
          ]
        }
      ],
      "thresholds": "1000,1500",
      "timeFrom": null,
      "timeShift": null,
      "title": "Demanda atual",
      "transparent": true,
      "type": "singlestat",
      "valueFontSize": "80%",
      "valueMaps": [
        {
          "op": "=",
          "text": "0",
          "value": "null"
        }
      ],
      "valueName": "current"
    },
    {
      "cacheTimeout": null,
      "colorBackground": true,
      "colorValue": false,
      "colors": [
        "#37872D",
        "#E0B400",
        "#C4162A"
      ],
      "datasource": "${DS_INFLUXDB}",
      "decimals": 2,
      "format": "watt",
      "gauge": {
        "maxValue": 100,
        "minValue": 0,
        "show": false,
        "thresholdLabels": false,
        "thresholdMarkers": true
      },
      "gridPos": {
        "h": 3,
        "w": 4,
        "x": 16,
        "y": 0
      },
      "id": 27,
      "interval": null,
      "links": [],
      "mappingType": 1,
      "mappingTypes": [
        {
          "name": "value to text",
          "value": 1
        },
        {
          "name": "range to text",
          "value": 2
        }
      ],
      "maxDataPoints": 100,
      "nullPointMode": "connected",
      "nullText": null,
      "options": {},
      "pluginVersion": "6.2.3",
      "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": false
      },
      "tableColumn": "",
      "targets": [
        {
          "alias": "",
          "groupBy": [
            {
              "params": [
                "$__interval"
              ],
              "type": "time"
            },
            {
              "params": [
                "null"
              ],
              "type": "fill"
            }
          ],
          "measurement": "sensor_data_1",
          "orderByTime": "ASC",
          "policy": "default",
          "query": "SELECT last(\"p_apparent_1\")  + last(p_apparent_2) + last(p_apparent_3) FROM \"sensor_data_01\" WHERE (\"host\" =~ /^$host$/ AND \"sensor_mac\" =~ /^$equipamento$/) AND $timeFilter GROUP BY time($__interval) fill(0)",
          "rawQuery": false,
          "refId": "A",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "active_power_phase_1"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "sum"
              },
              {
                "params": [
                  " + sum(active_power_phase_2) + sum(active_power_phase_3)"
                ],
                "type": "math"
              }
            ]
          ],
          "tags": [
            {
              "key": "gateway_mac",
              "operator": "=~",
              "value": "/^$gateway_mac$/"
            },
            {
              "condition": "AND",
              "key": "sensor_name",
              "operator": "=~",
              "value": "/^$pme_sensor_name$/"
            },
            {
              "condition": "AND",
              "key": "sensor_mac",
              "operator": "=~",
              "value": "/^$pme_sensor_mac$/"
            },
            {
              "condition": "AND",
              "key": "gateway_name",
              "operator": "=~",
              "value": "/^$gateway_name$/"
            }
          ]
        }
      ],
      "thresholds": "1000,1500",
      "timeFrom": null,
      "timeShift": null,
      "title": "Demanda total",
      "transparent": true,
      "type": "singlestat",
      "valueFontSize": "80%",
      "valueMaps": [
        {
          "op": "=",
          "text": "0",
          "value": "null"
        }
      ],
      "valueName": "current"
    },
    {
      "cacheTimeout": null,
      "colorBackground": false,
      "colorValue": false,
      "colors": [
        "#299c46",
        "rgba(237, 129, 40, 0.89)",
        "#d44a3a"
      ],
      "datasource": "${DS_INFLUXDB}",
      "decimals": 2,
      "format": "watt",
      "gauge": {
        "maxValue": 100,
        "minValue": 0,
        "show": false,
        "thresholdLabels": false,
        "thresholdMarkers": true
      },
      "gridPos": {
        "h": 3,
        "w": 4,
        "x": 20,
        "y": 0
      },
      "id": 17,
      "interval": null,
      "links": [],
      "mappingType": 1,
      "mappingTypes": [
        {
          "name": "value to text",
          "value": 1
        },
        {
          "name": "range to text",
          "value": 2
        }
      ],
      "maxDataPoints": 100,
      "nullPointMode": "connected",
      "nullText": null,
      "options": {},
      "pluginVersion": "6.2.3",
      "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": false
      },
      "tableColumn": "",
      "targets": [
        {
          "alias": "total",
          "groupBy": [
            {
              "params": [
                "$__interval"
              ],
              "type": "time"
            },
            {
              "params": [
                "null"
              ],
              "type": "fill"
            }
          ],
          "measurement": "sensor_data_1",
          "orderByTime": "ASC",
          "policy": "default",
          "refId": "D",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "active_power_phase_1"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "mean"
              },
              {
                "params": [
                  " + mean(active_power_phase_2) + mean(active_power_phase_3)"
                ],
                "type": "math"
              }
            ]
          ],
          "tags": [
            {
              "key": "gateway_mac",
              "operator": "=~",
              "value": "/^$gateway_mac$/"
            },
            {
              "condition": "AND",
              "key": "sensor_name",
              "operator": "=~",
              "value": "/^$pme_sensor_name$/"
            },
            {
              "condition": "AND",
              "key": "sensor_mac",
              "operator": "=~",
              "value": "/^$pme_sensor_mac$/"
            },
            {
              "condition": "AND",
              "key": "gateway_name",
              "operator": "=~",
              "value": "/^$gateway_name$/"
            }
          ]
        }
      ],
      "thresholds": "",
      "timeFrom": null,
      "timeShift": null,
      "title": "Demanda média total",
      "transparent": true,
      "type": "singlestat",
      "valueFontSize": "80%",
      "valueMaps": [
        {
          "op": "=",
          "text": "N/A",
          "value": "null"
        }
      ],
      "valueName": "current"
    },
    {
      "cacheTimeout": null,
      "colorBackground": false,
      "colorValue": false,
      "colors": [
        "#299c46",
        "rgba(237, 129, 40, 0.89)",
        "#d44a3a"
      ],
      "datasource": "${DS_INFLUXDB}",
      "format": "celsius",
      "gauge": {
        "maxValue": 100,
        "minValue": 0,
        "show": false,
        "thresholdLabels": false,
        "thresholdMarkers": true
      },
      "gridPos": {
        "h": 2,
        "w": 3,
        "x": 4,
        "y": 2
      },
      "id": 21,
      "interval": null,
      "links": [],
      "mappingType": 1,
      "mappingTypes": [
        {
          "name": "value to text",
          "value": 1
        },
        {
          "name": "range to text",
          "value": 2
        }
      ],
      "maxDataPoints": 100,
      "nullPointMode": "connected",
      "nullText": null,
      "options": {},
      "pluginVersion": "6.2.3",
      "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": false
      },
      "tableColumn": "",
      "targets": [
        {
          "groupBy": [
            {
              "params": [
                "$__interval"
              ],
              "type": "time"
            },
            {
              "params": [
                "null"
              ],
              "type": "fill"
            }
          ],
          "measurement": "sensor_data_1",
          "orderByTime": "ASC",
          "policy": "default",
          "refId": "A",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "temperature_1"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "last"
              }
            ]
          ],
          "tags": [
            {
              "key": "gateway_mac",
              "operator": "=~",
              "value": "/^$gateway_mac$/"
            },
            {
              "condition": "AND",
              "key": "sensor_name",
              "operator": "=~",
              "value": "/^$pme_sensor_name$/"
            },
            {
              "condition": "AND",
              "key": "sensor_mac",
              "operator": "=~",
              "value": "/^$pme_sensor_mac$/"
            },
            {
              "condition": "AND",
              "key": "gateway_name",
              "operator": "=~",
              "value": "/^$gateway_name$/"
            }
          ]
        }
      ],
      "thresholds": "",
      "timeFrom": null,
      "timeShift": null,
      "title": "Temperatura",
      "transparent": true,
      "type": "singlestat",
      "valueFontSize": "80%",
      "valueMaps": [
        {
          "op": "=",
          "text": "N/A",
          "value": "null"
        }
      ],
      "valueName": "current"
    },
    {
      "cacheTimeout": null,
      "datasource": "${DS_INFLUXDB}",
      "gridPos": {
        "h": 5,
        "w": 6,
        "x": 7,
        "y": 3
      },
      "id": 19,
      "links": [],
      "options": {
        "fieldOptions": {
          "calcs": [
            "last"
          ],
          "defaults": {
            "decimals": 2,
            "mappings": [],
            "max": 1,
            "min": 0,
            "thresholds": [
              {
                "color": "dark-red",
                "value": null
              },
              {
                "color": "dark-green",
                "value": 0.92
              }
            ],
            "unit": "none"
          },
          "override": {},
          "values": false
        },
        "orientation": "auto",
        "showThresholdLabels": false,
        "showThresholdMarkers": true
      },
      "pluginVersion": "6.4.2",
      "targets": [
        {
          "alias": "fase 1",
          "groupBy": [
            {
              "params": [
                "$__interval"
              ],
              "type": "time"
            },
            {
              "params": [
                "previous"
              ],
              "type": "fill"
            }
          ],
          "measurement": "sensor_data_1",
          "orderByTime": "ASC",
          "policy": "default",
          "refId": "A",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "power_factor_phase_1"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "last"
              }
            ]
          ],
          "tags": [
            {
              "key": "gateway_mac",
              "operator": "=~",
              "value": "/^$gateway_mac$/"
            },
            {
              "condition": "AND",
              "key": "sensor_name",
              "operator": "=~",
              "value": "/^$pme_sensor_name$/"
            },
            {
              "condition": "AND",
              "key": "sensor_mac",
              "operator": "=~",
              "value": "/^$pme_sensor_mac$/"
            },
            {
              "condition": "AND",
              "key": "gateway_name",
              "operator": "=~",
              "value": "/^$gateway_name$/"
            }
          ]
        },
        {
          "alias": "fase 2",
          "groupBy": [
            {
              "params": [
                "$__interval"
              ],
              "type": "time"
            },
            {
              "params": [
                "previous"
              ],
              "type": "fill"
            }
          ],
          "measurement": "sensor_data_1",
          "orderByTime": "ASC",
          "policy": "default",
          "refId": "B",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "power_factor_phase_2"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "last"
              }
            ]
          ],
          "tags": [
            {
              "key": "gateway_mac",
              "operator": "=~",
              "value": "/^$gateway_mac$/"
            },
            {
              "condition": "AND",
              "key": "sensor_name",
              "operator": "=~",
              "value": "/^$pme_sensor_name$/"
            },
            {
              "condition": "AND",
              "key": "sensor_mac",
              "operator": "=~",
              "value": "/^$pme_sensor_mac$/"
            },
            {
              "condition": "AND",
              "key": "gateway_name",
              "operator": "=~",
              "value": "/^$gateway_name$/"
            }
          ]
        },
        {
          "alias": "fase 3",
          "groupBy": [
            {
              "params": [
                "$__interval"
              ],
              "type": "time"
            },
            {
              "params": [
                "previous"
              ],
              "type": "fill"
            }
          ],
          "measurement": "sensor_data_1",
          "orderByTime": "ASC",
          "policy": "default",
          "refId": "C",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "power_factor_phase_3"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "last"
              }
            ]
          ],
          "tags": [
            {
              "key": "gateway_mac",
              "operator": "=~",
              "value": "/^$gateway_mac$/"
            },
            {
              "condition": "AND",
              "key": "sensor_name",
              "operator": "=~",
              "value": "/^$pme_sensor_name$/"
            },
            {
              "condition": "AND",
              "key": "sensor_mac",
              "operator": "=~",
              "value": "/^$pme_sensor_mac$/"
            },
            {
              "condition": "AND",
              "key": "gateway_name",
              "operator": "=~",
              "value": "/^$gateway_name$/"
            }
          ]
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "Fator de potência",
      "transparent": true,
      "type": "gauge"
    },
    {
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_INFLUXDB}",
      "fill": 1,
      "fillGradient": 0,
      "gridPos": {
        "h": 10,
        "w": 11,
        "x": 13,
        "y": 3
      },
      "id": 12,
      "legend": {
        "alignAsTable": true,
        "avg": true,
        "current": true,
        "hideEmpty": false,
        "hideZero": false,
        "max": true,
        "min": true,
        "rightSide": false,
        "show": true,
        "total": false,
        "values": true
      },
      "lines": true,
      "linewidth": 1,
      "links": [],
      "nullPointMode": "connected",
      "options": {
        "dataLinks": []
      },
      "percentage": false,
      "pointradius": 2,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": true,
      "targets": [
        {
          "alias": "fase 1",
          "groupBy": [
            {
              "params": [
                "$__interval"
              ],
              "type": "time"
            },
            {
              "params": [
                "null"
              ],
              "type": "fill"
            }
          ],
          "measurement": "sensor_data_1",
          "orderByTime": "ASC",
          "policy": "default",
          "query": "SELECT last(\"p_apparent_1\") FROM \"sensor_data_01\" WHERE (\"host\" =~ /^$host$/ AND \"sensor_mac\" =~ /^$equipamento$/) AND $timeFilter GROUP BY time($__interval) fill(null)",
          "rawQuery": false,
          "refId": "A",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "active_power_phase_1"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "last"
              }
            ]
          ],
          "tags": [
            {
              "key": "gateway_mac",
              "operator": "=~",
              "value": "/^$gateway_mac$/"
            },
            {
              "condition": "AND",
              "key": "sensor_name",
              "operator": "=~",
              "value": "/^$pme_sensor_name$/"
            },
            {
              "condition": "AND",
              "key": "sensor_mac",
              "operator": "=~",
              "value": "/^$pme_sensor_mac$/"
            },
            {
              "condition": "AND",
              "key": "gateway_name",
              "operator": "=~",
              "value": "/^$gateway_name$/"
            }
          ]
        },
        {
          "alias": "fase 2",
          "groupBy": [
            {
              "params": [
                "$__interval"
              ],
              "type": "time"
            },
            {
              "params": [
                "null"
              ],
              "type": "fill"
            }
          ],
          "measurement": "sensor_data_1",
          "orderByTime": "ASC",
          "policy": "default",
          "query": "SELECT \"p_apparent_2\" FROM \"sensor_data_01\" WHERE (\"host\" =~ /^$host$/ AND \"sensor_mac\" =~ /^$equipamento$/) AND ",
          "rawQuery": false,
          "refId": "B",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "active_power_phase_2"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "last"
              }
            ]
          ],
          "tags": [
            {
              "key": "gateway_mac",
              "operator": "=~",
              "value": "/^$gateway_mac$/"
            },
            {
              "condition": "AND",
              "key": "sensor_name",
              "operator": "=~",
              "value": "/^$pme_sensor_name$/"
            },
            {
              "condition": "AND",
              "key": "sensor_mac",
              "operator": "=~",
              "value": "/^$pme_sensor_mac$/"
            },
            {
              "condition": "AND",
              "key": "gateway_name",
              "operator": "=~",
              "value": "/^$gateway_name$/"
            }
          ]
        },
        {
          "alias": "fase 3",
          "groupBy": [
            {
              "params": [
                "$__interval"
              ],
              "type": "time"
            },
            {
              "params": [
                "null"
              ],
              "type": "fill"
            }
          ],
          "measurement": "sensor_data_1",
          "orderByTime": "ASC",
          "policy": "default",
          "refId": "C",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "active_power_phase_3"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "last"
              }
            ]
          ],
          "tags": [
            {
              "key": "gateway_mac",
              "operator": "=~",
              "value": "/^$gateway_mac$/"
            },
            {
              "condition": "AND",
              "key": "sensor_name",
              "operator": "=~",
              "value": "/^$pme_sensor_name$/"
            },
            {
              "condition": "AND",
              "key": "sensor_mac",
              "operator": "=~",
              "value": "/^$pme_sensor_mac$/"
            },
            {
              "condition": "AND",
              "key": "gateway_name",
              "operator": "=~",
              "value": "/^$gateway_name$/"
            }
          ]
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "Histórico de demanda",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "transparent": true,
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "format": "watt",
          "label": "",
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        },
        {
          "format": "kvoltamp",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": false
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "cacheTimeout": null,
      "colorBackground": false,
      "colorValue": false,
      "colors": [
        "#299c46",
        "rgba(237, 129, 40, 0.89)",
        "#d44a3a"
      ],
      "datasource": "${DS_INFLUXDB}",
      "format": "percent",
      "gauge": {
        "maxValue": 100,
        "minValue": 0,
        "show": false,
        "thresholdLabels": false,
        "thresholdMarkers": true
      },
      "gridPos": {
        "h": 2,
        "w": 3,
        "x": 4,
        "y": 4
      },
      "id": 24,
      "interval": null,
      "links": [],
      "mappingType": 1,
      "mappingTypes": [
        {
          "name": "value to text",
          "value": 1
        },
        {
          "name": "range to text",
          "value": 2
        }
      ],
      "maxDataPoints": 100,
      "nullPointMode": "connected",
      "nullText": null,
      "options": {},
      "pluginVersion": "6.2.3",
      "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": false
      },
      "tableColumn": "",
      "targets": [
        {
          "groupBy": [
            {
              "params": [
                "$__interval"
              ],
              "type": "time"
            },
            {
              "params": [
                "null"
              ],
              "type": "fill"
            }
          ],
          "measurement": "sensor_data_1",
          "orderByTime": "ASC",
          "policy": "default",
          "refId": "A",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "humidity_2"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "last"
              }
            ]
          ],
          "tags": [
            {
              "key": "gateway_mac",
              "operator": "=~",
              "value": "/^$gateway_mac$/"
            },
            {
              "condition": "AND",
              "key": "sensor_name",
              "operator": "=~",
              "value": "/^$pme_sensor_name$/"
            },
            {
              "condition": "AND",
              "key": "sensor_mac",
              "operator": "=~",
              "value": "/^$pme_sensor_mac$/"
            },
            {
              "condition": "AND",
              "key": "gateway_name",
              "operator": "=~",
              "value": "/^$gateway_name$/"
            }
          ]
        }
      ],
      "thresholds": "",
      "timeFrom": null,
      "timeShift": null,
      "title": "Umidade",
      "transparent": true,
      "type": "singlestat",
      "valueFontSize": "80%",
      "valueMaps": [
        {
          "op": "=",
          "text": "N/A",
          "value": "null"
        }
      ],
      "valueName": "current"
    },
    {
      "cacheTimeout": null,
      "colorBackground": false,
      "colorValue": false,
      "colors": [
        "#299c46",
        "rgba(237, 129, 40, 0.89)",
        "#d44a3a"
      ],
      "datasource": "${DS_INFLUXDB}",
      "format": "percent",
      "gauge": {
        "maxValue": 100,
        "minValue": 0,
        "show": false,
        "thresholdLabels": false,
        "thresholdMarkers": true
      },
      "gridPos": {
        "h": 2,
        "w": 3,
        "x": 4,
        "y": 6
      },
      "id": 22,
      "interval": null,
      "links": [],
      "mappingType": 1,
      "mappingTypes": [
        {
          "name": "value to text",
          "value": 1
        },
        {
          "name": "range to text",
          "value": 2
        }
      ],
      "maxDataPoints": 100,
      "nullPointMode": "connected",
      "nullText": null,
      "options": {},
      "pluginVersion": "6.2.3",
      "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": false
      },
      "tableColumn": "",
      "targets": [
        {
          "groupBy": [
            {
              "params": [
                "$__interval"
              ],
              "type": "time"
            },
            {
              "params": [
                "null"
              ],
              "type": "fill"
            }
          ],
          "measurement": "sensor_data_1",
          "orderByTime": "ASC",
          "policy": "default",
          "refId": "A",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "humidity_1"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "last"
              }
            ]
          ],
          "tags": [
            {
              "key": "gateway_mac",
              "operator": "=~",
              "value": "/^$gateway_mac$/"
            },
            {
              "condition": "AND",
              "key": "sensor_name",
              "operator": "=~",
              "value": "/^$pme_sensor_name$/"
            },
            {
              "condition": "AND",
              "key": "sensor_mac",
              "operator": "=~",
              "value": "/^$pme_sensor_mac$/"
            },
            {
              "condition": "AND",
              "key": "gateway_name",
              "operator": "=~",
              "value": "/^$gateway_name$/"
            }
          ]
        }
      ],
      "thresholds": "",
      "timeFrom": null,
      "timeShift": null,
      "title": "Umidade",
      "transparent": true,
      "type": "singlestat",
      "valueFontSize": "80%",
      "valueMaps": [
        {
          "op": "=",
          "text": "N/A",
          "value": "null"
        }
      ],
      "valueName": "current"
    },
    {
      "content": "- Tipo de carga: 0h às 6h, a concessionária observa o fator de potência em capacitivo. No período complementar, é observado o fator de potência em indutivo.\n- Fator de potência: Indica a eficiência com qual a energia está sendo usada. Abaixo de 0.92, tanto em capacitivo quanto em indutivo, pode acarretar em multas pela concessionária de energia elétrica\n- Demanda contratada: Capacidade máxima que é exigida dentro dos seus processos em determinado momento. Ultrapassar pode acarretar em multas",
      "datasource": "${DS_INFLUXDB}",
      "gridPos": {
        "h": 5,
        "w": 12,
        "x": 0,
        "y": 8
      },
      "id": 16,
      "links": [],
      "mode": "markdown",
      "options": {},
      "targets": [
        {
          "groupBy": [
            {
              "params": [
                "$__interval"
              ],
              "type": "time"
            },
            {
              "params": [
                "null"
              ],
              "type": "fill"
            }
          ],
          "orderByTime": "ASC",
          "policy": "default",
          "refId": "A",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "mean"
              }
            ]
          ],
          "tags": []
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "Legenda",
      "transparent": true,
      "type": "text"
    }
  ],
  "refresh": "5s",
  "schemaVersion": 20,
  "style": "dark",
  "tags": [],
  "templating": {
    "list": [
      {
        "allValue": null,
        "current": {},
        "datasource": "${DS_INFLUXDB}",
        "definition": "SHOW TAG VALUES WITH KEY = \"gateway_name\"",
        "hide": 0,
        "includeAll": true,
        "label": null,
        "multi": true,
        "name": "gateway_name",
        "options": [],
        "query": "SHOW TAG VALUES WITH KEY = \"gateway_name\"",
        "refresh": 2,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "allValue": null,
        "current": {},
        "datasource": "${DS_INFLUXDB}",
        "definition": "SHOW TAG VALUES WITH KEY = \"gateway_mac\" WHERE \"gateway_name\" =~ /^$gateway_name$/",
        "hide": 0,
        "includeAll": true,
        "label": null,
        "multi": true,
        "name": "gateway_mac",
        "options": [],
        "query": "SHOW TAG VALUES WITH KEY = \"gateway_mac\" WHERE \"gateway_name\" =~ /^$gateway_name$/",
        "refresh": 2,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "allValue": null,
        "current": {},
        "datasource": "${DS_INFLUXDB}",
        "definition": "SHOW TAG VALUES FROM \"sensor_data_1\" WITH KEY = \"sensor_name\" WHERE \"gateway_mac\" =~ /^$gateway_mac$/",
        "hide": 0,
        "includeAll": true,
        "label": null,
        "multi": true,
        "name": "pme_sensor_name",
        "options": [],
        "query": "SHOW TAG VALUES FROM \"sensor_data_1\" WITH KEY = \"sensor_name\" WHERE \"gateway_mac\" =~ /^$gateway_mac$/",
        "refresh": 2,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "allValue": null,
        "current": {},
        "datasource": "${DS_INFLUXDB}",
        "definition": "SHOW TAG VALUES FROM \"sensor_data_1\" WITH KEY = \"sensor_mac\" WHERE \"gateway_mac\" =~ /^$gateway_mac$/ and \"sensor_name\" =~ /^$pme_sensor_name$/",
        "hide": 0,
        "includeAll": true,
        "label": "",
        "multi": true,
        "name": "pme_sensor_mac",
        "options": [],
        "query": "SHOW TAG VALUES FROM \"sensor_data_1\" WITH KEY = \"sensor_mac\" WHERE \"gateway_mac\" =~ /^$gateway_mac$/ and \"sensor_name\" =~ /^$pme_sensor_name$/",
        "refresh": 2,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      }
    ]
  },
  "time": {
    "from": "now-15m",
    "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": "browser",
  "title": "PDMA - Gestão",
  "uid": "PARK01",
  "version": 4
}