Grafana dashboard: TUPY - PEAMOD
Description: Dashboard módulo analógico


{
  "__inputs": [
    {
      "name": "DS_INFLUXDB_(GRAFANA ONLINE)",
      "label": "influxdb (grafana online)",
      "description": "",
      "type": "datasource",
      "pluginId": "influxdb",
      "pluginName": "InfluxDB"
    },
    {
      "name": "DS_INFLUXDB-TUPY",
      "label": "InfluxDB-TUPY",
      "description": "",
      "type": "datasource",
      "pluginId": "influxdb",
      "pluginName": "InfluxDB"
    }
  ],
  "__requires": [
    {
      "type": "panel",
      "id": "gauge",
      "name": "Gauge",
      "version": ""
    },
    {
      "type": "grafana",
      "id": "grafana",
      "name": "Grafana",
      "version": "8.0.3"
    },
    {
      "type": "datasource",
      "id": "influxdb",
      "name": "InfluxDB",
      "version": "1.0.0"
    },
    {
      "type": "panel",
      "id": "text",
      "name": "Text",
      "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",
        "type": "dashboard"
      }
    ]
  },
  "description": "Dashboard módulo analógico",
  "editable": true,
  "gnetId": 14655,
  "graphTooltip": 0,
  "id": null,
  "iteration": 1625148175276,
  "links": [
    {
      "asDropdown": true,
      "icon": "external link",
      "includeVars": false,
      "keepTime": false,
      "tags": [],
      "targetBlank": false,
      "title": "NAVEGAÇÃO",
      "tooltip": "",
      "type": "dashboards"
    }
  ],
  "panels": [
    {
      "collapsed": false,
      "datasource": "${DS_INFLUXDB_(GRAFANA ONLINE)}",
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 0
      },
      "id": 64,
      "panels": [],
      "title": "TUPY - PEAMOD",
      "type": "row"
    },
    {
      "datasource": "${DS_INFLUXDB_(GRAFANA ONLINE)}",
      "gridPos": {
        "h": 2,
        "w": 6,
        "x": 0,
        "y": 1
      },
      "id": 72,
      "options": {
        "content": "<p style=\"text-align: center;\"><span style=\"font-family: Verdana, Geneva, sans-serif;\"><strong><span style=\"color: rgb(0, 0, 0); font-size: 25px;\">ZONA 01</span></strong></span><br></p>\n         ",
        "mode": "html"
      },
      "pluginVersion": "8.0.3",
      "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,
      "transparent": true,
      "type": "text"
    },
    {
      "datasource": "${DS_INFLUXDB_(GRAFANA ONLINE)}",
      "gridPos": {
        "h": 2,
        "w": 6,
        "x": 6,
        "y": 1
      },
      "id": 73,
      "options": {
        "content": "<p style=\"text-align: center;\"><span style=\"font-family: Verdana, Geneva, sans-serif;\"><strong><span style=\"color: rgb(0, 0, 0); font-size: 25px;\">ZONA 02</span></strong></span><br></p>\n         ",
        "mode": "html"
      },
      "pluginVersion": "8.0.3",
      "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,
      "transparent": true,
      "type": "text"
    },
    {
      "datasource": "${DS_INFLUXDB_(GRAFANA ONLINE)}",
      "gridPos": {
        "h": 2,
        "w": 6,
        "x": 12,
        "y": 1
      },
      "id": 74,
      "options": {
        "content": "<p style=\"text-align: center;\"><span style=\"font-family: Verdana, Geneva, sans-serif;\"><strong><span style=\"color: rgb(0, 0, 0); font-size: 25px;\">ZONA 03</span></strong></span><br></p>\n         ",
        "mode": "html"
      },
      "pluginVersion": "8.0.3",
      "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,
      "transparent": true,
      "type": "text"
    },
    {
      "datasource": "${DS_INFLUXDB_(GRAFANA ONLINE)}",
      "gridPos": {
        "h": 2,
        "w": 6,
        "x": 18,
        "y": 1
      },
      "id": 75,
      "options": {
        "content": "<p style=\"text-align: center;\"><span style=\"font-family: Verdana, Geneva, sans-serif;\"><strong><span style=\"color: rgb(0, 0, 0); font-size: 25px;\">ZONA 04</span></strong></span><br></p>\n         ",
        "mode": "html"
      },
      "pluginVersion": "8.0.3",
      "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,
      "transparent": true,
      "type": "text"
    },
    {
      "cacheTimeout": null,
      "datasource": "${DS_INFLUXDB-TUPY}",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "displayName": "",
          "mappings": [
            {
              "options": {
                "match": "null",
                "result": {
                  "text": "N/A"
                }
              },
              "type": "special"
            }
          ],
          "max": 100,
          "min": 0,
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "semi-dark-green",
                "value": null
              },
              {
                "color": "#EAB839",
                "value": 50
              },
              {
                "color": "semi-dark-red",
                "value": 90
              }
            ]
          },
          "unit": "celsius"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 7,
        "w": 6,
        "x": 0,
        "y": 3
      },
      "id": 36,
      "links": [],
      "options": {
        "orientation": "horizontal",
        "reduceOptions": {
          "calcs": [
            "last"
          ],
          "fields": "",
          "values": false
        },
        "showThresholdLabels": false,
        "showThresholdMarkers": true,
        "text": {}
      },
      "pluginVersion": "8.0.3",
      "targets": [
        {
          "alias": "temperatura",
          "groupBy": [
            {
              "params": [
                "$__interval"
              ],
              "type": "time"
            },
            {
              "params": [
                "previous"
              ],
              "type": "fill"
            }
          ],
          "measurement": "sensor_data_4",
          "orderByTime": "ASC",
          "policy": "default",
          "query": "from(bucket: \"TUPY-PDMA\")\r\n  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n  |> filter(fn: (r) => r[\"_measurement\"] == \"sensor_data_4\")\r\n  |> filter(fn: (r) => r[\"_field\"] == \"ZONA_01antigo\")\r\n  |> filter(fn: (r) => r[\"sensor_name\"] == \"PEAMOD_Park\")\r\n  |> aggregateWindow(every: v.windowPeriod, fn: last, createEmpty: false)\r\n  //|> map(fn: (r) => ({ r with _value: ((r._value)*53.45)-315.0}))\r\n  |> map(fn: (r) => ({ r with _value: r._value}))",
          "refId": "A",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "Corrente_03"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "last"
              },
              {
                "params": [
                  " * 18.75"
                ],
                "type": "math"
              }
            ]
          ],
          "tags": [
            {
              "key": "gateway_mac",
              "operator": "=~",
              "value": "/^$gateway_mac$/"
            },
            {
              "condition": "AND",
              "key": "sensor_name",
              "operator": "=~",
              "value": "/^$peamod_sensor_name$/"
            },
            {
              "condition": "AND",
              "key": "sensor_mac",
              "operator": "=~",
              "value": "/^$peamod_sensor_mac$/"
            },
            {
              "condition": "AND",
              "key": "gateway_name",
              "operator": "=~",
              "value": "/^$gateway_name$/"
            }
          ]
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "transparent": true,
      "type": "gauge"
    },
    {
      "cacheTimeout": null,
      "datasource": "${DS_INFLUXDB-TUPY}",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "displayName": "",
          "mappings": [
            {
              "options": {
                "match": "null",
                "result": {
                  "text": "N/A"
                }
              },
              "type": "special"
            }
          ],
          "max": 100,
          "min": 0,
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "semi-dark-green",
                "value": null
              },
              {
                "color": "#EAB839",
                "value": 50
              },
              {
                "color": "semi-dark-red",
                "value": 90
              }
            ]
          },
          "unit": "celsius"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 7,
        "w": 6,
        "x": 6,
        "y": 3
      },
      "id": 30,
      "links": [],
      "options": {
        "orientation": "horizontal",
        "reduceOptions": {
          "calcs": [
            "last"
          ],
          "fields": "",
          "values": false
        },
        "showThresholdLabels": false,
        "showThresholdMarkers": true,
        "text": {}
      },
      "pluginVersion": "8.0.3",
      "targets": [
        {
          "alias": "temperatura",
          "groupBy": [
            {
              "params": [
                "$__interval"
              ],
              "type": "time"
            },
            {
              "params": [
                "previous"
              ],
              "type": "fill"
            }
          ],
          "measurement": "sensor_data_4",
          "orderByTime": "ASC",
          "policy": "default",
          "query": "from(bucket: \"TUPY-PDMA\")\r\n  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n  |> filter(fn: (r) => r[\"_measurement\"] == \"sensor_data_4\")\r\n  |> filter(fn: (r) => r[\"_field\"] == \"ZONA_02antigo\")\r\n  |> filter(fn: (r) => r[\"sensor_name\"] == \"PEAMOD_Park\")\r\n  |> aggregateWindow(every: v.windowPeriod, fn: last, createEmpty: false)\r\n  |> map(fn: (r) => ({ r with _value: ((r._value)*53.75)-99.0}))  \r\n  //|> map(fn: (r) => ({ r with _value: r._value}))",
          "refId": "A",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "Corrente_04"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "last"
              },
              {
                "params": [
                  " * 18.75"
                ],
                "type": "math"
              }
            ]
          ],
          "tags": [
            {
              "key": "gateway_mac",
              "operator": "=~",
              "value": "/^$gateway_mac$/"
            },
            {
              "condition": "AND",
              "key": "sensor_name",
              "operator": "=~",
              "value": "/^$peamod_sensor_name$/"
            },
            {
              "condition": "AND",
              "key": "sensor_mac",
              "operator": "=~",
              "value": "/^$peamod_sensor_mac$/"
            },
            {
              "condition": "AND",
              "key": "gateway_name",
              "operator": "=~",
              "value": "/^$gateway_name$/"
            }
          ]
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "transparent": true,
      "type": "gauge"
    },
    {
      "cacheTimeout": null,
      "datasource": "${DS_INFLUXDB-TUPY}",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "displayName": "",
          "mappings": [
            {
              "options": {
                "match": "null",
                "result": {
                  "text": "N/A"
                }
              },
              "type": "special"
            }
          ],
          "max": 100,
          "min": 0,
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "semi-dark-green",
                "value": null
              },
              {
                "color": "#EAB839",
                "value": 50
              },
              {
                "color": "semi-dark-red",
                "value": 90
              }
            ]
          },
          "unit": "celsius"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 7,
        "w": 6,
        "x": 12,
        "y": 3
      },
      "id": 40,
      "links": [],
      "options": {
        "orientation": "horizontal",
        "reduceOptions": {
          "calcs": [
            "last"
          ],
          "fields": "",
          "values": false
        },
        "showThresholdLabels": false,
        "showThresholdMarkers": true,
        "text": {}
      },
      "pluginVersion": "8.0.3",
      "targets": [
        {
          "alias": "temperatura",
          "groupBy": [
            {
              "params": [
                "$__interval"
              ],
              "type": "time"
            },
            {
              "params": [
                "previous"
              ],
              "type": "fill"
            }
          ],
          "measurement": "sensor_data_4",
          "orderByTime": "ASC",
          "policy": "default",
          "query": "from(bucket: \"TUPY-PDMA\")\r\n  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n  |> filter(fn: (r) => r[\"_measurement\"] == \"sensor_data_4\")\r\n  |> filter(fn: (r) => r[\"_field\"] == \"ZONA_03antigo\")\r\n  |> filter(fn: (r) => r[\"sensor_name\"] == \"PEAMOD_Park\")\r\n  |> aggregateWindow(every: v.windowPeriod, fn: last, createEmpty: false)\r\n  |> map(fn: (r) => ({ r with _value: ((r._value-0.1)*86.0)-100.0})) \r\n  //|> map(fn: (r) => ({ r with _value: ((r._value)*86.0)-100.0}))\r\n  |> yield(name:\"last\")",
          "refId": "A",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "Corrente_02"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "last"
              },
              {
                "params": [
                  " * 18.75"
                ],
                "type": "math"
              }
            ]
          ],
          "tags": [
            {
              "key": "gateway_mac",
              "operator": "=~",
              "value": "/^$gateway_mac$/"
            },
            {
              "condition": "AND",
              "key": "sensor_name",
              "operator": "=~",
              "value": "/^$peamod_sensor_name$/"
            },
            {
              "condition": "AND",
              "key": "sensor_mac",
              "operator": "=~",
              "value": "/^$peamod_sensor_mac$/"
            },
            {
              "condition": "AND",
              "key": "gateway_name",
              "operator": "=~",
              "value": "/^$gateway_name$/"
            }
          ]
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "transparent": true,
      "type": "gauge"
    },
    {
      "cacheTimeout": null,
      "datasource": "${DS_INFLUXDB-TUPY}",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "displayName": "",
          "mappings": [
            {
              "options": {
                "match": "null",
                "result": {
                  "text": "N/A"
                }
              },
              "type": "special"
            }
          ],
          "max": 100,
          "min": 0,
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "semi-dark-green",
                "value": null
              },
              {
                "color": "#EAB839",
                "value": 50
              },
              {
                "color": "semi-dark-red",
                "value": 90
              }
            ]
          },
          "unit": "celsius"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 7,
        "w": 6,
        "x": 18,
        "y": 3
      },
      "id": 39,
      "links": [],
      "options": {
        "orientation": "horizontal",
        "reduceOptions": {
          "calcs": [
            "last"
          ],
          "fields": "",
          "values": false
        },
        "showThresholdLabels": false,
        "showThresholdMarkers": true,
        "text": {}
      },
      "pluginVersion": "8.0.3",
      "targets": [
        {
          "alias": "temperatura",
          "groupBy": [
            {
              "params": [
                "$__interval"
              ],
              "type": "time"
            },
            {
              "params": [
                "previous"
              ],
              "type": "fill"
            }
          ],
          "measurement": "sensor_data_4",
          "orderByTime": "ASC",
          "policy": "default",
          "query": "from(bucket: \"TUPY-PDMA\")\r\n  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n  |> filter(fn: (r) => r[\"_measurement\"] == \"sensor_data_4\")\r\n  |> filter(fn: (r) => r[\"_field\"] == \"ZONA_04antigo\")\r\n  |> filter(fn: (r) => r[\"sensor_name\"] == \"PEAMOD_Park\")\r\n  |> aggregateWindow(every: v.windowPeriod, fn: last, createEmpty: false)\r\n  |> map(fn: (r) => ({ r with _value: ((r._value)*86.0)-104.0}))\r\n //|> yield(name: \"last\")",
          "refId": "A",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "Corrente_01"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "last"
              },
              {
                "params": [
                  " * 18.75"
                ],
                "type": "math"
              }
            ]
          ],
          "tags": [
            {
              "key": "gateway_mac",
              "operator": "=~",
              "value": "/^$gateway_mac$/"
            },
            {
              "condition": "AND",
              "key": "sensor_name",
              "operator": "=~",
              "value": "/^$peamod_sensor_name$/"
            },
            {
              "condition": "AND",
              "key": "sensor_mac",
              "operator": "=~",
              "value": "/^$peamod_sensor_mac$/"
            },
            {
              "condition": "AND",
              "key": "gateway_name",
              "operator": "=~",
              "value": "/^$gateway_name$/"
            }
          ]
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "transparent": true,
      "type": "gauge"
    },
    {
      "datasource": "${DS_INFLUXDB_(GRAFANA ONLINE)}",
      "gridPos": {
        "h": 2,
        "w": 6,
        "x": 0,
        "y": 10
      },
      "id": 76,
      "options": {
        "content": "<p style=\"text-align: center;\"><span style=\"font-family: Verdana, Geneva, sans-serif;\"><strong><span style=\"color: rgb(0, 0, 0); font-size: 25px;\">ZONA 05</span></strong></span><br></p>\n         ",
        "mode": "html"
      },
      "pluginVersion": "8.0.3",
      "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,
      "transparent": true,
      "type": "text"
    },
    {
      "datasource": "${DS_INFLUXDB_(GRAFANA ONLINE)}",
      "gridPos": {
        "h": 2,
        "w": 6,
        "x": 9,
        "y": 10
      },
      "id": 77,
      "options": {
        "content": "<p style=\"text-align: center;\"><span style=\"font-family: Verdana, Geneva, sans-serif;\"><strong><span style=\"color: rgb(0, 0, 0); font-size: 25px;\">ZONA 06</span></strong></span><br></p>\n         ",
        "mode": "html"
      },
      "pluginVersion": "8.0.3",
      "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,
      "transparent": true,
      "type": "text"
    },
    {
      "datasource": "${DS_INFLUXDB_(GRAFANA ONLINE)}",
      "gridPos": {
        "h": 2,
        "w": 6,
        "x": 18,
        "y": 10
      },
      "id": 78,
      "options": {
        "content": "<p style=\"text-align: center;\"><span style=\"font-family: Verdana, Geneva, sans-serif;\"><strong><span style=\"color: rgb(0, 0, 0); font-size: 25px;\">ZONA 07</span></strong></span><br></p>\n         ",
        "mode": "html"
      },
      "pluginVersion": "8.0.3",
      "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,
      "transparent": true,
      "type": "text"
    },
    {
      "cacheTimeout": null,
      "datasource": "${DS_INFLUXDB-TUPY}",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "displayName": "",
          "mappings": [
            {
              "options": {
                "match": "null",
                "result": {
                  "text": "N/A"
                }
              },
              "type": "special"
            }
          ],
          "max": 350,
          "min": 0,
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "semi-dark-green",
                "value": null
              },
              {
                "color": "#EAB839",
                "value": 200
              },
              {
                "color": "semi-dark-red",
                "value": 300
              }
            ]
          },
          "unit": "celsius"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 7,
        "w": 6,
        "x": 0,
        "y": 12
      },
      "id": 38,
      "links": [],
      "options": {
        "orientation": "horizontal",
        "reduceOptions": {
          "calcs": [
            "last"
          ],
          "fields": "",
          "values": false
        },
        "showThresholdLabels": false,
        "showThresholdMarkers": true,
        "text": {}
      },
      "pluginVersion": "8.0.3",
      "targets": [
        {
          "alias": "temperatura",
          "groupBy": [
            {
              "params": [
                "$__interval"
              ],
              "type": "time"
            },
            {
              "params": [
                "previous"
              ],
              "type": "fill"
            }
          ],
          "measurement": "sensor_data_4",
          "orderByTime": "ASC",
          "policy": "default",
          "query": "from(bucket: \"TUPY-PDMA\")\r\n  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n  |> filter(fn: (r) => r[\"_measurement\"] == \"sensor_data_4\")\r\n  |> filter(fn: (r) => r[\"_field\"] == \"ZONA_05antigo\")\r\n  |> filter(fn: (r) => r[\"sensor_name\"] == \"PEAMOD_Park\")\r\n  |> aggregateWindow(every: v.windowPeriod, fn: last, createEmpty: false)\r\n|> map(fn: (r) => ({ r with _value: ((r._value-0.1)*86.0)-100.0}))\r\n // |> yield(name: \"last\")",
          "refId": "A",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "Tensao_04"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "last"
              },
              {
                "params": [
                  " * 18.75"
                ],
                "type": "math"
              }
            ]
          ],
          "tags": [
            {
              "key": "gateway_mac",
              "operator": "=~",
              "value": "/^$gateway_mac$/"
            },
            {
              "condition": "AND",
              "key": "sensor_name",
              "operator": "=~",
              "value": "/^$peamod_sensor_name$/"
            },
            {
              "condition": "AND",
              "key": "sensor_mac",
              "operator": "=~",
              "value": "/^$peamod_sensor_mac$/"
            },
            {
              "condition": "AND",
              "key": "gateway_name",
              "operator": "=~",
              "value": "/^$gateway_name$/"
            }
          ]
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "transparent": true,
      "type": "gauge"
    },
    {
      "cacheTimeout": null,
      "datasource": "${DS_INFLUXDB-TUPY}",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "displayName": "",
          "mappings": [
            {
              "options": {
                "match": "null",
                "result": {
                  "text": "N/A"
                }
              },
              "type": "special"
            }
          ],
          "max": 100,
          "min": 0,
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "semi-dark-green",
                "value": null
              },
              {
                "color": "#EAB839",
                "value": 50
              },
              {
                "color": "semi-dark-red",
                "value": 90
              }
            ]
          },
          "unit": "celsius"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 7,
        "w": 6,
        "x": 9,
        "y": 12
      },
      "id": 41,
      "links": [],
      "options": {
        "orientation": "horizontal",
        "reduceOptions": {
          "calcs": [
            "last"
          ],
          "fields": "",
          "values": false
        },
        "showThresholdLabels": false,
        "showThresholdMarkers": true,
        "text": {}
      },
      "pluginVersion": "8.0.3",
      "targets": [
        {
          "alias": "temperatura",
          "groupBy": [
            {
              "params": [
                "$__interval"
              ],
              "type": "time"
            },
            {
              "params": [
                "previous"
              ],
              "type": "fill"
            }
          ],
          "measurement": "sensor_data_4",
          "orderByTime": "ASC",
          "policy": "default",
          "query": "from(bucket: \"TUPY-PDMA\")\r\n  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n  |> filter(fn: (r) => r[\"_measurement\"] == \"sensor_data_4\")\r\n  |> filter(fn: (r) => r[\"_field\"] == \"ZONA_06antigo\")\r\n  |> filter(fn: (r) => r[\"sensor_name\"] == \"PEAMOD_Park\")\r\n  |> aggregateWindow(every: v.windowPeriod, fn: last, createEmpty: false)\r\n|> map(fn: (r) => ({ r with _value: ((r._value-0.1)*86.0)-100.0}))\r\n // |> yield(name: \"last\")",
          "refId": "A",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "Tensao_03"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "last"
              },
              {
                "params": [
                  " * 18.75"
                ],
                "type": "math"
              }
            ]
          ],
          "tags": [
            {
              "key": "gateway_mac",
              "operator": "=~",
              "value": "/^$gateway_mac$/"
            },
            {
              "condition": "AND",
              "key": "sensor_name",
              "operator": "=~",
              "value": "/^$peamod_sensor_name$/"
            },
            {
              "condition": "AND",
              "key": "sensor_mac",
              "operator": "=~",
              "value": "/^$peamod_sensor_mac$/"
            },
            {
              "condition": "AND",
              "key": "gateway_name",
              "operator": "=~",
              "value": "/^$gateway_name$/"
            }
          ]
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "transparent": true,
      "type": "gauge"
    },
    {
      "cacheTimeout": null,
      "datasource": "${DS_INFLUXDB-TUPY}",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "displayName": "",
          "mappings": [
            {
              "options": {
                "match": "null",
                "result": {
                  "text": "N/A"
                }
              },
              "type": "special"
            }
          ],
          "max": 100,
          "min": 0,
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "semi-dark-green",
                "value": null
              },
              {
                "color": "#EAB839",
                "value": 50
              },
              {
                "color": "semi-dark-red",
                "value": 90
              }
            ]
          },
          "unit": "celsius"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 7,
        "w": 6,
        "x": 18,
        "y": 12
      },
      "id": 37,
      "links": [],
      "options": {
        "orientation": "horizontal",
        "reduceOptions": {
          "calcs": [
            "last"
          ],
          "fields": "",
          "values": false
        },
        "showThresholdLabels": false,
        "showThresholdMarkers": true,
        "text": {}
      },
      "pluginVersion": "8.0.3",
      "targets": [
        {
          "alias": "temperatura",
          "groupBy": [
            {
              "params": [
                "$__interval"
              ],
              "type": "time"
            },
            {
              "params": [
                "previous"
              ],
              "type": "fill"
            }
          ],
          "measurement": "sensor_data_4",
          "orderByTime": "ASC",
          "policy": "default",
          "query": "from(bucket: \"TUPY-PDMA\")\r\n  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n  |> filter(fn: (r) => r[\"_measurement\"] == \"sensor_data_4\")\r\n  |> filter(fn: (r) => r[\"_field\"] == \"ZONA_07antigo\")\r\n  |> filter(fn: (r) => r[\"sensor_name\"] == \"PEAMOD_Park\")\r\n  |> aggregateWindow(every: v.windowPeriod, fn: last, createEmpty: false)\r\n  |> map(fn: (r) => ({ r with _value: ((r._value)*53.75)-99.0}))\r\n  |> yield(name: \"last\")",
          "refId": "A",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "Tensao_02"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "last"
              },
              {
                "params": [
                  " * 18.75"
                ],
                "type": "math"
              }
            ]
          ],
          "tags": [
            {
              "key": "gateway_mac",
              "operator": "=~",
              "value": "/^$gateway_mac$/"
            },
            {
              "condition": "AND",
              "key": "sensor_name",
              "operator": "=~",
              "value": "/^$peamod_sensor_name$/"
            },
            {
              "condition": "AND",
              "key": "sensor_mac",
              "operator": "=~",
              "value": "/^$peamod_sensor_mac$/"
            },
            {
              "condition": "AND",
              "key": "gateway_name",
              "operator": "=~",
              "value": "/^$gateway_name$/"
            }
          ]
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "transparent": true,
      "type": "gauge"
    },
    {
      "collapsed": true,
      "datasource": null,
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 19
      },
      "id": 68,
      "panels": [
        {
          "datasource": "${DS_INFLUXDB-TUPY}",
          "fieldConfig": {
            "defaults": {
              "color": {
                "mode": "palette-classic"
              },
              "custom": {
                "axisLabel": "",
                "axisPlacement": "auto",
                "barAlignment": 0,
                "drawStyle": "bars",
                "fillOpacity": 44,
                "gradientMode": "none",
                "hideFrom": {
                  "legend": false,
                  "tooltip": false,
                  "viz": false
                },
                "lineInterpolation": "linear",
                "lineWidth": 2,
                "pointSize": 5,
                "scaleDistribution": {
                  "type": "linear"
                },
                "showPoints": "never",
                "spanNulls": true,
                "stacking": {
                  "group": "A",
                  "mode": "none"
                },
                "thresholdsStyle": {
                  "mode": "off"
                }
              },
              "mappings": [],
              "thresholds": {
                "mode": "absolute",
                "steps": [
                  {
                    "color": "green",
                    "value": null
                  }
                ]
              },
              "unit": "short"
            },
            "overrides": []
          },
          "gridPos": {
            "h": 9,
            "w": 24,
            "x": 0,
            "y": 20
          },
          "id": 79,
          "options": {
            "legend": {
              "calcs": [],
              "displayMode": "hidden",
              "placement": "bottom"
            },
            "tooltip": {
              "mode": "single"
            }
          },
          "pluginVersion": "8.0.2",
          "targets": [
            {
              "groupBy": [],
              "measurement": "sensor_data_4",
              "orderByTime": "ASC",
              "policy": "default",
              "query": "from(bucket: \"TUPY-PDMA\")\r\n  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n  |> filter(fn: (r) => r[\"_measurement\"] == \"sensor_data_4\")\r\n  |> filter(fn: (r) => r[\"_field\"] == \"${Historico_Temperatura}\")\r\n  |> filter(fn: (r) => r[\"sensor_name\"] == \"PEAMOD_Park\")\r\n  |> window(every: 1h)\r\n   |> mean()\r\n//|> aggregateWindow(every: 10m, fn: mean, createEmpty: false)\r\n |> group(columns: [\"_field\",\"_time\"])\r\n |> map(fn: (r) => ({ r with _value: \r\n  if \"${Historico_Temperatura}\" == \"ZONA_03antigo\" then ((r._value-0.1)*86.0)-100.0\r\n  else if \"${Historico_Temperatura}\" == \"ZONA_04antigo\" then ((r._value-0.1)*86.0)-100.0\r\n  else if \"${Historico_Temperatura}\" == \"ZONA_05antigo\" then ((r._value-0.1)*86.0)-100.0\r\n  else if \"${Historico_Temperatura}\" == \"ZONA_06antigo\" then ((r._value-0.1)*86.0)-100.0\r\n  else ((r._value)*53.75)-99.0 }))\r\n//  |> yield(name: \"last\")",
              "refId": "A",
              "resultFormat": "time_series",
              "select": [
                [
                  {
                    "params": [
                      "Corrente_04"
                    ],
                    "type": "field"
                  },
                  {
                    "params": [
                      "* 18.75"
                    ],
                    "type": "math"
                  }
                ]
              ],
              "tags": []
            }
          ],
          "timeFrom": "2d",
          "timeShift": null,
          "title": " HISTÓRICO TEMPERATURA",
          "type": "timeseries"
        }
      ],
      "title": "HISTÓRICO 2 DIAS",
      "type": "row"
    },
    {
      "collapsed": true,
      "datasource": null,
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 20
      },
      "id": 84,
      "panels": [
        {
          "datasource": "${DS_INFLUXDB-TUPY}",
          "fieldConfig": {
            "defaults": {
              "color": {
                "mode": "palette-classic"
              },
              "custom": {
                "axisLabel": "",
                "axisPlacement": "auto",
                "barAlignment": 0,
                "drawStyle": "bars",
                "fillOpacity": 44,
                "gradientMode": "none",
                "hideFrom": {
                  "legend": false,
                  "tooltip": false,
                  "viz": false
                },
                "lineInterpolation": "linear",
                "lineWidth": 2,
                "pointSize": 5,
                "scaleDistribution": {
                  "type": "linear"
                },
                "showPoints": "never",
                "spanNulls": true,
                "stacking": {
                  "group": "A",
                  "mode": "none"
                },
                "thresholdsStyle": {
                  "mode": "off"
                }
              },
              "mappings": [],
              "thresholds": {
                "mode": "absolute",
                "steps": [
                  {
                    "color": "green",
                    "value": null
                  }
                ]
              },
              "unit": "short"
            },
            "overrides": []
          },
          "gridPos": {
            "h": 9,
            "w": 24,
            "x": 0,
            "y": 21
          },
          "id": 86,
          "options": {
            "legend": {
              "calcs": [],
              "displayMode": "hidden",
              "placement": "bottom"
            },
            "tooltip": {
              "mode": "single"
            }
          },
          "pluginVersion": "8.0.2",
          "targets": [
            {
              "groupBy": [],
              "measurement": "sensor_data_4",
              "orderByTime": "ASC",
              "policy": "default",
              "query": "from(bucket: \"TUPY-PDMA\")\r\n  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n  |> filter(fn: (r) => r[\"_measurement\"] == \"sensor_data_4\")\r\n  |> filter(fn: (r) => r[\"_field\"] == \"${Historico_Temperatura}\")\r\n  |> filter(fn: (r) => r[\"sensor_name\"] == \"PEAMOD_Park\")\r\n  |> window(every: 2h)\r\n   |> mean()\r\n//|> aggregateWindow(every: 10m, fn: mean, createEmpty: false)\r\n |> group(columns: [\"_field\",\"_time\"])\r\n |> map(fn: (r) => ({ r with _value: \r\n  if \"${Historico_Temperatura}\" == \"ZONA_03antigo\" then ((r._value-0.1)*86.0)-100.0\r\n  else if \"${Historico_Temperatura}\" == \"ZONA_04antigo\" then ((r._value-0.1)*86.0)-100.0\r\n  else if \"${Historico_Temperatura}\" == \"ZONA_05antigo\" then ((r._value-0.1)*86.0)-100.0\r\n  else if \"${Historico_Temperatura}\" == \"ZONA_06antigo\" then ((r._value-0.1)*86.0)-100.0\r\n  else ((r._value)*53.75)-99.0 }))\r\n//  |> yield(name: \"last\")",
              "refId": "A",
              "resultFormat": "time_series",
              "select": [
                [
                  {
                    "params": [
                      "Corrente_04"
                    ],
                    "type": "field"
                  },
                  {
                    "params": [
                      "* 18.75"
                    ],
                    "type": "math"
                  }
                ]
              ],
              "tags": []
            }
          ],
          "timeFrom": "5d",
          "timeShift": null,
          "title": " HISTÓRICO TEMPERATURA",
          "type": "timeseries"
        }
      ],
      "title": "HISTÓRICO 5 DIAS",
      "type": "row"
    },
    {
      "collapsed": true,
      "datasource": null,
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 21
      },
      "id": 82,
      "panels": [
        {
          "datasource": "${DS_INFLUXDB-TUPY}",
          "fieldConfig": {
            "defaults": {
              "color": {
                "mode": "palette-classic"
              },
              "custom": {
                "axisLabel": "",
                "axisPlacement": "auto",
                "barAlignment": 0,
                "drawStyle": "bars",
                "fillOpacity": 44,
                "gradientMode": "none",
                "hideFrom": {
                  "legend": false,
                  "tooltip": false,
                  "viz": false
                },
                "lineInterpolation": "linear",
                "lineWidth": 2,
                "pointSize": 5,
                "scaleDistribution": {
                  "type": "linear"
                },
                "showPoints": "never",
                "spanNulls": true,
                "stacking": {
                  "group": "A",
                  "mode": "none"
                },
                "thresholdsStyle": {
                  "mode": "off"
                }
              },
              "mappings": [],
              "thresholds": {
                "mode": "absolute",
                "steps": [
                  {
                    "color": "green",
                    "value": null
                  }
                ]
              },
              "unit": "short"
            },
            "overrides": []
          },
          "gridPos": {
            "h": 9,
            "w": 24,
            "x": 0,
            "y": 22
          },
          "id": 88,
          "options": {
            "legend": {
              "calcs": [],
              "displayMode": "hidden",
              "placement": "bottom"
            },
            "tooltip": {
              "mode": "single"
            }
          },
          "pluginVersion": "8.0.2",
          "targets": [
            {
              "groupBy": [],
              "measurement": "sensor_data_4",
              "orderByTime": "ASC",
              "policy": "default",
              "query": "from(bucket: \"TUPY-PDMA\")\r\n  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n  |> filter(fn: (r) => r[\"_measurement\"] == \"sensor_data_4\")\r\n  |> filter(fn: (r) => r[\"_field\"] == \"${Historico_Temperatura}\")\r\n  |> filter(fn: (r) => r[\"sensor_name\"] == \"PEAMOD_Park\")\r\n  |> window(every: 1d)\r\n   |> mean()\r\n//|> aggregateWindow(every: 10m, fn: mean, createEmpty: false)\r\n |> group(columns: [\"_field\",\"_time\"])\r\n |> map(fn: (r) => ({ r with _value: \r\n  if \"${Historico_Temperatura}\" == \"ZONA_03antigo\" then ((r._value-0.1)*86.0)-100.0\r\n  else if \"${Historico_Temperatura}\" == \"ZONA_04antigo\" then ((r._value-0.1)*86.0)-100.0\r\n  else if \"${Historico_Temperatura}\" == \"ZONA_05antigo\" then ((r._value-0.1)*86.0)-100.0\r\n  else if \"${Historico_Temperatura}\" == \"ZONA_06antigo\" then ((r._value-0.1)*86.0)-100.0\r\n  else ((r._value)*53.75)-99.0 }))\r\n//  |> yield(name: \"last\")",
              "refId": "A",
              "resultFormat": "time_series",
              "select": [
                [
                  {
                    "params": [
                      "Corrente_04"
                    ],
                    "type": "field"
                  },
                  {
                    "params": [
                      "* 18.75"
                    ],
                    "type": "math"
                  }
                ]
              ],
              "tags": []
            }
          ],
          "timeFrom": "30d",
          "timeShift": null,
          "title": " HISTÓRICO TEMPERATURA",
          "type": "timeseries"
        }
      ],
      "title": "HISTÓRICO 30 DIAS",
      "type": "row"
    }
  ],
  "refresh": "1m",
  "schemaVersion": 30,
  "style": "dark",
  "tags": [],
  "templating": {
    "list": [
      {
        "allValue": null,
        "current": {},
        "datasource": "${DS_INFLUXDB_(GRAFANA ONLINE)}",
        "definition": "SHOW TAG VALUES WITH KEY = \"gateway_name\"",
        "description": null,
        "error": null,
        "hide": 2,
        "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": "",
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "allValue": null,
        "current": {},
        "datasource": "${DS_INFLUXDB_(GRAFANA ONLINE)}",
        "definition": "SHOW TAG VALUES WITH KEY = \"gateway_mac\" WHERE \"gateway_name\" =~ /^$gateway_name$/",
        "description": null,
        "error": null,
        "hide": 2,
        "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": "",
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "allValue": null,
        "current": {},
        "datasource": "${DS_INFLUXDB_(GRAFANA ONLINE)}",
        "definition": "SHOW TAG VALUES FROM \"sensor_data_4\" WITH KEY = \"sensor_name\" WHERE \"gateway_mac\" =~ /^$gateway_mac$/",
        "description": null,
        "error": null,
        "hide": 2,
        "includeAll": true,
        "label": null,
        "multi": true,
        "name": "peamod_sensor_name",
        "options": [],
        "query": "SHOW TAG VALUES FROM \"sensor_data_4\" WITH KEY = \"sensor_name\" WHERE \"gateway_mac\" =~ /^$gateway_mac$/",
        "refresh": 2,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "tagValuesQuery": "",
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "allValue": null,
        "current": {},
        "datasource": "${DS_INFLUXDB_(GRAFANA ONLINE)}",
        "definition": "SHOW TAG VALUES FROM \"sensor_data_4\" WITH KEY = \"sensor_mac\" WHERE \"gateway_mac\" =~ /^$gateway_mac$/ and \"sensor_name\" =~ /^$peamod_sensor_name$/",
        "description": null,
        "error": null,
        "hide": 2,
        "includeAll": true,
        "label": null,
        "multi": true,
        "name": "peamod_sensor_mac",
        "options": [],
        "query": "SHOW TAG VALUES FROM \"sensor_data_4\" WITH KEY = \"sensor_mac\" WHERE \"gateway_mac\" =~ /^$gateway_mac$/ and \"sensor_name\" =~ /^$peamod_sensor_name$/",
        "refresh": 2,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "tagValuesQuery": "",
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "allValue": null,
        "current": {
          "selected": true,
          "text": "ZONA_07antigo",
          "value": "ZONA_07antigo"
        },
        "description": null,
        "error": null,
        "hide": 0,
        "includeAll": false,
        "label": "Histórico de Temperatura",
        "multi": false,
        "name": "Historico_Temperatura",
        "options": [
          {
            "selected": false,
            "text": "ZONA_01antigo",
            "value": "ZONA_01antigo"
          },
          {
            "selected": false,
            "text": "ZONA_02antigo",
            "value": "ZONA_02antigo"
          },
          {
            "selected": false,
            "text": "ZONA_03antigo",
            "value": "ZONA_03antigo"
          },
          {
            "selected": false,
            "text": "ZONA_04antigo",
            "value": "ZONA_04antigo"
          },
          {
            "selected": false,
            "text": "ZONA_05antigo",
            "value": "ZONA_05antigo"
          },
          {
            "selected": false,
            "text": "ZONA_06antigo",
            "value": "ZONA_06antigo"
          },
          {
            "selected": true,
            "text": "ZONA_07antigo",
            "value": "ZONA_07antigo"
          }
        ],
        "query": "ZONA_01antigo,ZONA_02antigo,ZONA_03antigo,ZONA_04antigo,ZONA_05antigo,ZONA_06antigo,ZONA_07antigo",
        "queryValue": "",
        "skipUrlSync": false,
        "type": "custom"
      }
    ]
  },
  "time": {
    "from": "now-8h",
    "to": "now"
  },
  "timepicker": {
    "refresh_intervals": [
      "30s",
      "1m",
      "5m",
      "15m",
      "30m",
      "1h",
      "2h",
      "1d"
    ]
  },
  "timezone": "",
  "title": "TUPY - PEAMOD",
  "uid": "KtR39adGz",
  "version": 94
}