Grafana dashboard: Temperature Monitoring
Description: Monitor temperature with RPi and Python script


{
  "__inputs": [
    {
      "name": "DS_TEMPERATURE",
      "label": "Temperature",
      "description": "",
      "type": "datasource",
      "pluginId": "mysql",
      "pluginName": "MySQL"
    }
  ],
  "__requires": [
    {
      "type": "panel",
      "id": "alertlist",
      "name": "Alert List",
      "version": "5.0.0"
    },
    {
      "type": "grafana",
      "id": "grafana",
      "name": "Grafana",
      "version": "5.1.4"
    },
    {
      "type": "panel",
      "id": "grafana-clock-panel",
      "name": "Clock",
      "version": "1.0.3"
    },
    {
      "type": "panel",
      "id": "graph",
      "name": "Graph",
      "version": "5.0.0"
    },
    {
      "type": "datasource",
      "id": "mysql",
      "name": "MySQL",
      "version": "5.0.0"
    },
    {
      "type": "panel",
      "id": "singlestat",
      "name": "Singlestat",
      "version": "5.0.0"
    },
    {
      "type": "panel",
      "id": "text",
      "name": "Text",
      "version": "5.0.0"
    }
  ],
  "annotations": {
    "list": [
      {
        "builtIn": 1,
        "datasource": "-- Grafana --",
        "enable": true,
        "hide": true,
        "iconColor": "rgba(0, 211, 255, 1)",
        "name": "Annotations & Alerts",
        "type": "dashboard"
      }
    ]
  },
  "editable": true,
  "gnetId": 14351,
  "graphTooltip": 0,
  "id": null,
  "links": [],
  "panels": [
    {
      "content": "<h1><center> A1 Temperature </h1>",
      "gridPos": {
        "h": 2,
        "w": 24,
        "x": 0,
        "y": 0
      },
      "id": 8,
      "links": [],
      "mode": "html",
      "title": "",
      "transparent": true,
      "type": "text"
    },
    {
      "alert": {
        "conditions": [
          {
            "evaluator": {
              "params": [
                40
              ],
              "type": "gt"
            },
            "operator": {
              "type": "and"
            },
            "query": {
              "params": [
                "A",
                "5m",
                "now"
              ]
            },
            "reducer": {
              "params": [],
              "type": "last"
            },
            "type": "query"
          }
        ],
        "executionErrorState": "alerting",
        "frequency": "60s",
        "handler": 1,
        "message": "",
        "name": "A1 Temperature alert",
        "noDataState": "alerting",
        "notifications": []
      },
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_TEMPERATURE}",
      "decimals": 2,
      "fill": 1,
      "gridPos": {
        "h": 15,
        "w": 24,
        "x": 0,
        "y": 2
      },
      "hideTimeOverride": false,
      "id": 2,
      "legend": {
        "alignAsTable": true,
        "avg": true,
        "current": false,
        "hideEmpty": false,
        "hideZero": false,
        "max": true,
        "min": true,
        "rightSide": false,
        "show": true,
        "total": false,
        "values": true
      },
      "lines": true,
      "linewidth": 1,
      "links": [],
      "nullPointMode": "null",
      "percentage": false,
      "pointradius": 5,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "alias": "",
          "format": "time_series",
          "hide": false,
          "rawSql": "SELECT\n  UNIX_TIMESTAMP(dateur) as time_sec,\n  (sonde1) as value\nFROM (PiTemp)\nWHERE $__timeFilter(dateur)\nORDER BY (dateur) ASC\n",
          "refId": "A"
        }
      ],
      "thresholds": [
        {
          "colorMode": "critical",
          "fill": true,
          "line": true,
          "op": "gt",
          "value": 40
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "transparent": true,
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": "50",
          "min": "20",
          "show": true
        },
        {
          "decimals": null,
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": false
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "cacheTimeout": null,
      "colorBackground": false,
      "colorValue": false,
      "colors": [
        "#d44a3a",
        "rgba(237, 129, 40, 0.89)",
        "#299c46"
      ],
      "datasource": "${DS_TEMPERATURE}",
      "decimals": 1,
      "format": "celsius",
      "gauge": {
        "maxValue": 100,
        "minValue": 0,
        "show": true,
        "thresholdLabels": false,
        "thresholdMarkers": false
      },
      "gridPos": {
        "h": 9,
        "w": 14,
        "x": 0,
        "y": 17
      },
      "id": 4,
      "interval": null,
      "links": [],
      "mappingType": 1,
      "mappingTypes": [
        {
          "name": "value to text",
          "value": 1
        },
        {
          "name": "range to text",
          "value": 2
        }
      ],
      "maxDataPoints": 100,
      "nullPointMode": "connected",
      "nullText": null,
      "postfix": "",
      "postfixFontSize": "50%",
      "prefix": "",
      "prefixFontSize": "50%",
      "rangeMaps": [
        {
          "from": "null",
          "text": "N/A",
          "to": "null"
        }
      ],
      "sparkline": {
        "fillColor": "rgba(31, 118, 189, 0.18)",
        "full": false,
        "lineColor": "rgb(31, 120, 193)",
        "show": false
      },
      "tableColumn": "",
      "targets": [
        {
          "alias": "",
          "format": "time_series",
          "hide": false,
          "rawSql": "SELECT\n  UNIX_TIMESTAMP(dateur) as time_sec,\n  (sonde1) as value\nFROM PiTemp\nWHERE $__timeFilter(dateur)\nORDER BY dateur ASC\n",
          "refId": "A"
        }
      ],
      "thresholds": "",
      "title": "Température Actuelle",
      "transparent": false,
      "type": "singlestat",
      "valueFontSize": "80%",
      "valueMaps": [
        {
          "op": "=",
          "text": "N/A",
          "value": "null"
        }
      ],
      "valueName": "current"
    },
    {
      "bgColor": "#212124",
      "clockType": "24 hour",
      "countdownSettings": {
        "customFormat": null,
        "endCountdownTime": "2019-09-06T19:15:00.000Z",
        "endText": "00:00:00"
      },
      "dateSettings": {
        "dateFormat": "YYYY-MM-DD",
        "fontSize": "20px",
        "fontWeight": "normal",
        "showDate": false
      },
      "gridPos": {
        "h": 3,
        "w": 10,
        "x": 14,
        "y": 17
      },
      "id": 16,
      "links": [],
      "mode": "time",
      "refreshSettings": {
        "syncWithDashboard": false
      },
      "timeSettings": {
        "customFormat": "HH:mm:ss",
        "fontSize": "60px",
        "fontWeight": "normal"
      },
      "timezone": "Europe/Paris",
      "timezoneSettings": {
        "fontSize": "12px",
        "fontWeight": "normal",
        "showTimezone": false,
        "zoneFormat": "offsetAbbv"
      },
      "title": "",
      "transparent": false,
      "type": "grafana-clock-panel"
    },
    {
      "description": "",
      "gridPos": {
        "h": 6,
        "w": 10,
        "x": 14,
        "y": 20
      },
      "id": 6,
      "limit": 10,
      "links": [],
      "onlyAlertsOnDashboard": false,
      "show": "current",
      "sortOrder": 1,
      "stateFilter": [
        "ok",
        "no_data",
        "execution_error",
        "alerting",
        "paused"
      ],
      "title": "",
      "transparent": false,
      "type": "alertlist"
    },
    {
      "cacheTimeout": null,
      "colorBackground": false,
      "colorValue": false,
      "colors": [
        "#508642",
        "#508642",
        "#299c46"
      ],
      "datasource": "${DS_TEMPERATURE}",
      "decimals": 1,
      "format": "celsius",
      "gauge": {
        "maxValue": 100,
        "minValue": 0,
        "show": true,
        "thresholdLabels": false,
        "thresholdMarkers": false
      },
      "gridPos": {
        "h": 9,
        "w": 8,
        "x": 0,
        "y": 26
      },
      "id": 10,
      "interval": null,
      "links": [],
      "mappingType": 1,
      "mappingTypes": [
        {
          "name": "value to text",
          "value": 1
        },
        {
          "name": "range to text",
          "value": 2
        }
      ],
      "maxDataPoints": 100,
      "nullPointMode": "connected",
      "nullText": null,
      "postfix": "",
      "postfixFontSize": "50%",
      "prefix": "",
      "prefixFontSize": "50%",
      "rangeMaps": [
        {
          "from": "null",
          "text": "N/A",
          "to": "null"
        }
      ],
      "sparkline": {
        "fillColor": "rgba(31, 118, 189, 0.18)",
        "full": false,
        "lineColor": "rgb(31, 120, 193)",
        "show": false
      },
      "tableColumn": "",
      "targets": [
        {
          "alias": "",
          "format": "time_series",
          "hide": false,
          "rawSql": "SELECT\n  UNIX_TIMESTAMP(dateur) as time_sec,\n  sonde1 as value\nFROM PiTemp\nWHERE $__timeFilter(dateur)\nORDER BY dateur ASC\n",
          "refId": "A"
        }
      ],
      "thresholds": "",
      "title": "Minimum",
      "type": "singlestat",
      "valueFontSize": "80%",
      "valueMaps": [
        {
          "op": "=",
          "text": "N/A",
          "value": "null"
        }
      ],
      "valueName": "min"
    },
    {
      "cacheTimeout": null,
      "colorBackground": false,
      "colorValue": false,
      "colors": [
        "#ef843c",
        "rgba(237, 129, 40, 0.89)",
        "#ef843c"
      ],
      "datasource": "${DS_TEMPERATURE}",
      "decimals": 1,
      "format": "celsius",
      "gauge": {
        "maxValue": 100,
        "minValue": 0,
        "show": true,
        "thresholdLabels": false,
        "thresholdMarkers": false
      },
      "gridPos": {
        "h": 9,
        "w": 8,
        "x": 8,
        "y": 26
      },
      "id": 12,
      "interval": null,
      "links": [],
      "mappingType": 1,
      "mappingTypes": [
        {
          "name": "value to text",
          "value": 1
        },
        {
          "name": "range to text",
          "value": 2
        }
      ],
      "maxDataPoints": 100,
      "nullPointMode": "connected",
      "nullText": null,
      "postfix": "",
      "postfixFontSize": "50%",
      "prefix": "",
      "prefixFontSize": "50%",
      "rangeMaps": [
        {
          "from": "null",
          "text": "N/A",
          "to": "null"
        }
      ],
      "sparkline": {
        "fillColor": "rgba(31, 118, 189, 0.18)",
        "full": false,
        "lineColor": "rgb(31, 120, 193)",
        "show": false
      },
      "tableColumn": "",
      "targets": [
        {
          "alias": "",
          "format": "time_series",
          "hide": false,
          "rawSql": "SELECT\n  UNIX_TIMESTAMP(dateur) as time_sec,\n  sonde1 as value\nFROM PiTemp\nWHERE $__timeFilter(dateur)\nORDER BY dateur ASC\n",
          "refId": "A"
        }
      ],
      "thresholds": "",
      "title": "Moyenne",
      "type": "singlestat",
      "valueFontSize": "80%",
      "valueMaps": [
        {
          "op": "=",
          "text": "N/A",
          "value": "null"
        }
      ],
      "valueName": "avg"
    },
    {
      "cacheTimeout": null,
      "colorBackground": false,
      "colorValue": false,
      "colors": [
        "#e24d42",
        "#e24d42",
        "#d44a3a"
      ],
      "datasource": "${DS_TEMPERATURE}",
      "decimals": 1,
      "format": "celsius",
      "gauge": {
        "maxValue": 100,
        "minValue": 0,
        "show": true,
        "thresholdLabels": false,
        "thresholdMarkers": false
      },
      "gridPos": {
        "h": 9,
        "w": 8,
        "x": 16,
        "y": 26
      },
      "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,
      "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": "",
          "format": "time_series",
          "rawSql": "SELECT\n  UNIX_TIMESTAMP(dateur) as time_sec,\n  sonde1 as value\nFROM PiTemp\nWHERE $__timeFilter(dateur)\nORDER BY dateur ASC",
          "refId": "A"
        }
      ],
      "thresholds": "",
      "title": "Maximum",
      "type": "singlestat",
      "valueFontSize": "80%",
      "valueMaps": [
        {
          "op": "=",
          "text": "N/A",
          "value": "null"
        }
      ],
      "valueName": "max"
    }
  ],
  "refresh": "1m",
  "schemaVersion": 16,
  "style": "dark",
  "tags": [],
  "templating": {
    "list": []
  },
  "time": {
    "from": "now/d",
    "to": "now/d"
  },
  "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": "Temperature Monitoring",
  "uid": "0aZ4S3Zgz",
  "version": 38,
  "description": "Monitor temperature with RPi and Python script"
}