{ "__inputs": [ { "name": "DS_JEEDOM", "label": "Jeedom", "description": "", "type": "datasource", "pluginId": "influxdb", "pluginName": "InfluxDB" } ], "__elements": {}, "__requires": [ { "type": "grafana", "id": "grafana", "name": "Grafana", "version": "9.2.0" }, { "type": "datasource", "id": "influxdb", "name": "InfluxDB", "version": "1.0.0" }, { "type": "panel", "id": "timeseries", "name": "Time series", "version": "" } ], "annotations": { "list": [ { "builtIn": 1, "datasource": { "type": "grafana", "uid": "-- Grafana --" }, "enable": true, "hide": true, "iconColor": "rgba(0, 211, 255, 1)", "name": "Annotations & Alerts", "target": { "limit": 100, "matchAny": false, "tags": [], "type": "dashboard" }, "type": "dashboard" } ] }, "editable": true, "fiscalYearStartMonth": 0, "graphTooltip": 0, "id": null, "links": [], "liveNow": false, "panels": [ { "collapsed": false, "gridPos": { "h": 1, "w": 24, "x": 0, "y": 0 }, "id": 49, "panels": [], "title": "Coût", "type": "row" }, { "datasource": { "type": "influxdb", "uid": "${DS_JEEDOM}" }, "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, "drawStyle": "line", "fillOpacity": 0, "gradientMode": "none", "hideFrom": { "legend": false, "tooltip": false, "viz": false }, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, "scaleDistribution": { "type": "linear" }, "showPoints": "auto", "spanNulls": false, "stacking": { "group": "A", "mode": "none" }, "thresholdsStyle": { "mode": "off" } }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "red", "value": 80 } ] }, "unit": "kwatt" }, "overrides": [ { "matcher": { "id": "byName", "options": "STAT_TODAY_HP" }, "properties": [ { "id": "displayName", "value": "Heure Pleine" }, { "id": "color", "value": { "fixedColor": "dark-yellow", "mode": "fixed" } } ] }, { "matcher": { "id": "byName", "options": "STAT_TODAY" }, "properties": [ { "id": "color", "value": { "fixedColor": "orange", "mode": "fixed" } }, { "id": "displayName", "value": "Total Conso" } ] }, { "matcher": { "id": "byName", "options": "STAT_TODAY_HC" }, "properties": [ { "id": "color", "value": { "fixedColor": "super-light-yellow", "mode": "fixed" } }, { "id": "displayName", "value": "Heure Creuse" } ] } ] }, "gridPos": { "h": 11, "w": 12, "x": 0, "y": 1 }, "id": 37, "options": { "legend": { "calcs": [], "displayMode": "list", "placement": "bottom", "showLegend": true }, "tooltip": { "mode": "single", "sort": "none" } }, "targets": [ { "datasource": { "type": "influxdb", "uid": "${DS_JEEDOM}" }, "query": "import \"timezone\"\r\noption location = timezone.location(name: \"Europe/Paris\")\r\n\r\nfrom(bucket: \"Jeedom_History\")\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => r[\"_measurement\"] == \"Conso\")\r\n |> filter(fn: (r) => r[\"_field\"] =~ /STAT_TODAY/\r\n )\r\n\r\n|> pivot(rowKey: [\"_time\"], columnKey: [\"_field\"], valueColumn: \"_value\")\r\n|> sort(columns: [\"_time\"])", "refId": "Conso" } ], "timeFrom": "2M", "title": "Consommation par jour", "type": "timeseries" }, { "datasource": { "type": "influxdb", "uid": "${DS_JEEDOM}" }, "description": "", "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, "drawStyle": "line", "fillOpacity": 0, "gradientMode": "none", "hideFrom": { "legend": false, "tooltip": false, "viz": false }, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, "scaleDistribution": { "type": "linear" }, "showPoints": "auto", "spanNulls": false, "stacking": { "group": "A", "mode": "none" }, "thresholdsStyle": { "mode": "off" } }, "decimals": 2, "mappings": [], "min": 0, "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "red", "value": 80 } ] }, "unit": "currencyEUR" }, "overrides": [ { "matcher": { "id": "byName", "options": "Total_Cout_Heure" }, "properties": [ { "id": "color", "value": { "fixedColor": "orange", "mode": "fixed" } }, { "id": "displayName", "value": "Total Coût Heure" } ] }, { "matcher": { "id": "byName", "options": "Total_Cout_Heure_Creuse" }, "properties": [ { "id": "color", "value": { "fixedColor": "super-light-yellow", "mode": "fixed" } }, { "id": "displayName", "value": "Heure Creuse" } ] }, { "matcher": { "id": "byName", "options": "Total_Cout_Heure_Pleine" }, "properties": [ { "id": "color", "value": { "fixedColor": "yellow", "mode": "fixed" } }, { "id": "displayName", "value": "Heure Pleine" } ] }, { "matcher": { "id": "byFrameRefID", "options": "B" }, "properties": [ { "id": "color", "value": { "fixedColor": "dark-red", "mode": "fixed" } }, { "id": "displayName", "value": "Ancien Total Coût Heure" } ] } ] }, "gridPos": { "h": 11, "w": 12, "x": 12, "y": 1 }, "id": 41, "options": { "legend": { "calcs": [], "displayMode": "list", "placement": "bottom", "showLegend": true }, "tooltip": { "mode": "single", "sort": "none" } }, "targets": [ { "datasource": { "type": "influxdb", "uid": "${DS_JEEDOM}" }, "query": "import \"timezone\"\r\noption location = timezone.location(name: \"Europe/Paris\")\r\n\r\nfrom(bucket: \"Jeedom_History\")\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => r[\"_measurement\"] == \"Cout\")\r\n |> filter(fn: (r) => r[\"_field\"] =~ /Total_Cout_Heure/)\r\n\r\n|> pivot(rowKey: [\"_time\"], columnKey: [\"_field\"], valueColumn: \"_value\")\r\n|> sort(columns: [\"_time\"])", "refId": "A" }, { "datasource": { "type": "influxdb", "uid": "${DS_JEEDOM}" }, "hide": false, "query": "\r\n// ! ! ! Calcul des heures creuse et pleines en prennant en compte le tarif uniquement here pleine heure creuse, permet davoir l'ancien calcul et comparer avec Tempso\r\n// ! ! ! --------------------------------------\r\n\r\nimport \"timezone\"\r\nimport \"math\"\r\n\r\noption location = timezone.location(name: \"Europe/Paris\")\r\n\r\n// On sélectionne tout le tarif afin de bien remplir après suivant les consommation\r\ntarif = from(bucket: \"Jeedom_History\") \r\n |> range(start: -100y)\r\n |> filter(fn: (r) => r[\"_measurement\"] == \"Tarif\")\r\n |> filter(fn: (r) => r[\"_field\"] == \"Cout_Heure_Creuse\" or r[\"_field\"] == \"Cout_Heure_Pleine\" )\r\n |> pivot(rowKey:[\"_time\"], columnKey: [\"_field\"], valueColumn: \"_value\")\r\n |> sort(columns: [\"_time\"])\r\n |> keep(fn: (column) => column =~ /_time|Cout/)\r\n //|> yield(name: \"tarif\")\r\n\r\n// Sélection de la période pour le calcul\r\nconso = from(bucket: \"Jeedom_History\")\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop) \r\n |> filter(fn: (r) => r[\"_measurement\"] == \"Conso\" )\r\n |> filter(fn: (r) => r[\"_field\"] =~ /STAT_TODAY/)\r\n |> pivot(rowKey: [\"_time\"], columnKey: [\"_field\"], valueColumn: \"_value\")\r\n |> keep(fn: (column) => column =~ /_time|STAT/)\r\n |> sort(columns: [\"_time\"])\r\n //|> yield(name: \"conso\")\r\n\r\n// Merge des 2 tables\r\nunion(tables: [tarif, conso])\r\n\r\n// On trie sur time et sur STAT_TODAY afin d'avoir le coût en premier\r\n|> sort(columns: [\"_time\", \"STAT_TODAY\"])\r\n// On remplie les valeurs pour mettre le prix sur chaque ligne\r\n|> fill(column: \"Cout_Heure_Creuse\", usePrevious: true)\r\n|> fill(column: \"Cout_Heure_Pleine\", usePrevious: true)\r\n\r\n//|> fill(column: \"Cout_Abonnement\", usePrevious: true)\r\n// On supprime les lignes où il n'y a que le prix et pas de consommation (On ne garde que les consommation et pas les tarifs)\r\n|> filter(fn: (r) => exists r.STAT_TODAY)\r\n\r\n// Calcul des coûts\r\n\r\n|> map(\r\n fn: (r) => ({ r with\r\n _value: math.roundtoeven(x: ((r.STAT_TODAY_HC * r.Cout_Heure_Creuse) + (r.STAT_TODAY_HP * r.Cout_Heure_Pleine)) * 100.0) / 100.0,\r\n }),\r\n )\r\n\r\n|> keep(fn: (column) => column =~ /_time|_value/)\r\n\r\n\r\n\r\n", "refId": "B" } ], "timeFrom": "2M", "title": "Coût par Jour", "transformations": [], "type": "timeseries" }, { "datasource": { "type": "influxdb", "uid": "${DS_JEEDOM}" }, "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, "drawStyle": "line", "fillOpacity": 0, "gradientMode": "none", "hideFrom": { "legend": false, "tooltip": false, "viz": false }, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, "scaleDistribution": { "type": "linear" }, "showPoints": "auto", "spanNulls": false, "stacking": { "group": "A", "mode": "none" }, "thresholdsStyle": { "mode": "off" } }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "red", "value": 80 } ] }, "unit": "kwatt" }, "overrides": [ { "matcher": { "id": "byName", "options": "STAT_TODAY_HP" }, "properties": [ { "id": "displayName", "value": "Heure Pleine" }, { "id": "color", "value": { "fixedColor": "dark-yellow", "mode": "fixed" } } ] }, { "matcher": { "id": "byName", "options": "STAT_TODAY" }, "properties": [ { "id": "color", "value": { "fixedColor": "orange", "mode": "fixed" } }, { "id": "displayName", "value": "Total Conso" } ] }, { "matcher": { "id": "byName", "options": "STAT_TODAY_HC" }, "properties": [ { "id": "color", "value": { "fixedColor": "super-light-yellow", "mode": "fixed" } }, { "id": "displayName", "value": "Heure Creuse" }, { "id": "custom.lineStyle", "value": { "fill": "solid" } } ] } ] }, "gridPos": { "h": 11, "w": 12, "x": 0, "y": 12 }, "id": 39, "options": { "legend": { "calcs": [], "displayMode": "list", "placement": "bottom", "showLegend": true }, "tooltip": { "mode": "single", "sort": "none" } }, "targets": [ { "datasource": { "type": "influxdb", "uid": "${DS_JEEDOM}" }, "query": "import \"timezone\"\r\noption location = timezone.location(name: \"Europe/Paris\")\r\n\r\nfrom(bucket: \"Jeedom_History\")\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => r[\"_measurement\"] == \"Conso\")\r\n |> filter(fn: (r) => r[\"_field\"] =~ /STAT_TODAY/)\r\n |> aggregateWindow(every: 1mo, fn: sum, createEmpty: false) \r\n\r\n|> pivot(rowKey: [\"_time\"], columnKey: [\"_field\"], valueColumn: \"_value\")\r\n|> timeShift(duration: -1s, columns: [\"_time\"])\r\n|> truncateTimeColumn(unit: 1mo)\r\n|> sort(columns: [\"_time\"])", "refId": "Conso" } ], "timeFrom": "now-14M/M", "title": "Consommation par mois", "type": "timeseries" }, { "datasource": { "type": "influxdb", "uid": "${DS_JEEDOM}" }, "description": "", "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, "drawStyle": "line", "fillOpacity": 0, "gradientMode": "none", "hideFrom": { "legend": false, "tooltip": false, "viz": false }, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, "scaleDistribution": { "type": "linear" }, "showPoints": "auto", "spanNulls": false, "stacking": { "group": "A", "mode": "none" }, "thresholdsStyle": { "mode": "off" } }, "decimals": 2, "mappings": [], "min": 0, "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "red", "value": 80 } ] }, "unit": "currencyEUR" }, "overrides": [ { "matcher": { "id": "byName", "options": "Total_Cout_Heure" }, "properties": [ { "id": "color", "value": { "fixedColor": "blue", "mode": "fixed" } }, { "id": "displayName", "value": "Total Coût Heure" }, { "id": "color", "value": { "fixedColor": "orange", "mode": "fixed" } } ] }, { "matcher": { "id": "byName", "options": "Total_Cout_Heure_Creuse" }, "properties": [ { "id": "color", "value": { "fixedColor": "green", "mode": "fixed" } }, { "id": "displayName", "value": "Heure Creuse" } ] }, { "matcher": { "id": "byName", "options": "Total_Cout_Heure_Pleine" }, "properties": [ { "id": "color", "value": { "fixedColor": "yellow", "mode": "fixed" } }, { "id": "displayName", "value": "Heure Pleine" } ] }, { "matcher": { "id": "byName", "options": "Coût Heure" }, "properties": [ { "id": "color", "value": { "fixedColor": "orange", "mode": "fixed" } } ] }, { "matcher": { "id": "byName", "options": "Heure Creuse" }, "properties": [ { "id": "color", "value": { "fixedColor": "super-light-yellow", "mode": "fixed" } } ] }, { "matcher": { "id": "byName", "options": "Heure Pleine" }, "properties": [ { "id": "color", "value": { "fixedColor": "dark-yellow", "mode": "fixed" } } ] }, { "matcher": { "id": "byFrameRefID", "options": "Ancien Coût" }, "properties": [ { "id": "displayName", "value": "Ancien Total Coût Heure" }, { "id": "color", "value": { "fixedColor": "dark-red", "mode": "fixed" } } ] } ] }, "gridPos": { "h": 11, "w": 12, "x": 12, "y": 12 }, "id": 44, "options": { "legend": { "calcs": [], "displayMode": "list", "placement": "bottom", "showLegend": true }, "tooltip": { "mode": "single", "sort": "none" } }, "targets": [ { "datasource": { "type": "influxdb", "uid": "${DS_JEEDOM}" }, "query": "import \"timezone\"\r\noption location = timezone.location(name: \"Europe/Paris\")\r\n\r\nfrom(bucket: \"Jeedom_History\")\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => r[\"_measurement\"] == \"Cout\")\r\n |> filter(fn: (r) => r[\"_field\"] =~ /Total_Cout_Heure/)\r\n |> aggregateWindow(every: 1mo, fn: sum, createEmpty: false) \r\n\r\n|> pivot(rowKey: [\"_time\"], columnKey: [\"_field\"], valueColumn: \"_value\")\r\n|> timeShift(duration: -1s, columns: [\"_time\"])\r\n|> truncateTimeColumn(unit: 1mo)\r\n|> sort(columns: [\"_time\"])", "refId": "A" }, { "datasource": { "type": "influxdb", "uid": "${DS_JEEDOM}" }, "hide": false, "query": "\r\n// ! ! ! Calcul des heures creuse et pleines en prennant en compte le tarif uniquement here pleine heure creuse, permet davoir l'ancien calcul et comparer avec Tempso\r\n// ! ! ! --------------------------------------\r\n\r\nimport \"timezone\"\r\nimport \"math\"\r\n\r\noption location = timezone.location(name: \"Europe/Paris\")\r\n\r\n// On sélectionne tout le tarif afin de bien remplir après suivant les consommation\r\ntarif = from(bucket: \"Jeedom_History\") \r\n |> range(start: -100y)\r\n |> filter(fn: (r) => r[\"_measurement\"] == \"Tarif\")\r\n |> filter(fn: (r) => r[\"_field\"] == \"Cout_Heure_Creuse\" or r[\"_field\"] == \"Cout_Heure_Pleine\" )\r\n |> pivot(rowKey:[\"_time\"], columnKey: [\"_field\"], valueColumn: \"_value\")\r\n |> sort(columns: [\"_time\"])\r\n |> keep(fn: (column) => column =~ /_time|Cout/)\r\n //|> yield(name: \"tarif\")\r\n\r\n// Sélection de la période pour le calcul\r\nconso = from(bucket: \"Jeedom_History\")\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop) \r\n |> filter(fn: (r) => r[\"_measurement\"] == \"Conso\" )\r\n |> filter(fn: (r) => r[\"_field\"] =~ /STAT_TODAY/)\r\n |> pivot(rowKey: [\"_time\"], columnKey: [\"_field\"], valueColumn: \"_value\")\r\n |> keep(fn: (column) => column =~ /_time|STAT/)\r\n |> sort(columns: [\"_time\"])\r\n //|> yield(name: \"conso\")\r\n\r\n// Merge des 2 tables\r\nunion(tables: [tarif, conso])\r\n\r\n// On trie sur time et sur STAT_TODAY afin d'avoir le coût en premier\r\n|> sort(columns: [\"_time\", \"STAT_TODAY\"])\r\n// On remplie les valeurs pour mettre le prix sur chaque ligne\r\n|> fill(column: \"Cout_Heure_Creuse\", usePrevious: true)\r\n|> fill(column: \"Cout_Heure_Pleine\", usePrevious: true)\r\n\r\n//|> fill(column: \"Cout_Abonnement\", usePrevious: true)\r\n// On supprime les lignes où il n'y a que le prix et pas de consommation (On ne garde que les consommation et pas les tarifs)\r\n|> filter(fn: (r) => exists r.STAT_TODAY)\r\n\r\n// Calcul des coûts\r\n\r\n|> map(\r\n fn: (r) => ({ r with\r\n _value: math.roundtoeven(x: ((r.STAT_TODAY_HC * r.Cout_Heure_Creuse) + (r.STAT_TODAY_HP * r.Cout_Heure_Pleine)) * 100.0) / 100.0,\r\n }),\r\n )\r\n\r\n|> keep(fn: (column) => column =~ /_time|_value/)\r\n|> aggregateWindow(every: 1mo, fn: sum, createEmpty: false) \r\n|> timeShift(duration: -1s, columns: [\"_time\"])\r\n|> truncateTimeColumn(unit: 1mo)\r\n", "refId": "Ancien Coût" } ], "timeFrom": "now-14M/M", "title": "Coût par Mois", "transformations": [], "type": "timeseries" }, { "datasource": { "type": "influxdb", "uid": "${DS_JEEDOM}" }, "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, "drawStyle": "line", "fillOpacity": 0, "gradientMode": "none", "hideFrom": { "legend": false, "tooltip": false, "viz": false }, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, "scaleDistribution": { "type": "linear" }, "showPoints": "auto", "spanNulls": false, "stacking": { "group": "A", "mode": "none" }, "thresholdsStyle": { "mode": "off" } }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green" }, { "color": "red", "value": 80 } ] }, "unit": "kwatt" }, "overrides": [ { "matcher": { "id": "byName", "options": "STAT_TODAY_HP" }, "properties": [ { "id": "displayName", "value": "Heure Pleine" }, { "id": "color", "value": { "fixedColor": "dark-yellow", "mode": "fixed" } } ] }, { "matcher": { "id": "byName", "options": "STAT_TODAY" }, "properties": [ { "id": "color", "value": { "fixedColor": "orange", "mode": "fixed" } }, { "id": "displayName", "value": "Total Conso" } ] }, { "matcher": { "id": "byName", "options": "STAT_TODAY_HC" }, "properties": [ { "id": "color", "value": { "fixedColor": "super-light-yellow", "mode": "fixed" } }, { "id": "displayName", "value": "Heure Creuse" }, { "id": "custom.lineStyle", "value": { "fill": "solid" } } ] }, { "matcher": { "id": "byName", "options": "Heure Creuse" }, "properties": [ { "id": "color", "value": { "fixedColor": "super-light-yellow", "mode": "fixed" } } ] } ] }, "gridPos": { "h": 11, "w": 12, "x": 0, "y": 23 }, "id": 40, "options": { "legend": { "calcs": [], "displayMode": "list", "placement": "bottom", "showLegend": true }, "tooltip": { "mode": "single", "sort": "none" } }, "targets": [ { "datasource": { "type": "influxdb", "uid": "${DS_JEEDOM}" }, "query": "import \"strings\"\r\nimport \"timezone\"\r\noption location = timezone.location(name: \"Europe/Paris\")\r\n\r\nfrom(bucket: \"Jeedom_History\")\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => r[\"_measurement\"] == \"Conso\")\r\n |> filter(fn: (r) => r[\"_field\"] =~ /STAT_TODAY/)\r\n |> aggregateWindow(every: 1y, fn: sum, createEmpty: false) \r\n\r\n|> pivot(rowKey: [\"_time\"], columnKey: [\"_field\"], valueColumn: \"_value\")\r\n|> map(fn: (r) => ({ r with _time: time(v: strings.substring(v: string(v: r._time), start: 0, end: 4) + \"-01-01\") }))\r\n\r\n|> sort(columns: [\"_time\"])", "refId": "Conso" } ], "timeFrom": "now-12y", "title": "Consommation année", "type": "timeseries" }, { "datasource": { "type": "influxdb", "uid": "${DS_JEEDOM}" }, "description": "", "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, "drawStyle": "line", "fillOpacity": 0, "gradientMode": "none", "hideFrom": { "legend": false, "tooltip": false, "viz": false }, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, "scaleDistribution": { "type": "linear" }, "showPoints": "auto", "spanNulls": false, "stacking": { "group": "A", "mode": "none" }, "thresholdsStyle": { "mode": "off" } }, "decimals": 2, "mappings": [], "min": 0, "thresholds": { "mode": "absolute", "steps": [ { "color": "green" }, { "color": "red", "value": 80 } ] }, "unit": "currencyEUR" }, "overrides": [ { "matcher": { "id": "byName", "options": "Total_Cout" }, "properties": [ { "id": "color", "value": { "fixedColor": "blue", "mode": "fixed" } }, { "id": "displayName", "value": "Total Coût" } ] }, { "matcher": { "id": "byName", "options": "Total_Cout_Heure_Creuse" }, "properties": [ { "id": "color", "value": { "fixedColor": "green", "mode": "fixed" } }, { "id": "displayName", "value": "Heure Creuse" } ] }, { "matcher": { "id": "byName", "options": "Total_Cout_Heure_Pleine" }, "properties": [ { "id": "color", "value": { "fixedColor": "yellow", "mode": "fixed" } }, { "id": "displayName", "value": "Heure Pleine" } ] }, { "matcher": { "id": "byName", "options": "Total_Cout_Heure" }, "properties": [ { "id": "color", "value": { "fixedColor": "orange", "mode": "fixed" } }, { "id": "displayName", "value": "Total Coût Heure" } ] }, { "matcher": { "id": "byName", "options": "Cout_Abonnement" }, "properties": [ { "id": "color", "value": { "fixedColor": "dark-purple", "mode": "fixed" } }, { "id": "displayName", "value": "Cout Abonnement" } ] }, { "matcher": { "id": "byName", "options": "Heure Creuse" }, "properties": [ { "id": "color", "value": { "fixedColor": "super-light-yellow", "mode": "fixed" } } ] }, { "matcher": { "id": "byFrameRefID", "options": "Ancien Coût" }, "properties": [ { "id": "color", "value": { "fixedColor": "#ff001e", "mode": "fixed" } }, { "id": "displayName", "value": "Ancien Total Coût Heure" } ] } ] }, "gridPos": { "h": 11, "w": 12, "x": 12, "y": 23 }, "hideTimeOverride": false, "id": 43, "options": { "legend": { "calcs": [], "displayMode": "list", "placement": "bottom", "showLegend": true }, "tooltip": { "mode": "single", "sort": "none" } }, "pluginVersion": "8.5.4", "targets": [ { "datasource": { "type": "influxdb", "uid": "${DS_JEEDOM}" }, "query": "import \"strings\"\r\nimport \"timezone\"\r\noption location = timezone.location(name: \"Europe/Paris\")\r\n\r\n// Somme des coûts consommation par année\r\nConso = from(bucket: \"Jeedom_History\")\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => r[\"_measurement\"] == \"Cout\")\r\n |> aggregateWindow(every: 1y, fn: sum, createEmpty: false) \r\n |> pivot(rowKey: [\"_time\"], columnKey: [\"_field\"], valueColumn: \"_value\")\r\n // Pour rappel la fonction truncateTimeColumn(unit: 1d) met la date de la veille sur un enregistement en cours sur la journée\r\n // Permet de ne garder que l'année et ajouter le 1er Janvier à la date et mettre l'heure à 00:00:00:00, en convertissant la date sans l'heure dans le string\r\n |> map(fn: (r) => ({ r with _time: time(v: strings.substring(v: string(v: r._time), start: 0, end: 4) + \"-01-01\") }))\r\n |> sort(columns: [\"_time\"])\r\n |> keep(fn: (column) => column =~ /_time|Total/)\r\n //|> yield(name: \"Conso\")\r\n\r\n// Recherche des tarifs abonnement par année\r\n// On cumule les coûts des abonnement si plusieurs dans l'année (changement de tarif)\r\n// /!\\ Il faut impérativment un coût abonnement même à 0 sur chaque année sinon on perd l'historique de l'année avec le Join \r\n\r\nAbonnement = from(bucket: \"Jeedom_History\") \r\n |> range(start: -100y)\r\n |> filter(fn: (r) => r[\"_measurement\"] == \"Tarif\")\r\n |> filter(fn: (r) => r[\"_field\"] == \"Cout_Abonnement\")\r\n |> aggregateWindow(every: 1y, fn: sum, createEmpty: false) \r\n //|> truncateTimeColumn(unit: 1y)\r\n |> pivot(rowKey: [\"_time\"], columnKey: [\"_field\"], valueColumn: \"_value\")\r\n // Pour rappel la fonction truncateTimeColumn(unit: 1d) met la date de la veille sur un enregistement en cours sur la journée\r\n // Permet de ne garder que l'année et ajouter le 1er Janvier à la date et mettre l'heure à 00:00:00:00, en convertissant la date sans l'heure dans le string\r\n |> map(fn: (r) => ({ r with _time: time(v: strings.substring(v: string(v: r._time), start: 0, end: 4) + \"-01-01\") }))\r\n |> sort(columns: [\"_time\"])\r\n |> keep(fn: (column) => column =~ /_time|Cout/)\r\n //|> yield(name: \"Abonnement\")\r\n\r\njoin(tables: {Conso: Conso, Abonnement: Abonnement}, on: [\"_time\"])\r\n|> map(fn: (r) => ({ r with Total_Cout: r.Total_Cout_Heure + r.Cout_Abonnement }))\r\n|> keep(columns: [\"_time\",\"Total_Cout_Heure\",\"Total_Cout_Heure_Creuse\",\"Total_Cout_Heure_Pleine\",\"Total_Cout\",\"Cout_Abonnement\"])", "refId": "A" }, { "datasource": { "type": "influxdb", "uid": "${DS_JEEDOM}" }, "hide": false, "query": "\r\n// ! ! ! Calcul des heures creuse et pleines en prennant en compte le tarif uniquement here pleine heure creuse, permet davoir lancien calcul et comparer avec Tempso\r\n// ! ! ! --------------------------------------\r\n\r\nimport \"timezone\"\r\nimport \"math\"\r\n\r\noption location = timezone.location(name: \"Europe/Paris\")\r\n\r\n// On sélectionne tout le tarif afin de bien remplir après suivant les consommation\r\ntarif = from(bucket: \"Jeedom_History\") \r\n |> range(start: -100y)\r\n |> filter(fn: (r) => r[\"_measurement\"] == \"Tarif\")\r\n |> filter(fn: (r) => r[\"_field\"] == \"Cout_Heure_Creuse\" or r[\"_field\"] == \"Cout_Heure_Pleine\" )\r\n |> pivot(rowKey:[\"_time\"], columnKey: [\"_field\"], valueColumn: \"_value\")\r\n |> sort(columns: [\"_time\"])\r\n |> keep(fn: (column) => column =~ /_time|Cout/)\r\n //|> yield(name: \"tarif\")\r\n\r\n// Sélection de la période pour le calcul\r\nconso = from(bucket: \"Jeedom_History\")\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop) \r\n |> filter(fn: (r) => r[\"_measurement\"] == \"Conso\" )\r\n |> filter(fn: (r) => r[\"_field\"] =~ /STAT_TODAY/)\r\n |> pivot(rowKey: [\"_time\"], columnKey: [\"_field\"], valueColumn: \"_value\")\r\n |> keep(fn: (column) => column =~ /_time|STAT/)\r\n |> sort(columns: [\"_time\"])\r\n //|> yield(name: \"conso\")\r\n\r\n// Merge des 2 tables\r\nunion(tables: [tarif, conso])\r\n\r\n// On trie sur time et sur STAT_TODAY afin davoir le coût en premier\r\n|> sort(columns: [\"_time\", \"STAT_TODAY\"])\r\n// On remplie les valeurs pour mettre le prix sur chaque ligne\r\n|> fill(column: \"Cout_Heure_Creuse\", usePrevious: true)\r\n|> fill(column: \"Cout_Heure_Pleine\", usePrevious: true)\r\n\r\n//|> fill(column: \"Cout_Abonnement\", usePrevious: true)\r\n// On supprime les lignes où il ny a que le prix et pas de consommation (On ne garde que les consommation et pas les tarifs)\r\n|> filter(fn: (r) => exists r.STAT_TODAY)\r\n\r\n// Calcul des coûts\r\n\r\n|> map(\r\n fn: (r) => ({ r with\r\n _value: math.roundtoeven(x: ((r.STAT_TODAY_HC * r.Cout_Heure_Creuse) + (r.STAT_TODAY_HP * r.Cout_Heure_Pleine)) * 100.0) / 100.0,\r\n }),\r\n )\r\n\r\n|> keep(fn: (column) => column =~ /_time|_value/)\r\n|> aggregateWindow(every: 1y, fn: sum, createEmpty: false) \r\n|> timeShift(duration: -1s, columns: [\"_time\"])\r\n|> truncateTimeColumn(unit: 1y)\r\n", "refId": "Ancien Coût" } ], "timeFrom": "now-12y", "title": "Coût par Année", "transformations": [ { "id": "organize", "options": { "excludeByName": {}, "indexByName": { "Cout_Abonnement": 5, "Total_Cout": 1, "Total_Cout_Heure": 2, "Total_Cout_Heure_Creuse": 3, "Total_Cout_Heure_Pleine": 4, "_time": 0 }, "renameByName": {} } } ], "type": "timeseries" }, { "collapsed": false, "gridPos": { "h": 1, "w": 24, "x": 0, "y": 34 }, "id": 47, "panels": [], "title": "Coût Détaillé par Tarif", "type": "row" }, { "datasource": { "type": "influxdb", "uid": "${DS_JEEDOM}" }, "description": "", "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, "drawStyle": "line", "fillOpacity": 0, "gradientMode": "none", "hideFrom": { "legend": false, "tooltip": false, "viz": false }, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, "scaleDistribution": { "type": "linear" }, "showPoints": "auto", "spanNulls": true, "stacking": { "group": "A", "mode": "none" }, "thresholdsStyle": { "mode": "off" } }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green" }, { "color": "red", "value": 80 } ] }, "unit": "currencyEUR" }, "overrides": [ { "matcher": { "id": "byName", "options": "Cout_Abonnement" }, "properties": [ { "id": "custom.axisPlacement", "value": "right" }, { "id": "displayName", "value": "Abonnement Annuel" }, { "id": "color", "value": { "fixedColor": "dark-purple", "mode": "fixed" } }, { "id": "min", "value": 0 } ] }, { "matcher": { "id": "byName", "options": "Cout_Heure_Creuse" }, "properties": [ { "id": "displayName", "value": "Coût Heure Creuse" }, { "id": "color", "value": { "fixedColor": "super-light-yellow", "mode": "fixed" } } ] }, { "matcher": { "id": "byName", "options": "Cout_Heure_Creuse_Bleu" }, "properties": [ { "id": "displayName", "value": "Coût Heure Creuse Bleu" }, { "id": "color", "value": { "fixedColor": "super-light-blue", "mode": "fixed" } } ] }, { "matcher": { "id": "byName", "options": "Cout_Heure_Creuse_Blanc" }, "properties": [ { "id": "displayName", "value": "Coût Heure Creuse Blanc" }, { "id": "color", "value": { "fixedColor": "#d6d6d6", "mode": "fixed" } } ] }, { "matcher": { "id": "byName", "options": "Cout_Heure_Creuse_Rouge" }, "properties": [ { "id": "displayName", "value": "Coût Heure Creuse Rouge" }, { "id": "color", "value": { "fixedColor": "light-red", "mode": "fixed" } } ] }, { "matcher": { "id": "byName", "options": "Cout_Heure_Pleine" }, "properties": [ { "id": "displayName", "value": "Coût Heure Pleine" }, { "id": "color", "value": { "fixedColor": "yellow", "mode": "fixed" } } ] }, { "matcher": { "id": "byName", "options": "Cout_Heure_Pleine_Bleu" }, "properties": [ { "id": "displayName", "value": "Coût Heure Pleine Bleu" }, { "id": "color", "value": { "fixedColor": "dark-blue", "mode": "fixed" } } ] }, { "matcher": { "id": "byName", "options": "Cout_Heure_Pleine_Blanc" }, "properties": [ { "id": "displayName", "value": "Coût Heure Pleine Blanc" }, { "id": "color", "value": { "fixedColor": "#ffffff", "mode": "fixed" } } ] }, { "matcher": { "id": "byName", "options": "Cout_Heure_Pleine_Rouge" }, "properties": [ { "id": "displayName", "value": "Coût Heure Pleine Rouge" }, { "id": "color", "value": { "fixedColor": "dark-red", "mode": "fixed" } } ] } ] }, "gridPos": { "h": 11, "w": 12, "x": 0, "y": 35 }, "id": 31, "options": { "legend": { "calcs": [], "displayMode": "list", "placement": "bottom", "showLegend": true }, "tooltip": { "mode": "single", "sort": "none" } }, "pluginVersion": "8.5.4", "targets": [ { "datasource": { "type": "influxdb", "uid": "${DS_JEEDOM}" }, "query": "import \"timezone\"\r\noption location = timezone.location(name: \"Europe/Paris\")\r\n\r\nfrom(bucket: \"Jeedom_History\") \r\n |> range(start: -100y)\r\n |> filter(fn: (r) => r[\"_measurement\"] == \"Tarif\")\r\n |> pivot(rowKey:[\"_time\"], columnKey: [\"_field\"], valueColumn: \"_value\")\r\n |> sort(columns: [\"_time\"])\r\n |> keep(fn: (column) => column =~ /_time|Cout/)\r\n", "refId": "A" } ], "timeFrom": "now-12y", "title": "Coût Abonnement & Coût kw/h", "type": "timeseries" }, { "datasource": { "type": "influxdb", "uid": "${DS_JEEDOM}" }, "description": "", "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, "drawStyle": "line", "fillOpacity": 0, "gradientMode": "none", "hideFrom": { "legend": false, "tooltip": false, "viz": false }, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, "scaleDistribution": { "type": "linear" }, "showPoints": "auto", "spanNulls": false, "stacking": { "group": "A", "mode": "none" }, "thresholdsStyle": { "mode": "off" } }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green" }, { "color": "red", "value": 80 } ] }, "unit": "currencyEUR" }, "overrides": [ { "matcher": { "id": "byName", "options": "Total_Cout_HCHC" }, "properties": [ { "id": "displayName", "value": "Coût Heure Creuse" }, { "id": "color", "value": { "fixedColor": "super-light-yellow", "mode": "fixed" } } ] }, { "matcher": { "id": "byName", "options": "Total_Cout_BRHCJB" }, "properties": [ { "id": "displayName", "value": "Coût Heure Creuse Bleu" }, { "id": "color", "value": { "fixedColor": "super-light-blue", "mode": "fixed" } } ] }, { "matcher": { "id": "byName", "options": "Total_Cout_BRHCJW" }, "properties": [ { "id": "displayName", "value": "Coût Heure Creuse Blanc" }, { "id": "color", "value": { "fixedColor": "#d6d6d6", "mode": "fixed" } } ] }, { "matcher": { "id": "byName", "options": "Total_Cout_BRHCJR" }, "properties": [ { "id": "displayName", "value": "Coût Heure Creuse Rouge" }, { "id": "color", "value": { "fixedColor": "light-red", "mode": "fixed" } } ] }, { "matcher": { "id": "byName", "options": "Total_Cout_HCHP" }, "properties": [ { "id": "displayName", "value": "Coût Heure Pleine" }, { "id": "color", "value": { "fixedColor": "yellow", "mode": "fixed" } }, { "id": "custom.lineWidth", "value": 2 } ] }, { "matcher": { "id": "byName", "options": "Total_Cout_BRHPJB" }, "properties": [ { "id": "displayName", "value": "Coût Heure Pleine Bleu" }, { "id": "color", "value": { "fixedColor": "dark-blue", "mode": "fixed" } }, { "id": "custom.lineWidth", "value": 2 } ] }, { "matcher": { "id": "byName", "options": "Total_Cout_BRHPJW" }, "properties": [ { "id": "displayName", "value": "Coût Heure Pleine Blanc" }, { "id": "color", "value": { "fixedColor": "#ffffff", "mode": "fixed" } }, { "id": "custom.lineWidth", "value": 2 } ] }, { "matcher": { "id": "byName", "options": "Total_Cout_BRHPJR" }, "properties": [ { "id": "displayName", "value": "Coût Heure Pleine Rouge" }, { "id": "color", "value": { "fixedColor": "dark-red", "mode": "fixed" } }, { "id": "custom.lineWidth", "value": 2 } ] }, { "matcher": { "id": "byName", "options": "Total_Cout_Heure" }, "properties": [ { "id": "displayName", "value": "Total Coût Heure" }, { "id": "color", "value": { "fixedColor": "dark-orange", "mode": "fixed" } } ] } ] }, "gridPos": { "h": 11, "w": 12, "x": 12, "y": 35 }, "id": 45, "options": { "legend": { "calcs": [], "displayMode": "list", "placement": "bottom", "showLegend": true }, "tooltip": { "mode": "single", "sort": "none" } }, "pluginVersion": "8.5.4", "targets": [ { "datasource": { "type": "influxdb", "uid": "${DS_JEEDOM}" }, "query": "import \"timezone\"\r\noption location = timezone.location(name: \"Europe/Paris\")\r\n\r\nfrom(bucket: \"Jeedom_History\")\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => r[\"_measurement\"] == \"Cout\")\r\n |> filter(fn: (r) => (r[\"_field\"] =~ /Total_Cout_BR|Total_Cout_HC/ or r[\"_field\"] == \"Total_Cout_Heure\") and (r[\"_value\"] != 0))\r\n |> aggregateWindow(every: 1mo, fn: sum, createEmpty: false) \r\n\r\n|> pivot(rowKey: [\"_time\"], columnKey: [\"_field\"], valueColumn: \"_value\")\r\n|> timeShift(duration: -1s, columns: [\"_time\"])\r\n|> truncateTimeColumn(unit: 1mo)\r\n\r\n|> sort(columns: [\"_time\"])\r\n", "refId": "A" } ], "timeFrom": "14M", "title": "Cout par mois tout Tarif", "type": "timeseries" }, { "datasource": { "type": "influxdb", "uid": "${DS_JEEDOM}" }, "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, "drawStyle": "line", "fillOpacity": 0, "gradientMode": "none", "hideFrom": { "legend": false, "tooltip": false, "viz": false }, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, "scaleDistribution": { "type": "linear" }, "showPoints": "auto", "spanNulls": false, "stacking": { "group": "A", "mode": "none" }, "thresholdsStyle": { "mode": "off" } }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green" }, { "color": "red", "value": 80 } ] }, "unit": "kwatt" }, "overrides": [ { "matcher": { "id": "byName", "options": "STAT_TODAY_HP" }, "properties": [ { "id": "displayName", "value": "Heure Pleine" }, { "id": "color", "value": { "fixedColor": "dark-yellow", "mode": "fixed" } } ] }, { "matcher": { "id": "byName", "options": "STAT_TODAY" }, "properties": [ { "id": "color", "value": { "fixedColor": "orange", "mode": "fixed" } }, { "id": "displayName", "value": "Total Conso" } ] }, { "matcher": { "id": "byName", "options": "STAT_TODAY_HC" }, "properties": [ { "id": "color", "value": { "fixedColor": "super-light-yellow", "mode": "fixed" } }, { "id": "displayName", "value": "Heure Creuse" } ] } ] }, "gridPos": { "h": 11, "w": 12, "x": 0, "y": 46 }, "id": 51, "options": { "legend": { "calcs": [], "displayMode": "list", "placement": "bottom", "showLegend": true }, "tooltip": { "mode": "single", "sort": "none" } }, "targets": [ { "datasource": { "type": "influxdb", "uid": "${DS_JEEDOM}" }, "query": "import \"timezone\"\r\noption location = timezone.location(name: \"Europe/Paris\")\r\n\r\nfrom(bucket: \"Jeedom_History\")\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => r[\"_measurement\"] == \"Conso\")\r\n |> filter(fn: (r) => r[\"_field\"] =~ /STAT_TODAY/\r\n )\r\n\r\n|> pivot(rowKey: [\"_time\"], columnKey: [\"_field\"], valueColumn: \"_value\")\r\n|> sort(columns: [\"_time\"])", "refId": "Conso" } ], "timeFrom": "2M", "title": "Consommation par jour", "type": "timeseries" }, { "datasource": { "type": "influxdb", "uid": "${DS_JEEDOM}" }, "description": "", "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, "drawStyle": "line", "fillOpacity": 0, "gradientMode": "none", "hideFrom": { "legend": false, "tooltip": false, "viz": false }, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, "scaleDistribution": { "type": "linear" }, "showPoints": "auto", "spanNulls": false, "stacking": { "group": "A", "mode": "none" }, "thresholdsStyle": { "mode": "off" } }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green" }, { "color": "red", "value": 80 } ] }, "unit": "currencyEUR" }, "overrides": [ { "matcher": { "id": "byName", "options": "Total_Cout_HCHC" }, "properties": [ { "id": "displayName", "value": "Coût Heure Creuse" }, { "id": "color", "value": { "fixedColor": "super-light-yellow", "mode": "fixed" } } ] }, { "matcher": { "id": "byName", "options": "Total_Cout_BRHCJB" }, "properties": [ { "id": "displayName", "value": "Coût Heure Creuse Bleu" }, { "id": "color", "value": { "fixedColor": "super-light-blue", "mode": "fixed" } } ] }, { "matcher": { "id": "byName", "options": "Total_Cout_BRHCJW" }, "properties": [ { "id": "displayName", "value": "Coût Heure Creuse Blanc" }, { "id": "color", "value": { "fixedColor": "#d6d6d6", "mode": "fixed" } } ] }, { "matcher": { "id": "byName", "options": "Total_Cout_BRHCJR" }, "properties": [ { "id": "displayName", "value": "Coût Heure Creuse Rouge" }, { "id": "color", "value": { "fixedColor": "light-red", "mode": "fixed" } } ] }, { "matcher": { "id": "byName", "options": "Total_Cout_HCHP" }, "properties": [ { "id": "displayName", "value": "Coût Heure Pleine" }, { "id": "color", "value": { "fixedColor": "yellow", "mode": "fixed" } }, { "id": "custom.lineWidth", "value": 2 } ] }, { "matcher": { "id": "byName", "options": "Total_Cout_BRHPJB" }, "properties": [ { "id": "displayName", "value": "Coût Heure Pleine Bleu" }, { "id": "color", "value": { "fixedColor": "dark-blue", "mode": "fixed" } }, { "id": "custom.lineWidth", "value": 2 } ] }, { "matcher": { "id": "byName", "options": "Total_Cout_BRHPJW" }, "properties": [ { "id": "displayName", "value": "Coût Heure Pleine Blanc" }, { "id": "color", "value": { "fixedColor": "#ffffff", "mode": "fixed" } }, { "id": "custom.lineWidth", "value": 2 } ] }, { "matcher": { "id": "byName", "options": "Total_Cout_BRHPJR" }, "properties": [ { "id": "displayName", "value": "Coût Heure Pleine Rouge" }, { "id": "color", "value": { "fixedColor": "dark-red", "mode": "fixed" } }, { "id": "custom.lineWidth", "value": 2 } ] }, { "matcher": { "id": "byName", "options": "Total_Cout_Heure" }, "properties": [ { "id": "displayName", "value": "Total Coût Heure" }, { "id": "color", "value": { "fixedColor": "dark-orange", "mode": "fixed" } } ] } ] }, "gridPos": { "h": 11, "w": 12, "x": 12, "y": 46 }, "id": 50, "options": { "legend": { "calcs": [], "displayMode": "list", "placement": "bottom", "showLegend": true }, "tooltip": { "mode": "single", "sort": "none" } }, "pluginVersion": "8.5.4", "targets": [ { "datasource": { "type": "influxdb", "uid": "${DS_JEEDOM}" }, "query": "import \"timezone\"\r\noption location = timezone.location(name: \"Europe/Paris\")\r\n\r\nfrom(bucket: \"Jeedom_History\")\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => r[\"_measurement\"] == \"Cout\")\r\n |> filter(fn: (r) => (r[\"_field\"] =~ /Total_Cout_BR|Total_Cout_HC/ or r[\"_field\"] == \"Total_Cout_Heure\") and (r[\"_value\"] != 0))\r\n \r\n|> pivot(rowKey: [\"_time\"], columnKey: [\"_field\"], valueColumn: \"_value\")\r\n\r\n|> sort(columns: [\"_time\"])\r\n", "refId": "A" } ], "timeFrom": "2M", "title": "Cout par jour tout Tarif", "type": "timeseries" } ], "refresh": false, "schemaVersion": 37, "style": "dark", "tags": [], "templating": { "list": [] }, "time": { "from": "now-24h", "to": "now" }, "timepicker": {}, "timezone": "", "title": "Electricité - Coût", "uid": "YxDRsTr7z", "version": 2, "weekStart": "" }