tableau de bord avec tarif

This commit is contained in:
Sébastien Reuiller 2019-06-19 00:01:17 +02:00
parent 58ce8152c6
commit 238617e547
2 changed files with 252 additions and 180 deletions

2
README.md Normal file → Executable file
View file

@ -1,7 +1,7 @@
# Téléinfo Linky avec un Raspberry Pi
Surveiller sa consommation électrique en temps réel avec un compteur Linky et un Raspberry
![Monitorer son compteur Linky avec Grafana](https://sebastienreuiller.fr/blog/wp-content/uploads/2019/01/capture_dashboard_teleinfo.png)
![Monitorer son compteur Linky avec Grafana](https://sebastienreuiller.fr/blog/wp-content/uploads/2019/06/capture_teleinfo_avec_tarif.png)

View file

@ -1,8 +1,8 @@
{
"__inputs": [
{
"name": "DS_INFLUXLOCAL",
"label": "InfluxLocal",
"name": "DS_TELEINFO",
"label": "Teleinfo",
"description": "",
"type": "datasource",
"pluginId": "influxdb",
@ -63,7 +63,7 @@
"rgba(237, 129, 40, 0.89)",
"#d44a3a"
],
"datasource": "${DS_INFLUXLOCAL}",
"datasource": "${DS_TELEINFO}",
"decimals": 6,
"format": "watth",
"gauge": {
@ -75,7 +75,7 @@
},
"gridPos": {
"h": 3,
"w": 10,
"w": 5,
"x": 0,
"y": 0
},
@ -152,6 +152,124 @@
],
"valueName": "avg"
},
{
"cacheTimeout": null,
"colorBackground": true,
"colorValue": false,
"colors": [
"#299c46",
"rgb(185, 141, 18)",
"#d44a3a"
],
"datasource": "${DS_TELEINFO}",
"format": "currencyEUR",
"gauge": {
"maxValue": 100,
"minValue": 0,
"show": false,
"thresholdLabels": false,
"thresholdMarkers": true
},
"gridPos": {
"h": 3,
"w": 5,
"x": 5,
"y": 0
},
"id": 15,
"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": "HP",
"groupBy": [
{
"params": [
"$__interval"
],
"type": "time"
},
{
"params": [
"null"
],
"type": "fill"
}
],
"measurement": "HCHC",
"orderByTime": "ASC",
"policy": "default",
"refId": "A",
"resultFormat": "time_series",
"select": [
[
{
"params": [
"value"
],
"type": "field"
},
{
"params": [],
"type": "mean"
},
{
"params": [
"*0.00007380"
],
"type": "math"
}
]
],
"tags": []
}
],
"thresholds": "",
"title": "Tarif HC Période",
"transparent": false,
"type": "singlestat",
"valueFontSize": "80%",
"valueMaps": [
{
"op": "=",
"text": "N/A",
"value": "null"
}
],
"valueName": "diff"
},
{
"cacheTimeout": null,
"colorBackground": false,
@ -161,7 +279,7 @@
"rgba(237, 129, 40, 0.89)",
"#d44a3a"
],
"datasource": "${DS_INFLUXLOCAL}",
"datasource": "${DS_TELEINFO}",
"format": "watth",
"gauge": {
"maxValue": 100,
@ -237,7 +355,7 @@
}
],
"thresholds": "",
"title": "Tarif",
"title": "Tarif en cours",
"type": "singlestat",
"valueFontSize": "80%",
"valueMaps": [
@ -249,6 +367,124 @@
],
"valueName": "avg"
},
{
"cacheTimeout": null,
"colorBackground": true,
"colorValue": false,
"colors": [
"#299c46",
"#508642",
"#d44a3a"
],
"datasource": "${DS_TELEINFO}",
"format": "currencyEUR",
"gauge": {
"maxValue": 100,
"minValue": 0,
"show": false,
"thresholdLabels": false,
"thresholdMarkers": true
},
"gridPos": {
"h": 3,
"w": 5,
"x": 14,
"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,
"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": "HP",
"groupBy": [
{
"params": [
"$__interval"
],
"type": "time"
},
{
"params": [
"null"
],
"type": "fill"
}
],
"measurement": "HCHP",
"orderByTime": "ASC",
"policy": "default",
"refId": "A",
"resultFormat": "time_series",
"select": [
[
{
"params": [
"value"
],
"type": "field"
},
{
"params": [],
"type": "mean"
},
{
"params": [
"*0.00009790"
],
"type": "math"
}
]
],
"tags": []
}
],
"thresholds": "",
"title": "Tarif HP Période",
"transparent": false,
"type": "singlestat",
"valueFontSize": "80%",
"valueMaps": [
{
"op": "=",
"text": "N/A",
"value": "null"
}
],
"valueName": "diff"
},
{
"cacheTimeout": null,
"colorBackground": false,
@ -258,7 +494,7 @@
"rgba(237, 129, 40, 0.89)",
"#d44a3a"
],
"datasource": "${DS_INFLUXLOCAL}",
"datasource": "${DS_TELEINFO}",
"decimals": 6,
"format": "watth",
"gauge": {
@ -270,8 +506,8 @@
},
"gridPos": {
"h": 3,
"w": 10,
"x": 14,
"w": 5,
"x": 19,
"y": 0
},
"id": 11,
@ -352,7 +588,7 @@
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "${DS_INFLUXLOCAL}",
"datasource": "${DS_TELEINFO}",
"fill": 1,
"gridPos": {
"h": 9,
@ -482,7 +718,7 @@
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "${DS_INFLUXLOCAL}",
"datasource": "${DS_TELEINFO}",
"fill": 1,
"gridPos": {
"h": 9,
@ -643,7 +879,7 @@
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "${DS_INFLUXLOCAL}",
"datasource": "${DS_TELEINFO}",
"fill": 1,
"gridPos": {
"h": 9,
@ -745,7 +981,7 @@
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "${DS_INFLUXLOCAL}",
"datasource": "${DS_TELEINFO}",
"fill": 1,
"gridPos": {
"h": 9,
@ -842,170 +1078,6 @@
"align": true,
"alignLevel": null
}
},
{
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "${DS_INFLUXLOCAL}",
"fill": 1,
"gridPos": {
"h": 9,
"w": 12,
"x": 0,
"y": 21
},
"hideTimeOverride": false,
"id": 7,
"interval": "10s",
"legend": {
"alignAsTable": true,
"avg": false,
"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",
"percentage": false,
"pointradius": 5,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"stack": true,
"steppedLine": false,
"targets": [
{
"alias": "hp",
"groupBy": [
{
"params": [
"$__interval"
],
"type": "time"
},
{
"params": [
"linear"
],
"type": "fill"
}
],
"hide": false,
"measurement": "HCHP",
"orderByTime": "ASC",
"policy": "default",
"query": "SELECT mean(\"value\")::integer AS value FROM \"HCHC\" WHERE $timeFilter GROUP BY time(1s) fill(linear)",
"rawQuery": false,
"refId": "B",
"resultFormat": "time_series",
"select": [
[
{
"params": [
"value"
],
"type": "field"
},
{
"params": [],
"type": "mode"
}
]
],
"tags": []
},
{
"alias": "hc",
"groupBy": [
{
"params": [
"$__interval"
],
"type": "time"
},
{
"params": [
"linear"
],
"type": "fill"
}
],
"hide": false,
"measurement": "HCHC",
"orderByTime": "ASC",
"policy": "default",
"query": "SELECT mean(\"value\")::integer AS value FROM \"HCHC\" WHERE $timeFilter GROUP BY time(1s) fill(linear)",
"rawQuery": false,
"refId": "A",
"resultFormat": "time_series",
"select": [
[
{
"params": [
"value"
],
"type": "field"
},
{
"params": [],
"type": "mode"
}
]
],
"tags": []
}
],
"thresholds": [],
"timeFrom": null,
"timeShift": null,
"title": "HC + HP",
"tooltip": {
"shared": false,
"sort": 1,
"value_type": "individual"
},
"transparent": false,
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "watth",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
},
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": false
}
],
"yaxis": {
"align": true,
"alignLevel": null
}
}
],
"refresh": "10s",
@ -1047,5 +1119,5 @@
"timezone": "",
"title": "Conso Elec",
"uid": "vrq6Vgigz",
"version": 36
"version": 37
}