josefkyrian

grafana dashboard - PV Power Plant

May 8th, 2022 (edited)
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JSON 248.48 KB | None | 0 0
  1. {
  2.   "annotations": {
  3.     "list": [
  4.       {
  5.         "builtIn": 1,
  6.         "datasource": {
  7.           "type": "datasource",
  8.           "uid": "grafana"
  9.         },
  10.         "enable": true,
  11.         "hide": true,
  12.         "iconColor": "rgba(0, 211, 255, 1)",
  13.         "name": "Annotations & Alerts",
  14.         "target": {
  15.           "limit": 100,
  16.           "matchAny": false,
  17.           "tags": [],
  18.           "type": "dashboard"
  19.         },
  20.         "type": "dashboard"
  21.       }
  22.     ]
  23.   },
  24.   "editable": true,
  25.   "fiscalYearStartMonth": 0,
  26.   "graphTooltip": 0,
  27.   "id": 1,
  28.   "links": [],
  29.   "liveNow": true,
  30.   "panels": [
  31.     {
  32.       "collapsed": false,
  33.       "datasource": {
  34.         "type": "mysql",
  35.         "uid": "BjbJE3u7z"
  36.       },
  37.       "gridPos": {
  38.         "h": 1,
  39.         "w": 24,
  40.         "x": 0,
  41.         "y": 0
  42.       },
  43.       "id": 123143,
  44.       "panels": [],
  45.       "targets": [
  46.         {
  47.           "datasource": {
  48.             "type": "mysql",
  49.             "uid": "BjbJE3u7z"
  50.           },
  51.           "refId": "A"
  52.         }
  53.       ],
  54.       "title": "PV",
  55.       "type": "row"
  56.     },
  57.     {
  58.       "datasource": {
  59.         "type": "mysql",
  60.         "uid": "BjbJE3u7z"
  61.       },
  62.       "fieldConfig": {
  63.         "defaults": {
  64.           "color": {
  65.             "mode": "thresholds"
  66.           },
  67.           "mappings": [
  68.             {
  69.               "options": {
  70.                 "Normal (On-Grid)": {
  71.                   "color": "green",
  72.                   "index": 0
  73.                 }
  74.               },
  75.               "type": "value"
  76.             }
  77.           ],
  78.           "thresholds": {
  79.             "mode": "absolute",
  80.             "steps": [
  81.               {
  82.                 "color": "red",
  83.                 "value": null
  84.               }
  85.             ]
  86.           }
  87.         },
  88.         "overrides": []
  89.       },
  90.       "gridPos": {
  91.         "h": 6,
  92.         "w": 2,
  93.         "x": 0,
  94.         "y": 1
  95.       },
  96.       "id": 123141,
  97.       "options": {
  98.         "colorMode": "background",
  99.         "graphMode": "none",
  100.         "justifyMode": "auto",
  101.         "orientation": "horizontal",
  102.         "reduceOptions": {
  103.           "calcs": [
  104.             "lastNotNull"
  105.           ],
  106.           "fields": "/^work_mode$/",
  107.           "values": false
  108.         },
  109.         "text": {
  110.           "valueSize": 20
  111.         },
  112.         "textMode": "auto"
  113.       },
  114.       "pluginVersion": "10.2.0",
  115.       "targets": [
  116.         {
  117.           "datasource": {
  118.             "type": "mysql",
  119.             "uid": "BjbJE3u7z"
  120.           },
  121.           "editorMode": "code",
  122.           "format": "time_series",
  123.           "group": [],
  124.           "metricColumn": "none",
  125.           "rawQuery": true,
  126.           "rawSql": "SELECT\n  UNIX_TIMESTAMP(log_date) AS \"time\",\n  pv_inverter_work_mode.label AS work_mode\nFROM pv_inverter_record\nLEFT JOIN pv_inverter_work_mode ON pv_inverter_work_mode.id = pv_inverter_record.work_mode\nWHERE\n  $__timeFilter(log_date)\n  AND pv_inverter_id = $pv_inverter_id \nORDER BY log_date DESC\nLIMIT 1",
  127.           "refId": "A",
  128.           "select": [
  129.             [
  130.               {
  131.                 "params": [
  132.                   "id"
  133.                 ],
  134.                 "type": "column"
  135.               }
  136.             ]
  137.           ],
  138.           "sql": {
  139.             "columns": [
  140.               {
  141.                 "parameters": [],
  142.                 "type": "function"
  143.               }
  144.             ],
  145.             "groupBy": [
  146.               {
  147.                 "property": {
  148.                   "type": "string"
  149.                 },
  150.                 "type": "groupBy"
  151.               }
  152.             ],
  153.             "limit": 50
  154.           },
  155.           "table": "_is_generic_admin_media_objects",
  156.           "timeColumn": "date_of_creation",
  157.           "timeColumnType": "timestamp",
  158.           "where": [
  159.             {
  160.               "name": "$__timeFilter",
  161.               "params": [],
  162.               "type": "macro"
  163.             }
  164.           ]
  165.         }
  166.       ],
  167.       "title": "PV Inverter Work Mode",
  168.       "type": "stat"
  169.     },
  170.     {
  171.       "datasource": {
  172.         "type": "mysql",
  173.         "uid": "BjbJE3u7z"
  174.       },
  175.       "fieldConfig": {
  176.         "defaults": {
  177.           "color": {
  178.             "mode": "thresholds"
  179.           },
  180.           "mappings": [],
  181.           "thresholds": {
  182.             "mode": "absolute",
  183.             "steps": [
  184.               {
  185.                 "color": "#424242",
  186.                 "value": null
  187.               }
  188.             ]
  189.           }
  190.         },
  191.         "overrides": []
  192.       },
  193.       "gridPos": {
  194.         "h": 6,
  195.         "w": 2,
  196.         "x": 2,
  197.         "y": 1
  198.       },
  199.       "id": 123157,
  200.       "options": {
  201.         "colorMode": "background",
  202.         "graphMode": "none",
  203.         "justifyMode": "auto",
  204.         "orientation": "horizontal",
  205.         "reduceOptions": {
  206.           "calcs": [
  207.             "lastNotNull"
  208.           ],
  209.           "fields": "/^grid_mode$/",
  210.           "values": false
  211.         },
  212.         "text": {
  213.           "valueSize": 20
  214.         },
  215.         "textMode": "auto"
  216.       },
  217.       "pluginVersion": "10.2.0",
  218.       "targets": [
  219.         {
  220.           "datasource": {
  221.             "type": "mysql",
  222.             "uid": "BjbJE3u7z"
  223.           },
  224.           "editorMode": "code",
  225.           "format": "time_series",
  226.           "group": [],
  227.           "metricColumn": "none",
  228.           "rawQuery": true,
  229.           "rawSql": "SELECT\n  UNIX_TIMESTAMP(log_date) AS \"time\",\n  pv_inverter_grid_mode.label AS grid_mode\nFROM pv_inverter_record\nLEFT JOIN pv_inverter_grid_mode ON pv_inverter_grid_mode.id = pv_inverter_record.grid_mode\nWHERE\n  $__timeFilter(log_date)\n  AND pv_inverter_id = $pv_inverter_id \nORDER BY log_date DESC\nLIMIT 1",
  230.           "refId": "A",
  231.           "select": [
  232.             [
  233.               {
  234.                 "params": [
  235.                   "id"
  236.                 ],
  237.                 "type": "column"
  238.               }
  239.             ]
  240.           ],
  241.           "sql": {
  242.             "columns": [
  243.               {
  244.                 "parameters": [],
  245.                 "type": "function"
  246.               }
  247.             ],
  248.             "groupBy": [
  249.               {
  250.                 "property": {
  251.                   "type": "string"
  252.                 },
  253.                 "type": "groupBy"
  254.               }
  255.             ],
  256.             "limit": 50
  257.           },
  258.           "table": "_is_generic_admin_media_objects",
  259.           "timeColumn": "date_of_creation",
  260.           "timeColumnType": "timestamp",
  261.           "where": [
  262.             {
  263.               "name": "$__timeFilter",
  264.               "params": [],
  265.               "type": "macro"
  266.             }
  267.           ]
  268.         }
  269.       ],
  270.       "title": "Grid Mode",
  271.       "type": "stat"
  272.     },
  273.     {
  274.       "datasource": {
  275.         "type": "mysql",
  276.         "uid": "BjbJE3u7z"
  277.       },
  278.       "fieldConfig": {
  279.         "defaults": {
  280.           "color": {
  281.             "mode": "thresholds"
  282.           },
  283.           "mappings": [],
  284.           "thresholds": {
  285.             "mode": "absolute",
  286.             "steps": [
  287.               {
  288.                 "color": "#424242",
  289.                 "value": null
  290.               }
  291.             ]
  292.           }
  293.         },
  294.         "overrides": []
  295.       },
  296.       "gridPos": {
  297.         "h": 6,
  298.         "w": 2,
  299.         "x": 4,
  300.         "y": 1
  301.       },
  302.       "id": 123173,
  303.       "options": {
  304.         "colorMode": "background",
  305.         "graphMode": "none",
  306.         "justifyMode": "auto",
  307.         "orientation": "horizontal",
  308.         "reduceOptions": {
  309.           "calcs": [
  310.             "lastNotNull"
  311.           ],
  312.           "fields": "/^diagnose_result$/",
  313.           "values": false
  314.         },
  315.         "text": {
  316.           "valueSize": 20
  317.         },
  318.         "textMode": "auto"
  319.       },
  320.       "pluginVersion": "10.2.0",
  321.       "targets": [
  322.         {
  323.           "datasource": {
  324.             "type": "mysql",
  325.             "uid": "BjbJE3u7z"
  326.           },
  327.           "editorMode": "code",
  328.           "format": "time_series",
  329.           "group": [],
  330.           "metricColumn": "none",
  331.           "rawQuery": true,
  332.           "rawSql": "SELECT\n  UNIX_TIMESTAMP(log_date) AS \"time\",\n  diagnose_result_label AS diagnose_result\nFROM pv_inverter_record\nWHERE\n  $__timeFilter(log_date)\n  AND pv_inverter_id = $pv_inverter_id \nORDER BY log_date DESC\nLIMIT 1",
  333.           "refId": "A",
  334.           "select": [
  335.             [
  336.               {
  337.                 "params": [
  338.                   "id"
  339.                 ],
  340.                 "type": "column"
  341.               }
  342.             ]
  343.           ],
  344.           "sql": {
  345.             "columns": [
  346.               {
  347.                 "parameters": [],
  348.                 "type": "function"
  349.               }
  350.             ],
  351.             "groupBy": [
  352.               {
  353.                 "property": {
  354.                   "type": "string"
  355.                 },
  356.                 "type": "groupBy"
  357.               }
  358.             ],
  359.             "limit": 50
  360.           },
  361.           "table": "_is_generic_admin_media_objects",
  362.           "timeColumn": "date_of_creation",
  363.           "timeColumnType": "timestamp",
  364.           "where": [
  365.             {
  366.               "name": "$__timeFilter",
  367.               "params": [],
  368.               "type": "macro"
  369.             }
  370.           ]
  371.         }
  372.       ],
  373.       "title": "Diagnostics",
  374.       "type": "stat"
  375.     },
  376.     {
  377.       "datasource": {
  378.         "type": "mysql",
  379.         "uid": "BjbJE3u7z"
  380.       },
  381.       "fieldConfig": {
  382.         "defaults": {
  383.           "color": {
  384.             "mode": "thresholds"
  385.           },
  386.           "mappings": [
  387.             {
  388.               "options": {
  389.                 "from": -99999,
  390.                 "result": {
  391.                   "color": "red",
  392.                   "index": 0
  393.                 },
  394.                 "to": 0
  395.               },
  396.               "type": "range"
  397.             }
  398.           ],
  399.           "min": 0,
  400.           "thresholds": {
  401.             "mode": "absolute",
  402.             "steps": [
  403.               {
  404.                 "color": "green",
  405.                 "value": null
  406.               }
  407.             ]
  408.           },
  409.           "unit": "watt"
  410.         },
  411.         "overrides": []
  412.       },
  413.       "gridPos": {
  414.         "h": 4,
  415.         "w": 2,
  416.         "x": 6,
  417.         "y": 1
  418.       },
  419.       "id": 123153,
  420.       "options": {
  421.         "colorMode": "value",
  422.         "graphMode": "area",
  423.         "justifyMode": "auto",
  424.         "orientation": "auto",
  425.         "reduceOptions": {
  426.           "calcs": [
  427.             "lastNotNull"
  428.           ],
  429.           "fields": "/^power$/",
  430.           "values": false
  431.         },
  432.         "text": {},
  433.         "textMode": "auto"
  434.       },
  435.       "pluginVersion": "10.2.0",
  436.       "targets": [
  437.         {
  438.           "datasource": {
  439.             "type": "mysql",
  440.             "uid": "BjbJE3u7z"
  441.           },
  442.           "editorMode": "code",
  443.           "format": "time_series",
  444.           "group": [],
  445.           "metricColumn": "none",
  446.           "rawQuery": true,
  447.           "rawSql": "SELECT\n  UNIX_TIMESTAMP(log_date) AS \"time\",\n  pv_ppv AS power\nFROM pv_inverter_record\nWHERE\n  $__timeFilter(log_date)\n  AND pv_inverter_id = $pv_inverter_id \nORDER BY log_date ASC\n",
  448.           "refId": "A",
  449.           "select": [
  450.             [
  451.               {
  452.                 "params": [
  453.                   "id"
  454.                 ],
  455.                 "type": "column"
  456.               }
  457.             ]
  458.           ],
  459.           "sql": {
  460.             "columns": [
  461.               {
  462.                 "parameters": [],
  463.                 "type": "function"
  464.               }
  465.             ],
  466.             "groupBy": [
  467.               {
  468.                 "property": {
  469.                   "type": "string"
  470.                 },
  471.                 "type": "groupBy"
  472.               }
  473.             ],
  474.             "limit": 50
  475.           },
  476.           "table": "_is_generic_admin_media_objects",
  477.           "timeColumn": "date_of_creation",
  478.           "timeColumnType": "timestamp",
  479.           "where": [
  480.             {
  481.               "name": "$__timeFilter",
  482.               "params": [],
  483.               "type": "macro"
  484.             }
  485.           ]
  486.         }
  487.       ],
  488.       "title": "PV",
  489.       "type": "stat"
  490.     },
  491.     {
  492.       "datasource": {
  493.         "type": "mysql",
  494.         "uid": "BjbJE3u7z"
  495.       },
  496.       "fieldConfig": {
  497.         "defaults": {
  498.           "color": {
  499.             "mode": "thresholds"
  500.           },
  501.           "mappings": [],
  502.           "thresholds": {
  503.             "mode": "absolute",
  504.             "steps": [
  505.               {
  506.                 "color": "green",
  507.                 "value": null
  508.               }
  509.             ]
  510.           },
  511.           "unit": "kwatth"
  512.         },
  513.         "overrides": []
  514.       },
  515.       "gridPos": {
  516.         "h": 4,
  517.         "w": 2,
  518.         "x": 8,
  519.         "y": 1
  520.       },
  521.       "id": 123160,
  522.       "options": {
  523.         "colorMode": "background",
  524.         "graphMode": "none",
  525.         "justifyMode": "auto",
  526.         "orientation": "horizontal",
  527.         "reduceOptions": {
  528.           "calcs": [
  529.             "lastNotNull"
  530.           ],
  531.           "fields": "/^kwh$/",
  532.           "values": false
  533.         },
  534.         "text": {
  535.           "valueSize": 40
  536.         },
  537.         "textMode": "auto"
  538.       },
  539.       "pluginVersion": "10.2.0",
  540.       "targets": [
  541.         {
  542.           "datasource": {
  543.             "type": "mysql",
  544.             "uid": "BjbJE3u7z"
  545.           },
  546.           "editorMode": "code",
  547.           "format": "time_series",
  548.           "group": [],
  549.           "metricColumn": "none",
  550.           "rawQuery": true,
  551.           "rawSql": "SELECT\n  UNIX_TIMESTAMP(log_date) AS \"time\",\n  pv_e_day AS kwh\nFROM pv_inverter_record\nWHERE\n  $__timeFilter(log_date)\n  AND pv_inverter_id = $pv_inverter_id \nORDER BY log_date DESC\nLIMIT 1",
  552.           "refId": "A",
  553.           "select": [
  554.             [
  555.               {
  556.                 "params": [
  557.                   "id"
  558.                 ],
  559.                 "type": "column"
  560.               }
  561.             ]
  562.           ],
  563.           "sql": {
  564.             "columns": [
  565.               {
  566.                 "parameters": [],
  567.                 "type": "function"
  568.               }
  569.             ],
  570.             "groupBy": [
  571.               {
  572.                 "property": {
  573.                   "type": "string"
  574.                 },
  575.                 "type": "groupBy"
  576.               }
  577.             ],
  578.             "limit": 50
  579.           },
  580.           "table": "_is_generic_admin_media_objects",
  581.           "timeColumn": "date_of_creation",
  582.           "timeColumnType": "timestamp",
  583.           "where": [
  584.             {
  585.               "name": "$__timeFilter",
  586.               "params": [],
  587.               "type": "macro"
  588.             }
  589.           ]
  590.         }
  591.       ],
  592.       "title": "From PV Today",
  593.       "type": "stat"
  594.     },
  595.     {
  596.       "datasource": {
  597.         "type": "mysql",
  598.         "uid": "BjbJE3u7z"
  599.       },
  600.       "fieldConfig": {
  601.         "defaults": {
  602.           "color": {
  603.             "mode": "thresholds"
  604.           },
  605.           "mappings": [],
  606.           "thresholds": {
  607.             "mode": "absolute",
  608.             "steps": [
  609.               {
  610.                 "color": "green",
  611.                 "value": null
  612.               }
  613.             ]
  614.           },
  615.           "unit": "kwatth"
  616.         },
  617.         "overrides": []
  618.       },
  619.       "gridPos": {
  620.         "h": 4,
  621.         "w": 2,
  622.         "x": 10,
  623.         "y": 1
  624.       },
  625.       "id": 123193,
  626.       "options": {
  627.         "colorMode": "background",
  628.         "graphMode": "none",
  629.         "justifyMode": "auto",
  630.         "orientation": "horizontal",
  631.         "reduceOptions": {
  632.           "calcs": [
  633.             "lastNotNull"
  634.           ],
  635.           "fields": "/^kwh$/",
  636.           "values": false
  637.         },
  638.         "text": {
  639.           "valueSize": 40
  640.         },
  641.         "textMode": "auto"
  642.       },
  643.       "pluginVersion": "10.2.0",
  644.       "targets": [
  645.         {
  646.           "datasource": {
  647.             "type": "mysql",
  648.             "uid": "BjbJE3u7z"
  649.           },
  650.           "editorMode": "code",
  651.           "format": "time_series",
  652.           "group": [],
  653.           "metricColumn": "none",
  654.           "rawQuery": true,
  655.           "rawSql": "SELECT\n  UNIX_TIMESTAMP(log_date) AS \"time\",\n  pv_e_total AS kwh\nFROM pv_inverter_record\nWHERE\n  $__timeFilter(log_date)\n  AND pv_inverter_id = $pv_inverter_id \nORDER BY log_date DESC\nLIMIT 1",
  656.           "refId": "A",
  657.           "select": [
  658.             [
  659.               {
  660.                 "params": [
  661.                   "id"
  662.                 ],
  663.                 "type": "column"
  664.               }
  665.             ]
  666.           ],
  667.           "sql": {
  668.             "columns": [
  669.               {
  670.                 "parameters": [],
  671.                 "type": "function"
  672.               }
  673.             ],
  674.             "groupBy": [
  675.               {
  676.                 "property": {
  677.                   "type": "string"
  678.                 },
  679.                 "type": "groupBy"
  680.               }
  681.             ],
  682.             "limit": 50
  683.           },
  684.           "table": "_is_generic_admin_media_objects",
  685.           "timeColumn": "date_of_creation",
  686.           "timeColumnType": "timestamp",
  687.           "where": [
  688.             {
  689.               "name": "$__timeFilter",
  690.               "params": [],
  691.               "type": "macro"
  692.             }
  693.           ]
  694.         }
  695.       ],
  696.       "title": "From PV Total",
  697.       "type": "stat"
  698.     },
  699.     {
  700.       "datasource": {
  701.         "type": "mysql",
  702.         "uid": "BjbJE3u7z"
  703.       },
  704.       "fieldConfig": {
  705.         "defaults": {
  706.           "color": {
  707.             "mode": "palette-classic"
  708.           },
  709.           "custom": {
  710.             "axisBorderShow": false,
  711.             "axisCenteredZero": false,
  712.             "axisColorMode": "text",
  713.             "axisLabel": "",
  714.             "axisPlacement": "auto",
  715.             "barAlignment": 0,
  716.             "drawStyle": "line",
  717.             "fillOpacity": 0,
  718.             "gradientMode": "none",
  719.             "hideFrom": {
  720.               "legend": false,
  721.               "tooltip": false,
  722.               "viz": false
  723.             },
  724.             "insertNulls": false,
  725.             "lineInterpolation": "linear",
  726.             "lineWidth": 1,
  727.             "pointSize": 5,
  728.             "scaleDistribution": {
  729.               "type": "linear"
  730.             },
  731.             "showPoints": "auto",
  732.             "spanNulls": false,
  733.             "stacking": {
  734.               "group": "A",
  735.               "mode": "none"
  736.             },
  737.             "thresholdsStyle": {
  738.               "mode": "line"
  739.             }
  740.           },
  741.           "mappings": [],
  742.           "thresholds": {
  743.             "mode": "absolute",
  744.             "steps": [
  745.               {
  746.                 "color": "green",
  747.                 "value": null
  748.               },
  749.               {
  750.                 "color": "#ffffff",
  751.                 "value": 0
  752.               }
  753.             ]
  754.           },
  755.           "unit": "watt"
  756.         },
  757.         "overrides": []
  758.       },
  759.       "gridPos": {
  760.         "h": 8,
  761.         "w": 12,
  762.         "x": 12,
  763.         "y": 1
  764.       },
  765.       "id": 123172,
  766.       "options": {
  767.         "legend": {
  768.           "calcs": [
  769.             "mean",
  770.             "last"
  771.           ],
  772.           "displayMode": "table",
  773.           "placement": "bottom",
  774.           "showLegend": true
  775.         },
  776.         "tooltip": {
  777.           "mode": "multi",
  778.           "sort": "desc"
  779.         }
  780.       },
  781.       "targets": [
  782.         {
  783.           "datasource": {
  784.             "type": "mysql",
  785.             "uid": "BjbJE3u7z"
  786.           },
  787.           "editorMode": "code",
  788.           "format": "time_series",
  789.           "group": [],
  790.           "metricColumn": "none",
  791.           "rawQuery": true,
  792.           "rawSql": "SELECT\n  UNIX_TIMESTAMP(log_date) AS \"time\",\n  battery_pbattery1 as battery_source\nFROM pv_inverter_record\nWHERE\n  $__timeFilter(log_date)\n  AND pv_inverter_id = 1\n  AND battery_mode_label = 'Discharge'\nORDER BY log_date",
  793.           "refId": "A",
  794.           "select": [
  795.             [
  796.               {
  797.                 "params": [
  798.                   "id"
  799.                 ],
  800.                 "type": "column"
  801.               }
  802.             ]
  803.           ],
  804.           "sql": {
  805.             "columns": [
  806.               {
  807.                 "parameters": [],
  808.                 "type": "function"
  809.               }
  810.             ],
  811.             "groupBy": [
  812.               {
  813.                 "property": {
  814.                   "type": "string"
  815.                 },
  816.                 "type": "groupBy"
  817.               }
  818.             ],
  819.             "limit": 50
  820.           },
  821.           "table": "_is_generic_admin_media_objects",
  822.           "timeColumn": "date_of_creation",
  823.           "timeColumnType": "timestamp",
  824.           "where": [
  825.             {
  826.               "name": "$__timeFilter",
  827.               "params": [],
  828.               "type": "macro"
  829.             }
  830.           ]
  831.         }
  832.       ],
  833.       "title": "Battery Source - Discharge Power",
  834.       "type": "timeseries"
  835.     },
  836.     {
  837.       "datasource": {
  838.         "type": "mysql",
  839.         "uid": "BjbJE3u7z"
  840.       },
  841.       "fieldConfig": {
  842.         "defaults": {
  843.           "color": {
  844.             "mode": "thresholds"
  845.           },
  846.           "mappings": [],
  847.           "thresholds": {
  848.             "mode": "absolute",
  849.             "steps": [
  850.               {
  851.                 "color": "red",
  852.                 "value": null
  853.               },
  854.               {
  855.                 "color": "green",
  856.                 "value": 0
  857.               }
  858.             ]
  859.           },
  860.           "unit": "watt"
  861.         },
  862.         "overrides": []
  863.       },
  864.       "gridPos": {
  865.         "h": 4,
  866.         "w": 2,
  867.         "x": 6,
  868.         "y": 5
  869.       },
  870.       "id": 123149,
  871.       "options": {
  872.         "colorMode": "value",
  873.         "graphMode": "area",
  874.         "justifyMode": "auto",
  875.         "orientation": "auto",
  876.         "reduceOptions": {
  877.           "calcs": [
  878.             "lastNotNull"
  879.           ],
  880.           "fields": "/^power$/",
  881.           "values": false
  882.         },
  883.         "text": {},
  884.         "textMode": "auto"
  885.       },
  886.       "pluginVersion": "10.2.0",
  887.       "targets": [
  888.         {
  889.           "datasource": {
  890.             "type": "mysql",
  891.             "uid": "BjbJE3u7z"
  892.           },
  893.           "editorMode": "code",
  894.           "format": "time_series",
  895.           "group": [],
  896.           "metricColumn": "none",
  897.           "rawQuery": true,
  898.           "rawSql": "SELECT\n  UNIX_TIMESTAMP(log_date) AS \"time\",\n  battery_pbattery1*-1 AS power\nFROM pv_inverter_record\nWHERE\n  $__timeFilter(log_date)\n  AND pv_inverter_id = 1\nORDER BY log_date ASC",
  899.           "refId": "A",
  900.           "select": [
  901.             [
  902.               {
  903.                 "params": [
  904.                   "id"
  905.                 ],
  906.                 "type": "column"
  907.               }
  908.             ]
  909.           ],
  910.           "sql": {
  911.             "columns": [
  912.               {
  913.                 "parameters": [],
  914.                 "type": "function"
  915.               }
  916.             ],
  917.             "groupBy": [
  918.               {
  919.                 "property": {
  920.                   "type": "string"
  921.                 },
  922.                 "type": "groupBy"
  923.               }
  924.             ],
  925.             "limit": 50
  926.           },
  927.           "table": "_is_generic_admin_media_objects",
  928.           "timeColumn": "date_of_creation",
  929.           "timeColumnType": "timestamp",
  930.           "where": [
  931.             {
  932.               "name": "$__timeFilter",
  933.               "params": [],
  934.               "type": "macro"
  935.             }
  936.           ]
  937.         }
  938.       ],
  939.       "title": "Battery",
  940.       "type": "stat"
  941.     },
  942.     {
  943.       "datasource": {
  944.         "type": "mysql",
  945.         "uid": "BjbJE3u7z"
  946.       },
  947.       "fieldConfig": {
  948.         "defaults": {
  949.           "color": {
  950.             "mode": "thresholds"
  951.           },
  952.           "mappings": [],
  953.           "thresholds": {
  954.             "mode": "absolute",
  955.             "steps": [
  956.               {
  957.                 "color": "red",
  958.                 "value": null
  959.               }
  960.             ]
  961.           },
  962.           "unit": "kwatth"
  963.         },
  964.         "overrides": []
  965.       },
  966.       "gridPos": {
  967.         "h": 4,
  968.         "w": 2,
  969.         "x": 8,
  970.         "y": 5
  971.       },
  972.       "id": 123162,
  973.       "options": {
  974.         "colorMode": "background",
  975.         "graphMode": "none",
  976.         "justifyMode": "auto",
  977.         "orientation": "horizontal",
  978.         "reduceOptions": {
  979.           "calcs": [
  980.             "lastNotNull"
  981.           ],
  982.           "fields": "/^kwh$/",
  983.           "values": false
  984.         },
  985.         "text": {
  986.           "valueSize": 40
  987.         },
  988.         "textMode": "auto"
  989.       },
  990.       "pluginVersion": "10.2.0",
  991.       "targets": [
  992.         {
  993.           "datasource": {
  994.             "type": "mysql",
  995.             "uid": "BjbJE3u7z"
  996.           },
  997.           "editorMode": "code",
  998.           "format": "time_series",
  999.           "group": [],
  1000.           "metricColumn": "none",
  1001.           "rawQuery": true,
  1002.           "rawSql": "SELECT\n  UNIX_TIMESTAMP(log_date) AS \"time\",\n  battery_e_bat_discharge_day AS kwh\nFROM pv_inverter_record\nWHERE\n  $__timeFilter(log_date)\n  AND pv_inverter_id = $pv_inverter_id \nORDER BY log_date DESC\nLIMIT 1",
  1003.           "refId": "A",
  1004.           "select": [
  1005.             [
  1006.               {
  1007.                 "params": [
  1008.                   "id"
  1009.                 ],
  1010.                 "type": "column"
  1011.               }
  1012.             ]
  1013.           ],
  1014.           "sql": {
  1015.             "columns": [
  1016.               {
  1017.                 "parameters": [],
  1018.                 "type": "function"
  1019.               }
  1020.             ],
  1021.             "groupBy": [
  1022.               {
  1023.                 "property": {
  1024.                   "type": "string"
  1025.                 },
  1026.                 "type": "groupBy"
  1027.               }
  1028.             ],
  1029.             "limit": 50
  1030.           },
  1031.           "table": "_is_generic_admin_media_objects",
  1032.           "timeColumn": "date_of_creation",
  1033.           "timeColumnType": "timestamp",
  1034.           "where": [
  1035.             {
  1036.               "name": "$__timeFilter",
  1037.               "params": [],
  1038.               "type": "macro"
  1039.             }
  1040.           ]
  1041.         }
  1042.       ],
  1043.       "title": "From Battery Today (Discharge)",
  1044.       "type": "stat"
  1045.     },
  1046.     {
  1047.       "datasource": {
  1048.         "type": "mysql",
  1049.         "uid": "BjbJE3u7z"
  1050.       },
  1051.       "fieldConfig": {
  1052.         "defaults": {
  1053.           "color": {
  1054.             "mode": "thresholds"
  1055.           },
  1056.           "mappings": [],
  1057.           "thresholds": {
  1058.             "mode": "absolute",
  1059.             "steps": [
  1060.               {
  1061.                 "color": "green",
  1062.                 "value": null
  1063.               }
  1064.             ]
  1065.           },
  1066.           "unit": "kwatth"
  1067.         },
  1068.         "overrides": []
  1069.       },
  1070.       "gridPos": {
  1071.         "h": 4,
  1072.         "w": 2,
  1073.         "x": 10,
  1074.         "y": 5
  1075.       },
  1076.       "id": 123161,
  1077.       "options": {
  1078.         "colorMode": "background",
  1079.         "graphMode": "none",
  1080.         "justifyMode": "auto",
  1081.         "orientation": "horizontal",
  1082.         "reduceOptions": {
  1083.           "calcs": [
  1084.             "lastNotNull"
  1085.           ],
  1086.           "fields": "/^kwh$/",
  1087.           "values": false
  1088.         },
  1089.         "text": {
  1090.           "valueSize": 40
  1091.         },
  1092.         "textMode": "auto"
  1093.       },
  1094.       "pluginVersion": "10.2.0",
  1095.       "targets": [
  1096.         {
  1097.           "datasource": {
  1098.             "type": "mysql",
  1099.             "uid": "BjbJE3u7z"
  1100.           },
  1101.           "editorMode": "code",
  1102.           "format": "time_series",
  1103.           "group": [],
  1104.           "metricColumn": "none",
  1105.           "rawQuery": true,
  1106.           "rawSql": "SELECT\n  UNIX_TIMESTAMP(log_date) AS \"time\",\n  battery_e_bat_charge_day AS kwh\nFROM pv_inverter_record\nWHERE\n  $__timeFilter(log_date)\n  AND pv_inverter_id = $pv_inverter_id \nORDER BY log_date DESC\nLIMIT 1",
  1107.           "refId": "A",
  1108.           "select": [
  1109.             [
  1110.               {
  1111.                 "params": [
  1112.                   "id"
  1113.                 ],
  1114.                 "type": "column"
  1115.               }
  1116.             ]
  1117.           ],
  1118.           "sql": {
  1119.             "columns": [
  1120.               {
  1121.                 "parameters": [],
  1122.                 "type": "function"
  1123.               }
  1124.             ],
  1125.             "groupBy": [
  1126.               {
  1127.                 "property": {
  1128.                   "type": "string"
  1129.                 },
  1130.                 "type": "groupBy"
  1131.               }
  1132.             ],
  1133.             "limit": 50
  1134.           },
  1135.           "table": "_is_generic_admin_media_objects",
  1136.           "timeColumn": "date_of_creation",
  1137.           "timeColumnType": "timestamp",
  1138.           "where": [
  1139.             {
  1140.               "name": "$__timeFilter",
  1141.               "params": [],
  1142.               "type": "macro"
  1143.             }
  1144.           ]
  1145.         }
  1146.       ],
  1147.       "title": "To Battery Today (Charge)",
  1148.       "type": "stat"
  1149.     },
  1150.     {
  1151.       "datasource": {
  1152.         "type": "mysql",
  1153.         "uid": "BjbJE3u7z"
  1154.       },
  1155.       "fieldConfig": {
  1156.         "defaults": {
  1157.           "color": {
  1158.             "mode": "thresholds"
  1159.           },
  1160.           "custom": {
  1161.             "fillOpacity": 64,
  1162.             "hideFrom": {
  1163.               "legend": false,
  1164.               "tooltip": false,
  1165.               "viz": false
  1166.             },
  1167.             "insertNulls": false,
  1168.             "lineWidth": 0,
  1169.             "spanNulls": false
  1170.           },
  1171.           "mappings": [
  1172.             {
  1173.               "options": {
  1174.                 "Normal (Off-Grid)": {
  1175.                   "color": "light-green",
  1176.                   "index": 1
  1177.                 },
  1178.                 "Normal (On-Grid)": {
  1179.                   "color": "semi-dark-green",
  1180.                   "index": 0
  1181.                 }
  1182.               },
  1183.               "type": "value"
  1184.             }
  1185.           ],
  1186.           "thresholds": {
  1187.             "mode": "absolute",
  1188.             "steps": [
  1189.               {
  1190.                 "color": "red",
  1191.                 "value": null
  1192.               }
  1193.             ]
  1194.           }
  1195.         },
  1196.         "overrides": []
  1197.       },
  1198.       "gridPos": {
  1199.         "h": 4,
  1200.         "w": 6,
  1201.         "x": 0,
  1202.         "y": 7
  1203.       },
  1204.       "id": 123206,
  1205.       "options": {
  1206.         "alignValue": "center",
  1207.         "legend": {
  1208.           "displayMode": "list",
  1209.           "placement": "bottom",
  1210.           "showLegend": false
  1211.         },
  1212.         "mergeValues": true,
  1213.         "rowHeight": 1,
  1214.         "showValue": "auto",
  1215.         "tooltip": {
  1216.           "mode": "single",
  1217.           "sort": "none"
  1218.         }
  1219.       },
  1220.       "targets": [
  1221.         {
  1222.           "datasource": {
  1223.             "type": "mysql",
  1224.             "uid": "BjbJE3u7z"
  1225.           },
  1226.           "editorMode": "code",
  1227.           "format": "time_series",
  1228.           "group": [],
  1229.           "metricColumn": "none",
  1230.           "rawQuery": true,
  1231.           "rawSql": "SELECT\n  UNIX_TIMESTAMP(log_date) AS \"time\",\n  work_mode_label AS mode\nFROM (\n  select *, @e as prev, @e:=pv_inverter_work_mode.label AS work_mode_label\n  from (pv_inverter_record, (select @e:='') e)\n  inner join pv_inverter_work_mode on pv_inverter_work_mode.id = pv_inverter_record.work_mode\n  WHERE\n    $__timeFilter(log_date)\n    AND pv_inverter_id = $pv_inverter_id \n) t\nWHERE\n  prev <> work_mode_label COLLATE utf8_general_ci\nORDER BY log_date\n",
  1232.           "refId": "A",
  1233.           "select": [
  1234.             [
  1235.               {
  1236.                 "params": [
  1237.                   "id"
  1238.                 ],
  1239.                 "type": "column"
  1240.               }
  1241.             ]
  1242.           ],
  1243.           "sql": {
  1244.             "columns": [
  1245.               {
  1246.                 "parameters": [],
  1247.                 "type": "function"
  1248.               }
  1249.             ],
  1250.             "groupBy": [
  1251.               {
  1252.                 "property": {
  1253.                   "type": "string"
  1254.                 },
  1255.                 "type": "groupBy"
  1256.               }
  1257.             ],
  1258.             "limit": 50
  1259.           },
  1260.           "table": "_is_generic_admin_media_objects",
  1261.           "timeColumn": "date_of_creation",
  1262.           "timeColumnType": "timestamp",
  1263.           "where": [
  1264.             {
  1265.               "name": "$__timeFilter",
  1266.               "params": [],
  1267.               "type": "macro"
  1268.             }
  1269.           ]
  1270.         }
  1271.       ],
  1272.       "title": "Work Mode",
  1273.       "type": "state-timeline"
  1274.     },
  1275.     {
  1276.       "datasource": {
  1277.         "type": "mysql",
  1278.         "uid": "BjbJE3u7z"
  1279.       },
  1280.       "fieldConfig": {
  1281.         "defaults": {
  1282.           "color": {
  1283.             "mode": "thresholds"
  1284.           },
  1285.           "mappings": [
  1286.             {
  1287.               "options": {
  1288.                 "from": -99999,
  1289.                 "result": {
  1290.                   "color": "red",
  1291.                   "index": 0
  1292.                 },
  1293.                 "to": 0
  1294.               },
  1295.               "type": "range"
  1296.             }
  1297.           ],
  1298.           "thresholds": {
  1299.             "mode": "absolute",
  1300.             "steps": [
  1301.               {
  1302.                 "color": "green",
  1303.                 "value": null
  1304.               }
  1305.             ]
  1306.           },
  1307.           "unit": "watt"
  1308.         },
  1309.         "overrides": []
  1310.       },
  1311.       "gridPos": {
  1312.         "h": 4,
  1313.         "w": 2,
  1314.         "x": 6,
  1315.         "y": 9
  1316.       },
  1317.       "id": 123155,
  1318.       "options": {
  1319.         "colorMode": "value",
  1320.         "graphMode": "area",
  1321.         "justifyMode": "auto",
  1322.         "orientation": "auto",
  1323.         "reduceOptions": {
  1324.           "calcs": [
  1325.             "lastNotNull"
  1326.           ],
  1327.           "fields": "/^power$/",
  1328.           "values": false
  1329.         },
  1330.         "text": {},
  1331.         "textMode": "auto"
  1332.       },
  1333.       "pluginVersion": "10.2.0",
  1334.       "targets": [
  1335.         {
  1336.           "datasource": {
  1337.             "type": "mysql",
  1338.             "uid": "BjbJE3u7z"
  1339.           },
  1340.           "editorMode": "code",
  1341.           "format": "time_series",
  1342.           "group": [],
  1343.           "metricColumn": "none",
  1344.           "rawQuery": true,
  1345.           "rawSql": "SELECT\n  UNIX_TIMESTAMP(log_date) AS \"time\",\n  grid_active_power AS power\nFROM pv_inverter_record\nWHERE\n  $__timeFilter(log_date)\n  AND pv_inverter_id = $pv_inverter_id \nORDER BY log_date ASC",
  1346.           "refId": "A",
  1347.           "select": [
  1348.             [
  1349.               {
  1350.                 "params": [
  1351.                   "id"
  1352.                 ],
  1353.                 "type": "column"
  1354.               }
  1355.             ]
  1356.           ],
  1357.           "sql": {
  1358.             "columns": [
  1359.               {
  1360.                 "parameters": [],
  1361.                 "type": "function"
  1362.               }
  1363.             ],
  1364.             "groupBy": [
  1365.               {
  1366.                 "property": {
  1367.                   "type": "string"
  1368.                 },
  1369.                 "type": "groupBy"
  1370.               }
  1371.             ],
  1372.             "limit": 50
  1373.           },
  1374.           "table": "_is_generic_admin_media_objects",
  1375.           "timeColumn": "date_of_creation",
  1376.           "timeColumnType": "timestamp",
  1377.           "where": [
  1378.             {
  1379.               "name": "$__timeFilter",
  1380.               "params": [],
  1381.               "type": "macro"
  1382.             }
  1383.           ]
  1384.         }
  1385.       ],
  1386.       "title": "Grid",
  1387.       "type": "stat"
  1388.     },
  1389.     {
  1390.       "datasource": {
  1391.         "type": "mysql",
  1392.         "uid": "BjbJE3u7z"
  1393.       },
  1394.       "fieldConfig": {
  1395.         "defaults": {
  1396.           "color": {
  1397.             "mode": "thresholds"
  1398.           },
  1399.           "mappings": [],
  1400.           "thresholds": {
  1401.             "mode": "absolute",
  1402.             "steps": [
  1403.               {
  1404.                 "color": "red",
  1405.                 "value": null
  1406.               }
  1407.             ]
  1408.           },
  1409.           "unit": "kwatth"
  1410.         },
  1411.         "overrides": []
  1412.       },
  1413.       "gridPos": {
  1414.         "h": 4,
  1415.         "w": 2,
  1416.         "x": 8,
  1417.         "y": 9
  1418.       },
  1419.       "id": 123203,
  1420.       "options": {
  1421.         "colorMode": "background",
  1422.         "graphMode": "none",
  1423.         "justifyMode": "auto",
  1424.         "orientation": "horizontal",
  1425.         "reduceOptions": {
  1426.           "calcs": [
  1427.             "lastNotNull"
  1428.           ],
  1429.           "fields": "/^kwh$/",
  1430.           "values": false
  1431.         },
  1432.         "text": {
  1433.           "valueSize": 40
  1434.         },
  1435.         "textMode": "auto"
  1436.       },
  1437.       "pluginVersion": "10.2.0",
  1438.       "targets": [
  1439.         {
  1440.           "datasource": {
  1441.             "type": "mysql",
  1442.             "uid": "BjbJE3u7z"
  1443.           },
  1444.           "editorMode": "code",
  1445.           "format": "time_series",
  1446.           "group": [],
  1447.           "metricColumn": "none",
  1448.           "rawQuery": true,
  1449.           "rawSql": "SELECT\n  UNIX_TIMESTAMP(log_date) AS \"time\",\n  grid_meter_e_total_imp-(SELECT grid_meter_e_total_imp FROM pv_inverter_record WHERE log_date < $__timeFrom() ORDER BY log_date DESC LIMIT 1) AS kwh\nFROM pv_inverter_record\nWHERE\n  log_date < $__timeTo()\n  AND pv_inverter_id = $pv_inverter_id \nORDER BY log_date DESC\nLIMIT 1",
  1450.           "refId": "A",
  1451.           "select": [
  1452.             [
  1453.               {
  1454.                 "params": [
  1455.                   "id"
  1456.                 ],
  1457.                 "type": "column"
  1458.               }
  1459.             ]
  1460.           ],
  1461.           "sql": {
  1462.             "columns": [
  1463.               {
  1464.                 "parameters": [],
  1465.                 "type": "function"
  1466.               }
  1467.             ],
  1468.             "groupBy": [
  1469.               {
  1470.                 "property": {
  1471.                   "type": "string"
  1472.                 },
  1473.                 "type": "groupBy"
  1474.               }
  1475.             ],
  1476.             "limit": 50
  1477.           },
  1478.           "table": "_is_generic_admin_media_objects",
  1479.           "timeColumn": "date_of_creation",
  1480.           "timeColumnType": "timestamp",
  1481.           "where": [
  1482.             {
  1483.               "name": "$__timeFilter",
  1484.               "params": [],
  1485.               "type": "macro"
  1486.             }
  1487.           ]
  1488.         }
  1489.       ],
  1490.       "title": "From Grid Imported Today",
  1491.       "type": "stat"
  1492.     },
  1493.     {
  1494.       "datasource": {
  1495.         "type": "mysql",
  1496.         "uid": "BjbJE3u7z"
  1497.       },
  1498.       "fieldConfig": {
  1499.         "defaults": {
  1500.           "color": {
  1501.             "mode": "thresholds"
  1502.           },
  1503.           "mappings": [],
  1504.           "thresholds": {
  1505.             "mode": "absolute",
  1506.             "steps": [
  1507.               {
  1508.                 "color": "green",
  1509.                 "value": null
  1510.               }
  1511.             ]
  1512.           },
  1513.           "unit": "kwatth"
  1514.         },
  1515.         "overrides": []
  1516.       },
  1517.       "gridPos": {
  1518.         "h": 4,
  1519.         "w": 2,
  1520.         "x": 10,
  1521.         "y": 9
  1522.       },
  1523.       "id": 123164,
  1524.       "options": {
  1525.         "colorMode": "background",
  1526.         "graphMode": "none",
  1527.         "justifyMode": "auto",
  1528.         "orientation": "horizontal",
  1529.         "reduceOptions": {
  1530.           "calcs": [
  1531.             "lastNotNull"
  1532.           ],
  1533.           "fields": "/^kwh$/",
  1534.           "values": false
  1535.         },
  1536.         "text": {
  1537.           "valueSize": 40
  1538.         },
  1539.         "textMode": "auto"
  1540.       },
  1541.       "pluginVersion": "10.2.0",
  1542.       "targets": [
  1543.         {
  1544.           "datasource": {
  1545.             "type": "mysql",
  1546.             "uid": "BjbJE3u7z"
  1547.           },
  1548.           "editorMode": "code",
  1549.           "format": "time_series",
  1550.           "group": [],
  1551.           "metricColumn": "none",
  1552.           "rawQuery": true,
  1553.           "rawSql": "SELECT\n  UNIX_TIMESTAMP(log_date) AS \"time\",\n  grid_meter_e_total_exp-(SELECT grid_meter_e_total_exp FROM pv_inverter_record WHERE log_date < $__timeFrom() ORDER BY log_date DESC LIMIT 1) AS kwh\nFROM pv_inverter_record\nWHERE\n  log_date < $__timeTo()\n  AND pv_inverter_id = $pv_inverter_id \nORDER BY log_date DESC\nLIMIT 1",
  1554.           "refId": "A",
  1555.           "select": [
  1556.             [
  1557.               {
  1558.                 "params": [
  1559.                   "id"
  1560.                 ],
  1561.                 "type": "column"
  1562.               }
  1563.             ]
  1564.           ],
  1565.           "sql": {
  1566.             "columns": [
  1567.               {
  1568.                 "parameters": [],
  1569.                 "type": "function"
  1570.               }
  1571.             ],
  1572.             "groupBy": [
  1573.               {
  1574.                 "property": {
  1575.                   "type": "string"
  1576.                 },
  1577.                 "type": "groupBy"
  1578.               }
  1579.             ],
  1580.             "limit": 50
  1581.           },
  1582.           "table": "_is_generic_admin_media_objects",
  1583.           "timeColumn": "date_of_creation",
  1584.           "timeColumnType": "timestamp",
  1585.           "where": [
  1586.             {
  1587.               "name": "$__timeFilter",
  1588.               "params": [],
  1589.               "type": "macro"
  1590.             }
  1591.           ]
  1592.         }
  1593.       ],
  1594.       "title": "To Grid Exported Today",
  1595.       "type": "stat"
  1596.     },
  1597.     {
  1598.       "datasource": {
  1599.         "type": "mysql",
  1600.         "uid": "BjbJE3u7z"
  1601.       },
  1602.       "fieldConfig": {
  1603.         "defaults": {
  1604.           "color": {
  1605.             "mode": "palette-classic"
  1606.           },
  1607.           "custom": {
  1608.             "axisBorderShow": false,
  1609.             "axisCenteredZero": false,
  1610.             "axisColorMode": "text",
  1611.             "axisLabel": "",
  1612.             "axisPlacement": "auto",
  1613.             "barAlignment": 0,
  1614.             "drawStyle": "line",
  1615.             "fillOpacity": 0,
  1616.             "gradientMode": "none",
  1617.             "hideFrom": {
  1618.               "legend": false,
  1619.               "tooltip": false,
  1620.               "viz": false
  1621.             },
  1622.             "insertNulls": false,
  1623.             "lineInterpolation": "linear",
  1624.             "lineWidth": 1,
  1625.             "pointSize": 5,
  1626.             "scaleDistribution": {
  1627.               "type": "linear"
  1628.             },
  1629.             "showPoints": "auto",
  1630.             "spanNulls": false,
  1631.             "stacking": {
  1632.               "group": "A",
  1633.               "mode": "none"
  1634.             },
  1635.             "thresholdsStyle": {
  1636.               "mode": "line"
  1637.             }
  1638.           },
  1639.           "mappings": [],
  1640.           "thresholds": {
  1641.             "mode": "absolute",
  1642.             "steps": [
  1643.               {
  1644.                 "color": "green",
  1645.                 "value": null
  1646.               },
  1647.               {
  1648.                 "color": "dark-red",
  1649.                 "value": 360
  1650.               },
  1651.               {
  1652.                 "color": "semi-dark-orange",
  1653.                 "value": 422
  1654.               },
  1655.               {
  1656.                 "color": "dark-red",
  1657.                 "value": 432
  1658.               }
  1659.             ]
  1660.           },
  1661.           "unit": "volt"
  1662.         },
  1663.         "overrides": []
  1664.       },
  1665.       "gridPos": {
  1666.         "h": 8,
  1667.         "w": 12,
  1668.         "x": 12,
  1669.         "y": 9
  1670.       },
  1671.       "id": 123175,
  1672.       "options": {
  1673.         "legend": {
  1674.           "calcs": [
  1675.             "last",
  1676.             "min",
  1677.             "max"
  1678.           ],
  1679.           "displayMode": "list",
  1680.           "placement": "bottom",
  1681.           "showLegend": false
  1682.         },
  1683.         "tooltip": {
  1684.           "mode": "multi",
  1685.           "sort": "desc"
  1686.         }
  1687.       },
  1688.       "targets": [
  1689.         {
  1690.           "datasource": {
  1691.             "type": "mysql",
  1692.             "uid": "BjbJE3u7z"
  1693.           },
  1694.           "editorMode": "code",
  1695.           "format": "time_series",
  1696.           "group": [],
  1697.           "metricColumn": "none",
  1698.           "rawQuery": true,
  1699.           "rawSql": "SELECT\n  UNIX_TIMESTAMP(log_date) AS \"time\",\n  battery_vbattery1 as voltage\nFROM pv_inverter_record\nWHERE\n  $__timeFilter(log_date)\n  AND pv_inverter_id = $pv_inverter_id \nORDER BY log_date",
  1700.           "refId": "A",
  1701.           "select": [
  1702.             [
  1703.               {
  1704.                 "params": [
  1705.                   "id"
  1706.                 ],
  1707.                 "type": "column"
  1708.               }
  1709.             ]
  1710.           ],
  1711.           "sql": {
  1712.             "columns": [
  1713.               {
  1714.                 "parameters": [],
  1715.                 "type": "function"
  1716.               }
  1717.             ],
  1718.             "groupBy": [
  1719.               {
  1720.                 "property": {
  1721.                   "type": "string"
  1722.                 },
  1723.                 "type": "groupBy"
  1724.               }
  1725.             ],
  1726.             "limit": 50
  1727.           },
  1728.           "table": "_is_generic_admin_media_objects",
  1729.           "timeColumn": "date_of_creation",
  1730.           "timeColumnType": "timestamp",
  1731.           "where": [
  1732.             {
  1733.               "name": "$__timeFilter",
  1734.               "params": [],
  1735.               "type": "macro"
  1736.             }
  1737.           ]
  1738.         }
  1739.       ],
  1740.       "title": "Battery Voltage",
  1741.       "type": "timeseries"
  1742.     },
  1743.     {
  1744.       "datasource": {
  1745.         "type": "mysql",
  1746.         "uid": "BjbJE3u7z"
  1747.       },
  1748.       "fieldConfig": {
  1749.         "defaults": {
  1750.           "color": {
  1751.             "mode": "thresholds"
  1752.           },
  1753.           "mappings": [],
  1754.           "max": 100,
  1755.           "min": 0,
  1756.           "thresholds": {
  1757.             "mode": "absolute",
  1758.             "steps": [
  1759.               {
  1760.                 "color": "semi-dark-red",
  1761.                 "value": null
  1762.               },
  1763.               {
  1764.                 "color": "semi-dark-orange",
  1765.                 "value": 30
  1766.               },
  1767.               {
  1768.                 "color": "semi-dark-green",
  1769.                 "value": 70
  1770.               }
  1771.             ]
  1772.           },
  1773.           "unit": "percent"
  1774.         },
  1775.         "overrides": []
  1776.       },
  1777.       "gridPos": {
  1778.         "h": 8,
  1779.         "w": 2,
  1780.         "x": 0,
  1781.         "y": 11
  1782.       },
  1783.       "id": 123145,
  1784.       "options": {
  1785.         "minVizHeight": 75,
  1786.         "minVizWidth": 75,
  1787.         "orientation": "auto",
  1788.         "reduceOptions": {
  1789.           "calcs": [
  1790.             "lastNotNull"
  1791.           ],
  1792.           "fields": "/^soc$/",
  1793.           "values": false
  1794.         },
  1795.         "showThresholdLabels": false,
  1796.         "showThresholdMarkers": true,
  1797.         "text": {}
  1798.       },
  1799.       "pluginVersion": "10.2.0",
  1800.       "targets": [
  1801.         {
  1802.           "datasource": {
  1803.             "type": "mysql",
  1804.             "uid": "BjbJE3u7z"
  1805.           },
  1806.           "format": "time_series",
  1807.           "group": [],
  1808.           "metricColumn": "none",
  1809.           "rawQuery": true,
  1810.           "rawSql": "SELECT\n  UNIX_TIMESTAMP(log_date) AS \"time\",\n  battery_soc AS soc\nFROM pv_inverter_record\nWHERE\n  $__timeFilter(log_date)\nORDER BY log_date DESC\nLIMIT 1",
  1811.           "refId": "A",
  1812.           "select": [
  1813.             [
  1814.               {
  1815.                 "params": [
  1816.                   "id"
  1817.                 ],
  1818.                 "type": "column"
  1819.               }
  1820.             ]
  1821.           ],
  1822.           "table": "_is_generic_admin_media_objects",
  1823.           "timeColumn": "date_of_creation",
  1824.           "timeColumnType": "timestamp",
  1825.           "where": [
  1826.             {
  1827.               "name": "$__timeFilter",
  1828.               "params": [],
  1829.               "type": "macro"
  1830.             }
  1831.           ]
  1832.         }
  1833.       ],
  1834.       "title": "Battery SOC",
  1835.       "type": "gauge"
  1836.     },
  1837.     {
  1838.       "datasource": {
  1839.         "type": "mysql",
  1840.         "uid": "BjbJE3u7z"
  1841.       },
  1842.       "fieldConfig": {
  1843.         "defaults": {
  1844.           "color": {
  1845.             "mode": "palette-classic"
  1846.           },
  1847.           "custom": {
  1848.             "axisBorderShow": false,
  1849.             "axisCenteredZero": false,
  1850.             "axisColorMode": "text",
  1851.             "axisLabel": "",
  1852.             "axisPlacement": "auto",
  1853.             "axisSoftMax": 100,
  1854.             "barAlignment": 0,
  1855.             "drawStyle": "line",
  1856.             "fillOpacity": 0,
  1857.             "gradientMode": "none",
  1858.             "hideFrom": {
  1859.               "legend": false,
  1860.               "tooltip": false,
  1861.               "viz": false
  1862.             },
  1863.             "insertNulls": false,
  1864.             "lineInterpolation": "linear",
  1865.             "lineWidth": 1,
  1866.             "pointSize": 5,
  1867.             "scaleDistribution": {
  1868.               "type": "linear"
  1869.             },
  1870.             "showPoints": "auto",
  1871.             "spanNulls": false,
  1872.             "stacking": {
  1873.               "group": "A",
  1874.               "mode": "none"
  1875.             },
  1876.             "thresholdsStyle": {
  1877.               "mode": "off"
  1878.             }
  1879.           },
  1880.           "mappings": [],
  1881.           "thresholds": {
  1882.             "mode": "absolute",
  1883.             "steps": [
  1884.               {
  1885.                 "color": "green",
  1886.                 "value": null
  1887.               },
  1888.               {
  1889.                 "color": "red",
  1890.                 "value": 80
  1891.               }
  1892.             ]
  1893.           },
  1894.           "unit": "percent"
  1895.         },
  1896.         "overrides": []
  1897.       },
  1898.       "gridPos": {
  1899.         "h": 6,
  1900.         "w": 4,
  1901.         "x": 2,
  1902.         "y": 11
  1903.       },
  1904.       "id": 123135,
  1905.       "options": {
  1906.         "legend": {
  1907.           "calcs": [
  1908.             "mean",
  1909.             "last"
  1910.           ],
  1911.           "displayMode": "table",
  1912.           "placement": "bottom",
  1913.           "showLegend": true
  1914.         },
  1915.         "tooltip": {
  1916.           "mode": "multi",
  1917.           "sort": "desc"
  1918.         }
  1919.       },
  1920.       "targets": [
  1921.         {
  1922.           "datasource": {
  1923.             "type": "mysql",
  1924.             "uid": "BjbJE3u7z"
  1925.           },
  1926.           "format": "time_series",
  1927.           "group": [],
  1928.           "metricColumn": "none",
  1929.           "rawQuery": true,
  1930.           "rawSql": "SELECT\n  UNIX_TIMESTAMP(log_date) AS \"time\",\n  battery_soc\nFROM pv_inverter_record\nWHERE\n  $__timeFilter(log_date)\nORDER BY log_date",
  1931.           "refId": "A",
  1932.           "select": [
  1933.             [
  1934.               {
  1935.                 "params": [
  1936.                   "id"
  1937.                 ],
  1938.                 "type": "column"
  1939.               }
  1940.             ]
  1941.           ],
  1942.           "table": "_is_generic_admin_media_objects",
  1943.           "timeColumn": "date_of_creation",
  1944.           "timeColumnType": "timestamp",
  1945.           "where": [
  1946.             {
  1947.               "name": "$__timeFilter",
  1948.               "params": [],
  1949.               "type": "macro"
  1950.             }
  1951.           ]
  1952.         }
  1953.       ],
  1954.       "title": "PV Battery SOC",
  1955.       "type": "timeseries"
  1956.     },
  1957.     {
  1958.       "datasource": {
  1959.         "type": "mysql",
  1960.         "uid": "BjbJE3u7z"
  1961.       },
  1962.       "fieldConfig": {
  1963.         "defaults": {
  1964.           "color": {
  1965.             "mode": "thresholds"
  1966.           },
  1967.           "mappings": [
  1968.             {
  1969.               "options": {
  1970.                 "from": -99999,
  1971.                 "result": {
  1972.                   "color": "red",
  1973.                   "index": 0
  1974.                 },
  1975.                 "to": 0
  1976.               },
  1977.               "type": "range"
  1978.             }
  1979.           ],
  1980.           "max": 0,
  1981.           "thresholds": {
  1982.             "mode": "absolute",
  1983.             "steps": [
  1984.               {
  1985.                 "color": "green",
  1986.                 "value": null
  1987.               }
  1988.             ]
  1989.           },
  1990.           "unit": "watt"
  1991.         },
  1992.         "overrides": []
  1993.       },
  1994.       "gridPos": {
  1995.         "h": 5,
  1996.         "w": 2,
  1997.         "x": 6,
  1998.         "y": 13
  1999.       },
  2000.       "id": 123156,
  2001.       "options": {
  2002.         "colorMode": "value",
  2003.         "graphMode": "area",
  2004.         "justifyMode": "auto",
  2005.         "orientation": "auto",
  2006.         "reduceOptions": {
  2007.           "calcs": [
  2008.             "lastNotNull"
  2009.           ],
  2010.           "fields": "/^power$/",
  2011.           "values": false
  2012.         },
  2013.         "text": {},
  2014.         "textMode": "auto"
  2015.       },
  2016.       "pluginVersion": "10.2.0",
  2017.       "targets": [
  2018.         {
  2019.           "datasource": {
  2020.             "type": "mysql",
  2021.             "uid": "BjbJE3u7z"
  2022.           },
  2023.           "editorMode": "code",
  2024.           "format": "time_series",
  2025.           "group": [],
  2026.           "metricColumn": "none",
  2027.           "rawQuery": true,
  2028.           "rawSql": "SELECT\n  UNIX_TIMESTAMP(log_date) AS \"time\",\n  GREATEST((IF(work_mode_label = \"Normal (On-Grid)\", ac_load_p1, 0)+IF(work_mode_label = \"Normal (On-Grid)\", ac_load_p2, 0)+IF(work_mode_label = \"Normal (On-Grid)\", ac_load_p3, 0)) + (backup_p1+backup_p2+backup_p3), ac_house_consumption)*-1 AS power\nFROM pv_inverter_record\nWHERE\n  $__timeFilter(log_date)\n  AND pv_inverter_id = $pv_inverter_id \nORDER BY log_date ASC",
  2029.           "refId": "A",
  2030.           "select": [
  2031.             [
  2032.               {
  2033.                 "params": [
  2034.                   "id"
  2035.                 ],
  2036.                 "type": "column"
  2037.               }
  2038.             ]
  2039.           ],
  2040.           "sql": {
  2041.             "columns": [
  2042.               {
  2043.                 "parameters": [],
  2044.                 "type": "function"
  2045.               }
  2046.             ],
  2047.             "groupBy": [
  2048.               {
  2049.                 "property": {
  2050.                   "type": "string"
  2051.                 },
  2052.                 "type": "groupBy"
  2053.               }
  2054.             ],
  2055.             "limit": 50
  2056.           },
  2057.           "table": "_is_generic_admin_media_objects",
  2058.           "timeColumn": "date_of_creation",
  2059.           "timeColumnType": "timestamp",
  2060.           "where": [
  2061.             {
  2062.               "name": "$__timeFilter",
  2063.               "params": [],
  2064.               "type": "macro"
  2065.             }
  2066.           ]
  2067.         }
  2068.       ],
  2069.       "title": "House Consumption",
  2070.       "type": "stat"
  2071.     },
  2072.     {
  2073.       "datasource": {
  2074.         "type": "mysql",
  2075.         "uid": "BjbJE3u7z"
  2076.       },
  2077.       "fieldConfig": {
  2078.         "defaults": {
  2079.           "color": {
  2080.             "mode": "palette-classic"
  2081.           },
  2082.           "custom": {
  2083.             "axisBorderShow": false,
  2084.             "axisCenteredZero": false,
  2085.             "axisColorMode": "text",
  2086.             "axisLabel": "",
  2087.             "axisPlacement": "auto",
  2088.             "barAlignment": 0,
  2089.             "drawStyle": "line",
  2090.             "fillOpacity": 0,
  2091.             "gradientMode": "none",
  2092.             "hideFrom": {
  2093.               "legend": false,
  2094.               "tooltip": false,
  2095.               "viz": false
  2096.             },
  2097.             "insertNulls": false,
  2098.             "lineInterpolation": "linear",
  2099.             "lineWidth": 1,
  2100.             "pointSize": 5,
  2101.             "scaleDistribution": {
  2102.               "type": "linear"
  2103.             },
  2104.             "showPoints": "auto",
  2105.             "spanNulls": false,
  2106.             "stacking": {
  2107.               "group": "A",
  2108.               "mode": "none"
  2109.             },
  2110.             "thresholdsStyle": {
  2111.               "mode": "off"
  2112.             }
  2113.           },
  2114.           "mappings": [],
  2115.           "thresholds": {
  2116.             "mode": "absolute",
  2117.             "steps": [
  2118.               {
  2119.                 "color": "green",
  2120.                 "value": null
  2121.               },
  2122.               {
  2123.                 "color": "red",
  2124.                 "value": 80
  2125.               }
  2126.             ]
  2127.           }
  2128.         },
  2129.         "overrides": []
  2130.       },
  2131.       "gridPos": {
  2132.         "h": 5,
  2133.         "w": 2,
  2134.         "x": 8,
  2135.         "y": 13
  2136.       },
  2137.       "id": 123169,
  2138.       "options": {
  2139.         "legend": {
  2140.           "calcs": [],
  2141.           "displayMode": "list",
  2142.           "placement": "bottom",
  2143.           "showLegend": true
  2144.         },
  2145.         "tooltip": {
  2146.           "mode": "single",
  2147.           "sort": "none"
  2148.         }
  2149.       },
  2150.       "targets": [
  2151.         {
  2152.           "datasource": {
  2153.             "type": "mysql",
  2154.             "uid": "BjbJE3u7z"
  2155.           },
  2156.           "format": "time_series",
  2157.           "group": [],
  2158.           "metricColumn": "none",
  2159.           "rawQuery": true,
  2160.           "rawSql": "",
  2161.           "refId": "A",
  2162.           "select": [
  2163.             [
  2164.               {
  2165.                 "params": [
  2166.                   "id"
  2167.                 ],
  2168.                 "type": "column"
  2169.               }
  2170.             ]
  2171.           ],
  2172.           "table": "_is_generic_admin_media_objects",
  2173.           "timeColumn": "date_of_creation",
  2174.           "timeColumnType": "timestamp",
  2175.           "where": [
  2176.             {
  2177.               "name": "$__timeFilter",
  2178.               "params": [],
  2179.               "type": "macro"
  2180.             }
  2181.           ]
  2182.         }
  2183.       ],
  2184.       "type": "timeseries"
  2185.     },
  2186.     {
  2187.       "datasource": {
  2188.         "type": "mysql",
  2189.         "uid": "BjbJE3u7z"
  2190.       },
  2191.       "fieldConfig": {
  2192.         "defaults": {
  2193.           "color": {
  2194.             "mode": "thresholds"
  2195.           },
  2196.           "mappings": [],
  2197.           "thresholds": {
  2198.             "mode": "absolute",
  2199.             "steps": [
  2200.               {
  2201.                 "color": "green",
  2202.                 "value": null
  2203.               }
  2204.             ]
  2205.           },
  2206.           "unit": "kwatth"
  2207.         },
  2208.         "overrides": []
  2209.       },
  2210.       "gridPos": {
  2211.         "h": 5,
  2212.         "w": 2,
  2213.         "x": 10,
  2214.         "y": 13
  2215.       },
  2216.       "id": 123168,
  2217.       "options": {
  2218.         "colorMode": "background",
  2219.         "graphMode": "none",
  2220.         "justifyMode": "auto",
  2221.         "orientation": "horizontal",
  2222.         "reduceOptions": {
  2223.           "calcs": [
  2224.             "lastNotNull"
  2225.           ],
  2226.           "fields": "/^kwh$/",
  2227.           "values": false
  2228.         },
  2229.         "text": {
  2230.           "valueSize": 40
  2231.         },
  2232.         "textMode": "auto"
  2233.       },
  2234.       "pluginVersion": "10.2.0",
  2235.       "targets": [
  2236.         {
  2237.           "datasource": {
  2238.             "type": "mysql",
  2239.             "uid": "BjbJE3u7z"
  2240.           },
  2241.           "editorMode": "code",
  2242.           "format": "time_series",
  2243.           "group": [],
  2244.           "metricColumn": "none",
  2245.           "rawQuery": true,
  2246.           "rawSql": "SELECT\n  $__timeTo() AS time,\n  SUM(exported) AS kwh\nFROM pv_daily_stats\nWHERE\n  DATE(log_date) <= DATE($__timeTo())\n",
  2247.           "refId": "A",
  2248.           "select": [
  2249.             [
  2250.               {
  2251.                 "params": [
  2252.                   "id"
  2253.                 ],
  2254.                 "type": "column"
  2255.               }
  2256.             ]
  2257.           ],
  2258.           "sql": {
  2259.             "columns": [
  2260.               {
  2261.                 "parameters": [],
  2262.                 "type": "function"
  2263.               }
  2264.             ],
  2265.             "groupBy": [
  2266.               {
  2267.                 "property": {
  2268.                   "type": "string"
  2269.                 },
  2270.                 "type": "groupBy"
  2271.               }
  2272.             ],
  2273.             "limit": 50
  2274.           },
  2275.           "table": "_is_generic_admin_media_objects",
  2276.           "timeColumn": "date_of_creation",
  2277.           "timeColumnType": "timestamp",
  2278.           "where": [
  2279.             {
  2280.               "name": "$__timeFilter",
  2281.               "params": [],
  2282.               "type": "macro"
  2283.             }
  2284.           ]
  2285.         }
  2286.       ],
  2287.       "title": "To Grid Exported Total",
  2288.       "type": "stat"
  2289.     },
  2290.     {
  2291.       "datasource": {
  2292.         "type": "mysql",
  2293.         "uid": "BjbJE3u7z"
  2294.       },
  2295.       "fieldConfig": {
  2296.         "defaults": {
  2297.           "color": {
  2298.             "mode": "thresholds"
  2299.           },
  2300.           "mappings": [
  2301.             {
  2302.               "options": {
  2303.                 "from": -99999,
  2304.                 "result": {
  2305.                   "color": "red",
  2306.                   "index": 0
  2307.                 },
  2308.                 "to": 0
  2309.               },
  2310.               "type": "range"
  2311.             }
  2312.           ],
  2313.           "thresholds": {
  2314.             "mode": "absolute",
  2315.             "steps": [
  2316.               {
  2317.                 "color": "green",
  2318.                 "value": null
  2319.               }
  2320.             ]
  2321.           },
  2322.           "unit": "amp"
  2323.         },
  2324.         "overrides": []
  2325.       },
  2326.       "gridPos": {
  2327.         "h": 2,
  2328.         "w": 2,
  2329.         "x": 2,
  2330.         "y": 17
  2331.       },
  2332.       "id": 123198,
  2333.       "options": {
  2334.         "colorMode": "value",
  2335.         "graphMode": "area",
  2336.         "justifyMode": "auto",
  2337.         "orientation": "auto",
  2338.         "reduceOptions": {
  2339.           "calcs": [
  2340.             "lastNotNull"
  2341.           ],
  2342.           "fields": "/^battery_charge_limit$/",
  2343.           "values": false
  2344.         },
  2345.         "text": {},
  2346.         "textMode": "auto"
  2347.       },
  2348.       "pluginVersion": "10.2.0",
  2349.       "targets": [
  2350.         {
  2351.           "datasource": {
  2352.             "type": "mysql",
  2353.             "uid": "BjbJE3u7z"
  2354.           },
  2355.           "format": "time_series",
  2356.           "group": [],
  2357.           "metricColumn": "none",
  2358.           "rawQuery": true,
  2359.           "rawSql": "SELECT\n  UNIX_TIMESTAMP(log_date) AS \"time\",\n  battery_charge_limit AS battery_charge_limit\nFROM pv_inverter_record\nWHERE\n  $__timeFilter(log_date)\nORDER BY log_date ASC",
  2360.           "refId": "A",
  2361.           "select": [
  2362.             [
  2363.               {
  2364.                 "params": [
  2365.                   "id"
  2366.                 ],
  2367.                 "type": "column"
  2368.               }
  2369.             ]
  2370.           ],
  2371.           "table": "_is_generic_admin_media_objects",
  2372.           "timeColumn": "date_of_creation",
  2373.           "timeColumnType": "timestamp",
  2374.           "where": [
  2375.             {
  2376.               "name": "$__timeFilter",
  2377.               "params": [],
  2378.               "type": "macro"
  2379.             }
  2380.           ]
  2381.         }
  2382.       ],
  2383.       "title": "Charge Limit",
  2384.       "type": "stat"
  2385.     },
  2386.     {
  2387.       "datasource": {
  2388.         "type": "mysql",
  2389.         "uid": "BjbJE3u7z"
  2390.       },
  2391.       "fieldConfig": {
  2392.         "defaults": {
  2393.           "color": {
  2394.             "mode": "thresholds"
  2395.           },
  2396.           "mappings": [
  2397.             {
  2398.               "options": {
  2399.                 "from": -99999,
  2400.                 "result": {
  2401.                   "color": "red",
  2402.                   "index": 0
  2403.                 },
  2404.                 "to": 0
  2405.               },
  2406.               "type": "range"
  2407.             }
  2408.           ],
  2409.           "thresholds": {
  2410.             "mode": "absolute",
  2411.             "steps": [
  2412.               {
  2413.                 "color": "green",
  2414.                 "value": null
  2415.               }
  2416.             ]
  2417.           },
  2418.           "unit": "amp"
  2419.         },
  2420.         "overrides": []
  2421.       },
  2422.       "gridPos": {
  2423.         "h": 2,
  2424.         "w": 2,
  2425.         "x": 4,
  2426.         "y": 17
  2427.       },
  2428.       "id": 123199,
  2429.       "options": {
  2430.         "colorMode": "value",
  2431.         "graphMode": "area",
  2432.         "justifyMode": "auto",
  2433.         "orientation": "auto",
  2434.         "reduceOptions": {
  2435.           "calcs": [
  2436.             "lastNotNull"
  2437.           ],
  2438.           "fields": "/^battery_discharge_limit$/",
  2439.           "values": false
  2440.         },
  2441.         "text": {},
  2442.         "textMode": "auto"
  2443.       },
  2444.       "pluginVersion": "10.2.0",
  2445.       "targets": [
  2446.         {
  2447.           "datasource": {
  2448.             "type": "mysql",
  2449.             "uid": "BjbJE3u7z"
  2450.           },
  2451.           "format": "time_series",
  2452.           "group": [],
  2453.           "metricColumn": "none",
  2454.           "rawQuery": true,
  2455.           "rawSql": "SELECT\n  UNIX_TIMESTAMP(log_date) AS \"time\",\n  battery_discharge_limit AS battery_discharge_limit\nFROM pv_inverter_record\nWHERE\n  $__timeFilter(log_date)\nORDER BY log_date ASC",
  2456.           "refId": "A",
  2457.           "select": [
  2458.             [
  2459.               {
  2460.                 "params": [
  2461.                   "id"
  2462.                 ],
  2463.                 "type": "column"
  2464.               }
  2465.             ]
  2466.           ],
  2467.           "table": "_is_generic_admin_media_objects",
  2468.           "timeColumn": "date_of_creation",
  2469.           "timeColumnType": "timestamp",
  2470.           "where": [
  2471.             {
  2472.               "name": "$__timeFilter",
  2473.               "params": [],
  2474.               "type": "macro"
  2475.             }
  2476.           ]
  2477.         }
  2478.       ],
  2479.       "title": "Discharge Limit",
  2480.       "type": "stat"
  2481.     },
  2482.     {
  2483.       "datasource": {
  2484.         "type": "mysql",
  2485.         "uid": "BjbJE3u7z"
  2486.       },
  2487.       "fieldConfig": {
  2488.         "defaults": {
  2489.           "color": {
  2490.             "mode": "palette-classic"
  2491.           },
  2492.           "custom": {
  2493.             "axisBorderShow": false,
  2494.             "axisCenteredZero": false,
  2495.             "axisColorMode": "text",
  2496.             "axisLabel": "",
  2497.             "axisPlacement": "auto",
  2498.             "axisSoftMax": 100,
  2499.             "barAlignment": 0,
  2500.             "drawStyle": "line",
  2501.             "fillOpacity": 0,
  2502.             "gradientMode": "none",
  2503.             "hideFrom": {
  2504.               "legend": false,
  2505.               "tooltip": false,
  2506.               "viz": false
  2507.             },
  2508.             "insertNulls": false,
  2509.             "lineInterpolation": "linear",
  2510.             "lineWidth": 1,
  2511.             "pointSize": 5,
  2512.             "scaleDistribution": {
  2513.               "type": "linear"
  2514.             },
  2515.             "showPoints": "auto",
  2516.             "spanNulls": false,
  2517.             "stacking": {
  2518.               "group": "A",
  2519.               "mode": "none"
  2520.             },
  2521.             "thresholdsStyle": {
  2522.               "mode": "line"
  2523.             }
  2524.           },
  2525.           "mappings": [],
  2526.           "thresholds": {
  2527.             "mode": "absolute",
  2528.             "steps": [
  2529.               {
  2530.                 "color": "green",
  2531.                 "value": null
  2532.               },
  2533.               {
  2534.                 "color": "#ffffff",
  2535.                 "value": 0
  2536.               }
  2537.             ]
  2538.           },
  2539.           "unit": "percent"
  2540.         },
  2541.         "overrides": []
  2542.       },
  2543.       "gridPos": {
  2544.         "h": 8,
  2545.         "w": 12,
  2546.         "x": 12,
  2547.         "y": 17
  2548.       },
  2549.       "id": 123177,
  2550.       "options": {
  2551.         "legend": {
  2552.           "calcs": [
  2553.             "last",
  2554.             "min",
  2555.             "max"
  2556.           ],
  2557.           "displayMode": "list",
  2558.           "placement": "right",
  2559.           "showLegend": false
  2560.         },
  2561.         "tooltip": {
  2562.           "mode": "multi",
  2563.           "sort": "desc"
  2564.         }
  2565.       },
  2566.       "targets": [
  2567.         {
  2568.           "datasource": {
  2569.             "type": "mysql",
  2570.             "uid": "BjbJE3u7z"
  2571.           },
  2572.           "editorMode": "code",
  2573.           "format": "time_series",
  2574.           "group": [],
  2575.           "metricColumn": "none",
  2576.           "rawQuery": true,
  2577.           "rawSql": "SELECT\n  UNIX_TIMESTAMP(log_date) AS \"time\",\n  battery_soc as soc\nFROM pv_inverter_record\nWHERE\n  $__timeFilter(log_date)\n  AND pv_inverter_id = $pv_inverter_id \nORDER BY log_date",
  2578.           "refId": "A",
  2579.           "select": [
  2580.             [
  2581.               {
  2582.                 "params": [
  2583.                   "id"
  2584.                 ],
  2585.                 "type": "column"
  2586.               }
  2587.             ]
  2588.           ],
  2589.           "sql": {
  2590.             "columns": [
  2591.               {
  2592.                 "parameters": [],
  2593.                 "type": "function"
  2594.               }
  2595.             ],
  2596.             "groupBy": [
  2597.               {
  2598.                 "property": {
  2599.                   "type": "string"
  2600.                 },
  2601.                 "type": "groupBy"
  2602.               }
  2603.             ],
  2604.             "limit": 50
  2605.           },
  2606.           "table": "_is_generic_admin_media_objects",
  2607.           "timeColumn": "date_of_creation",
  2608.           "timeColumnType": "timestamp",
  2609.           "where": [
  2610.             {
  2611.               "name": "$__timeFilter",
  2612.               "params": [],
  2613.               "type": "macro"
  2614.             }
  2615.           ]
  2616.         }
  2617.       ],
  2618.       "title": "Battery SOC",
  2619.       "type": "timeseries"
  2620.     },
  2621.     {
  2622.       "datasource": {
  2623.         "type": "mysql",
  2624.         "uid": "BjbJE3u7z"
  2625.       },
  2626.       "fieldConfig": {
  2627.         "defaults": {
  2628.           "color": {
  2629.             "mode": "thresholds"
  2630.           },
  2631.           "mappings": [
  2632.             {
  2633.               "options": {
  2634.                 "from": -99999,
  2635.                 "result": {
  2636.                   "color": "red",
  2637.                   "index": 0
  2638.                 },
  2639.                 "to": 0
  2640.               },
  2641.               "type": "range"
  2642.             }
  2643.           ],
  2644.           "max": 100,
  2645.           "min": 0,
  2646.           "thresholds": {
  2647.             "mode": "absolute",
  2648.             "steps": [
  2649.               {
  2650.                 "color": "green",
  2651.                 "value": null
  2652.               }
  2653.             ]
  2654.           },
  2655.           "unit": "percent"
  2656.         },
  2657.         "overrides": []
  2658.       },
  2659.       "gridPos": {
  2660.         "h": 4,
  2661.         "w": 3,
  2662.         "x": 6,
  2663.         "y": 18
  2664.       },
  2665.       "id": 123189,
  2666.       "options": {
  2667.         "colorMode": "value",
  2668.         "graphMode": "area",
  2669.         "justifyMode": "auto",
  2670.         "orientation": "auto",
  2671.         "reduceOptions": {
  2672.           "calcs": [
  2673.             "lastNotNull"
  2674.           ],
  2675.           "fields": "/^backup_ups_load$/",
  2676.           "values": false
  2677.         },
  2678.         "text": {},
  2679.         "textMode": "auto"
  2680.       },
  2681.       "pluginVersion": "10.2.0",
  2682.       "targets": [
  2683.         {
  2684.           "datasource": {
  2685.             "type": "mysql",
  2686.             "uid": "BjbJE3u7z"
  2687.           },
  2688.           "editorMode": "code",
  2689.           "format": "time_series",
  2690.           "group": [],
  2691.           "metricColumn": "none",
  2692.           "rawQuery": true,
  2693.           "rawSql": "SELECT\n  UNIX_TIMESTAMP(log_date) AS \"time\",\n  backup_ups_load\nFROM pv_inverter_record\nWHERE\n  $__timeFilter(log_date)\n  AND pv_inverter_id = $pv_inverter_id \nORDER BY log_date ASC",
  2694.           "refId": "A",
  2695.           "select": [
  2696.             [
  2697.               {
  2698.                 "params": [
  2699.                   "id"
  2700.                 ],
  2701.                 "type": "column"
  2702.               }
  2703.             ]
  2704.           ],
  2705.           "sql": {
  2706.             "columns": [
  2707.               {
  2708.                 "parameters": [],
  2709.                 "type": "function"
  2710.               }
  2711.             ],
  2712.             "groupBy": [
  2713.               {
  2714.                 "property": {
  2715.                   "type": "string"
  2716.                 },
  2717.                 "type": "groupBy"
  2718.               }
  2719.             ],
  2720.             "limit": 50
  2721.           },
  2722.           "table": "_is_generic_admin_media_objects",
  2723.           "timeColumn": "date_of_creation",
  2724.           "timeColumnType": "timestamp",
  2725.           "where": [
  2726.             {
  2727.               "name": "$__timeFilter",
  2728.               "params": [],
  2729.               "type": "macro"
  2730.             }
  2731.           ]
  2732.         }
  2733.       ],
  2734.       "title": "UPS Load",
  2735.       "type": "stat"
  2736.     },
  2737.     {
  2738.       "datasource": {
  2739.         "type": "mysql",
  2740.         "uid": "BjbJE3u7z"
  2741.       },
  2742.       "fieldConfig": {
  2743.         "defaults": {
  2744.           "color": {
  2745.             "mode": "thresholds"
  2746.           },
  2747.           "mappings": [
  2748.             {
  2749.               "options": {
  2750.                 "from": -99999,
  2751.                 "result": {
  2752.                   "color": "red",
  2753.                   "index": 0
  2754.                 },
  2755.                 "to": 0
  2756.               },
  2757.               "type": "range"
  2758.             }
  2759.           ],
  2760.           "thresholds": {
  2761.             "mode": "absolute",
  2762.             "steps": [
  2763.               {
  2764.                 "color": "green",
  2765.                 "value": null
  2766.               }
  2767.             ]
  2768.           },
  2769.           "unit": "watt"
  2770.         },
  2771.         "overrides": []
  2772.       },
  2773.       "gridPos": {
  2774.         "h": 4,
  2775.         "w": 3,
  2776.         "x": 9,
  2777.         "y": 18
  2778.       },
  2779.       "id": 123190,
  2780.       "options": {
  2781.         "colorMode": "value",
  2782.         "graphMode": "area",
  2783.         "justifyMode": "auto",
  2784.         "orientation": "auto",
  2785.         "reduceOptions": {
  2786.           "calcs": [
  2787.             "lastNotNull"
  2788.           ],
  2789.           "fields": "/^power$/",
  2790.           "values": false
  2791.         },
  2792.         "text": {},
  2793.         "textMode": "auto"
  2794.       },
  2795.       "pluginVersion": "10.2.0",
  2796.       "targets": [
  2797.         {
  2798.           "datasource": {
  2799.             "type": "mysql",
  2800.             "uid": "BjbJE3u7z"
  2801.           },
  2802.           "editorMode": "code",
  2803.           "format": "time_series",
  2804.           "group": [],
  2805.           "metricColumn": "none",
  2806.           "rawQuery": true,
  2807.           "rawSql": "SELECT\n  UNIX_TIMESTAMP(log_date) AS \"time\",\n  backup_ptotal AS power\nFROM pv_inverter_record\nWHERE\n  $__timeFilter(log_date)\n  AND pv_inverter_id = $pv_inverter_id \nORDER BY log_date ASC",
  2808.           "refId": "A",
  2809.           "select": [
  2810.             [
  2811.               {
  2812.                 "params": [
  2813.                   "id"
  2814.                 ],
  2815.                 "type": "column"
  2816.               }
  2817.             ]
  2818.           ],
  2819.           "sql": {
  2820.             "columns": [
  2821.               {
  2822.                 "parameters": [],
  2823.                 "type": "function"
  2824.               }
  2825.             ],
  2826.             "groupBy": [
  2827.               {
  2828.                 "property": {
  2829.                   "type": "string"
  2830.                 },
  2831.                 "type": "groupBy"
  2832.               }
  2833.             ],
  2834.             "limit": 50
  2835.           },
  2836.           "table": "_is_generic_admin_media_objects",
  2837.           "timeColumn": "date_of_creation",
  2838.           "timeColumnType": "timestamp",
  2839.           "where": [
  2840.             {
  2841.               "name": "$__timeFilter",
  2842.               "params": [],
  2843.               "type": "macro"
  2844.             }
  2845.           ]
  2846.         }
  2847.       ],
  2848.       "title": "UPS Load Power",
  2849.       "type": "stat"
  2850.     },
  2851.     {
  2852.       "datasource": {
  2853.         "type": "mysql",
  2854.         "uid": "BjbJE3u7z"
  2855.       },
  2856.       "fieldConfig": {
  2857.         "defaults": {
  2858.           "color": {
  2859.             "mode": "thresholds"
  2860.           },
  2861.           "mappings": [],
  2862.           "thresholds": {
  2863.             "mode": "absolute",
  2864.             "steps": [
  2865.               {
  2866.                 "color": "green",
  2867.                 "value": null
  2868.               }
  2869.             ]
  2870.           },
  2871.           "unit": "volt"
  2872.         },
  2873.         "overrides": []
  2874.       },
  2875.       "gridPos": {
  2876.         "h": 3,
  2877.         "w": 2,
  2878.         "x": 0,
  2879.         "y": 19
  2880.       },
  2881.       "id": 123158,
  2882.       "options": {
  2883.         "colorMode": "background",
  2884.         "graphMode": "none",
  2885.         "justifyMode": "auto",
  2886.         "orientation": "horizontal",
  2887.         "reduceOptions": {
  2888.           "calcs": [
  2889.             "lastNotNull"
  2890.           ],
  2891.           "fields": "/^voltage$/",
  2892.           "values": false
  2893.         },
  2894.         "text": {
  2895.           "valueSize": 40
  2896.         },
  2897.         "textMode": "auto"
  2898.       },
  2899.       "pluginVersion": "10.2.0",
  2900.       "targets": [
  2901.         {
  2902.           "datasource": {
  2903.             "type": "mysql",
  2904.             "uid": "BjbJE3u7z"
  2905.           },
  2906.           "editorMode": "code",
  2907.           "format": "time_series",
  2908.           "group": [],
  2909.           "metricColumn": "none",
  2910.           "rawQuery": true,
  2911.           "rawSql": "SELECT\n  UNIX_TIMESTAMP(log_date) AS \"time\",\n  battery_vbattery1 AS voltage\nFROM pv_inverter_record\nWHERE\n  $__timeFilter(log_date)\n  AND pv_inverter_id = 1\nORDER BY log_date DESC\nLIMIT 1",
  2912.           "refId": "A",
  2913.           "select": [
  2914.             [
  2915.               {
  2916.                 "params": [
  2917.                   "id"
  2918.                 ],
  2919.                 "type": "column"
  2920.               }
  2921.             ]
  2922.           ],
  2923.           "sql": {
  2924.             "columns": [
  2925.               {
  2926.                 "parameters": [],
  2927.                 "type": "function"
  2928.               }
  2929.             ],
  2930.             "groupBy": [
  2931.               {
  2932.                 "property": {
  2933.                   "type": "string"
  2934.                 },
  2935.                 "type": "groupBy"
  2936.               }
  2937.             ],
  2938.             "limit": 50
  2939.           },
  2940.           "table": "_is_generic_admin_media_objects",
  2941.           "timeColumn": "date_of_creation",
  2942.           "timeColumnType": "timestamp",
  2943.           "where": [
  2944.             {
  2945.               "name": "$__timeFilter",
  2946.               "params": [],
  2947.               "type": "macro"
  2948.             }
  2949.           ]
  2950.         }
  2951.       ],
  2952.       "title": "Battery Voltage",
  2953.       "type": "stat"
  2954.     },
  2955.     {
  2956.       "datasource": {
  2957.         "type": "mysql",
  2958.         "uid": "BjbJE3u7z"
  2959.       },
  2960.       "fieldConfig": {
  2961.         "defaults": {
  2962.           "color": {
  2963.             "mode": "thresholds"
  2964.           },
  2965.           "mappings": [
  2966.             {
  2967.               "options": {
  2968.                 "from": -9999,
  2969.                 "result": {
  2970.                   "color": "semi-dark-red",
  2971.                   "index": 0
  2972.                 },
  2973.                 "to": 0
  2974.               },
  2975.               "type": "range"
  2976.             }
  2977.           ],
  2978.           "thresholds": {
  2979.             "mode": "absolute",
  2980.             "steps": [
  2981.               {
  2982.                 "color": "green",
  2983.                 "value": null
  2984.               }
  2985.             ]
  2986.           },
  2987.           "unit": "amp"
  2988.         },
  2989.         "overrides": []
  2990.       },
  2991.       "gridPos": {
  2992.         "h": 3,
  2993.         "w": 2,
  2994.         "x": 2,
  2995.         "y": 19
  2996.       },
  2997.       "id": 123159,
  2998.       "options": {
  2999.         "colorMode": "background",
  3000.         "graphMode": "none",
  3001.         "justifyMode": "auto",
  3002.         "orientation": "horizontal",
  3003.         "reduceOptions": {
  3004.           "calcs": [
  3005.             "lastNotNull"
  3006.           ],
  3007.           "fields": "/^current$/",
  3008.           "values": false
  3009.         },
  3010.         "text": {
  3011.           "valueSize": 40
  3012.         },
  3013.         "textMode": "auto"
  3014.       },
  3015.       "pluginVersion": "10.2.0",
  3016.       "targets": [
  3017.         {
  3018.           "datasource": {
  3019.             "type": "mysql",
  3020.             "uid": "BjbJE3u7z"
  3021.           },
  3022.           "editorMode": "code",
  3023.           "format": "time_series",
  3024.           "group": [],
  3025.           "metricColumn": "none",
  3026.           "rawQuery": true,
  3027.           "rawSql": "SELECT\n  UNIX_TIMESTAMP(log_date) AS \"time\",\n  battery_ibattery1*-1 AS current\nFROM pv_inverter_record\nWHERE\n  $__timeFilter(log_date)\n  AND pv_inverter_id = 1\nORDER BY log_date DESC\nLIMIT 1",
  3028.           "refId": "A",
  3029.           "select": [
  3030.             [
  3031.               {
  3032.                 "params": [
  3033.                   "id"
  3034.                 ],
  3035.                 "type": "column"
  3036.               }
  3037.             ]
  3038.           ],
  3039.           "sql": {
  3040.             "columns": [
  3041.               {
  3042.                 "parameters": [],
  3043.                 "type": "function"
  3044.               }
  3045.             ],
  3046.             "groupBy": [
  3047.               {
  3048.                 "property": {
  3049.                   "type": "string"
  3050.                 },
  3051.                 "type": "groupBy"
  3052.               }
  3053.             ],
  3054.             "limit": 50
  3055.           },
  3056.           "table": "_is_generic_admin_media_objects",
  3057.           "timeColumn": "date_of_creation",
  3058.           "timeColumnType": "timestamp",
  3059.           "where": [
  3060.             {
  3061.               "name": "$__timeFilter",
  3062.               "params": [],
  3063.               "type": "macro"
  3064.             }
  3065.           ]
  3066.         }
  3067.       ],
  3068.       "title": "Battery Current",
  3069.       "type": "stat"
  3070.     },
  3071.     {
  3072.       "datasource": {
  3073.         "type": "mysql",
  3074.         "uid": "BjbJE3u7z"
  3075.       },
  3076.       "fieldConfig": {
  3077.         "defaults": {
  3078.           "color": {
  3079.             "mode": "thresholds"
  3080.           },
  3081.           "mappings": [
  3082.             {
  3083.               "options": {
  3084.                 "from": -9999,
  3085.                 "result": {
  3086.                   "color": "semi-dark-red",
  3087.                   "index": 0
  3088.                 },
  3089.                 "to": 0
  3090.               },
  3091.               "type": "range"
  3092.             }
  3093.           ],
  3094.           "thresholds": {
  3095.             "mode": "absolute",
  3096.             "steps": [
  3097.               {
  3098.                 "color": "green",
  3099.                 "value": null
  3100.               }
  3101.             ]
  3102.           },
  3103.           "unit": "kwatt"
  3104.         },
  3105.         "overrides": []
  3106.       },
  3107.       "gridPos": {
  3108.         "h": 3,
  3109.         "w": 2,
  3110.         "x": 4,
  3111.         "y": 19
  3112.       },
  3113.       "id": 123207,
  3114.       "options": {
  3115.         "colorMode": "background",
  3116.         "graphMode": "none",
  3117.         "justifyMode": "auto",
  3118.         "orientation": "horizontal",
  3119.         "reduceOptions": {
  3120.           "calcs": [
  3121.             "lastNotNull"
  3122.           ],
  3123.           "fields": "/^power$/",
  3124.           "values": false
  3125.         },
  3126.         "text": {
  3127.           "valueSize": 40
  3128.         },
  3129.         "textMode": "auto"
  3130.       },
  3131.       "pluginVersion": "10.2.0",
  3132.       "targets": [
  3133.         {
  3134.           "datasource": {
  3135.             "type": "mysql",
  3136.             "uid": "BjbJE3u7z"
  3137.           },
  3138.           "editorMode": "code",
  3139.           "format": "time_series",
  3140.           "group": [],
  3141.           "metricColumn": "none",
  3142.           "rawQuery": true,
  3143.           "rawSql": "SELECT\n  UNIX_TIMESTAMP(log_date) AS \"time\",\n  battery_pbattery1*-1/1000 AS power\nFROM pv_inverter_record\nWHERE\n  $__timeFilter(log_date)\n  AND pv_inverter_id = 1\nORDER BY log_date DESC\nLIMIT 1",
  3144.           "refId": "A",
  3145.           "select": [
  3146.             [
  3147.               {
  3148.                 "params": [
  3149.                   "id"
  3150.                 ],
  3151.                 "type": "column"
  3152.               }
  3153.             ]
  3154.           ],
  3155.           "sql": {
  3156.             "columns": [
  3157.               {
  3158.                 "parameters": [],
  3159.                 "type": "function"
  3160.               }
  3161.             ],
  3162.             "groupBy": [
  3163.               {
  3164.                 "property": {
  3165.                   "type": "string"
  3166.                 },
  3167.                 "type": "groupBy"
  3168.               }
  3169.             ],
  3170.             "limit": 50
  3171.           },
  3172.           "table": "_is_generic_admin_media_objects",
  3173.           "timeColumn": "date_of_creation",
  3174.           "timeColumnType": "timestamp",
  3175.           "where": [
  3176.             {
  3177.               "name": "$__timeFilter",
  3178.               "params": [],
  3179.               "type": "macro"
  3180.             }
  3181.           ]
  3182.         }
  3183.       ],
  3184.       "title": "Battery Power",
  3185.       "type": "stat"
  3186.     },
  3187.     {
  3188.       "datasource": {
  3189.         "type": "mysql",
  3190.         "uid": "BjbJE3u7z"
  3191.       },
  3192.       "fieldConfig": {
  3193.         "defaults": {
  3194.           "color": {
  3195.             "mode": "thresholds"
  3196.           },
  3197.           "custom": {
  3198.             "fillOpacity": 64,
  3199.             "hideFrom": {
  3200.               "legend": false,
  3201.               "tooltip": false,
  3202.               "viz": false
  3203.             },
  3204.             "insertNulls": false,
  3205.             "lineWidth": 0,
  3206.             "spanNulls": false
  3207.           },
  3208.           "mappings": [
  3209.             {
  3210.               "options": {
  3211.                 "Charge": {
  3212.                   "color": "semi-dark-green",
  3213.                   "index": 0
  3214.                 },
  3215.                 "Discharge": {
  3216.                   "color": "semi-dark-red",
  3217.                   "index": 1
  3218.                 }
  3219.               },
  3220.               "type": "value"
  3221.             }
  3222.           ],
  3223.           "thresholds": {
  3224.             "mode": "absolute",
  3225.             "steps": [
  3226.               {
  3227.                 "color": "green",
  3228.                 "value": null
  3229.               },
  3230.               {
  3231.                 "color": "red",
  3232.                 "value": 80
  3233.               }
  3234.             ]
  3235.           }
  3236.         },
  3237.         "overrides": []
  3238.       },
  3239.       "gridPos": {
  3240.         "h": 4,
  3241.         "w": 6,
  3242.         "x": 0,
  3243.         "y": 22
  3244.       },
  3245.       "id": 123147,
  3246.       "options": {
  3247.         "alignValue": "center",
  3248.         "legend": {
  3249.           "displayMode": "list",
  3250.           "placement": "bottom",
  3251.           "showLegend": false
  3252.         },
  3253.         "mergeValues": true,
  3254.         "rowHeight": 1,
  3255.         "showValue": "auto",
  3256.         "tooltip": {
  3257.           "mode": "single",
  3258.           "sort": "none"
  3259.         }
  3260.       },
  3261.       "targets": [
  3262.         {
  3263.           "datasource": {
  3264.             "type": "mysql",
  3265.             "uid": "BjbJE3u7z"
  3266.           },
  3267.           "editorMode": "code",
  3268.           "format": "time_series",
  3269.           "group": [],
  3270.           "metricColumn": "none",
  3271.           "rawQuery": true,
  3272.           "rawSql": "SELECT\n  UNIX_TIMESTAMP(log_date) AS \"time\",\n  battery_mode_label AS mode\nFROM (\n  select *, @e prev, @e:=battery_mode_label\n  from pv_inverter_record, (select @e:='') e\n  WHERE\n    $__timeFilter(log_date)\n    AND pv_inverter_id = 1\n) t\nWHERE\n  prev <> battery_mode_label COLLATE utf8_general_ci\nORDER BY log_date\n",
  3273.           "refId": "A",
  3274.           "select": [
  3275.             [
  3276.               {
  3277.                 "params": [
  3278.                   "id"
  3279.                 ],
  3280.                 "type": "column"
  3281.               }
  3282.             ]
  3283.           ],
  3284.           "sql": {
  3285.             "columns": [
  3286.               {
  3287.                 "parameters": [],
  3288.                 "type": "function"
  3289.               }
  3290.             ],
  3291.             "groupBy": [
  3292.               {
  3293.                 "property": {
  3294.                   "type": "string"
  3295.                 },
  3296.                 "type": "groupBy"
  3297.               }
  3298.             ],
  3299.             "limit": 50
  3300.           },
  3301.           "table": "_is_generic_admin_media_objects",
  3302.           "timeColumn": "date_of_creation",
  3303.           "timeColumnType": "timestamp",
  3304.           "where": [
  3305.             {
  3306.               "name": "$__timeFilter",
  3307.               "params": [],
  3308.               "type": "macro"
  3309.             }
  3310.           ]
  3311.         }
  3312.       ],
  3313.       "title": "Battery Mode",
  3314.       "type": "state-timeline"
  3315.     },
  3316.     {
  3317.       "datasource": {
  3318.         "type": "mysql",
  3319.         "uid": "BjbJE3u7z"
  3320.       },
  3321.       "fieldConfig": {
  3322.         "defaults": {
  3323.           "color": {
  3324.             "mode": "palette-classic"
  3325.           },
  3326.           "custom": {
  3327.             "axisBorderShow": false,
  3328.             "axisCenteredZero": false,
  3329.             "axisColorMode": "text",
  3330.             "axisLabel": "",
  3331.             "axisPlacement": "auto",
  3332.             "barAlignment": 0,
  3333.             "drawStyle": "line",
  3334.             "fillOpacity": 0,
  3335.             "gradientMode": "none",
  3336.             "hideFrom": {
  3337.               "legend": false,
  3338.               "tooltip": false,
  3339.               "viz": false
  3340.             },
  3341.             "insertNulls": false,
  3342.             "lineInterpolation": "linear",
  3343.             "lineWidth": 1,
  3344.             "pointSize": 5,
  3345.             "scaleDistribution": {
  3346.               "type": "linear"
  3347.             },
  3348.             "showPoints": "auto",
  3349.             "spanNulls": false,
  3350.             "stacking": {
  3351.               "group": "A",
  3352.               "mode": "none"
  3353.             },
  3354.             "thresholdsStyle": {
  3355.               "mode": "line"
  3356.             }
  3357.           },
  3358.           "mappings": [],
  3359.           "thresholds": {
  3360.             "mode": "absolute",
  3361.             "steps": [
  3362.               {
  3363.                 "color": "green",
  3364.                 "value": null
  3365.               },
  3366.               {
  3367.                 "color": "red",
  3368.                 "value": 60
  3369.               }
  3370.             ]
  3371.           },
  3372.           "unit": "celsius"
  3373.         },
  3374.         "overrides": []
  3375.       },
  3376.       "gridPos": {
  3377.         "h": 8,
  3378.         "w": 4,
  3379.         "x": 6,
  3380.         "y": 22
  3381.       },
  3382.       "id": 123139,
  3383.       "options": {
  3384.         "legend": {
  3385.           "calcs": [
  3386.             "mean",
  3387.             "last"
  3388.           ],
  3389.           "displayMode": "table",
  3390.           "placement": "bottom",
  3391.           "showLegend": true
  3392.         },
  3393.         "tooltip": {
  3394.           "mode": "multi",
  3395.           "sort": "desc"
  3396.         }
  3397.       },
  3398.       "targets": [
  3399.         {
  3400.           "datasource": {
  3401.             "type": "mysql",
  3402.             "uid": "BjbJE3u7z"
  3403.           },
  3404.           "editorMode": "code",
  3405.           "format": "time_series",
  3406.           "group": [],
  3407.           "metricColumn": "none",
  3408.           "rawQuery": true,
  3409.           "rawSql": "SELECT\n  UNIX_TIMESTAMP(log_date) AS \"time\",\n  temperature_air AS air_temperature, temperature AS inverter_radiator_temperature, battery_temperature\nFROM pv_inverter_record\nWHERE\n  $__timeFilter(log_date)\n  AND pv_inverter_id = $pv_inverter_id \nORDER BY log_date",
  3410.           "refId": "A",
  3411.           "select": [
  3412.             [
  3413.               {
  3414.                 "params": [
  3415.                   "id"
  3416.                 ],
  3417.                 "type": "column"
  3418.               }
  3419.             ]
  3420.           ],
  3421.           "sql": {
  3422.             "columns": [
  3423.               {
  3424.                 "parameters": [],
  3425.                 "type": "function"
  3426.               }
  3427.             ],
  3428.             "groupBy": [
  3429.               {
  3430.                 "property": {
  3431.                   "type": "string"
  3432.                 },
  3433.                 "type": "groupBy"
  3434.               }
  3435.             ],
  3436.             "limit": 50
  3437.           },
  3438.           "table": "_is_generic_admin_media_objects",
  3439.           "timeColumn": "date_of_creation",
  3440.           "timeColumnType": "timestamp",
  3441.           "where": [
  3442.             {
  3443.               "name": "$__timeFilter",
  3444.               "params": [],
  3445.               "type": "macro"
  3446.             }
  3447.           ]
  3448.         }
  3449.       ],
  3450.       "title": "PV Temperature",
  3451.       "type": "timeseries"
  3452.     },
  3453.     {
  3454.       "datasource": {
  3455.         "type": "mysql",
  3456.         "uid": "BjbJE3u7z"
  3457.       },
  3458.       "fieldConfig": {
  3459.         "defaults": {
  3460.           "color": {
  3461.             "mode": "thresholds"
  3462.           },
  3463.           "mappings": [],
  3464.           "min": 30,
  3465.           "thresholds": {
  3466.             "mode": "absolute",
  3467.             "steps": [
  3468.               {
  3469.                 "color": "green",
  3470.                 "value": null
  3471.               },
  3472.               {
  3473.                 "color": "#EAB839",
  3474.                 "value": 40
  3475.               },
  3476.               {
  3477.                 "color": "red",
  3478.                 "value": 50
  3479.               }
  3480.             ]
  3481.           },
  3482.           "unit": "celsius"
  3483.         },
  3484.         "overrides": []
  3485.       },
  3486.       "gridPos": {
  3487.         "h": 4,
  3488.         "w": 2,
  3489.         "x": 10,
  3490.         "y": 22
  3491.       },
  3492.       "id": 123171,
  3493.       "options": {
  3494.         "colorMode": "background",
  3495.         "graphMode": "area",
  3496.         "justifyMode": "auto",
  3497.         "orientation": "horizontal",
  3498.         "reduceOptions": {
  3499.           "calcs": [
  3500.             "lastNotNull"
  3501.           ],
  3502.           "fields": "/^temperature$/",
  3503.           "values": false
  3504.         },
  3505.         "text": {
  3506.           "valueSize": 40
  3507.         },
  3508.         "textMode": "auto"
  3509.       },
  3510.       "pluginVersion": "10.2.0",
  3511.       "targets": [
  3512.         {
  3513.           "datasource": {
  3514.             "type": "mysql",
  3515.             "uid": "BjbJE3u7z"
  3516.           },
  3517.           "editorMode": "code",
  3518.           "format": "time_series",
  3519.           "group": [],
  3520.           "metricColumn": "none",
  3521.           "rawQuery": true,
  3522.           "rawSql": "SELECT\n  UNIX_TIMESTAMP(log_date) AS \"time\",\n  temperature\nFROM pv_inverter_record\nWHERE\n  $__timeFilter(log_date)\n  AND pv_inverter_id = $pv_inverter_id \nORDER BY log_date ASC",
  3523.           "refId": "A",
  3524.           "select": [
  3525.             [
  3526.               {
  3527.                 "params": [
  3528.                   "id"
  3529.                 ],
  3530.                 "type": "column"
  3531.               }
  3532.             ]
  3533.           ],
  3534.           "sql": {
  3535.             "columns": [
  3536.               {
  3537.                 "parameters": [],
  3538.                 "type": "function"
  3539.               }
  3540.             ],
  3541.             "groupBy": [
  3542.               {
  3543.                 "property": {
  3544.                   "type": "string"
  3545.                 },
  3546.                 "type": "groupBy"
  3547.               }
  3548.             ],
  3549.             "limit": 50
  3550.           },
  3551.           "table": "_is_generic_admin_media_objects",
  3552.           "timeColumn": "date_of_creation",
  3553.           "timeColumnType": "timestamp",
  3554.           "where": [
  3555.             {
  3556.               "name": "$__timeFilter",
  3557.               "params": [],
  3558.               "type": "macro"
  3559.             }
  3560.           ]
  3561.         }
  3562.       ],
  3563.       "title": "Inverter Temperature",
  3564.       "type": "stat"
  3565.     },
  3566.     {
  3567.       "datasource": {
  3568.         "type": "mysql",
  3569.         "uid": "BjbJE3u7z"
  3570.       },
  3571.       "fieldConfig": {
  3572.         "defaults": {
  3573.           "color": {
  3574.             "mode": "palette-classic"
  3575.           },
  3576.           "custom": {
  3577.             "axisBorderShow": false,
  3578.             "axisCenteredZero": false,
  3579.             "axisColorMode": "text",
  3580.             "axisLabel": "",
  3581.             "axisPlacement": "auto",
  3582.             "barAlignment": 0,
  3583.             "drawStyle": "line",
  3584.             "fillOpacity": 0,
  3585.             "gradientMode": "none",
  3586.             "hideFrom": {
  3587.               "legend": false,
  3588.               "tooltip": false,
  3589.               "viz": false
  3590.             },
  3591.             "insertNulls": false,
  3592.             "lineInterpolation": "linear",
  3593.             "lineWidth": 1,
  3594.             "pointSize": 5,
  3595.             "scaleDistribution": {
  3596.               "type": "linear"
  3597.             },
  3598.             "showPoints": "auto",
  3599.             "spanNulls": false,
  3600.             "stacking": {
  3601.               "group": "A",
  3602.               "mode": "none"
  3603.             },
  3604.             "thresholdsStyle": {
  3605.               "mode": "line"
  3606.             }
  3607.           },
  3608.           "mappings": [],
  3609.           "thresholds": {
  3610.             "mode": "absolute",
  3611.             "steps": [
  3612.               {
  3613.                 "color": "green",
  3614.                 "value": null
  3615.               },
  3616.               {
  3617.                 "color": "dark-red",
  3618.                 "value": 360
  3619.               },
  3620.               {
  3621.                 "color": "yellow",
  3622.                 "value": 422
  3623.               },
  3624.               {
  3625.                 "color": "dark-red",
  3626.                 "value": 432
  3627.               }
  3628.             ]
  3629.           },
  3630.           "unit": "volt"
  3631.         },
  3632.         "overrides": []
  3633.       },
  3634.       "gridPos": {
  3635.         "h": 9,
  3636.         "w": 12,
  3637.         "x": 12,
  3638.         "y": 25
  3639.       },
  3640.       "id": 123201,
  3641.       "options": {
  3642.         "legend": {
  3643.           "calcs": [
  3644.             "last",
  3645.             "min",
  3646.             "max"
  3647.           ],
  3648.           "displayMode": "table",
  3649.           "placement": "bottom",
  3650.           "showLegend": true
  3651.         },
  3652.         "tooltip": {
  3653.           "mode": "multi",
  3654.           "sort": "desc"
  3655.         }
  3656.       },
  3657.       "targets": [
  3658.         {
  3659.           "datasource": {
  3660.             "type": "mysql",
  3661.             "uid": "BjbJE3u7z"
  3662.           },
  3663.           "format": "time_series",
  3664.           "group": [],
  3665.           "metricColumn": "none",
  3666.           "rawQuery": true,
  3667.           "rawSql": "SELECT\n  UNIX_TIMESTAMP(log_date) AS \"time\",\n  min_cell_voltage as min_cell_voltage,\n  max_cell_voltage as max_cell_voltage\nFROM pv_battery_state_record\nWHERE\n  $__timeFilter(log_date)\nORDER BY log_date",
  3668.           "refId": "A",
  3669.           "select": [
  3670.             [
  3671.               {
  3672.                 "params": [
  3673.                   "id"
  3674.                 ],
  3675.                 "type": "column"
  3676.               }
  3677.             ]
  3678.           ],
  3679.           "table": "_is_generic_admin_media_objects",
  3680.           "timeColumn": "date_of_creation",
  3681.           "timeColumnType": "timestamp",
  3682.           "where": [
  3683.             {
  3684.               "name": "$__timeFilter",
  3685.               "params": [],
  3686.               "type": "macro"
  3687.             }
  3688.           ]
  3689.         }
  3690.       ],
  3691.       "title": "Battery Cells Voltage",
  3692.       "type": "timeseries"
  3693.     },
  3694.     {
  3695.       "datasource": {
  3696.         "type": "mysql",
  3697.         "uid": "BjbJE3u7z"
  3698.       },
  3699.       "fieldConfig": {
  3700.         "defaults": {
  3701.           "color": {
  3702.             "mode": "thresholds"
  3703.           },
  3704.           "custom": {
  3705.             "fillOpacity": 64,
  3706.             "hideFrom": {
  3707.               "legend": false,
  3708.               "tooltip": false,
  3709.               "viz": false
  3710.             },
  3711.             "insertNulls": false,
  3712.             "lineWidth": 0,
  3713.             "spanNulls": false
  3714.           },
  3715.           "mappings": [],
  3716.           "thresholds": {
  3717.             "mode": "absolute",
  3718.             "steps": [
  3719.               {
  3720.                 "color": "orange",
  3721.                 "value": null
  3722.               }
  3723.             ]
  3724.           }
  3725.         },
  3726.         "overrides": []
  3727.       },
  3728.       "gridPos": {
  3729.         "h": 4,
  3730.         "w": 6,
  3731.         "x": 0,
  3732.         "y": 26
  3733.       },
  3734.       "id": 123174,
  3735.       "options": {
  3736.         "alignValue": "center",
  3737.         "legend": {
  3738.           "displayMode": "list",
  3739.           "placement": "bottom",
  3740.           "showLegend": false
  3741.         },
  3742.         "mergeValues": true,
  3743.         "rowHeight": 1,
  3744.         "showValue": "auto",
  3745.         "tooltip": {
  3746.           "mode": "single",
  3747.           "sort": "none"
  3748.         }
  3749.       },
  3750.       "targets": [
  3751.         {
  3752.           "datasource": {
  3753.             "type": "mysql",
  3754.             "uid": "BjbJE3u7z"
  3755.           },
  3756.           "editorMode": "code",
  3757.           "format": "time_series",
  3758.           "group": [],
  3759.           "metricColumn": "none",
  3760.           "rawQuery": true,
  3761.           "rawSql": "SELECT\n  UNIX_TIMESTAMP(log_date) AS \"time\",\n  battery_warning AS battery_warning\nFROM (\n  select *, @e prev, @e:=battery_warning\n  from pv_inverter_record, (select @e:='') e\n  WHERE\n    $__timeFilter(log_date)\n    AND pv_inverter_id = 1\n) t\nWHERE\n  prev <> battery_warning COLLATE utf8_general_ci\nORDER BY log_date\n",
  3762.           "refId": "A",
  3763.           "select": [
  3764.             [
  3765.               {
  3766.                 "params": [
  3767.                   "id"
  3768.                 ],
  3769.                 "type": "column"
  3770.               }
  3771.             ]
  3772.           ],
  3773.           "sql": {
  3774.             "columns": [
  3775.               {
  3776.                 "parameters": [],
  3777.                 "type": "function"
  3778.               }
  3779.             ],
  3780.             "groupBy": [
  3781.               {
  3782.                 "property": {
  3783.                   "type": "string"
  3784.                 },
  3785.                 "type": "groupBy"
  3786.               }
  3787.             ],
  3788.             "limit": 50
  3789.           },
  3790.           "table": "_is_generic_admin_media_objects",
  3791.           "timeColumn": "date_of_creation",
  3792.           "timeColumnType": "timestamp",
  3793.           "where": [
  3794.             {
  3795.               "name": "$__timeFilter",
  3796.               "params": [],
  3797.               "type": "macro"
  3798.             }
  3799.           ]
  3800.         }
  3801.       ],
  3802.       "title": "Battery Errors",
  3803.       "type": "state-timeline"
  3804.     },
  3805.     {
  3806.       "datasource": {
  3807.         "type": "mysql",
  3808.         "uid": "BjbJE3u7z"
  3809.       },
  3810.       "fieldConfig": {
  3811.         "defaults": {
  3812.           "color": {
  3813.             "mode": "palette-classic"
  3814.           },
  3815.           "custom": {
  3816.             "axisBorderShow": false,
  3817.             "axisCenteredZero": false,
  3818.             "axisColorMode": "text",
  3819.             "axisLabel": "",
  3820.             "axisPlacement": "auto",
  3821.             "barAlignment": 0,
  3822.             "drawStyle": "line",
  3823.             "fillOpacity": 0,
  3824.             "gradientMode": "none",
  3825.             "hideFrom": {
  3826.               "legend": false,
  3827.               "tooltip": false,
  3828.               "viz": false
  3829.             },
  3830.             "insertNulls": false,
  3831.             "lineInterpolation": "linear",
  3832.             "lineStyle": {
  3833.               "fill": "solid"
  3834.             },
  3835.             "lineWidth": 1,
  3836.             "pointSize": 5,
  3837.             "scaleDistribution": {
  3838.               "type": "linear"
  3839.             },
  3840.             "showPoints": "auto",
  3841.             "spanNulls": false,
  3842.             "stacking": {
  3843.               "group": "A",
  3844.               "mode": "none"
  3845.             },
  3846.             "thresholdsStyle": {
  3847.               "mode": "off"
  3848.             }
  3849.           },
  3850.           "mappings": [],
  3851.           "thresholds": {
  3852.             "mode": "absolute",
  3853.             "steps": [
  3854.               {
  3855.                 "color": "green",
  3856.                 "value": null
  3857.               },
  3858.               {
  3859.                 "color": "red",
  3860.                 "value": 80
  3861.               }
  3862.             ]
  3863.           },
  3864.           "unit": "watt"
  3865.         },
  3866.         "overrides": []
  3867.       },
  3868.       "gridPos": {
  3869.         "h": 8,
  3870.         "w": 12,
  3871.         "x": 0,
  3872.         "y": 30
  3873.       },
  3874.       "id": 123137,
  3875.       "options": {
  3876.         "legend": {
  3877.           "calcs": [
  3878.             "mean",
  3879.             "last"
  3880.           ],
  3881.           "displayMode": "table",
  3882.           "placement": "bottom",
  3883.           "showLegend": true
  3884.         },
  3885.         "tooltip": {
  3886.           "mode": "multi",
  3887.           "sort": "desc"
  3888.         }
  3889.       },
  3890.       "targets": [
  3891.         {
  3892.           "datasource": {
  3893.             "type": "mysql",
  3894.             "uid": "BjbJE3u7z"
  3895.           },
  3896.           "editorMode": "code",
  3897.           "format": "time_series",
  3898.           "group": [],
  3899.           "metricColumn": "none",
  3900.           "rawQuery": true,
  3901.           "rawSql": "SELECT\n  UNIX_TIMESTAMP(log_date) AS \"time\",\n  pv_ppv1 AS pv_jihovychod, pv_ppv2 AS pv_jihozapad, pv_ppv1+pv_ppv2 AS pv_total\nFROM pv_inverter_record\nWHERE\n  $__timeFilter(log_date)\n  AND pv_inverter_id = $pv_inverter_id \nORDER BY log_date",
  3902.           "refId": "A",
  3903.           "select": [
  3904.             [
  3905.               {
  3906.                 "params": [
  3907.                   "id"
  3908.                 ],
  3909.                 "type": "column"
  3910.               }
  3911.             ]
  3912.           ],
  3913.           "sql": {
  3914.             "columns": [
  3915.               {
  3916.                 "parameters": [],
  3917.                 "type": "function"
  3918.               }
  3919.             ],
  3920.             "groupBy": [
  3921.               {
  3922.                 "property": {
  3923.                   "type": "string"
  3924.                 },
  3925.                 "type": "groupBy"
  3926.               }
  3927.             ],
  3928.             "limit": 50
  3929.           },
  3930.           "table": "_is_generic_admin_media_objects",
  3931.           "timeColumn": "date_of_creation",
  3932.           "timeColumnType": "timestamp",
  3933.           "where": [
  3934.             {
  3935.               "name": "$__timeFilter",
  3936.               "params": [],
  3937.               "type": "macro"
  3938.             }
  3939.           ]
  3940.         }
  3941.       ],
  3942.       "title": "PV Strings Power",
  3943.       "type": "timeseries"
  3944.     },
  3945.     {
  3946.       "datasource": {
  3947.         "type": "mysql",
  3948.         "uid": "BjbJE3u7z"
  3949.       },
  3950.       "fieldConfig": {
  3951.         "defaults": {
  3952.           "color": {
  3953.             "mode": "palette-classic"
  3954.           },
  3955.           "custom": {
  3956.             "axisBorderShow": false,
  3957.             "axisCenteredZero": false,
  3958.             "axisColorMode": "text",
  3959.             "axisLabel": "",
  3960.             "axisPlacement": "auto",
  3961.             "barAlignment": 0,
  3962.             "drawStyle": "line",
  3963.             "fillOpacity": 0,
  3964.             "gradientMode": "none",
  3965.             "hideFrom": {
  3966.               "legend": false,
  3967.               "tooltip": false,
  3968.               "viz": false
  3969.             },
  3970.             "insertNulls": false,
  3971.             "lineInterpolation": "linear",
  3972.             "lineWidth": 1,
  3973.             "pointSize": 5,
  3974.             "scaleDistribution": {
  3975.               "type": "linear"
  3976.             },
  3977.             "showPoints": "auto",
  3978.             "spanNulls": false,
  3979.             "stacking": {
  3980.               "group": "A",
  3981.               "mode": "none"
  3982.             },
  3983.             "thresholdsStyle": {
  3984.               "mode": "line"
  3985.             }
  3986.           },
  3987.           "mappings": [],
  3988.           "thresholds": {
  3989.             "mode": "absolute",
  3990.             "steps": [
  3991.               {
  3992.                 "color": "green",
  3993.                 "value": null
  3994.               },
  3995.               {
  3996.                 "color": "dark-red",
  3997.                 "value": 360
  3998.               },
  3999.               {
  4000.                 "color": "yellow",
  4001.                 "value": 422
  4002.               },
  4003.               {
  4004.                 "color": "dark-red",
  4005.                 "value": 432
  4006.               }
  4007.             ]
  4008.           },
  4009.           "unit": "volt"
  4010.         },
  4011.         "overrides": []
  4012.       },
  4013.       "gridPos": {
  4014.         "h": 9,
  4015.         "w": 12,
  4016.         "x": 12,
  4017.         "y": 34
  4018.       },
  4019.       "id": 123222,
  4020.       "options": {
  4021.         "legend": {
  4022.           "calcs": [
  4023.             "last",
  4024.             "min",
  4025.             "max"
  4026.           ],
  4027.           "displayMode": "table",
  4028.           "placement": "bottom",
  4029.           "showLegend": true
  4030.         },
  4031.         "tooltip": {
  4032.           "mode": "multi",
  4033.           "sort": "desc"
  4034.         }
  4035.       },
  4036.       "targets": [
  4037.         {
  4038.           "datasource": {
  4039.             "type": "mysql",
  4040.             "uid": "BjbJE3u7z"
  4041.           },
  4042.           "editorMode": "code",
  4043.           "format": "time_series",
  4044.           "group": [],
  4045.           "metricColumn": "none",
  4046.           "rawQuery": true,
  4047.           "rawSql": "SELECT\n  UNIX_TIMESTAMP(log_date) AS \"time\",\n  max_cell_voltage-min_cell_voltage as voltage_difference\nFROM pv_battery_state_record\nWHERE\n  $__timeFilter(log_date)\nORDER BY log_date",
  4048.           "refId": "A",
  4049.           "select": [
  4050.             [
  4051.               {
  4052.                 "params": [
  4053.                   "id"
  4054.                 ],
  4055.                 "type": "column"
  4056.               }
  4057.             ]
  4058.           ],
  4059.           "sql": {
  4060.             "columns": [
  4061.               {
  4062.                 "parameters": [],
  4063.                 "type": "function"
  4064.               }
  4065.             ],
  4066.             "groupBy": [
  4067.               {
  4068.                 "property": {
  4069.                   "type": "string"
  4070.                 },
  4071.                 "type": "groupBy"
  4072.               }
  4073.             ],
  4074.             "limit": 50
  4075.           },
  4076.           "table": "_is_generic_admin_media_objects",
  4077.           "timeColumn": "date_of_creation",
  4078.           "timeColumnType": "timestamp",
  4079.           "where": [
  4080.             {
  4081.               "name": "$__timeFilter",
  4082.               "params": [],
  4083.               "type": "macro"
  4084.             }
  4085.           ]
  4086.         }
  4087.       ],
  4088.       "title": "Battery Cells Min/Max Voltage Difference",
  4089.       "type": "timeseries"
  4090.     },
  4091.     {
  4092.       "datasource": {
  4093.         "type": "mysql",
  4094.         "uid": "BjbJE3u7z"
  4095.       },
  4096.       "fieldConfig": {
  4097.         "defaults": {
  4098.           "color": {
  4099.             "mode": "palette-classic"
  4100.           },
  4101.           "custom": {
  4102.             "axisBorderShow": false,
  4103.             "axisCenteredZero": false,
  4104.             "axisColorMode": "text",
  4105.             "axisLabel": "",
  4106.             "axisPlacement": "auto",
  4107.             "barAlignment": 0,
  4108.             "drawStyle": "line",
  4109.             "fillOpacity": 0,
  4110.             "gradientMode": "none",
  4111.             "hideFrom": {
  4112.               "legend": false,
  4113.               "tooltip": false,
  4114.               "viz": false
  4115.             },
  4116.             "insertNulls": false,
  4117.             "lineInterpolation": "linear",
  4118.             "lineWidth": 1,
  4119.             "pointSize": 5,
  4120.             "scaleDistribution": {
  4121.               "type": "linear"
  4122.             },
  4123.             "showPoints": "auto",
  4124.             "spanNulls": false,
  4125.             "stacking": {
  4126.               "group": "A",
  4127.               "mode": "none"
  4128.             },
  4129.             "thresholdsStyle": {
  4130.               "mode": "line"
  4131.             }
  4132.           },
  4133.           "mappings": [],
  4134.           "thresholds": {
  4135.             "mode": "absolute",
  4136.             "steps": [
  4137.               {
  4138.                 "color": "green",
  4139.                 "value": null
  4140.               },
  4141.               {
  4142.                 "color": "#ffffff",
  4143.                 "value": 0
  4144.               }
  4145.             ]
  4146.           },
  4147.           "unit": "volt"
  4148.         },
  4149.         "overrides": []
  4150.       },
  4151.       "gridPos": {
  4152.         "h": 8,
  4153.         "w": 12,
  4154.         "x": 0,
  4155.         "y": 38
  4156.       },
  4157.       "id": 123182,
  4158.       "options": {
  4159.         "legend": {
  4160.           "calcs": [
  4161.             "last",
  4162.             "min",
  4163.             "max"
  4164.           ],
  4165.           "displayMode": "table",
  4166.           "placement": "bottom",
  4167.           "showLegend": true
  4168.         },
  4169.         "tooltip": {
  4170.           "mode": "multi",
  4171.           "sort": "desc"
  4172.         }
  4173.       },
  4174.       "targets": [
  4175.         {
  4176.           "datasource": {
  4177.             "type": "mysql",
  4178.             "uid": "BjbJE3u7z"
  4179.           },
  4180.           "editorMode": "code",
  4181.           "format": "time_series",
  4182.           "group": [],
  4183.           "metricColumn": "none",
  4184.           "rawQuery": true,
  4185.           "rawSql": "SELECT\n  UNIX_TIMESTAMP(log_date) AS \"time\",\n  pv_vpv1 as string1, pv_vpv2 as string2\nFROM pv_inverter_record\nWHERE\n  $__timeFilter(log_date)\n  AND pv_inverter_id = $pv_inverter_id \nORDER BY log_date",
  4186.           "refId": "A",
  4187.           "select": [
  4188.             [
  4189.               {
  4190.                 "params": [
  4191.                   "id"
  4192.                 ],
  4193.                 "type": "column"
  4194.               }
  4195.             ]
  4196.           ],
  4197.           "sql": {
  4198.             "columns": [
  4199.               {
  4200.                 "parameters": [],
  4201.                 "type": "function"
  4202.               }
  4203.             ],
  4204.             "groupBy": [
  4205.               {
  4206.                 "property": {
  4207.                   "type": "string"
  4208.                 },
  4209.                 "type": "groupBy"
  4210.               }
  4211.             ],
  4212.             "limit": 50
  4213.           },
  4214.           "table": "_is_generic_admin_media_objects",
  4215.           "timeColumn": "date_of_creation",
  4216.           "timeColumnType": "timestamp",
  4217.           "where": [
  4218.             {
  4219.               "name": "$__timeFilter",
  4220.               "params": [],
  4221.               "type": "macro"
  4222.             }
  4223.           ]
  4224.         }
  4225.       ],
  4226.       "title": "PV Strings Voltage",
  4227.       "type": "timeseries"
  4228.     },
  4229.     {
  4230.       "datasource": {
  4231.         "type": "mysql",
  4232.         "uid": "BjbJE3u7z"
  4233.       },
  4234.       "fieldConfig": {
  4235.         "defaults": {
  4236.           "color": {
  4237.             "mode": "palette-classic"
  4238.           },
  4239.           "custom": {
  4240.             "axisBorderShow": false,
  4241.             "axisCenteredZero": false,
  4242.             "axisColorMode": "text",
  4243.             "axisLabel": "",
  4244.             "axisPlacement": "auto",
  4245.             "barAlignment": 0,
  4246.             "drawStyle": "line",
  4247.             "fillOpacity": 0,
  4248.             "gradientMode": "none",
  4249.             "hideFrom": {
  4250.               "legend": false,
  4251.               "tooltip": false,
  4252.               "viz": false
  4253.             },
  4254.             "insertNulls": false,
  4255.             "lineInterpolation": "linear",
  4256.             "lineWidth": 1,
  4257.             "pointSize": 5,
  4258.             "scaleDistribution": {
  4259.               "type": "linear"
  4260.             },
  4261.             "showPoints": "auto",
  4262.             "spanNulls": false,
  4263.             "stacking": {
  4264.               "group": "A",
  4265.               "mode": "none"
  4266.             },
  4267.             "thresholdsStyle": {
  4268.               "mode": "line"
  4269.             }
  4270.           },
  4271.           "mappings": [],
  4272.           "thresholds": {
  4273.             "mode": "absolute",
  4274.             "steps": [
  4275.               {
  4276.                 "color": "green",
  4277.                 "value": null
  4278.               },
  4279.               {
  4280.                 "color": "#ffffff",
  4281.                 "value": 0
  4282.               }
  4283.             ]
  4284.           },
  4285.           "unit": "amp"
  4286.         },
  4287.         "overrides": []
  4288.       },
  4289.       "gridPos": {
  4290.         "h": 8,
  4291.         "w": 12,
  4292.         "x": 12,
  4293.         "y": 43
  4294.       },
  4295.       "id": 123176,
  4296.       "options": {
  4297.         "legend": {
  4298.           "calcs": [
  4299.             "last",
  4300.             "min",
  4301.             "max"
  4302.           ],
  4303.           "displayMode": "table",
  4304.           "placement": "bottom",
  4305.           "showLegend": true
  4306.         },
  4307.         "tooltip": {
  4308.           "mode": "multi",
  4309.           "sort": "desc"
  4310.         }
  4311.       },
  4312.       "targets": [
  4313.         {
  4314.           "datasource": {
  4315.             "type": "mysql",
  4316.             "uid": "BjbJE3u7z"
  4317.           },
  4318.           "editorMode": "code",
  4319.           "format": "time_series",
  4320.           "group": [],
  4321.           "metricColumn": "none",
  4322.           "rawQuery": true,
  4323.           "rawSql": "SELECT\n  UNIX_TIMESTAMP(log_date) AS \"time\",\n  battery_ibattery1*-1 as current\nFROM pv_inverter_record\nWHERE\n  $__timeFilter(log_date)\n  AND pv_inverter_id = 1\nORDER BY log_date",
  4324.           "refId": "A",
  4325.           "select": [
  4326.             [
  4327.               {
  4328.                 "params": [
  4329.                   "id"
  4330.                 ],
  4331.                 "type": "column"
  4332.               }
  4333.             ]
  4334.           ],
  4335.           "sql": {
  4336.             "columns": [
  4337.               {
  4338.                 "parameters": [],
  4339.                 "type": "function"
  4340.               }
  4341.             ],
  4342.             "groupBy": [
  4343.               {
  4344.                 "property": {
  4345.                   "type": "string"
  4346.                 },
  4347.                 "type": "groupBy"
  4348.               }
  4349.             ],
  4350.             "limit": 50
  4351.           },
  4352.           "table": "_is_generic_admin_media_objects",
  4353.           "timeColumn": "date_of_creation",
  4354.           "timeColumnType": "timestamp",
  4355.           "where": [
  4356.             {
  4357.               "name": "$__timeFilter",
  4358.               "params": [],
  4359.               "type": "macro"
  4360.             }
  4361.           ]
  4362.         },
  4363.         {
  4364.           "datasource": {
  4365.             "type": "mysql",
  4366.             "uid": "BjbJE3u7z"
  4367.           },
  4368.           "editorMode": "code",
  4369.           "format": "time_series",
  4370.           "group": [],
  4371.           "hide": false,
  4372.           "metricColumn": "none",
  4373.           "rawQuery": true,
  4374.           "rawSql": "SELECT\n  UNIX_TIMESTAMP(log_date) AS \"time\",\n  current as bms_current\nFROM pv_battery_state_record\nWHERE\n  $__timeFilter(log_date)\nORDER BY log_date",
  4375.           "refId": "B",
  4376.           "select": [
  4377.             [
  4378.               {
  4379.                 "params": [
  4380.                   "id"
  4381.                 ],
  4382.                 "type": "column"
  4383.               }
  4384.             ]
  4385.           ],
  4386.           "sql": {
  4387.             "columns": [
  4388.               {
  4389.                 "parameters": [],
  4390.                 "type": "function"
  4391.               }
  4392.             ],
  4393.             "groupBy": [
  4394.               {
  4395.                 "property": {
  4396.                   "type": "string"
  4397.                 },
  4398.                 "type": "groupBy"
  4399.               }
  4400.             ],
  4401.             "limit": 50
  4402.           },
  4403.           "table": "_is_generic_admin_media_objects",
  4404.           "timeColumn": "date_of_creation",
  4405.           "timeColumnType": "timestamp",
  4406.           "where": [
  4407.             {
  4408.               "name": "$__timeFilter",
  4409.               "params": [],
  4410.               "type": "macro"
  4411.             }
  4412.           ]
  4413.         }
  4414.       ],
  4415.       "title": "Battery Current",
  4416.       "type": "timeseries"
  4417.     },
  4418.     {
  4419.       "datasource": {
  4420.         "type": "mysql",
  4421.         "uid": "BjbJE3u7z"
  4422.       },
  4423.       "fieldConfig": {
  4424.         "defaults": {
  4425.           "color": {
  4426.             "mode": "palette-classic"
  4427.           },
  4428.           "custom": {
  4429.             "axisBorderShow": false,
  4430.             "axisCenteredZero": false,
  4431.             "axisColorMode": "text",
  4432.             "axisLabel": "",
  4433.             "axisPlacement": "auto",
  4434.             "barAlignment": 0,
  4435.             "drawStyle": "line",
  4436.             "fillOpacity": 0,
  4437.             "gradientMode": "none",
  4438.             "hideFrom": {
  4439.               "legend": false,
  4440.               "tooltip": false,
  4441.               "viz": false
  4442.             },
  4443.             "insertNulls": false,
  4444.             "lineInterpolation": "linear",
  4445.             "lineWidth": 1,
  4446.             "pointSize": 5,
  4447.             "scaleDistribution": {
  4448.               "type": "linear"
  4449.             },
  4450.             "showPoints": "auto",
  4451.             "spanNulls": false,
  4452.             "stacking": {
  4453.               "group": "A",
  4454.               "mode": "none"
  4455.             },
  4456.             "thresholdsStyle": {
  4457.               "mode": "line"
  4458.             }
  4459.           },
  4460.           "mappings": [],
  4461.           "thresholds": {
  4462.             "mode": "absolute",
  4463.             "steps": [
  4464.               {
  4465.                 "color": "green",
  4466.                 "value": null
  4467.               },
  4468.               {
  4469.                 "color": "#ffffff",
  4470.                 "value": 0
  4471.               }
  4472.             ]
  4473.           },
  4474.           "unit": "amp"
  4475.         },
  4476.         "overrides": []
  4477.       },
  4478.       "gridPos": {
  4479.         "h": 8,
  4480.         "w": 12,
  4481.         "x": 0,
  4482.         "y": 46
  4483.       },
  4484.       "id": 123183,
  4485.       "options": {
  4486.         "legend": {
  4487.           "calcs": [
  4488.             "last",
  4489.             "min",
  4490.             "max"
  4491.           ],
  4492.           "displayMode": "table",
  4493.           "placement": "bottom",
  4494.           "showLegend": true
  4495.         },
  4496.         "tooltip": {
  4497.           "mode": "multi",
  4498.           "sort": "desc"
  4499.         }
  4500.       },
  4501.       "targets": [
  4502.         {
  4503.           "datasource": {
  4504.             "type": "mysql",
  4505.             "uid": "BjbJE3u7z"
  4506.           },
  4507.           "editorMode": "code",
  4508.           "format": "time_series",
  4509.           "group": [],
  4510.           "metricColumn": "none",
  4511.           "rawQuery": true,
  4512.           "rawSql": "SELECT\n  UNIX_TIMESTAMP(log_date) AS \"time\",\n  pv_ipv1 as string1, pv_ipv2 as string2\nFROM pv_inverter_record\nWHERE\n  $__timeFilter(log_date)\n  AND pv_inverter_id = $pv_inverter_id \nORDER BY log_date",
  4513.           "refId": "A",
  4514.           "select": [
  4515.             [
  4516.               {
  4517.                 "params": [
  4518.                   "id"
  4519.                 ],
  4520.                 "type": "column"
  4521.               }
  4522.             ]
  4523.           ],
  4524.           "sql": {
  4525.             "columns": [
  4526.               {
  4527.                 "parameters": [],
  4528.                 "type": "function"
  4529.               }
  4530.             ],
  4531.             "groupBy": [
  4532.               {
  4533.                 "property": {
  4534.                   "type": "string"
  4535.                 },
  4536.                 "type": "groupBy"
  4537.               }
  4538.             ],
  4539.             "limit": 50
  4540.           },
  4541.           "table": "_is_generic_admin_media_objects",
  4542.           "timeColumn": "date_of_creation",
  4543.           "timeColumnType": "timestamp",
  4544.           "where": [
  4545.             {
  4546.               "name": "$__timeFilter",
  4547.               "params": [],
  4548.               "type": "macro"
  4549.             }
  4550.           ]
  4551.         }
  4552.       ],
  4553.       "title": "PV Strings Current",
  4554.       "type": "timeseries"
  4555.     },
  4556.     {
  4557.       "datasource": {
  4558.         "type": "mysql",
  4559.         "uid": "BjbJE3u7z"
  4560.       },
  4561.       "fieldConfig": {
  4562.         "defaults": {
  4563.           "color": {
  4564.             "mode": "palette-classic"
  4565.           },
  4566.           "custom": {
  4567.             "axisBorderShow": false,
  4568.             "axisCenteredZero": false,
  4569.             "axisColorMode": "text",
  4570.             "axisLabel": "",
  4571.             "axisPlacement": "auto",
  4572.             "barAlignment": 0,
  4573.             "drawStyle": "line",
  4574.             "fillOpacity": 0,
  4575.             "gradientMode": "none",
  4576.             "hideFrom": {
  4577.               "legend": false,
  4578.               "tooltip": false,
  4579.               "viz": false
  4580.             },
  4581.             "insertNulls": false,
  4582.             "lineInterpolation": "linear",
  4583.             "lineWidth": 1,
  4584.             "pointSize": 5,
  4585.             "scaleDistribution": {
  4586.               "type": "linear"
  4587.             },
  4588.             "showPoints": "auto",
  4589.             "spanNulls": false,
  4590.             "stacking": {
  4591.               "group": "A",
  4592.               "mode": "none"
  4593.             },
  4594.             "thresholdsStyle": {
  4595.               "mode": "line"
  4596.             }
  4597.           },
  4598.           "mappings": [],
  4599.           "thresholds": {
  4600.             "mode": "absolute",
  4601.             "steps": [
  4602.               {
  4603.                 "color": "green",
  4604.                 "value": null
  4605.               },
  4606.               {
  4607.                 "color": "#ffffff",
  4608.                 "value": 0
  4609.               }
  4610.             ]
  4611.           },
  4612.           "unit": "amp"
  4613.         },
  4614.         "overrides": []
  4615.       },
  4616.       "gridPos": {
  4617.         "h": 8,
  4618.         "w": 12,
  4619.         "x": 12,
  4620.         "y": 51
  4621.       },
  4622.       "id": 123219,
  4623.       "options": {
  4624.         "legend": {
  4625.           "calcs": [
  4626.             "last",
  4627.             "min",
  4628.             "max"
  4629.           ],
  4630.           "displayMode": "table",
  4631.           "placement": "bottom",
  4632.           "showLegend": true
  4633.         },
  4634.         "tooltip": {
  4635.           "mode": "multi",
  4636.           "sort": "desc"
  4637.         }
  4638.       },
  4639.       "targets": [
  4640.         {
  4641.           "datasource": {
  4642.             "type": "mysql",
  4643.             "uid": "BjbJE3u7z"
  4644.           },
  4645.           "editorMode": "code",
  4646.           "format": "time_series",
  4647.           "group": [],
  4648.           "metricColumn": "none",
  4649.           "rawQuery": true,
  4650.           "rawSql": "SELECT\n  UNIX_TIMESTAMP(log_date) AS \"time\",\n  battery_charge_limit, battery_discharge_limit\nFROM pv_inverter_record\nWHERE\n  $__timeFilter(log_date)\n  AND pv_inverter_id = $pv_inverter_id \nORDER BY log_date",
  4651.           "refId": "A",
  4652.           "select": [
  4653.             [
  4654.               {
  4655.                 "params": [
  4656.                   "id"
  4657.                 ],
  4658.                 "type": "column"
  4659.               }
  4660.             ]
  4661.           ],
  4662.           "sql": {
  4663.             "columns": [
  4664.               {
  4665.                 "parameters": [],
  4666.                 "type": "function"
  4667.               }
  4668.             ],
  4669.             "groupBy": [
  4670.               {
  4671.                 "property": {
  4672.                   "type": "string"
  4673.                 },
  4674.                 "type": "groupBy"
  4675.               }
  4676.             ],
  4677.             "limit": 50
  4678.           },
  4679.           "table": "_is_generic_admin_media_objects",
  4680.           "timeColumn": "date_of_creation",
  4681.           "timeColumnType": "timestamp",
  4682.           "where": [
  4683.             {
  4684.               "name": "$__timeFilter",
  4685.               "params": [],
  4686.               "type": "macro"
  4687.             }
  4688.           ]
  4689.         }
  4690.       ],
  4691.       "title": "Battery Charge/Discharge Limits",
  4692.       "type": "timeseries"
  4693.     },
  4694.     {
  4695.       "datasource": {
  4696.         "type": "mysql",
  4697.         "uid": "BjbJE3u7z"
  4698.       },
  4699.       "fieldConfig": {
  4700.         "defaults": {
  4701.           "color": {
  4702.             "mode": "palette-classic"
  4703.           },
  4704.           "custom": {
  4705.             "axisBorderShow": false,
  4706.             "axisCenteredZero": false,
  4707.             "axisColorMode": "text",
  4708.             "axisLabel": "",
  4709.             "axisPlacement": "auto",
  4710.             "barAlignment": 0,
  4711.             "drawStyle": "line",
  4712.             "fillOpacity": 0,
  4713.             "gradientMode": "none",
  4714.             "hideFrom": {
  4715.               "legend": false,
  4716.               "tooltip": false,
  4717.               "viz": false
  4718.             },
  4719.             "insertNulls": false,
  4720.             "lineInterpolation": "linear",
  4721.             "lineWidth": 1,
  4722.             "pointSize": 5,
  4723.             "scaleDistribution": {
  4724.               "type": "linear"
  4725.             },
  4726.             "showPoints": "auto",
  4727.             "spanNulls": false,
  4728.             "stacking": {
  4729.               "group": "A",
  4730.               "mode": "none"
  4731.             },
  4732.             "thresholdsStyle": {
  4733.               "mode": "line"
  4734.             }
  4735.           },
  4736.           "mappings": [],
  4737.           "thresholds": {
  4738.             "mode": "absolute",
  4739.             "steps": [
  4740.               {
  4741.                 "color": "green",
  4742.                 "value": null
  4743.               },
  4744.               {
  4745.                 "color": "#ffffff",
  4746.                 "value": 0
  4747.               }
  4748.             ]
  4749.           },
  4750.           "unit": "percent"
  4751.         },
  4752.         "overrides": []
  4753.       },
  4754.       "gridPos": {
  4755.         "h": 8,
  4756.         "w": 12,
  4757.         "x": 0,
  4758.         "y": 54
  4759.       },
  4760.       "id": 123217,
  4761.       "options": {
  4762.         "legend": {
  4763.           "calcs": [
  4764.             "last",
  4765.             "min",
  4766.             "max"
  4767.           ],
  4768.           "displayMode": "table",
  4769.           "placement": "bottom",
  4770.           "showLegend": true
  4771.         },
  4772.         "tooltip": {
  4773.           "mode": "multi",
  4774.           "sort": "desc"
  4775.         }
  4776.       },
  4777.       "targets": [
  4778.         {
  4779.           "datasource": {
  4780.             "type": "mysql",
  4781.             "uid": "BjbJE3u7z"
  4782.           },
  4783.           "editorMode": "code",
  4784.           "format": "time_series",
  4785.           "group": [],
  4786.           "metricColumn": "none",
  4787.           "rawQuery": true,
  4788.           "rawSql": "SELECT\n  UNIX_TIMESTAMP(log_date) AS \"time\",\n  pv_ppv1 / (SELECT power*1000 FROM pv_rooftop WHERE id = 1)*100 AS power_efficiency_string1,\n  pv_ppv2 / (SELECT power*1000 FROM pv_rooftop WHERE id = 2)*100 AS power_efficiency_string2\nFROM pv_inverter_record\nWHERE\n  $__timeFilter(log_date)\n  AND pv_inverter_id = $pv_inverter_id \nORDER BY log_date",
  4789.           "refId": "A",
  4790.           "select": [
  4791.             [
  4792.               {
  4793.                 "params": [
  4794.                   "id"
  4795.                 ],
  4796.                 "type": "column"
  4797.               }
  4798.             ]
  4799.           ],
  4800.           "sql": {
  4801.             "columns": [
  4802.               {
  4803.                 "parameters": [],
  4804.                 "type": "function"
  4805.               }
  4806.             ],
  4807.             "groupBy": [
  4808.               {
  4809.                 "property": {
  4810.                   "type": "string"
  4811.                 },
  4812.                 "type": "groupBy"
  4813.               }
  4814.             ],
  4815.             "limit": 50
  4816.           },
  4817.           "table": "_is_generic_admin_media_objects",
  4818.           "timeColumn": "date_of_creation",
  4819.           "timeColumnType": "timestamp",
  4820.           "where": [
  4821.             {
  4822.               "name": "$__timeFilter",
  4823.               "params": [],
  4824.               "type": "macro"
  4825.             }
  4826.           ]
  4827.         }
  4828.       ],
  4829.       "title": "PV Strings Efficiency",
  4830.       "type": "timeseries"
  4831.     },
  4832.     {
  4833.       "datasource": {
  4834.         "type": "mysql",
  4835.         "uid": "BjbJE3u7z"
  4836.       },
  4837.       "fieldConfig": {
  4838.         "defaults": {
  4839.           "color": {
  4840.             "mode": "palette-classic"
  4841.           },
  4842.           "custom": {
  4843.             "axisBorderShow": false,
  4844.             "axisCenteredZero": false,
  4845.             "axisColorMode": "text",
  4846.             "axisLabel": "",
  4847.             "axisPlacement": "auto",
  4848.             "axisSoftMax": 100,
  4849.             "barAlignment": 0,
  4850.             "drawStyle": "line",
  4851.             "fillOpacity": 0,
  4852.             "gradientMode": "none",
  4853.             "hideFrom": {
  4854.               "legend": false,
  4855.               "tooltip": false,
  4856.               "viz": false
  4857.             },
  4858.             "insertNulls": false,
  4859.             "lineInterpolation": "linear",
  4860.             "lineWidth": 1,
  4861.             "pointSize": 5,
  4862.             "scaleDistribution": {
  4863.               "type": "linear"
  4864.             },
  4865.             "showPoints": "auto",
  4866.             "spanNulls": false,
  4867.             "stacking": {
  4868.               "group": "A",
  4869.               "mode": "none"
  4870.             },
  4871.             "thresholdsStyle": {
  4872.               "mode": "line"
  4873.             }
  4874.           },
  4875.           "mappings": [],
  4876.           "max": 100,
  4877.           "min": 0,
  4878.           "thresholds": {
  4879.             "mode": "absolute",
  4880.             "steps": [
  4881.               {
  4882.                 "color": "green",
  4883.                 "value": null
  4884.               },
  4885.               {
  4886.                 "color": "#ffffff",
  4887.                 "value": 0
  4888.               }
  4889.             ]
  4890.           },
  4891.           "unit": "percent"
  4892.         },
  4893.         "overrides": []
  4894.       },
  4895.       "gridPos": {
  4896.         "h": 8,
  4897.         "w": 12,
  4898.         "x": 12,
  4899.         "y": 59
  4900.       },
  4901.       "id": 123197,
  4902.       "options": {
  4903.         "legend": {
  4904.           "calcs": [
  4905.             "last",
  4906.             "min",
  4907.             "max"
  4908.           ],
  4909.           "displayMode": "list",
  4910.           "placement": "right",
  4911.           "showLegend": false
  4912.         },
  4913.         "tooltip": {
  4914.           "mode": "multi",
  4915.           "sort": "desc"
  4916.         }
  4917.       },
  4918.       "targets": [
  4919.         {
  4920.           "datasource": {
  4921.             "type": "mysql",
  4922.             "uid": "BjbJE3u7z"
  4923.           },
  4924.           "editorMode": "code",
  4925.           "format": "time_series",
  4926.           "group": [],
  4927.           "metricColumn": "none",
  4928.           "rawQuery": true,
  4929.           "rawSql": "SELECT\n  UNIX_TIMESTAMP(log_date) AS \"time\",\n  battery_soc as real_soc\nFROM pv_inverter_record\nWHERE\n  $__timeFilter(log_date)\n  AND pv_inverter_id = $pv_inverter_id \nORDER BY log_date",
  4930.           "refId": "A",
  4931.           "select": [
  4932.             [
  4933.               {
  4934.                 "params": [
  4935.                   "id"
  4936.                 ],
  4937.                 "type": "column"
  4938.               }
  4939.             ]
  4940.           ],
  4941.           "sql": {
  4942.             "columns": [
  4943.               {
  4944.                 "parameters": [],
  4945.                 "type": "function"
  4946.               }
  4947.             ],
  4948.             "groupBy": [
  4949.               {
  4950.                 "property": {
  4951.                   "type": "string"
  4952.                 },
  4953.                 "type": "groupBy"
  4954.               }
  4955.             ],
  4956.             "limit": 50
  4957.           },
  4958.           "table": "_is_generic_admin_media_objects",
  4959.           "timeColumn": "date_of_creation",
  4960.           "timeColumnType": "timestamp",
  4961.           "where": [
  4962.             {
  4963.               "name": "$__timeFilter",
  4964.               "params": [],
  4965.               "type": "macro"
  4966.             }
  4967.           ]
  4968.         },
  4969.         {
  4970.           "datasource": {
  4971.             "type": "mysql",
  4972.             "uid": "BjbJE3u7z"
  4973.           },
  4974.           "editorMode": "code",
  4975.           "format": "time_series",
  4976.           "group": [],
  4977.           "hide": false,
  4978.           "metricColumn": "none",
  4979.           "rawQuery": true,
  4980.           "rawSql": "SELECT\n  UNIX_TIMESTAMP(log_date) AS \"time\",\n  soc as predicted_soc\nFROM pv_inverter_battery_soc_prediction\nWHERE\n  $__timeFilter(log_date)\nORDER BY log_date",
  4981.           "refId": "B",
  4982.           "select": [
  4983.             [
  4984.               {
  4985.                 "params": [
  4986.                   "load_mode1"
  4987.                 ],
  4988.                 "type": "column"
  4989.               }
  4990.             ]
  4991.           ],
  4992.           "sql": {
  4993.             "columns": [
  4994.               {
  4995.                 "parameters": [],
  4996.                 "type": "function"
  4997.               }
  4998.             ],
  4999.             "groupBy": [
  5000.               {
  5001.                 "property": {
  5002.                   "type": "string"
  5003.                 },
  5004.                 "type": "groupBy"
  5005.               }
  5006.             ],
  5007.             "limit": 50
  5008.           },
  5009.           "table": "pv_inverter_record",
  5010.           "timeColumn": "log_date",
  5011.           "timeColumnType": "timestamp",
  5012.           "where": [
  5013.             {
  5014.               "name": "$__timeFilter",
  5015.               "params": [],
  5016.               "type": "macro"
  5017.             }
  5018.           ]
  5019.         }
  5020.       ],
  5021.       "title": "Battery SOC Prediction",
  5022.       "type": "timeseries"
  5023.     },
  5024.     {
  5025.       "datasource": {
  5026.         "type": "datasource",
  5027.         "uid": "-- Mixed --"
  5028.       },
  5029.       "fieldConfig": {
  5030.         "defaults": {
  5031.           "color": {
  5032.             "mode": "palette-classic"
  5033.           },
  5034.           "custom": {
  5035.             "axisBorderShow": false,
  5036.             "axisCenteredZero": false,
  5037.             "axisColorMode": "text",
  5038.             "axisLabel": "",
  5039.             "axisPlacement": "auto",
  5040.             "barAlignment": 0,
  5041.             "drawStyle": "line",
  5042.             "fillOpacity": 0,
  5043.             "gradientMode": "none",
  5044.             "hideFrom": {
  5045.               "legend": false,
  5046.               "tooltip": false,
  5047.               "viz": false
  5048.             },
  5049.             "insertNulls": false,
  5050.             "lineInterpolation": "linear",
  5051.             "lineWidth": 1,
  5052.             "pointSize": 5,
  5053.             "scaleDistribution": {
  5054.               "type": "linear"
  5055.             },
  5056.             "showPoints": "auto",
  5057.             "spanNulls": false,
  5058.             "stacking": {
  5059.               "group": "A",
  5060.               "mode": "none"
  5061.             },
  5062.             "thresholdsStyle": {
  5063.               "mode": "line"
  5064.             }
  5065.           },
  5066.           "mappings": [],
  5067.           "thresholds": {
  5068.             "mode": "absolute",
  5069.             "steps": [
  5070.               {
  5071.                 "color": "green",
  5072.                 "value": null
  5073.               },
  5074.               {
  5075.                 "color": "#ffffff",
  5076.                 "value": 0
  5077.               }
  5078.             ]
  5079.           },
  5080.           "unit": "percent"
  5081.         },
  5082.         "overrides": []
  5083.       },
  5084.       "gridPos": {
  5085.         "h": 8,
  5086.         "w": 12,
  5087.         "x": 0,
  5088.         "y": 62
  5089.       },
  5090.       "id": 123218,
  5091.       "options": {
  5092.         "legend": {
  5093.           "calcs": [
  5094.             "last",
  5095.             "min",
  5096.             "max"
  5097.           ],
  5098.           "displayMode": "table",
  5099.           "placement": "bottom",
  5100.           "showLegend": true
  5101.         },
  5102.         "tooltip": {
  5103.           "mode": "multi",
  5104.           "sort": "desc"
  5105.         }
  5106.       },
  5107.       "targets": [
  5108.         {
  5109.           "datasource": {
  5110.             "type": "mysql",
  5111.             "uid": "BjbJE3u7z"
  5112.           },
  5113.           "editorMode": "code",
  5114.           "format": "time_series",
  5115.           "group": [],
  5116.           "metricColumn": "none",
  5117.           "rawQuery": true,
  5118.           "rawSql": "SELECT\n  UNIX_TIMESTAMP(log_date) AS \"time\",\n  pv_ppv1 / (SELECT power*1000 FROM pv_rooftop WHERE id = 1)*100 AS power_efficiency_string1,\n  pv_ppv2 / (SELECT power*1000 FROM pv_rooftop WHERE id = 2)*100 AS power_efficiency_string2\nFROM pv_inverter_record\nWHERE\n  $__timeFilter(log_date)\n  AND pv_inverter_id = $pv_inverter_id \nORDER BY log_date",
  5119.           "refId": "A",
  5120.           "select": [
  5121.             [
  5122.               {
  5123.                 "params": [
  5124.                   "id"
  5125.                 ],
  5126.                 "type": "column"
  5127.               }
  5128.             ]
  5129.           ],
  5130.           "sql": {
  5131.             "columns": [
  5132.               {
  5133.                 "parameters": [],
  5134.                 "type": "function"
  5135.               }
  5136.             ],
  5137.             "groupBy": [
  5138.               {
  5139.                 "property": {
  5140.                   "type": "string"
  5141.                 },
  5142.                 "type": "groupBy"
  5143.               }
  5144.             ],
  5145.             "limit": 50
  5146.           },
  5147.           "table": "_is_generic_admin_media_objects",
  5148.           "timeColumn": "date_of_creation",
  5149.           "timeColumnType": "timestamp",
  5150.           "where": [
  5151.             {
  5152.               "name": "$__timeFilter",
  5153.               "params": [],
  5154.               "type": "macro"
  5155.             }
  5156.           ]
  5157.         },
  5158.         {
  5159.           "datasource": {
  5160.             "uid": "0b6N-zQ4k"
  5161.           },
  5162.           "editorMode": "code",
  5163.           "format": "time_series",
  5164.           "group": [],
  5165.           "hide": true,
  5166.           "metricColumn": "none",
  5167.           "rawQuery": true,
  5168.           "rawSql": "SELECT\n  UNIX_TIMESTAMP(log_date) AS \"time\",\n  pv_ppv1 / (SELECT power*1000 FROM pv_rooftop WHERE id = 1)*100 AS panjisa_power_efficiency_string1,\n  pv_ppv2 / (SELECT power*1000 FROM pv_rooftop WHERE id = 2)*100 AS panjisa_power_efficiency_string2\nFROM pv_inverter_record\nWHERE\n  $__timeFilter(log_date)\n  AND pv_inverter_id = $pv_inverter_id \nORDER BY log_date",
  5169.           "refId": "B",
  5170.           "select": [
  5171.             [
  5172.               {
  5173.                 "params": [
  5174.                   "id"
  5175.                 ],
  5176.                 "type": "column"
  5177.               }
  5178.             ]
  5179.           ],
  5180.           "sql": {
  5181.             "columns": [
  5182.               {
  5183.                 "parameters": [],
  5184.                 "type": "function"
  5185.               }
  5186.             ],
  5187.             "groupBy": [
  5188.               {
  5189.                 "property": {
  5190.                   "type": "string"
  5191.                 },
  5192.                 "type": "groupBy"
  5193.               }
  5194.             ],
  5195.             "limit": 50
  5196.           },
  5197.           "table": "_is_generic_admin_media_objects",
  5198.           "timeColumn": "date_of_creation",
  5199.           "timeColumnType": "timestamp",
  5200.           "where": [
  5201.             {
  5202.               "name": "$__timeFilter",
  5203.               "params": [],
  5204.               "type": "macro"
  5205.             }
  5206.           ]
  5207.         }
  5208.       ],
  5209.       "title": "PV Strings Efficiency Comparison",
  5210.       "type": "timeseries"
  5211.     },
  5212.     {
  5213.       "datasource": {
  5214.         "type": "mysql",
  5215.         "uid": "BjbJE3u7z"
  5216.       },
  5217.       "fieldConfig": {
  5218.         "defaults": {
  5219.           "color": {
  5220.             "mode": "thresholds"
  5221.           },
  5222.           "custom": {
  5223.             "fillOpacity": 64,
  5224.             "hideFrom": {
  5225.               "legend": false,
  5226.               "tooltip": false,
  5227.               "viz": false
  5228.             },
  5229.             "insertNulls": false,
  5230.             "lineWidth": 0,
  5231.             "spanNulls": false
  5232.           },
  5233.           "mappings": [
  5234.             {
  5235.               "options": {
  5236.                 "Charge": {
  5237.                   "color": "semi-dark-green",
  5238.                   "index": 0
  5239.                 },
  5240.                 "Discharge": {
  5241.                   "color": "semi-dark-red",
  5242.                   "index": 1
  5243.                 }
  5244.               },
  5245.               "type": "value"
  5246.             }
  5247.           ],
  5248.           "thresholds": {
  5249.             "mode": "absolute",
  5250.             "steps": [
  5251.               {
  5252.                 "color": "green",
  5253.                 "value": null
  5254.               },
  5255.               {
  5256.                 "color": "red",
  5257.                 "value": 80
  5258.               }
  5259.             ]
  5260.           }
  5261.         },
  5262.         "overrides": []
  5263.       },
  5264.       "gridPos": {
  5265.         "h": 4,
  5266.         "w": 12,
  5267.         "x": 12,
  5268.         "y": 67
  5269.       },
  5270.       "id": 123178,
  5271.       "options": {
  5272.         "alignValue": "center",
  5273.         "legend": {
  5274.           "displayMode": "list",
  5275.           "placement": "bottom",
  5276.           "showLegend": false
  5277.         },
  5278.         "mergeValues": true,
  5279.         "rowHeight": 1,
  5280.         "showValue": "auto",
  5281.         "tooltip": {
  5282.           "mode": "single",
  5283.           "sort": "none"
  5284.         }
  5285.       },
  5286.       "targets": [
  5287.         {
  5288.           "datasource": {
  5289.             "type": "mysql",
  5290.             "uid": "BjbJE3u7z"
  5291.           },
  5292.           "editorMode": "code",
  5293.           "format": "time_series",
  5294.           "group": [],
  5295.           "metricColumn": "none",
  5296.           "rawQuery": true,
  5297.           "rawSql": "SELECT\n  UNIX_TIMESTAMP(log_date) AS \"time\",\n  battery_mode_label AS mode\nFROM (\n  select *, @e prev, @e:=battery_mode_label\n  from pv_inverter_record, (select @e:='') e\n  WHERE\n    $__timeFilter(log_date)\n    AND pv_inverter_id = 1\n) t\nWHERE\n  prev <> battery_mode_label COLLATE utf8_general_ci\nORDER BY log_date\n",
  5298.           "refId": "A",
  5299.           "select": [
  5300.             [
  5301.               {
  5302.                 "params": [
  5303.                   "id"
  5304.                 ],
  5305.                 "type": "column"
  5306.               }
  5307.             ]
  5308.           ],
  5309.           "sql": {
  5310.             "columns": [
  5311.               {
  5312.                 "parameters": [],
  5313.                 "type": "function"
  5314.               }
  5315.             ],
  5316.             "groupBy": [
  5317.               {
  5318.                 "property": {
  5319.                   "type": "string"
  5320.                 },
  5321.                 "type": "groupBy"
  5322.               }
  5323.             ],
  5324.             "limit": 50
  5325.           },
  5326.           "table": "_is_generic_admin_media_objects",
  5327.           "timeColumn": "date_of_creation",
  5328.           "timeColumnType": "timestamp",
  5329.           "where": [
  5330.             {
  5331.               "name": "$__timeFilter",
  5332.               "params": [],
  5333.               "type": "macro"
  5334.             }
  5335.           ]
  5336.         }
  5337.       ],
  5338.       "title": "Battery Mode",
  5339.       "type": "state-timeline"
  5340.     },
  5341.     {
  5342.       "datasource": {
  5343.         "type": "datasource",
  5344.         "uid": "-- Mixed --"
  5345.       },
  5346.       "fieldConfig": {
  5347.         "defaults": {
  5348.           "color": {
  5349.             "mode": "palette-classic"
  5350.           },
  5351.           "custom": {
  5352.             "axisBorderShow": false,
  5353.             "axisCenteredZero": false,
  5354.             "axisColorMode": "text",
  5355.             "axisLabel": "",
  5356.             "axisPlacement": "auto",
  5357.             "barAlignment": 0,
  5358.             "drawStyle": "line",
  5359.             "fillOpacity": 0,
  5360.             "gradientMode": "none",
  5361.             "hideFrom": {
  5362.               "legend": false,
  5363.               "tooltip": false,
  5364.               "viz": false
  5365.             },
  5366.             "insertNulls": false,
  5367.             "lineInterpolation": "linear",
  5368.             "lineWidth": 1,
  5369.             "pointSize": 5,
  5370.             "scaleDistribution": {
  5371.               "type": "linear"
  5372.             },
  5373.             "showPoints": "auto",
  5374.             "spanNulls": false,
  5375.             "stacking": {
  5376.               "group": "A",
  5377.               "mode": "none"
  5378.             },
  5379.             "thresholdsStyle": {
  5380.               "mode": "off"
  5381.             }
  5382.           },
  5383.           "mappings": [],
  5384.           "thresholds": {
  5385.             "mode": "absolute",
  5386.             "steps": [
  5387.               {
  5388.                 "color": "green",
  5389.                 "value": null
  5390.               },
  5391.               {
  5392.                 "color": "red",
  5393.                 "value": 80
  5394.               }
  5395.             ]
  5396.           },
  5397.           "unit": "kwatt"
  5398.         },
  5399.         "overrides": []
  5400.       },
  5401.       "gridPos": {
  5402.         "h": 10,
  5403.         "w": 12,
  5404.         "x": 0,
  5405.         "y": 70
  5406.       },
  5407.       "id": 123131,
  5408.       "options": {
  5409.         "legend": {
  5410.           "calcs": [
  5411.             "mean",
  5412.             "last"
  5413.           ],
  5414.           "displayMode": "table",
  5415.           "placement": "bottom",
  5416.           "showLegend": true
  5417.         },
  5418.         "tooltip": {
  5419.           "mode": "multi",
  5420.           "sort": "desc"
  5421.         }
  5422.       },
  5423.       "targets": [
  5424.         {
  5425.           "datasource": {
  5426.             "type": "mysql",
  5427.             "uid": "BjbJE3u7z"
  5428.           },
  5429.           "format": "time_series",
  5430.           "group": [],
  5431.           "hide": false,
  5432.           "metricColumn": "none",
  5433.           "rawQuery": true,
  5434.           "rawSql": "WITH pv_forecast_ranked AS (\n  select\n    pv_forecast.forecast_from_date, pv_forecast.kilowatts*pv_rooftop.power AS rooftop_kilowatts, ROW_NUMBER() OVER (PARTITION BY forecast_from_date ORDER BY request_date DESC) AS rn\n  from\n    pv_forecast\n  JOIN pv_rooftop ON pv_rooftop.id = pv_rooftop_id\n  where\n    $__timeFilter(forecast_from_date)\n    and pv_rooftop_id = 1\n  order by forecast_from_date, request_date\n)\nSELECT\n  UNIX_TIMESTAMP(forecast_from_date) AS \"time\",\n  rooftop_kilowatts AS \"solcast.com string1\"\nFROM\n  pv_forecast_ranked\nWHERE\n  rn = 1\n",
  5435.           "refId": "C",
  5436.           "select": [
  5437.             [
  5438.               {
  5439.                 "params": [
  5440.                   "id"
  5441.                 ],
  5442.                 "type": "column"
  5443.               }
  5444.             ]
  5445.           ],
  5446.           "table": "_is_generic_admin_media_objects",
  5447.           "timeColumn": "date_of_creation",
  5448.           "timeColumnType": "timestamp",
  5449.           "where": [
  5450.             {
  5451.               "name": "$__timeFilter",
  5452.               "params": [],
  5453.               "type": "macro"
  5454.             }
  5455.           ]
  5456.         },
  5457.         {
  5458.           "datasource": {
  5459.             "type": "mysql",
  5460.             "uid": "BjbJE3u7z"
  5461.           },
  5462.           "format": "time_series",
  5463.           "group": [],
  5464.           "hide": false,
  5465.           "metricColumn": "none",
  5466.           "rawQuery": true,
  5467.           "rawSql": "WITH pv_forecast_ranked AS (\n  select\n    pv_forecast.forecast_from_date, pv_forecast.kilowatts*pv_rooftop.power AS rooftop_kilowatts, ROW_NUMBER() OVER (PARTITION BY forecast_from_date ORDER BY request_date DESC) AS rn\n  from\n    pv_forecast\n  JOIN pv_rooftop ON pv_rooftop.id = pv_rooftop_id\n  where\n    $__timeFilter(forecast_from_date)\n    and pv_rooftop_id = 2\n  order by forecast_from_date, request_date\n)\nSELECT\n  UNIX_TIMESTAMP(forecast_from_date) AS \"time\",\n  rooftop_kilowatts AS \"solcast.com string2\"\nFROM\n  pv_forecast_ranked\nWHERE\n  rn = 1\n",
  5468.           "refId": "E",
  5469.           "select": [
  5470.             [
  5471.               {
  5472.                 "params": [
  5473.                   "id"
  5474.                 ],
  5475.                 "type": "column"
  5476.               }
  5477.             ]
  5478.           ],
  5479.           "table": "_is_generic_admin_media_objects",
  5480.           "timeColumn": "date_of_creation",
  5481.           "timeColumnType": "timestamp",
  5482.           "where": [
  5483.             {
  5484.               "name": "$__timeFilter",
  5485.               "params": [],
  5486.               "type": "macro"
  5487.             }
  5488.           ]
  5489.         },
  5490.         {
  5491.           "datasource": {
  5492.             "uid": "BjbJE3u7z"
  5493.           },
  5494.           "format": "time_series",
  5495.           "group": [],
  5496.           "hide": false,
  5497.           "metricColumn": "none",
  5498.           "rawQuery": true,
  5499.           "rawSql": "SELECT time*(10*60) AS time, real_pv_string_1 FROM (\n\tSELECT\n\tFLOOR(UNIX_TIMESTAMP(log_date) / (10*60)) as time,\n\tAVG((pv_ppv1)/1000) AS real_pv_string_1\n\tFROM pv_inverter_record\n\tWHERE\n\t$__timeFilter(log_date)\n\tGROUP BY time\n\tORDER BY time\n)r",
  5500.           "refId": "D",
  5501.           "select": [
  5502.             [
  5503.               {
  5504.                 "params": [
  5505.                   "id"
  5506.                 ],
  5507.                 "type": "column"
  5508.               }
  5509.             ]
  5510.           ],
  5511.           "table": "_is_generic_admin_media_objects",
  5512.           "timeColumn": "date_of_creation",
  5513.           "timeColumnType": "timestamp",
  5514.           "where": [
  5515.             {
  5516.               "name": "$__timeFilter",
  5517.               "params": [],
  5518.               "type": "macro"
  5519.             }
  5520.           ]
  5521.         },
  5522.         {
  5523.           "datasource": {
  5524.             "uid": "BjbJE3u7z"
  5525.           },
  5526.           "format": "time_series",
  5527.           "group": [],
  5528.           "hide": false,
  5529.           "metricColumn": "none",
  5530.           "rawQuery": true,
  5531.           "rawSql": "SELECT time*(10*60) AS time, real_pv_string_2 FROM (\n\tSELECT\n\tFLOOR(UNIX_TIMESTAMP(log_date) / (10*60)) as time,\n\tAVG((pv_ppv2)/1000) AS real_pv_string_2\n\tFROM pv_inverter_record\n\tWHERE\n\t$__timeFilter(log_date)\n\tGROUP BY time\n\tORDER BY time\n)r",
  5532.           "refId": "F",
  5533.           "select": [
  5534.             [
  5535.               {
  5536.                 "params": [
  5537.                   "id"
  5538.                 ],
  5539.                 "type": "column"
  5540.               }
  5541.             ]
  5542.           ],
  5543.           "table": "_is_generic_admin_media_objects",
  5544.           "timeColumn": "date_of_creation",
  5545.           "timeColumnType": "timestamp",
  5546.           "where": [
  5547.             {
  5548.               "name": "$__timeFilter",
  5549.               "params": [],
  5550.               "type": "macro"
  5551.             }
  5552.           ]
  5553.         }
  5554.       ],
  5555.       "title": "PV Forecast / Real",
  5556.       "type": "timeseries"
  5557.     },
  5558.     {
  5559.       "datasource": {
  5560.         "type": "mysql",
  5561.         "uid": "BjbJE3u7z"
  5562.       },
  5563.       "fieldConfig": {
  5564.         "defaults": {
  5565.           "color": {
  5566.             "mode": "thresholds"
  5567.           },
  5568.           "custom": {
  5569.             "fillOpacity": 64,
  5570.             "hideFrom": {
  5571.               "legend": false,
  5572.               "tooltip": false,
  5573.               "viz": false
  5574.             },
  5575.             "insertNulls": false,
  5576.             "lineWidth": 0,
  5577.             "spanNulls": false
  5578.           },
  5579.           "mappings": [
  5580.             {
  5581.               "options": {
  5582.                 "Charge": {
  5583.                   "color": "semi-dark-green",
  5584.                   "index": 0
  5585.                 },
  5586.                 "Dischg": {
  5587.                   "color": "semi-dark-red",
  5588.                   "index": 1
  5589.                 }
  5590.               },
  5591.               "type": "value"
  5592.             }
  5593.           ],
  5594.           "thresholds": {
  5595.             "mode": "absolute",
  5596.             "steps": [
  5597.               {
  5598.                 "color": "green",
  5599.                 "value": null
  5600.               },
  5601.               {
  5602.                 "color": "red",
  5603.                 "value": 80
  5604.               }
  5605.             ]
  5606.           }
  5607.         },
  5608.         "overrides": []
  5609.       },
  5610.       "gridPos": {
  5611.         "h": 4,
  5612.         "w": 12,
  5613.         "x": 12,
  5614.         "y": 71
  5615.       },
  5616.       "id": 123200,
  5617.       "options": {
  5618.         "alignValue": "center",
  5619.         "legend": {
  5620.           "displayMode": "list",
  5621.           "placement": "bottom",
  5622.           "showLegend": false
  5623.         },
  5624.         "mergeValues": true,
  5625.         "rowHeight": 1,
  5626.         "showValue": "auto",
  5627.         "tooltip": {
  5628.           "mode": "single",
  5629.           "sort": "none"
  5630.         }
  5631.       },
  5632.       "targets": [
  5633.         {
  5634.           "datasource": {
  5635.             "type": "mysql",
  5636.             "uid": "BjbJE3u7z"
  5637.           },
  5638.           "format": "time_series",
  5639.           "group": [],
  5640.           "metricColumn": "none",
  5641.           "rawQuery": true,
  5642.           "rawSql": "SELECT\n  UNIX_TIMESTAMP(log_date) AS \"time\",\n  base_state_label AS mode\nFROM (\n  select *, @e prev, @e:=base_state_label\n  from pv_battery_state_record, (select @e:='') e\n  WHERE\n    $__timeFilter(log_date)\n) t\nWHERE\n  prev <> base_state_label COLLATE utf8_general_ci\nORDER BY log_date\n",
  5643.           "refId": "A",
  5644.           "select": [
  5645.             [
  5646.               {
  5647.                 "params": [
  5648.                   "id"
  5649.                 ],
  5650.                 "type": "column"
  5651.               }
  5652.             ]
  5653.           ],
  5654.           "table": "_is_generic_admin_media_objects",
  5655.           "timeColumn": "date_of_creation",
  5656.           "timeColumnType": "timestamp",
  5657.           "where": [
  5658.             {
  5659.               "name": "$__timeFilter",
  5660.               "params": [],
  5661.               "type": "macro"
  5662.             }
  5663.           ]
  5664.         }
  5665.       ],
  5666.       "title": "Battery Mode BMS",
  5667.       "type": "state-timeline"
  5668.     },
  5669.     {
  5670.       "datasource": {
  5671.         "type": "mysql",
  5672.         "uid": "BjbJE3u7z"
  5673.       },
  5674.       "fieldConfig": {
  5675.         "defaults": {
  5676.           "color": {
  5677.             "mode": "thresholds"
  5678.           },
  5679.           "custom": {
  5680.             "fillOpacity": 64,
  5681.             "hideFrom": {
  5682.               "legend": false,
  5683.               "tooltip": false,
  5684.               "viz": false
  5685.             },
  5686.             "insertNulls": false,
  5687.             "lineWidth": 1,
  5688.             "spanNulls": false
  5689.           },
  5690.           "mappings": [],
  5691.           "thresholds": {
  5692.             "mode": "absolute",
  5693.             "steps": [
  5694.               {
  5695.                 "color": "orange",
  5696.                 "value": null
  5697.               }
  5698.             ]
  5699.           }
  5700.         },
  5701.         "overrides": []
  5702.       },
  5703.       "gridPos": {
  5704.         "h": 9,
  5705.         "w": 12,
  5706.         "x": 12,
  5707.         "y": 75
  5708.       },
  5709.       "id": 123179,
  5710.       "options": {
  5711.         "alignValue": "center",
  5712.         "legend": {
  5713.           "displayMode": "table",
  5714.           "placement": "bottom",
  5715.           "showLegend": true
  5716.         },
  5717.         "mergeValues": true,
  5718.         "rowHeight": 1,
  5719.         "showValue": "always",
  5720.         "tooltip": {
  5721.           "mode": "single",
  5722.           "sort": "none"
  5723.         }
  5724.       },
  5725.       "targets": [
  5726.         {
  5727.           "datasource": {
  5728.             "type": "mysql",
  5729.             "uid": "BjbJE3u7z"
  5730.           },
  5731.           "format": "time_series",
  5732.           "group": [],
  5733.           "metricColumn": "none",
  5734.           "rawQuery": true,
  5735.           "rawSql": "SELECT\n  UNIX_TIMESTAMP(log_date) AS \"time\",\n  label AS label\nFROM (\n  select log_date, @e prev, @e:=ifnull(nullif(trim(replace(replace(replace(replace(replace(replace(replace(replace(diagnose_result_label, 'Discharge BUS high PV voltage', ''), 'Self-use off', ''), 'Discharge Driver On', ''), 'Self-use load light', ''), 'Export power limit set', ''), 'PF value set', ''), 'Real power limit set', ''), ',', ' ')), ''), '-') AS label\n  from pv_inverter_record, (select @e:='') e\n  WHERE\n    $__timeFilter(log_date)\n) t\nWHERE\n  prev <> label COLLATE utf8_general_ci\nORDER BY log_date\n",
  5736.           "refId": "A",
  5737.           "select": [
  5738.             [
  5739.               {
  5740.                 "params": [
  5741.                   "id"
  5742.                 ],
  5743.                 "type": "column"
  5744.               }
  5745.             ]
  5746.           ],
  5747.           "table": "_is_generic_admin_media_objects",
  5748.           "timeColumn": "date_of_creation",
  5749.           "timeColumnType": "timestamp",
  5750.           "where": [
  5751.             {
  5752.               "name": "$__timeFilter",
  5753.               "params": [],
  5754.               "type": "macro"
  5755.             }
  5756.           ]
  5757.         }
  5758.       ],
  5759.       "title": "Battery Diagnostics",
  5760.       "type": "state-timeline"
  5761.     },
  5762.     {
  5763.       "datasource": {
  5764.         "type": "datasource",
  5765.         "uid": "-- Mixed --"
  5766.       },
  5767.       "description": "",
  5768.       "fieldConfig": {
  5769.         "defaults": {
  5770.           "color": {
  5771.             "mode": "palette-classic"
  5772.           },
  5773.           "custom": {
  5774.             "axisBorderShow": false,
  5775.             "axisCenteredZero": false,
  5776.             "axisColorMode": "text",
  5777.             "axisLabel": "",
  5778.             "axisPlacement": "auto",
  5779.             "barAlignment": 0,
  5780.             "drawStyle": "line",
  5781.             "fillOpacity": 0,
  5782.             "gradientMode": "none",
  5783.             "hideFrom": {
  5784.               "legend": false,
  5785.               "tooltip": false,
  5786.               "viz": false
  5787.             },
  5788.             "insertNulls": false,
  5789.             "lineInterpolation": "linear",
  5790.             "lineWidth": 1,
  5791.             "pointSize": 5,
  5792.             "scaleDistribution": {
  5793.               "type": "linear"
  5794.             },
  5795.             "showPoints": "auto",
  5796.             "spanNulls": false,
  5797.             "stacking": {
  5798.               "group": "A",
  5799.               "mode": "none"
  5800.             },
  5801.             "thresholdsStyle": {
  5802.               "mode": "off"
  5803.             }
  5804.           },
  5805.           "mappings": [],
  5806.           "thresholds": {
  5807.             "mode": "absolute",
  5808.             "steps": [
  5809.               {
  5810.                 "color": "green",
  5811.                 "value": null
  5812.               },
  5813.               {
  5814.                 "color": "red",
  5815.                 "value": 80
  5816.               }
  5817.             ]
  5818.           },
  5819.           "unit": "kwatth"
  5820.         },
  5821.         "overrides": []
  5822.       },
  5823.       "gridPos": {
  5824.         "h": 8,
  5825.         "w": 12,
  5826.         "x": 0,
  5827.         "y": 80
  5828.       },
  5829.       "id": 123188,
  5830.       "options": {
  5831.         "legend": {
  5832.           "calcs": [
  5833.             "mean",
  5834.             "last"
  5835.           ],
  5836.           "displayMode": "table",
  5837.           "placement": "bottom",
  5838.           "showLegend": true
  5839.         },
  5840.         "tooltip": {
  5841.           "mode": "multi",
  5842.           "sort": "desc"
  5843.         }
  5844.       },
  5845.       "targets": [
  5846.         {
  5847.           "datasource": {
  5848.             "uid": "BjbJE3u7z"
  5849.           },
  5850.           "editorMode": "code",
  5851.           "format": "time_series",
  5852.           "group": [],
  5853.           "hide": false,
  5854.           "metricColumn": "none",
  5855.           "rawQuery": true,
  5856.           "rawSql": "WITH\n\tpv_forecast_ranked_1 AS (\n\t\tselect\n\t\t\tpv_forecast.forecast_to_date, pv_forecast.kilowatts*pv_rooftop.power AS rooftop_kilowatts, ROW_NUMBER() OVER (PARTITION BY forecast_from_date ORDER BY request_date DESC) AS rn\n\t\tfrom\n\t\t\tpv_forecast\n\t\tJOIN pv_rooftop ON pv_rooftop.id = pv_rooftop_id\n\t\twhere\n\t\t\tDATE($__timeTo()) = DATE(forecast_to_date)\n\t\t\tand pv_rooftop_id = 1\n\t\torder by forecast_to_date, request_date\n\t),\n\tpv_forecast_ranked_2 AS (\n\t\tselect\n\t\t\tpv_forecast.forecast_to_date, pv_forecast.kilowatts*pv_rooftop.power AS rooftop_kilowatts, ROW_NUMBER() OVER (PARTITION BY forecast_from_date ORDER BY request_date DESC) AS rn\n\t\tfrom\n\t\t\tpv_forecast\n\t\tJOIN pv_rooftop ON pv_rooftop.id = pv_rooftop_id\n\t\twhere\n\t\t\tDATE($__timeTo()) = DATE(forecast_to_date)\n\t\t\tand pv_rooftop_id = 2\n\t\torder by forecast_to_date, request_date\n\t)\n\nSELECT * FROM (\n\tSELECT time, total_power AS pv_forecast_rest_power FROM (\n\t\tSELECT time, @curr:=(string1+string2)*(ABS(IF(@prevTime IS NULL, 0, time-@prevTime)/3600)) as kwh, @e:=@e+@curr AS total_power, @prevTime:=time FROM (\n\t\t\tSELECT\n\t\t\tUNIX_TIMESTAMP(pv_forecast_ranked_1.forecast_to_date) AS \"time\",\n\t\t\tpv_forecast_ranked_1.rooftop_kilowatts AS string1, pv_forecast_ranked_2.rooftop_kilowatts AS string2\n\t\t\tFROM\n\t\t\tpv_forecast_ranked_1, pv_forecast_ranked_2\n\t\t\tWHERE\n\t\t\tpv_forecast_ranked_1.forecast_to_date = pv_forecast_ranked_2.forecast_to_date\n\t\t\tAND pv_forecast_ranked_1.rn = 1\n\t\t\tAND pv_forecast_ranked_2.rn = 1\n\t\t\tORDER BY time DESC\n\t\t) forecast, (SELECT@e:=0)e, (SELECT@prevTime:=NULL)prevTime\n\t) forecast2\n\tORDER BY time ASC\n) forecast3",
  5857.           "refId": "F",
  5858.           "select": [
  5859.             [
  5860.               {
  5861.                 "params": [
  5862.                   "id"
  5863.                 ],
  5864.                 "type": "column"
  5865.               }
  5866.             ]
  5867.           ],
  5868.           "sql": {
  5869.             "columns": [
  5870.               {
  5871.                 "parameters": [],
  5872.                 "type": "function"
  5873.               }
  5874.             ],
  5875.             "groupBy": [
  5876.               {
  5877.                 "property": {
  5878.                   "type": "string"
  5879.                 },
  5880.                 "type": "groupBy"
  5881.               }
  5882.             ],
  5883.             "limit": 50
  5884.           },
  5885.           "table": "_is_generic_admin_media_objects",
  5886.           "timeColumn": "date_of_creation",
  5887.           "timeColumnType": "timestamp",
  5888.           "where": [
  5889.             {
  5890.               "name": "$__timeFilter",
  5891.               "params": [],
  5892.               "type": "macro"
  5893.             }
  5894.           ]
  5895.         }
  5896.       ],
  5897.       "title": "PV Forecast Rest Power",
  5898.       "type": "timeseries"
  5899.     },
  5900.     {
  5901.       "datasource": {
  5902.         "type": "mysql",
  5903.         "uid": "BjbJE3u7z"
  5904.       },
  5905.       "fieldConfig": {
  5906.         "defaults": {
  5907.           "color": {
  5908.             "mode": "palette-classic"
  5909.           },
  5910.           "custom": {
  5911.             "axisBorderShow": false,
  5912.             "axisCenteredZero": false,
  5913.             "axisColorMode": "text",
  5914.             "axisLabel": "",
  5915.             "axisPlacement": "auto",
  5916.             "barAlignment": 0,
  5917.             "drawStyle": "line",
  5918.             "fillOpacity": 0,
  5919.             "gradientMode": "none",
  5920.             "hideFrom": {
  5921.               "legend": false,
  5922.               "tooltip": false,
  5923.               "viz": false
  5924.             },
  5925.             "insertNulls": false,
  5926.             "lineInterpolation": "linear",
  5927.             "lineWidth": 1,
  5928.             "pointSize": 5,
  5929.             "scaleDistribution": {
  5930.               "type": "linear"
  5931.             },
  5932.             "showPoints": "auto",
  5933.             "spanNulls": false,
  5934.             "stacking": {
  5935.               "group": "A",
  5936.               "mode": "none"
  5937.             },
  5938.             "thresholdsStyle": {
  5939.               "mode": "line"
  5940.             }
  5941.           },
  5942.           "mappings": [],
  5943.           "thresholds": {
  5944.             "mode": "absolute",
  5945.             "steps": [
  5946.               {
  5947.                 "color": "green",
  5948.                 "value": null
  5949.               },
  5950.               {
  5951.                 "color": "#ffffff",
  5952.                 "value": 0
  5953.               }
  5954.             ]
  5955.           },
  5956.           "unit": "watt"
  5957.         },
  5958.         "overrides": []
  5959.       },
  5960.       "gridPos": {
  5961.         "h": 8,
  5962.         "w": 12,
  5963.         "x": 12,
  5964.         "y": 84
  5965.       },
  5966.       "id": 123133,
  5967.       "options": {
  5968.         "legend": {
  5969.           "calcs": [
  5970.             "mean",
  5971.             "last"
  5972.           ],
  5973.           "displayMode": "table",
  5974.           "placement": "bottom",
  5975.           "showLegend": true
  5976.         },
  5977.         "tooltip": {
  5978.           "mode": "multi",
  5979.           "sort": "desc"
  5980.         }
  5981.       },
  5982.       "targets": [
  5983.         {
  5984.           "datasource": {
  5985.             "type": "mysql",
  5986.             "uid": "BjbJE3u7z"
  5987.           },
  5988.           "editorMode": "code",
  5989.           "format": "time_series",
  5990.           "group": [],
  5991.           "metricColumn": "none",
  5992.           "rawQuery": true,
  5993.           "rawSql": "SELECT\n  UNIX_TIMESTAMP(log_date) AS \"time\",\n  pv_ppv AS pv_source,\n  -- ac_house_consumption*-1 as ac_house_consumption,\n  -- battery_pbattery1 as battery_source,\n  grid_active_power*-1 AS grid_source,\n  GREATEST((IF(work_mode_label = \"Normal (On-Grid)\", ac_load_p1, 0)+IF(work_mode_label = \"Normal (On-Grid)\", ac_load_p2, 0)+IF(work_mode_label = \"Normal (On-Grid)\", ac_load_p3, 0)) + (backup_p1+backup_p2+backup_p3), ac_house_consumption /*ac_pgrid1+ac_pgrid2+ac_pgrid3,*/)*-1 AS ac_house_consumption_maxof\n  -- (ac_load_p1+ac_load_p2+ac_load_p3)*-1 AS ac_load_power,\n  -- (backup_p1+backup_p2+backup_p3)*-1 AS backup_power\nFROM pv_inverter_record\nWHERE\n  $__timeFilter(log_date)\n  AND pv_inverter_id = $pv_inverter_id \nORDER BY log_date",
  5994.           "refId": "A",
  5995.           "select": [
  5996.             [
  5997.               {
  5998.                 "params": [
  5999.                   "id"
  6000.                 ],
  6001.                 "type": "column"
  6002.               }
  6003.             ]
  6004.           ],
  6005.           "sql": {
  6006.             "columns": [
  6007.               {
  6008.                 "parameters": [],
  6009.                 "type": "function"
  6010.               }
  6011.             ],
  6012.             "groupBy": [
  6013.               {
  6014.                 "property": {
  6015.                   "type": "string"
  6016.                 },
  6017.                 "type": "groupBy"
  6018.               }
  6019.             ],
  6020.             "limit": 50
  6021.           },
  6022.           "table": "_is_generic_admin_media_objects",
  6023.           "timeColumn": "date_of_creation",
  6024.           "timeColumnType": "timestamp",
  6025.           "where": [
  6026.             {
  6027.               "name": "$__timeFilter",
  6028.               "params": [],
  6029.               "type": "macro"
  6030.             }
  6031.           ]
  6032.         },
  6033.         {
  6034.           "datasource": {
  6035.             "type": "mysql",
  6036.             "uid": "BjbJE3u7z"
  6037.           },
  6038.           "editorMode": "code",
  6039.           "format": "time_series",
  6040.           "group": [],
  6041.           "hide": false,
  6042.           "metricColumn": "none",
  6043.           "rawQuery": true,
  6044.           "rawSql": "SELECT\n  UNIX_TIMESTAMP(log_date) AS \"time\",\n  current*voltage*-1 as bms_battery_source\nFROM pv_battery_state_record\nWHERE\n  $__timeFilter(log_date)\nORDER BY log_date",
  6045.           "refId": "B",
  6046.           "select": [
  6047.             [
  6048.               {
  6049.                 "params": [
  6050.                   "id"
  6051.                 ],
  6052.                 "type": "column"
  6053.               }
  6054.             ]
  6055.           ],
  6056.           "sql": {
  6057.             "columns": [
  6058.               {
  6059.                 "parameters": [],
  6060.                 "type": "function"
  6061.               }
  6062.             ],
  6063.             "groupBy": [
  6064.               {
  6065.                 "property": {
  6066.                   "type": "string"
  6067.                 },
  6068.                 "type": "groupBy"
  6069.               }
  6070.             ],
  6071.             "limit": 50
  6072.           },
  6073.           "table": "_is_generic_admin_media_objects",
  6074.           "timeColumn": "date_of_creation",
  6075.           "timeColumnType": "timestamp",
  6076.           "where": [
  6077.             {
  6078.               "name": "$__timeFilter",
  6079.               "params": [],
  6080.               "type": "macro"
  6081.             }
  6082.           ]
  6083.         }
  6084.       ],
  6085.       "title": "Power - All",
  6086.       "type": "timeseries"
  6087.     },
  6088.     {
  6089.       "datasource": {
  6090.         "type": "datasource",
  6091.         "uid": "-- Mixed --"
  6092.       },
  6093.       "fieldConfig": {
  6094.         "defaults": {
  6095.           "color": {
  6096.             "mode": "palette-classic"
  6097.           },
  6098.           "custom": {
  6099.             "axisBorderShow": false,
  6100.             "axisCenteredZero": false,
  6101.             "axisColorMode": "text",
  6102.             "axisLabel": "",
  6103.             "axisPlacement": "auto",
  6104.             "barAlignment": 0,
  6105.             "drawStyle": "line",
  6106.             "fillOpacity": 0,
  6107.             "gradientMode": "none",
  6108.             "hideFrom": {
  6109.               "legend": false,
  6110.               "tooltip": false,
  6111.               "viz": false
  6112.             },
  6113.             "insertNulls": false,
  6114.             "lineInterpolation": "linear",
  6115.             "lineWidth": 1,
  6116.             "pointSize": 5,
  6117.             "scaleDistribution": {
  6118.               "type": "linear"
  6119.             },
  6120.             "showPoints": "auto",
  6121.             "spanNulls": false,
  6122.             "stacking": {
  6123.               "group": "A",
  6124.               "mode": "none"
  6125.             },
  6126.             "thresholdsStyle": {
  6127.               "mode": "off"
  6128.             }
  6129.           },
  6130.           "mappings": [],
  6131.           "thresholds": {
  6132.             "mode": "absolute",
  6133.             "steps": [
  6134.               {
  6135.                 "color": "green",
  6136.                 "value": null
  6137.               },
  6138.               {
  6139.                 "color": "red",
  6140.                 "value": 80
  6141.               }
  6142.             ]
  6143.           },
  6144.           "unit": "kwatth"
  6145.         },
  6146.         "overrides": []
  6147.       },
  6148.       "gridPos": {
  6149.         "h": 12,
  6150.         "w": 12,
  6151.         "x": 0,
  6152.         "y": 88
  6153.       },
  6154.       "id": 123196,
  6155.       "options": {
  6156.         "legend": {
  6157.           "calcs": [
  6158.             "mean",
  6159.             "last"
  6160.           ],
  6161.           "displayMode": "table",
  6162.           "placement": "bottom",
  6163.           "showLegend": true
  6164.         },
  6165.         "tooltip": {
  6166.           "mode": "multi",
  6167.           "sort": "desc"
  6168.         }
  6169.       },
  6170.       "targets": [
  6171.         {
  6172.           "datasource": {
  6173.             "uid": "BjbJE3u7z"
  6174.           },
  6175.           "format": "time_series",
  6176.           "group": [],
  6177.           "hide": false,
  6178.           "metricColumn": "none",
  6179.           "rawQuery": true,
  6180.           "rawSql": "WITH\n\tpv_forecast_ranked_1 AS (\n\t\tselect\n\t\t\tpv_forecast.forecast_to_date, pv_forecast.kilowatts*pv_rooftop.power AS rooftop_kilowatts, ROW_NUMBER() OVER (PARTITION BY forecast_from_date ORDER BY request_date DESC) AS rn\n\t\tfrom\n\t\t\tpv_forecast\n\t\tJOIN pv_rooftop ON pv_rooftop.id = pv_rooftop_id\n\t\twhere\n\t\t\t$__timeFilter(forecast_to_date)\n\t\t\tand pv_rooftop_id = 1\n\t\torder by forecast_to_date, request_date\n\t),\n\tpv_forecast_ranked_2 AS (\n\t\tselect\n\t\t\tpv_forecast.forecast_to_date, pv_forecast.kilowatts*pv_rooftop.power AS rooftop_kilowatts, ROW_NUMBER() OVER (PARTITION BY forecast_from_date ORDER BY request_date DESC) AS rn\n\t\tfrom\n\t\t\tpv_forecast\n\t\tJOIN pv_rooftop ON pv_rooftop.id = pv_rooftop_id\n\t\twhere\n\t\t\t$__timeFilter(forecast_to_date)\n\t\t\tand pv_rooftop_id = 2\n\t\torder by forecast_to_date, request_date\n\t)\n\nSELECT * FROM (\n\tSELECT time, total_power AS pv_forecast_power FROM (\n\t\tSELECT time, @curr:=(string1+string2)*(ABS(IF(@prevTime IS NULL, 0, time-@prevTime)/3600)) as kwh, @e:=@e+@curr AS total_power, @prevTime:=time FROM (\n\t\t\tSELECT\n\t\t\tUNIX_TIMESTAMP(pv_forecast_ranked_1.forecast_to_date) AS \"time\",\n\t\t\tpv_forecast_ranked_1.rooftop_kilowatts AS string1, pv_forecast_ranked_2.rooftop_kilowatts AS string2\n\t\t\tFROM\n\t\t\tpv_forecast_ranked_1, pv_forecast_ranked_2\n\t\t\tWHERE\n\t\t\tpv_forecast_ranked_1.forecast_to_date = pv_forecast_ranked_2.forecast_to_date\n\t\t\tAND pv_forecast_ranked_1.rn = 1\n\t\t\tAND pv_forecast_ranked_2.rn = 1\n\t\t\tORDER BY time ASC\n\t\t) forecast, (SELECT@e:=0)e, (SELECT@prevTime:=NULL)prevTime\n\t) foreast2\n\tORDER BY time ASC\n) foreast3",
  6181.           "refId": "F",
  6182.           "select": [
  6183.             [
  6184.               {
  6185.                 "params": [
  6186.                   "id"
  6187.                 ],
  6188.                 "type": "column"
  6189.               }
  6190.             ]
  6191.           ],
  6192.           "table": "_is_generic_admin_media_objects",
  6193.           "timeColumn": "date_of_creation",
  6194.           "timeColumnType": "timestamp",
  6195.           "where": [
  6196.             {
  6197.               "name": "$__timeFilter",
  6198.               "params": [],
  6199.               "type": "macro"
  6200.             }
  6201.           ]
  6202.         },
  6203.         {
  6204.           "datasource": {
  6205.             "uid": "BjbJE3u7z"
  6206.           },
  6207.           "format": "time_series",
  6208.           "group": [],
  6209.           "hide": false,
  6210.           "metricColumn": "none",
  6211.           "rawQuery": true,
  6212.           "rawSql": "\nSELECT time, total_ws/1000/3600 AS house_consumption_kwh FROM (\n\tSELECT time, @curr:=power_value*(IF(@prevT IS NULL, 0, time-@prevT)) as ws, @e:=@e+@curr AS total_ws, @prevT:=time FROM (\n\t\tSELECT\n\t\tUNIX_TIMESTAMP(log_date) AS \"time\",\n\t\t-- ac_house_consumption AS power_value\n\t\tGREATEST((IF(work_mode_label = \"Normal (On-Grid)\", ac_load_p1, 0)+IF(work_mode_label = \"Normal (On-Grid)\", ac_load_p2, 0)+IF(work_mode_label = \"Normal (On-Grid)\", ac_load_p3, 0)) + (backup_p1+backup_p2+backup_p3), ac_house_consumption) AS power_value\n\t\tFROM pv_inverter_record\n\t\tWHERE\n\t\t$__timeFilter(log_date)\n\t\tORDER BY log_date\n\t)r1, (SELECT@e:=0)e, (SELECT@prevT:=NULL)prevT\n)r2;",
  6213.           "refId": "A",
  6214.           "select": [
  6215.             [
  6216.               {
  6217.                 "params": [
  6218.                   "id"
  6219.                 ],
  6220.                 "type": "column"
  6221.               }
  6222.             ]
  6223.           ],
  6224.           "table": "_is_generic_admin_media_objects",
  6225.           "timeColumn": "date_of_creation",
  6226.           "timeColumnType": "timestamp",
  6227.           "where": [
  6228.             {
  6229.               "name": "$__timeFilter",
  6230.               "params": [],
  6231.               "type": "macro"
  6232.             }
  6233.           ]
  6234.         },
  6235.         {
  6236.           "datasource": {
  6237.             "type": "mysql",
  6238.             "uid": "BjbJE3u7z"
  6239.           },
  6240.           "format": "time_series",
  6241.           "group": [],
  6242.           "hide": false,
  6243.           "metricColumn": "none",
  6244.           "rawQuery": true,
  6245.           "rawSql": "\nSELECT time, total_ws/1000/3600 AS pv_harvested_kwh FROM (\n\tSELECT time, @curr:=power_value*(IF(@prevT IS NULL, 0, time-@prevT)) as ws, @e:=@e+@curr AS total_ws, @prevT:=time FROM (\n\t\tSELECT\n\t\tUNIX_TIMESTAMP(log_date) AS \"time\",\n\t\tpv_ppv AS power_value\n\t\tFROM pv_inverter_record\n\t\tWHERE\n\t\t$__timeFilter(log_date)\n\t\tORDER BY log_date\n\t)r1, (SELECT@e:=0)e, (SELECT@prevT:=NULL)prevT\n)r2;",
  6246.           "refId": "B",
  6247.           "select": [
  6248.             [
  6249.               {
  6250.                 "params": [
  6251.                   "id"
  6252.                 ],
  6253.                 "type": "column"
  6254.               }
  6255.             ]
  6256.           ],
  6257.           "table": "_is_generic_admin_media_objects",
  6258.           "timeColumn": "date_of_creation",
  6259.           "timeColumnType": "timestamp",
  6260.           "where": [
  6261.             {
  6262.               "name": "$__timeFilter",
  6263.               "params": [],
  6264.               "type": "macro"
  6265.             }
  6266.           ]
  6267.         },
  6268.         {
  6269.           "datasource": {
  6270.             "type": "mysql",
  6271.             "uid": "BjbJE3u7z"
  6272.           },
  6273.           "format": "time_series",
  6274.           "group": [],
  6275.           "hide": false,
  6276.           "metricColumn": "none",
  6277.           "rawQuery": true,
  6278.           "rawSql": "\nSELECT time, total_ws/1000/3600 AS grid_export_kwh FROM (\n\tSELECT time, @curr:=power_value*(IF(@prevT IS NULL, 0, time-@prevT)) as ws, @e:=@e+@curr AS total_ws, @prevT:=time FROM (\n\t\tSELECT\n\t\tUNIX_TIMESTAMP(log_date) AS \"time\",\n\t\tIF(grid_meter_active_power1 > 0, grid_meter_active_power1, 0) + IF(grid_meter_active_power2 > 0, grid_meter_active_power2, 0) + IF(grid_meter_active_power3 > 0, grid_meter_active_power3, 0) AS power_value\n\t\tFROM pv_inverter_record\n\t\tWHERE\n\t\t$__timeFilter(log_date)\n\t\tORDER BY log_date\n\t)r1, (SELECT@e:=0)e, (SELECT@prevT:=NULL)prevT\n)r2;",
  6279.           "refId": "C",
  6280.           "select": [
  6281.             [
  6282.               {
  6283.                 "params": [
  6284.                   "id"
  6285.                 ],
  6286.                 "type": "column"
  6287.               }
  6288.             ]
  6289.           ],
  6290.           "table": "_is_generic_admin_media_objects",
  6291.           "timeColumn": "date_of_creation",
  6292.           "timeColumnType": "timestamp",
  6293.           "where": [
  6294.             {
  6295.               "name": "$__timeFilter",
  6296.               "params": [],
  6297.               "type": "macro"
  6298.             }
  6299.           ]
  6300.         },
  6301.         {
  6302.           "datasource": {
  6303.             "type": "mysql",
  6304.             "uid": "BjbJE3u7z"
  6305.           },
  6306.           "format": "time_series",
  6307.           "group": [],
  6308.           "hide": false,
  6309.           "metricColumn": "none",
  6310.           "rawQuery": true,
  6311.           "rawSql": "\nSELECT time, total_ws/1000/3600 AS grid_import_kwh FROM (\n\tSELECT time, @curr:=power_value*(IF(@prevT IS NULL, 0, time-@prevT)) as ws, @e:=@e+@curr AS total_ws, @prevT:=time FROM (\n\t\tSELECT\n\t\tUNIX_TIMESTAMP(log_date) AS \"time\",\n\t\t-1*(IF(grid_meter_active_power1 < 0, grid_meter_active_power1, 0) + IF(grid_meter_active_power2 < 0, grid_meter_active_power2, 0) + IF(grid_meter_active_power3 < 0, grid_meter_active_power3, 0)) AS power_value\n\t\tFROM pv_inverter_record\n\t\tWHERE\n\t\t$__timeFilter(log_date)\n\t\tORDER BY log_date\n\t)r1, (SELECT@e:=0)e, (SELECT@prevT:=NULL)prevT\n)r2;",
  6312.           "refId": "D",
  6313.           "select": [
  6314.             [
  6315.               {
  6316.                 "params": [
  6317.                   "id"
  6318.                 ],
  6319.                 "type": "column"
  6320.               }
  6321.             ]
  6322.           ],
  6323.           "table": "_is_generic_admin_media_objects",
  6324.           "timeColumn": "date_of_creation",
  6325.           "timeColumnType": "timestamp",
  6326.           "where": [
  6327.             {
  6328.               "name": "$__timeFilter",
  6329.               "params": [],
  6330.               "type": "macro"
  6331.             }
  6332.           ]
  6333.         }
  6334.       ],
  6335.       "title": "Power Sums",
  6336.       "type": "timeseries"
  6337.     },
  6338.     {
  6339.       "datasource": {
  6340.         "type": "mysql",
  6341.         "uid": "BjbJE3u7z"
  6342.       },
  6343.       "fieldConfig": {
  6344.         "defaults": {
  6345.           "color": {
  6346.             "mode": "palette-classic"
  6347.           },
  6348.           "custom": {
  6349.             "axisBorderShow": false,
  6350.             "axisCenteredZero": false,
  6351.             "axisColorMode": "text",
  6352.             "axisLabel": "",
  6353.             "axisPlacement": "auto",
  6354.             "barAlignment": 0,
  6355.             "drawStyle": "line",
  6356.             "fillOpacity": 0,
  6357.             "gradientMode": "none",
  6358.             "hideFrom": {
  6359.               "legend": false,
  6360.               "tooltip": false,
  6361.               "viz": false
  6362.             },
  6363.             "insertNulls": false,
  6364.             "lineInterpolation": "linear",
  6365.             "lineWidth": 1,
  6366.             "pointSize": 5,
  6367.             "scaleDistribution": {
  6368.               "type": "linear"
  6369.             },
  6370.             "showPoints": "auto",
  6371.             "spanNulls": false,
  6372.             "stacking": {
  6373.               "group": "A",
  6374.               "mode": "none"
  6375.             },
  6376.             "thresholdsStyle": {
  6377.               "mode": "line"
  6378.             }
  6379.           },
  6380.           "mappings": [],
  6381.           "thresholds": {
  6382.             "mode": "absolute",
  6383.             "steps": [
  6384.               {
  6385.                 "color": "green",
  6386.                 "value": null
  6387.               },
  6388.               {
  6389.                 "color": "#ffffff",
  6390.                 "value": 0
  6391.               }
  6392.             ]
  6393.           },
  6394.           "unit": "watt"
  6395.         },
  6396.         "overrides": []
  6397.       },
  6398.       "gridPos": {
  6399.         "h": 8,
  6400.         "w": 12,
  6401.         "x": 12,
  6402.         "y": 92
  6403.       },
  6404.       "id": 123185,
  6405.       "options": {
  6406.         "legend": {
  6407.           "calcs": [
  6408.             "last",
  6409.             "min",
  6410.             "max"
  6411.           ],
  6412.           "displayMode": "table",
  6413.           "placement": "bottom",
  6414.           "showLegend": true
  6415.         },
  6416.         "tooltip": {
  6417.           "mode": "multi",
  6418.           "sort": "desc"
  6419.         }
  6420.       },
  6421.       "targets": [
  6422.         {
  6423.           "datasource": {
  6424.             "type": "mysql",
  6425.             "uid": "BjbJE3u7z"
  6426.           },
  6427.           "editorMode": "code",
  6428.           "format": "time_series",
  6429.           "group": [],
  6430.           "metricColumn": "none",
  6431.           "rawQuery": true,
  6432.           "rawSql": "SELECT\n  UNIX_TIMESTAMP(log_date) AS \"time\",\n  grid_active_power1 as L1, grid_active_power2 as L2, grid_active_power3 as L3, grid_active_power1+grid_active_power2+grid_active_power3 as total\nFROM pv_inverter_record\nWHERE\n  $__timeFilter(log_date)\n  AND pv_inverter_id = 1\nORDER BY log_date",
  6433.           "refId": "A",
  6434.           "select": [
  6435.             [
  6436.               {
  6437.                 "params": [
  6438.                   "id"
  6439.                 ],
  6440.                 "type": "column"
  6441.               }
  6442.             ]
  6443.           ],
  6444.           "sql": {
  6445.             "columns": [
  6446.               {
  6447.                 "parameters": [],
  6448.                 "type": "function"
  6449.               }
  6450.             ],
  6451.             "groupBy": [
  6452.               {
  6453.                 "property": {
  6454.                   "type": "string"
  6455.                 },
  6456.                 "type": "groupBy"
  6457.               }
  6458.             ],
  6459.             "limit": 50
  6460.           },
  6461.           "table": "_is_generic_admin_media_objects",
  6462.           "timeColumn": "date_of_creation",
  6463.           "timeColumnType": "timestamp",
  6464.           "where": [
  6465.             {
  6466.               "name": "$__timeFilter",
  6467.               "params": [],
  6468.               "type": "macro"
  6469.             }
  6470.           ]
  6471.         }
  6472.       ],
  6473.       "title": "Grid Meter Power",
  6474.       "type": "timeseries"
  6475.     },
  6476.     {
  6477.       "datasource": {
  6478.         "type": "datasource",
  6479.         "uid": "-- Mixed --"
  6480.       },
  6481.       "fieldConfig": {
  6482.         "defaults": {
  6483.           "color": {
  6484.             "mode": "palette-classic"
  6485.           },
  6486.           "custom": {
  6487.             "axisBorderShow": false,
  6488.             "axisCenteredZero": false,
  6489.             "axisColorMode": "text",
  6490.             "axisLabel": "",
  6491.             "axisPlacement": "auto",
  6492.             "axisSoftMin": 0,
  6493.             "fillOpacity": 80,
  6494.             "gradientMode": "none",
  6495.             "hideFrom": {
  6496.               "legend": false,
  6497.               "tooltip": false,
  6498.               "viz": false
  6499.             },
  6500.             "lineWidth": 1,
  6501.             "scaleDistribution": {
  6502.               "type": "linear"
  6503.             },
  6504.             "thresholdsStyle": {
  6505.               "mode": "off"
  6506.             }
  6507.           },
  6508.           "mappings": [],
  6509.           "thresholds": {
  6510.             "mode": "absolute",
  6511.             "steps": [
  6512.               {
  6513.                 "color": "green",
  6514.                 "value": null
  6515.               },
  6516.               {
  6517.                 "color": "red",
  6518.                 "value": 80
  6519.               }
  6520.             ]
  6521.           },
  6522.           "unit": "kwatth"
  6523.         },
  6524.         "overrides": []
  6525.       },
  6526.       "gridPos": {
  6527.         "h": 12,
  6528.         "w": 12,
  6529.         "x": 0,
  6530.         "y": 100
  6531.       },
  6532.       "id": 123210,
  6533.       "options": {
  6534.         "barRadius": 0,
  6535.         "barWidth": 0.97,
  6536.         "fullHighlight": false,
  6537.         "groupWidth": 0.7,
  6538.         "legend": {
  6539.           "calcs": [],
  6540.           "displayMode": "list",
  6541.           "placement": "bottom",
  6542.           "showLegend": true
  6543.         },
  6544.         "orientation": "auto",
  6545.         "showValue": "auto",
  6546.         "stacking": "none",
  6547.         "tooltip": {
  6548.           "mode": "single",
  6549.           "sort": "none"
  6550.         },
  6551.         "xTickLabelRotation": 0,
  6552.         "xTickLabelSpacing": 0
  6553.       },
  6554.       "targets": [
  6555.         {
  6556.           "datasource": {
  6557.             "uid": "BjbJE3u7z"
  6558.           },
  6559.           "editorMode": "code",
  6560.           "format": "time_series",
  6561.           "group": [],
  6562.           "hide": false,
  6563.           "metricColumn": "none",
  6564.           "rawQuery": true,
  6565.           "rawSql": "\nSELECT UNIX_TIMESTAMP(DATE(FROM_UNIXTIME(time))) AS time_sec, SUM(total_ws/1000/3600) AS pv_harvested_kwh_string1 FROM (\n\tSELECT time, @curr:=power_value*(IF(@prevT IS NULL, 0, time-@prevT)) as ws, @curr AS total_ws, @prevT:=time FROM (\n\t\tSELECT\n\t\tUNIX_TIMESTAMP(log_date) AS \"time\",\n\t\tpv_ppv1 AS power_value\n\t\tFROM pv_inverter_record\n\t\tWHERE\n\t\t$__timeFilter(log_date)\n\t\tORDER BY log_date\n\t)r1, (SELECT@e:=0)e, (SELECT@prevT:=NULL)prevT\n)r2 GROUP BY time_sec;",
  6566.           "refId": "F",
  6567.           "select": [
  6568.             [
  6569.               {
  6570.                 "params": [
  6571.                   "id"
  6572.                 ],
  6573.                 "type": "column"
  6574.               }
  6575.             ]
  6576.           ],
  6577.           "sql": {
  6578.             "columns": [
  6579.               {
  6580.                 "parameters": [],
  6581.                 "type": "function"
  6582.               }
  6583.             ],
  6584.             "groupBy": [
  6585.               {
  6586.                 "property": {
  6587.                   "type": "string"
  6588.                 },
  6589.                 "type": "groupBy"
  6590.               }
  6591.             ],
  6592.             "limit": 50
  6593.           },
  6594.           "table": "_is_generic_admin_media_objects",
  6595.           "timeColumn": "date_of_creation",
  6596.           "timeColumnType": "timestamp",
  6597.           "where": [
  6598.             {
  6599.               "name": "$__timeFilter",
  6600.               "params": [],
  6601.               "type": "macro"
  6602.             }
  6603.           ]
  6604.         },
  6605.         {
  6606.           "datasource": {
  6607.             "uid": "BjbJE3u7z"
  6608.           },
  6609.           "editorMode": "code",
  6610.           "format": "time_series",
  6611.           "group": [],
  6612.           "hide": false,
  6613.           "metricColumn": "none",
  6614.           "rawQuery": true,
  6615.           "rawSql": "\nSELECT UNIX_TIMESTAMP(DATE(FROM_UNIXTIME(time))) AS time_sec, SUM(total_ws/1000/3600) AS pv_harvested_kwh_string2 FROM (\n\tSELECT time, @curr:=power_value*(IF(@prevT IS NULL, 0, time-@prevT)) as ws, @curr AS total_ws, @prevT:=time FROM (\n\t\tSELECT\n\t\tUNIX_TIMESTAMP(log_date) AS \"time\",\n\t\tpv_ppv2 AS power_value\n\t\tFROM pv_inverter_record\n\t\tWHERE\n\t\t$__timeFilter(log_date)\n\t\tORDER BY log_date\n\t)r1, (SELECT@e:=0)e, (SELECT@prevT:=NULL)prevT\n)r2 GROUP BY time_sec;",
  6616.           "refId": "A",
  6617.           "select": [
  6618.             [
  6619.               {
  6620.                 "params": [
  6621.                   "id"
  6622.                 ],
  6623.                 "type": "column"
  6624.               }
  6625.             ]
  6626.           ],
  6627.           "sql": {
  6628.             "columns": [
  6629.               {
  6630.                 "parameters": [],
  6631.                 "type": "function"
  6632.               }
  6633.             ],
  6634.             "groupBy": [
  6635.               {
  6636.                 "property": {
  6637.                   "type": "string"
  6638.                 },
  6639.                 "type": "groupBy"
  6640.               }
  6641.             ],
  6642.             "limit": 50
  6643.           },
  6644.           "table": "_is_generic_admin_media_objects",
  6645.           "timeColumn": "date_of_creation",
  6646.           "timeColumnType": "timestamp",
  6647.           "where": [
  6648.             {
  6649.               "name": "$__timeFilter",
  6650.               "params": [],
  6651.               "type": "macro"
  6652.             }
  6653.           ]
  6654.         }
  6655.       ],
  6656.       "title": "Harvest By PV String",
  6657.       "type": "barchart"
  6658.     },
  6659.     {
  6660.       "datasource": {
  6661.         "type": "mysql",
  6662.         "uid": "BjbJE3u7z"
  6663.       },
  6664.       "fieldConfig": {
  6665.         "defaults": {
  6666.           "color": {
  6667.             "mode": "palette-classic"
  6668.           },
  6669.           "custom": {
  6670.             "axisBorderShow": false,
  6671.             "axisCenteredZero": false,
  6672.             "axisColorMode": "text",
  6673.             "axisLabel": "",
  6674.             "axisPlacement": "auto",
  6675.             "barAlignment": 0,
  6676.             "drawStyle": "line",
  6677.             "fillOpacity": 0,
  6678.             "gradientMode": "none",
  6679.             "hideFrom": {
  6680.               "legend": false,
  6681.               "tooltip": false,
  6682.               "viz": false
  6683.             },
  6684.             "insertNulls": false,
  6685.             "lineInterpolation": "linear",
  6686.             "lineWidth": 1,
  6687.             "pointSize": 5,
  6688.             "scaleDistribution": {
  6689.               "type": "linear"
  6690.             },
  6691.             "showPoints": "auto",
  6692.             "spanNulls": false,
  6693.             "stacking": {
  6694.               "group": "A",
  6695.               "mode": "none"
  6696.             },
  6697.             "thresholdsStyle": {
  6698.               "mode": "line"
  6699.             }
  6700.           },
  6701.           "mappings": [],
  6702.           "thresholds": {
  6703.             "mode": "absolute",
  6704.             "steps": [
  6705.               {
  6706.                 "color": "green",
  6707.                 "value": null
  6708.               },
  6709.               {
  6710.                 "color": "#ffffff",
  6711.                 "value": 0
  6712.               }
  6713.             ]
  6714.           },
  6715.           "unit": "watt"
  6716.         },
  6717.         "overrides": []
  6718.       },
  6719.       "gridPos": {
  6720.         "h": 8,
  6721.         "w": 12,
  6722.         "x": 12,
  6723.         "y": 100
  6724.       },
  6725.       "id": 123186,
  6726.       "options": {
  6727.         "legend": {
  6728.           "calcs": [
  6729.             "last",
  6730.             "min",
  6731.             "max"
  6732.           ],
  6733.           "displayMode": "table",
  6734.           "placement": "bottom",
  6735.           "showLegend": true
  6736.         },
  6737.         "tooltip": {
  6738.           "mode": "multi",
  6739.           "sort": "desc"
  6740.         }
  6741.       },
  6742.       "targets": [
  6743.         {
  6744.           "datasource": {
  6745.             "type": "mysql",
  6746.             "uid": "BjbJE3u7z"
  6747.           },
  6748.           "editorMode": "code",
  6749.           "format": "time_series",
  6750.           "group": [],
  6751.           "metricColumn": "none",
  6752.           "rawQuery": true,
  6753.           "rawSql": "SELECT\n  UNIX_TIMESTAMP(log_date) AS \"time\",\n  ac_pgrid1 as L1, ac_pgrid2 as L2, ac_pgrid3 as L3, ac_pgrid1+ac_pgrid2+ac_pgrid3 AS total\nFROM pv_inverter_record\nWHERE\n  $__timeFilter(log_date)\n  AND pv_inverter_id = $pv_inverter_id \nORDER BY log_date",
  6754.           "refId": "A",
  6755.           "select": [
  6756.             [
  6757.               {
  6758.                 "params": [
  6759.                   "id"
  6760.                 ],
  6761.                 "type": "column"
  6762.               }
  6763.             ]
  6764.           ],
  6765.           "sql": {
  6766.             "columns": [
  6767.               {
  6768.                 "parameters": [],
  6769.                 "type": "function"
  6770.               }
  6771.             ],
  6772.             "groupBy": [
  6773.               {
  6774.                 "property": {
  6775.                   "type": "string"
  6776.                 },
  6777.                 "type": "groupBy"
  6778.               }
  6779.             ],
  6780.             "limit": 50
  6781.           },
  6782.           "table": "_is_generic_admin_media_objects",
  6783.           "timeColumn": "date_of_creation",
  6784.           "timeColumnType": "timestamp",
  6785.           "where": [
  6786.             {
  6787.               "name": "$__timeFilter",
  6788.               "params": [],
  6789.               "type": "macro"
  6790.             }
  6791.           ]
  6792.         }
  6793.       ],
  6794.       "title": "Inverter AC Output Power",
  6795.       "type": "timeseries"
  6796.     },
  6797.     {
  6798.       "datasource": {
  6799.         "type": "mysql",
  6800.         "uid": "BjbJE3u7z"
  6801.       },
  6802.       "fieldConfig": {
  6803.         "defaults": {
  6804.           "color": {
  6805.             "mode": "palette-classic"
  6806.           },
  6807.           "custom": {
  6808.             "axisBorderShow": false,
  6809.             "axisCenteredZero": false,
  6810.             "axisColorMode": "text",
  6811.             "axisLabel": "",
  6812.             "axisPlacement": "auto",
  6813.             "barAlignment": 0,
  6814.             "drawStyle": "line",
  6815.             "fillOpacity": 0,
  6816.             "gradientMode": "none",
  6817.             "hideFrom": {
  6818.               "legend": false,
  6819.               "tooltip": false,
  6820.               "viz": false
  6821.             },
  6822.             "insertNulls": false,
  6823.             "lineInterpolation": "linear",
  6824.             "lineWidth": 1,
  6825.             "pointSize": 5,
  6826.             "scaleDistribution": {
  6827.               "type": "linear"
  6828.             },
  6829.             "showPoints": "auto",
  6830.             "spanNulls": false,
  6831.             "stacking": {
  6832.               "group": "A",
  6833.               "mode": "none"
  6834.             },
  6835.             "thresholdsStyle": {
  6836.               "mode": "line"
  6837.             }
  6838.           },
  6839.           "mappings": [],
  6840.           "thresholds": {
  6841.             "mode": "absolute",
  6842.             "steps": [
  6843.               {
  6844.                 "color": "green",
  6845.                 "value": null
  6846.               },
  6847.               {
  6848.                 "color": "#ffffff",
  6849.                 "value": 0
  6850.               }
  6851.             ]
  6852.           },
  6853.           "unit": "watt"
  6854.         },
  6855.         "overrides": []
  6856.       },
  6857.       "gridPos": {
  6858.         "h": 8,
  6859.         "w": 12,
  6860.         "x": 12,
  6861.         "y": 108
  6862.       },
  6863.       "id": 123209,
  6864.       "options": {
  6865.         "legend": {
  6866.           "calcs": [
  6867.             "last",
  6868.             "min",
  6869.             "max"
  6870.           ],
  6871.           "displayMode": "table",
  6872.           "placement": "bottom",
  6873.           "showLegend": true
  6874.         },
  6875.         "tooltip": {
  6876.           "mode": "multi",
  6877.           "sort": "desc"
  6878.         }
  6879.       },
  6880.       "targets": [
  6881.         {
  6882.           "datasource": {
  6883.             "type": "mysql",
  6884.             "uid": "BjbJE3u7z"
  6885.           },
  6886.           "editorMode": "code",
  6887.           "format": "time_series",
  6888.           "group": [],
  6889.           "metricColumn": "none",
  6890.           "rawQuery": true,
  6891.           "rawSql": "SELECT\n  UNIX_TIMESTAMP(log_date) AS \"time\",\n  backup_p1 as backup_L1, backup_p2 as backup_L2, backup_p3 as backup_L3,\n  ac_load_p3 as ac_load_L3, ac_load_p2 as ac_load_L2, ac_load_p1 as ac_load_L1\nFROM pv_inverter_record\nWHERE\n  $__timeFilter(log_date)\n  AND pv_inverter_id = $pv_inverter_id \nORDER BY log_date",
  6892.           "refId": "A",
  6893.           "select": [
  6894.             [
  6895.               {
  6896.                 "params": [
  6897.                   "id"
  6898.                 ],
  6899.                 "type": "column"
  6900.               }
  6901.             ]
  6902.           ],
  6903.           "sql": {
  6904.             "columns": [
  6905.               {
  6906.                 "parameters": [],
  6907.                 "type": "function"
  6908.               }
  6909.             ],
  6910.             "groupBy": [
  6911.               {
  6912.                 "property": {
  6913.                   "type": "string"
  6914.                 },
  6915.                 "type": "groupBy"
  6916.               }
  6917.             ],
  6918.             "limit": 50
  6919.           },
  6920.           "table": "_is_generic_admin_media_objects",
  6921.           "timeColumn": "date_of_creation",
  6922.           "timeColumnType": "timestamp",
  6923.           "where": [
  6924.             {
  6925.               "name": "$__timeFilter",
  6926.               "params": [],
  6927.               "type": "macro"
  6928.             }
  6929.           ]
  6930.         }
  6931.       ],
  6932.       "title": "Phases Load",
  6933.       "type": "timeseries"
  6934.     },
  6935.     {
  6936.       "datasource": {
  6937.         "type": "datasource",
  6938.         "uid": "-- Mixed --"
  6939.       },
  6940.       "fieldConfig": {
  6941.         "defaults": {
  6942.           "color": {
  6943.             "mode": "palette-classic"
  6944.           },
  6945.           "custom": {
  6946.             "axisBorderShow": false,
  6947.             "axisCenteredZero": false,
  6948.             "axisColorMode": "text",
  6949.             "axisLabel": "",
  6950.             "axisPlacement": "auto",
  6951.             "axisSoftMax": 6,
  6952.             "axisSoftMin": 0,
  6953.             "fillOpacity": 80,
  6954.             "gradientMode": "none",
  6955.             "hideFrom": {
  6956.               "legend": false,
  6957.               "tooltip": false,
  6958.               "viz": false
  6959.             },
  6960.             "lineWidth": 1,
  6961.             "scaleDistribution": {
  6962.               "type": "linear"
  6963.             },
  6964.             "thresholdsStyle": {
  6965.               "mode": "off"
  6966.             }
  6967.           },
  6968.           "mappings": [],
  6969.           "thresholds": {
  6970.             "mode": "absolute",
  6971.             "steps": [
  6972.               {
  6973.                 "color": "green",
  6974.                 "value": null
  6975.               },
  6976.               {
  6977.                 "color": "red",
  6978.                 "value": 80
  6979.               }
  6980.             ]
  6981.           },
  6982.           "unit": "kwatth"
  6983.         },
  6984.         "overrides": []
  6985.       },
  6986.       "gridPos": {
  6987.         "h": 12,
  6988.         "w": 12,
  6989.         "x": 0,
  6990.         "y": 112
  6991.       },
  6992.       "id": 123211,
  6993.       "options": {
  6994.         "barRadius": 0,
  6995.         "barWidth": 0.97,
  6996.         "fullHighlight": false,
  6997.         "groupWidth": 0.7,
  6998.         "legend": {
  6999.           "calcs": [],
  7000.           "displayMode": "list",
  7001.           "placement": "bottom",
  7002.           "showLegend": true
  7003.         },
  7004.         "orientation": "auto",
  7005.         "showValue": "auto",
  7006.         "stacking": "none",
  7007.         "tooltip": {
  7008.           "mode": "single",
  7009.           "sort": "none"
  7010.         },
  7011.         "xTickLabelRotation": 0,
  7012.         "xTickLabelSpacing": 0
  7013.       },
  7014.       "targets": [
  7015.         {
  7016.           "datasource": {
  7017.             "uid": "BjbJE3u7z"
  7018.           },
  7019.           "editorMode": "code",
  7020.           "format": "time_series",
  7021.           "group": [],
  7022.           "hide": false,
  7023.           "metricColumn": "none",
  7024.           "rawQuery": true,
  7025.           "rawSql": "\nSELECT UNIX_TIMESTAMP(DATE(FROM_UNIXTIME(time))) AS time_sec, SUM(total_ws/1000/3600) AS pv_harvested_kwh_per_kwp_string1 FROM (\n\tSELECT time, @curr:=power_value*(IF(@prevT IS NULL, 0, time-@prevT)) as ws, @curr AS total_ws, @prevT:=time FROM (\n\t\tSELECT\n\t\tUNIX_TIMESTAMP(log_date) AS \"time\",\n\t\tpv_ppv1 / pv_rooftop_history.power AS power_value\n\t\tFROM pv_inverter_record\n\t\tJOIN pv_rooftop_history ON pv_rooftop_id = 1 AND pv_inverter_record.log_date >= pv_rooftop_history.from_date AND pv_inverter_record.log_date <= pv_rooftop_history.to_date\n\t\tWHERE\n\t\t$__timeFilter(log_date)\n\t\tORDER BY log_date\n\t)r1, (SELECT@e:=0)e, (SELECT@prevT:=NULL)prevT\n)r2 GROUP BY time_sec;",
  7026.           "refId": "F",
  7027.           "select": [
  7028.             [
  7029.               {
  7030.                 "params": [
  7031.                   "id"
  7032.                 ],
  7033.                 "type": "column"
  7034.               }
  7035.             ]
  7036.           ],
  7037.           "sql": {
  7038.             "columns": [
  7039.               {
  7040.                 "parameters": [],
  7041.                 "type": "function"
  7042.               }
  7043.             ],
  7044.             "groupBy": [
  7045.               {
  7046.                 "property": {
  7047.                   "type": "string"
  7048.                 },
  7049.                 "type": "groupBy"
  7050.               }
  7051.             ],
  7052.             "limit": 50
  7053.           },
  7054.           "table": "_is_generic_admin_media_objects",
  7055.           "timeColumn": "date_of_creation",
  7056.           "timeColumnType": "timestamp",
  7057.           "where": [
  7058.             {
  7059.               "name": "$__timeFilter",
  7060.               "params": [],
  7061.               "type": "macro"
  7062.             }
  7063.           ]
  7064.         },
  7065.         {
  7066.           "datasource": {
  7067.             "uid": "BjbJE3u7z"
  7068.           },
  7069.           "editorMode": "code",
  7070.           "format": "time_series",
  7071.           "group": [],
  7072.           "hide": false,
  7073.           "metricColumn": "none",
  7074.           "rawQuery": true,
  7075.           "rawSql": "\nSELECT UNIX_TIMESTAMP(DATE(FROM_UNIXTIME(time))) AS time_sec, SUM(total_ws/1000/3600) AS pv_harvested_kwh_per_kwp_string2 FROM (\n\tSELECT time, @curr:=power_value*(IF(@prevT IS NULL, 0, time-@prevT)) as ws, @curr AS total_ws, @prevT:=time FROM (\n\t\tSELECT\n\t\tUNIX_TIMESTAMP(log_date) AS \"time\",\n\t\tpv_ppv2 / pv_rooftop_history.power AS power_value\n\t\tFROM pv_inverter_record\n\t\tJOIN pv_rooftop_history ON pv_rooftop_id = 2 AND pv_inverter_record.log_date >= pv_rooftop_history.from_date AND pv_inverter_record.log_date <= pv_rooftop_history.to_date\n\t\tWHERE\n\t\t$__timeFilter(log_date)\n\t\tORDER BY log_date\n\t)r1, (SELECT@e:=0)e, (SELECT@prevT:=NULL)prevT\n)r2 GROUP BY time_sec;",
  7076.           "refId": "A",
  7077.           "select": [
  7078.             [
  7079.               {
  7080.                 "params": [
  7081.                   "id"
  7082.                 ],
  7083.                 "type": "column"
  7084.               }
  7085.             ]
  7086.           ],
  7087.           "sql": {
  7088.             "columns": [
  7089.               {
  7090.                 "parameters": [],
  7091.                 "type": "function"
  7092.               }
  7093.             ],
  7094.             "groupBy": [
  7095.               {
  7096.                 "property": {
  7097.                   "type": "string"
  7098.                 },
  7099.                 "type": "groupBy"
  7100.               }
  7101.             ],
  7102.             "limit": 50
  7103.           },
  7104.           "table": "_is_generic_admin_media_objects",
  7105.           "timeColumn": "date_of_creation",
  7106.           "timeColumnType": "timestamp",
  7107.           "where": [
  7108.             {
  7109.               "name": "$__timeFilter",
  7110.               "params": [],
  7111.               "type": "macro"
  7112.             }
  7113.           ]
  7114.         }
  7115.       ],
  7116.       "title": "Harvest By PV String Per KWP",
  7117.       "type": "barchart"
  7118.     },
  7119.     {
  7120.       "datasource": {
  7121.         "type": "mysql",
  7122.         "uid": "BjbJE3u7z"
  7123.       },
  7124.       "fieldConfig": {
  7125.         "defaults": {
  7126.           "color": {
  7127.             "mode": "palette-classic"
  7128.           },
  7129.           "custom": {
  7130.             "axisBorderShow": false,
  7131.             "axisCenteredZero": false,
  7132.             "axisColorMode": "text",
  7133.             "axisLabel": "",
  7134.             "axisPlacement": "auto",
  7135.             "barAlignment": 0,
  7136.             "drawStyle": "line",
  7137.             "fillOpacity": 0,
  7138.             "gradientMode": "none",
  7139.             "hideFrom": {
  7140.               "legend": false,
  7141.               "tooltip": false,
  7142.               "viz": false
  7143.             },
  7144.             "insertNulls": false,
  7145.             "lineInterpolation": "linear",
  7146.             "lineWidth": 1,
  7147.             "pointSize": 5,
  7148.             "scaleDistribution": {
  7149.               "type": "linear"
  7150.             },
  7151.             "showPoints": "auto",
  7152.             "spanNulls": false,
  7153.             "stacking": {
  7154.               "group": "A",
  7155.               "mode": "none"
  7156.             },
  7157.             "thresholdsStyle": {
  7158.               "mode": "line"
  7159.             }
  7160.           },
  7161.           "mappings": [],
  7162.           "thresholds": {
  7163.             "mode": "absolute",
  7164.             "steps": [
  7165.               {
  7166.                 "color": "green",
  7167.                 "value": null
  7168.               },
  7169.               {
  7170.                 "color": "#ffffff",
  7171.                 "value": 0
  7172.               }
  7173.             ]
  7174.           },
  7175.           "unit": "watt"
  7176.         },
  7177.         "overrides": []
  7178.       },
  7179.       "gridPos": {
  7180.         "h": 10,
  7181.         "w": 12,
  7182.         "x": 12,
  7183.         "y": 116
  7184.       },
  7185.       "id": 123194,
  7186.       "options": {
  7187.         "legend": {
  7188.           "calcs": [
  7189.             "last",
  7190.             "min",
  7191.             "max"
  7192.           ],
  7193.           "displayMode": "table",
  7194.           "placement": "bottom",
  7195.           "showLegend": true
  7196.         },
  7197.         "tooltip": {
  7198.           "mode": "multi",
  7199.           "sort": "desc"
  7200.         }
  7201.       },
  7202.       "targets": [
  7203.         {
  7204.           "datasource": {
  7205.             "type": "mysql",
  7206.             "uid": "BjbJE3u7z"
  7207.           },
  7208.           "editorMode": "code",
  7209.           "format": "time_series",
  7210.           "group": [],
  7211.           "metricColumn": "none",
  7212.           "rawQuery": true,
  7213.           "rawSql": "SELECT\n  UNIX_TIMESTAMP(log_date) AS \"time\",\n  ac_load_p1+ac_load_p2+ac_load_p3 AS ac_load_total,\n  ac_pgrid1+ac_pgrid2+ac_pgrid3 AS ac_pgrid_total,\n  grid_meter_active_power1+grid_meter_active_power2+grid_meter_active_power3 AS grid_meter_active_power,\n  backup_p1+backup_p2+backup_p3 AS backup_total,\n  ac_house_consumption AS ac_house_consumption,\n  GREATEST((IF(work_mode_label = \"Normal (On-Grid)\", ac_load_p1, 0)+IF(work_mode_label = \"Normal (On-Grid)\", ac_load_p2, 0)+IF(work_mode_label = \"Normal (On-Grid)\", ac_load_p3, 0)) + (backup_p1+backup_p2+backup_p3), ac_house_consumption) AS ac_house_consumption_maxof\n  -- GREATEST(ac_load_p1+ac_load_p2+ac_load_p3, ac_pgrid1+ac_pgrid2+ac_pgrid3, backup_p1+backup_p2+backup_p3, ac_house_consumption) AS ac_house_consumption_maxof\nFROM pv_inverter_record\nWHERE\n  $__timeFilter(log_date)\n  AND pv_inverter_id = $pv_inverter_id \nORDER BY log_date",
  7214.           "refId": "A",
  7215.           "select": [
  7216.             [
  7217.               {
  7218.                 "params": [
  7219.                   "id"
  7220.                 ],
  7221.                 "type": "column"
  7222.               }
  7223.             ]
  7224.           ],
  7225.           "sql": {
  7226.             "columns": [
  7227.               {
  7228.                 "parameters": [],
  7229.                 "type": "function"
  7230.               }
  7231.             ],
  7232.             "groupBy": [
  7233.               {
  7234.                 "property": {
  7235.                   "type": "string"
  7236.                 },
  7237.                 "type": "groupBy"
  7238.               }
  7239.             ],
  7240.             "limit": 50
  7241.           },
  7242.           "table": "_is_generic_admin_media_objects",
  7243.           "timeColumn": "date_of_creation",
  7244.           "timeColumnType": "timestamp",
  7245.           "where": [
  7246.             {
  7247.               "name": "$__timeFilter",
  7248.               "params": [],
  7249.               "type": "macro"
  7250.             }
  7251.           ]
  7252.         }
  7253.       ],
  7254.       "title": "AC House Consumption",
  7255.       "type": "timeseries"
  7256.     },
  7257.     {
  7258.       "datasource": {
  7259.         "type": "datasource",
  7260.         "uid": "-- Mixed --"
  7261.       },
  7262.       "fieldConfig": {
  7263.         "defaults": {
  7264.           "color": {
  7265.             "mode": "thresholds",
  7266.             "seriesBy": "last"
  7267.           },
  7268.           "custom": {
  7269.             "axisBorderShow": false,
  7270.             "axisCenteredZero": false,
  7271.             "axisColorMode": "text",
  7272.             "axisLabel": "",
  7273.             "axisPlacement": "auto",
  7274.             "axisSoftMax": 200,
  7275.             "axisSoftMin": -200,
  7276.             "barAlignment": 0,
  7277.             "drawStyle": "line",
  7278.             "fillOpacity": 13,
  7279.             "gradientMode": "scheme",
  7280.             "hideFrom": {
  7281.               "legend": false,
  7282.               "tooltip": false,
  7283.               "viz": false
  7284.             },
  7285.             "insertNulls": false,
  7286.             "lineInterpolation": "stepBefore",
  7287.             "lineStyle": {
  7288.               "fill": "solid"
  7289.             },
  7290.             "lineWidth": 1,
  7291.             "pointSize": 5,
  7292.             "scaleDistribution": {
  7293.               "type": "linear"
  7294.             },
  7295.             "showPoints": "auto",
  7296.             "spanNulls": false,
  7297.             "stacking": {
  7298.               "group": "A",
  7299.               "mode": "none"
  7300.             },
  7301.             "thresholdsStyle": {
  7302.               "mode": "line"
  7303.             }
  7304.           },
  7305.           "mappings": [
  7306.             {
  7307.               "options": {
  7308.                 "from": 0,
  7309.                 "result": {
  7310.                   "color": "purple",
  7311.                   "index": 0
  7312.                 },
  7313.                 "to": 999
  7314.               },
  7315.               "type": "range"
  7316.             },
  7317.             {
  7318.               "options": {
  7319.                 "from": -999,
  7320.                 "result": {
  7321.                   "color": "yellow",
  7322.                   "index": 1
  7323.                 },
  7324.                 "to": 0
  7325.               },
  7326.               "type": "range"
  7327.             }
  7328.           ],
  7329.           "thresholds": {
  7330.             "mode": "absolute",
  7331.             "steps": [
  7332.               {
  7333.                 "color": "blue",
  7334.                 "value": null
  7335.               },
  7336.               {
  7337.                 "color": "#EAB839",
  7338.                 "value": 0
  7339.               }
  7340.             ]
  7341.           },
  7342.           "unit": "percent"
  7343.         },
  7344.         "overrides": []
  7345.       },
  7346.       "gridPos": {
  7347.         "h": 12,
  7348.         "w": 12,
  7349.         "x": 0,
  7350.         "y": 124
  7351.       },
  7352.       "id": 123212,
  7353.       "options": {
  7354.         "legend": {
  7355.           "calcs": [],
  7356.           "displayMode": "list",
  7357.           "placement": "bottom",
  7358.           "showLegend": true
  7359.         },
  7360.         "tooltip": {
  7361.           "mode": "single",
  7362.           "sort": "none"
  7363.         }
  7364.       },
  7365.       "targets": [
  7366.         {
  7367.           "datasource": {
  7368.             "uid": "BjbJE3u7z"
  7369.           },
  7370.           "format": "time_series",
  7371.           "group": [],
  7372.           "hide": false,
  7373.           "metricColumn": "none",
  7374.           "rawQuery": true,
  7375.           "rawSql": "WITH\n\tpv_string1 AS (\n\t\tSELECT UNIX_TIMESTAMP(DATE(FROM_UNIXTIME(time))) AS time_sec, SUM(total_ws/1000/3600) AS pv_harvested_kwh_per_kwp FROM (\n\t\t\tSELECT time, @curr:=power_value*(IF(@prevT IS NULL, 0, time-@prevT)) as ws, @curr AS total_ws, @prevT:=time FROM (\n\t\t\t\tSELECT\n\t\t\t\tUNIX_TIMESTAMP(log_date) AS \"time\",\n\t\t\t\tpv_ppv1 / (SELECT power FROM pv_rooftop WHERE id = 1) AS power_value\n\t\t\t\tFROM pv_inverter_record\n\t\t\t\tWHERE\n\t\t\t\t$__timeFilter(log_date)\n\t\t\t\tORDER BY log_date\n\t\t\t)r1, (SELECT@e:=0)e, (SELECT@prevT:=NULL)prevT\n\t\t)r2 GROUP BY time_sec\n\t),\n\tpv_string2 AS (\n\t\tSELECT UNIX_TIMESTAMP(DATE(FROM_UNIXTIME(time))) AS time_sec, SUM(total_ws/1000/3600) AS pv_harvested_kwh_per_kwp FROM (\n\t\t\tSELECT time, @curr:=power_value*(IF(@prevT2 IS NULL, 0, time-@prevT2)) as ws, @curr AS total_ws, @prevT2:=time FROM (\n\t\t\t\tSELECT\n\t\t\t\tUNIX_TIMESTAMP(log_date) AS \"time\",\n\t\t\t\tpv_ppv2 / (SELECT power FROM pv_rooftop WHERE id = 2) AS power_value\n\t\t\t\tFROM pv_inverter_record\n\t\t\t\tWHERE\n\t\t\t\t$__timeFilter(log_date)\n\t\t\t\tORDER BY log_date\n\t\t\t)r1, (SELECT@e:=0)e, (SELECT@prevT2:=NULL)prevT2\n\t\t)r2 GROUP BY time_sec\n\t)\n\n\nSELECT\n\tpv_string1.time_sec AS time_sec, IF(pv_string1.pv_harvested_kwh_per_kwp >= pv_string2.pv_harvested_kwh_per_kwp, 1, -1) * (GREATEST(pv_string1.pv_harvested_kwh_per_kwp, pv_string2.pv_harvested_kwh_per_kwp) / LEAST(pv_string1.pv_harvested_kwh_per_kwp, pv_string2.pv_harvested_kwh_per_kwp)-1) * 100 AS efficiency\nFROM \n\tpv_string1\nINNER JOIN pv_string2 ON pv_string2.time_sec = pv_string1.time_sec\n",
  7376.           "refId": "F",
  7377.           "select": [
  7378.             [
  7379.               {
  7380.                 "params": [
  7381.                   "id"
  7382.                 ],
  7383.                 "type": "column"
  7384.               }
  7385.             ]
  7386.           ],
  7387.           "table": "_is_generic_admin_media_objects",
  7388.           "timeColumn": "date_of_creation",
  7389.           "timeColumnType": "timestamp",
  7390.           "where": [
  7391.             {
  7392.               "name": "$__timeFilter",
  7393.               "params": [],
  7394.               "type": "macro"
  7395.             }
  7396.           ]
  7397.         }
  7398.       ],
  7399.       "title": "PV Harvesting Efficiency String1 vs String2",
  7400.       "type": "timeseries"
  7401.     },
  7402.     {
  7403.       "datasource": {
  7404.         "type": "mysql",
  7405.         "uid": "BjbJE3u7z"
  7406.       },
  7407.       "fieldConfig": {
  7408.         "defaults": {
  7409.           "color": {
  7410.             "mode": "palette-classic"
  7411.           },
  7412.           "custom": {
  7413.             "axisBorderShow": false,
  7414.             "axisCenteredZero": false,
  7415.             "axisColorMode": "text",
  7416.             "axisLabel": "",
  7417.             "axisPlacement": "auto",
  7418.             "barAlignment": 0,
  7419.             "drawStyle": "line",
  7420.             "fillOpacity": 0,
  7421.             "gradientMode": "none",
  7422.             "hideFrom": {
  7423.               "legend": false,
  7424.               "tooltip": false,
  7425.               "viz": false
  7426.             },
  7427.             "insertNulls": false,
  7428.             "lineInterpolation": "linear",
  7429.             "lineWidth": 1,
  7430.             "pointSize": 5,
  7431.             "scaleDistribution": {
  7432.               "type": "linear"
  7433.             },
  7434.             "showPoints": "auto",
  7435.             "spanNulls": false,
  7436.             "stacking": {
  7437.               "group": "A",
  7438.               "mode": "none"
  7439.             },
  7440.             "thresholdsStyle": {
  7441.               "mode": "line"
  7442.             }
  7443.           },
  7444.           "mappings": [],
  7445.           "thresholds": {
  7446.             "mode": "absolute",
  7447.             "steps": [
  7448.               {
  7449.                 "color": "green",
  7450.                 "value": null
  7451.               },
  7452.               {
  7453.                 "color": "#ffffff",
  7454.                 "value": 0
  7455.               }
  7456.             ]
  7457.           },
  7458.           "unit": "watt"
  7459.         },
  7460.         "overrides": []
  7461.       },
  7462.       "gridPos": {
  7463.         "h": 10,
  7464.         "w": 12,
  7465.         "x": 12,
  7466.         "y": 126
  7467.       },
  7468.       "id": 123213,
  7469.       "options": {
  7470.         "legend": {
  7471.           "calcs": [
  7472.             "last",
  7473.             "min",
  7474.             "max"
  7475.           ],
  7476.           "displayMode": "table",
  7477.           "placement": "bottom",
  7478.           "showLegend": true
  7479.         },
  7480.         "tooltip": {
  7481.           "mode": "multi",
  7482.           "sort": "desc"
  7483.         }
  7484.       },
  7485.       "targets": [
  7486.         {
  7487.           "datasource": {
  7488.             "type": "mysql",
  7489.             "uid": "BjbJE3u7z"
  7490.           },
  7491.           "editorMode": "code",
  7492.           "format": "time_series",
  7493.           "group": [],
  7494.           "metricColumn": "none",
  7495.           "rawQuery": true,
  7496.           "rawSql": "SELECT\n  UNIX_TIMESTAMP(log_date) AS \"time\",\n  grid_meter_active_power1+grid_meter_active_power2+grid_meter_active_power3 AS export_power\nFROM pv_inverter_record\nWHERE\n  $__timeFilter(log_date)\n  AND pv_inverter_id = $pv_inverter_id \n  and (grid_meter_active_power1+grid_meter_active_power2+grid_meter_active_power3) > 7000\nORDER BY log_date",
  7497.           "refId": "A",
  7498.           "select": [
  7499.             [
  7500.               {
  7501.                 "params": [
  7502.                   "id"
  7503.                 ],
  7504.                 "type": "column"
  7505.               }
  7506.             ]
  7507.           ],
  7508.           "sql": {
  7509.             "columns": [
  7510.               {
  7511.                 "parameters": [],
  7512.                 "type": "function"
  7513.               }
  7514.             ],
  7515.             "groupBy": [
  7516.               {
  7517.                 "property": {
  7518.                   "type": "string"
  7519.                 },
  7520.                 "type": "groupBy"
  7521.               }
  7522.             ],
  7523.             "limit": 50
  7524.           },
  7525.           "table": "_is_generic_admin_media_objects",
  7526.           "timeColumn": "date_of_creation",
  7527.           "timeColumnType": "timestamp",
  7528.           "where": [
  7529.             {
  7530.               "name": "$__timeFilter",
  7531.               "params": [],
  7532.               "type": "macro"
  7533.             }
  7534.           ]
  7535.         }
  7536.       ],
  7537.       "title": "Grid Export > 7kw",
  7538.       "type": "timeseries"
  7539.     },
  7540.     {
  7541.       "datasource": {
  7542.         "type": "datasource",
  7543.         "uid": "-- Mixed --"
  7544.       },
  7545.       "description": "",
  7546.       "fieldConfig": {
  7547.         "defaults": {
  7548.           "color": {
  7549.             "mode": "palette-classic"
  7550.           },
  7551.           "custom": {
  7552.             "axisBorderShow": false,
  7553.             "axisCenteredZero": false,
  7554.             "axisColorMode": "text",
  7555.             "axisLabel": "",
  7556.             "axisPlacement": "auto",
  7557.             "barAlignment": 0,
  7558.             "drawStyle": "line",
  7559.             "fillOpacity": 0,
  7560.             "gradientMode": "none",
  7561.             "hideFrom": {
  7562.               "legend": false,
  7563.               "tooltip": false,
  7564.               "viz": false
  7565.             },
  7566.             "insertNulls": false,
  7567.             "lineInterpolation": "linear",
  7568.             "lineWidth": 1,
  7569.             "pointSize": 5,
  7570.             "scaleDistribution": {
  7571.               "type": "linear"
  7572.             },
  7573.             "showPoints": "auto",
  7574.             "spanNulls": false,
  7575.             "stacking": {
  7576.               "group": "A",
  7577.               "mode": "none"
  7578.             },
  7579.             "thresholdsStyle": {
  7580.               "mode": "off"
  7581.             }
  7582.           },
  7583.           "mappings": [],
  7584.           "thresholds": {
  7585.             "mode": "absolute",
  7586.             "steps": [
  7587.               {
  7588.                 "color": "green",
  7589.                 "value": null
  7590.               },
  7591.               {
  7592.                 "color": "red",
  7593.                 "value": 80
  7594.               }
  7595.             ]
  7596.           }
  7597.         },
  7598.         "overrides": []
  7599.       },
  7600.       "gridPos": {
  7601.         "h": 8,
  7602.         "w": 12,
  7603.         "x": 0,
  7604.         "y": 136
  7605.       },
  7606.       "id": 123221,
  7607.       "options": {
  7608.         "legend": {
  7609.           "calcs": [],
  7610.           "displayMode": "list",
  7611.           "placement": "bottom",
  7612.           "showLegend": true
  7613.         },
  7614.         "tooltip": {
  7615.           "mode": "single",
  7616.           "sort": "none"
  7617.         }
  7618.       },
  7619.       "targets": [
  7620.         {
  7621.           "datasource": {
  7622.             "type": "mysql",
  7623.             "uid": "BjbJE3u7z"
  7624.           },
  7625.           "format": "time_series",
  7626.           "group": [],
  7627.           "metricColumn": "none",
  7628.           "rawQuery": true,
  7629.           "rawSql": "WITH RECURSIVE dates AS (   SELECT DATE($__timeFrom()) AS log_date   UNION ALL   SELECT log_date + INTERVAL 1 DAY   FROM dates   WHERE log_date < $__timeTo() )\nSELECT time, kwh - (SELECT pv_e_total FROM pv_inverter_record WHERE log_date = DATE($__timeFrom()) LIMIT 1) AS kwh_gibon FROM (\n  SELECT \n    UNIX_TIMESTAMP(dates.log_date) AS \"time\",\n    (SELECT pv_inverter_record.pv_e_total\n     FROM pv_inverter_record\n     WHERE pv_inverter_record.log_date = dates.log_date\n     LIMIT 1) AS kwh\n  FROM dates\n  HAVING kwh IS NOT NULL\n) a",
  7630.           "refId": "A",
  7631.           "select": [
  7632.             [
  7633.               {
  7634.                 "params": [
  7635.                   "id"
  7636.                 ],
  7637.                 "type": "column"
  7638.               }
  7639.             ]
  7640.           ],
  7641.           "table": "_is_generic_admin_media_objects",
  7642.           "timeColumn": "date_of_creation",
  7643.           "timeColumnType": "timestamp",
  7644.           "where": [
  7645.             {
  7646.               "name": "$__timeFilter",
  7647.               "params": [],
  7648.               "type": "macro"
  7649.             }
  7650.           ]
  7651.         },
  7652.         {
  7653.           "datasource": {
  7654.             "uid": "s4WMx3uVz"
  7655.           },
  7656.           "format": "time_series",
  7657.           "group": [],
  7658.           "hide": false,
  7659.           "metricColumn": "none",
  7660.           "rawQuery": true,
  7661.           "rawSql": "WITH RECURSIVE dates AS (   SELECT DATE($__timeFrom()) AS log_date   UNION ALL   SELECT log_date + INTERVAL 1 DAY   FROM dates   WHERE log_date < $__timeTo() )\nSELECT time, kwh - (SELECT pv_e_total FROM pv_inverter_record WHERE log_date = DATE($__timeFrom()) LIMIT 1) AS kwh_ota FROM (\n  SELECT \n    UNIX_TIMESTAMP(dates.log_date) AS \"time\",\n    (SELECT pv_inverter_record.pv_e_total\n     FROM pv_inverter_record\n     WHERE pv_inverter_record.log_date = dates.log_date\n     LIMIT 1) AS kwh\n  FROM dates\n  HAVING kwh IS NOT NULL\n) a",
  7662.           "refId": "B",
  7663.           "select": [
  7664.             [
  7665.               {
  7666.                 "params": [
  7667.                   "id"
  7668.                 ],
  7669.                 "type": "column"
  7670.               }
  7671.             ]
  7672.           ],
  7673.           "table": "_is_generic_admin_media_objects",
  7674.           "timeColumn": "date_of_creation",
  7675.           "timeColumnType": "timestamp",
  7676.           "where": [
  7677.             {
  7678.               "name": "$__timeFilter",
  7679.               "params": [],
  7680.               "type": "macro"
  7681.             }
  7682.           ]
  7683.         }
  7684.       ],
  7685.       "title": "Total Production GIbon vs Oto",
  7686.       "type": "timeseries"
  7687.     },
  7688.     {
  7689.       "datasource": {
  7690.         "type": "mysql",
  7691.         "uid": "BjbJE3u7z"
  7692.       },
  7693.       "fieldConfig": {
  7694.         "defaults": {
  7695.           "color": {
  7696.             "mode": "palette-classic"
  7697.           },
  7698.           "custom": {
  7699.             "axisBorderShow": false,
  7700.             "axisCenteredZero": false,
  7701.             "axisColorMode": "text",
  7702.             "axisLabel": "",
  7703.             "axisPlacement": "auto",
  7704.             "barAlignment": 0,
  7705.             "drawStyle": "line",
  7706.             "fillOpacity": 0,
  7707.             "gradientMode": "none",
  7708.             "hideFrom": {
  7709.               "legend": false,
  7710.               "tooltip": false,
  7711.               "viz": false
  7712.             },
  7713.             "insertNulls": false,
  7714.             "lineInterpolation": "linear",
  7715.             "lineWidth": 1,
  7716.             "pointSize": 5,
  7717.             "scaleDistribution": {
  7718.               "type": "linear"
  7719.             },
  7720.             "showPoints": "auto",
  7721.             "spanNulls": false,
  7722.             "stacking": {
  7723.               "group": "A",
  7724.               "mode": "none"
  7725.             },
  7726.             "thresholdsStyle": {
  7727.               "mode": "line"
  7728.             }
  7729.           },
  7730.           "mappings": [],
  7731.           "thresholds": {
  7732.             "mode": "absolute",
  7733.             "steps": [
  7734.               {
  7735.                 "color": "green",
  7736.                 "value": null
  7737.               },
  7738.               {
  7739.                 "color": "#ffffff",
  7740.                 "value": 0
  7741.               }
  7742.             ]
  7743.           },
  7744.           "unit": "kwatt"
  7745.         },
  7746.         "overrides": []
  7747.       },
  7748.       "gridPos": {
  7749.         "h": 8,
  7750.         "w": 12,
  7751.         "x": 12,
  7752.         "y": 136
  7753.       },
  7754.       "id": 123202,
  7755.       "options": {
  7756.         "legend": {
  7757.           "calcs": [
  7758.             "mean",
  7759.             "last"
  7760.           ],
  7761.           "displayMode": "table",
  7762.           "placement": "bottom",
  7763.           "showLegend": true
  7764.         },
  7765.         "tooltip": {
  7766.           "mode": "multi",
  7767.           "sort": "desc"
  7768.         }
  7769.       },
  7770.       "targets": [
  7771.         {
  7772.           "datasource": {
  7773.             "type": "mysql",
  7774.             "uid": "BjbJE3u7z"
  7775.           },
  7776.           "format": "time_series",
  7777.           "group": [],
  7778.           "metricColumn": "none",
  7779.           "rawQuery": true,
  7780.           "rawSql": "\nSELECT time, total_ws/1000/3600 AS consumption_kwh_L1 FROM (\n\tSELECT time, @curr:=consumption*(IF(@prevT IS NULL, 0, time-@prevT)) as ws, @e:=@e+@curr AS total_ws, @prevT:=time FROM (\n\t\tSELECT\n\t\tUNIX_TIMESTAMP(log_date) AS \"time\",\n\t\tbackup_p1 + IF(work_mode_label = \"Normal (On-Grid)\", ac_load_p1, 0) AS consumption\n\t\tFROM pv_inverter_record\n\t\tWHERE\n\t\t$__timeFilter(log_date)\n\t\tORDER BY log_date\n\t)r1, (SELECT@e:=0)e, (SELECT@prevT:=NULL)prevT\n)r2;",
  7781.           "refId": "A",
  7782.           "select": [
  7783.             [
  7784.               {
  7785.                 "params": [
  7786.                   "id"
  7787.                 ],
  7788.                 "type": "column"
  7789.               }
  7790.             ]
  7791.           ],
  7792.           "table": "_is_generic_admin_media_objects",
  7793.           "timeColumn": "date_of_creation",
  7794.           "timeColumnType": "timestamp",
  7795.           "where": [
  7796.             {
  7797.               "name": "$__timeFilter",
  7798.               "params": [],
  7799.               "type": "macro"
  7800.             }
  7801.           ]
  7802.         },
  7803.         {
  7804.           "datasource": {
  7805.             "type": "mysql",
  7806.             "uid": "BjbJE3u7z"
  7807.           },
  7808.           "format": "time_series",
  7809.           "group": [],
  7810.           "hide": false,
  7811.           "metricColumn": "none",
  7812.           "rawQuery": true,
  7813.           "rawSql": "\nSELECT time, total_ws/1000/3600 AS consumption_kwh_L2 FROM (\n\tSELECT time, @curr:=consumption*(IF(@prevT IS NULL, 0, time-@prevT)) as ws, @e:=@e+@curr AS total_ws, @prevT:=time FROM (\n\t\tSELECT\n\t\tUNIX_TIMESTAMP(log_date) AS \"time\",\n\t\tbackup_p2 + IF(work_mode_label = \"Normal (On-Grid)\", ac_load_p2, 0) AS consumption\n\t\tFROM pv_inverter_record\n\t\tWHERE\n\t\t$__timeFilter(log_date)\n\t\tORDER BY log_date\n\t)r1, (SELECT@e:=0)e, (SELECT@prevT:=NULL)prevT\n)r2;",
  7814.           "refId": "B",
  7815.           "select": [
  7816.             [
  7817.               {
  7818.                 "params": [
  7819.                   "id"
  7820.                 ],
  7821.                 "type": "column"
  7822.               }
  7823.             ]
  7824.           ],
  7825.           "table": "_is_generic_admin_media_objects",
  7826.           "timeColumn": "date_of_creation",
  7827.           "timeColumnType": "timestamp",
  7828.           "where": [
  7829.             {
  7830.               "name": "$__timeFilter",
  7831.               "params": [],
  7832.               "type": "macro"
  7833.             }
  7834.           ]
  7835.         },
  7836.         {
  7837.           "datasource": {
  7838.             "type": "mysql",
  7839.             "uid": "BjbJE3u7z"
  7840.           },
  7841.           "format": "time_series",
  7842.           "group": [],
  7843.           "hide": false,
  7844.           "metricColumn": "none",
  7845.           "rawQuery": true,
  7846.           "rawSql": "\nSELECT time, total_ws/1000/3600 AS consumption_kwh_L3 FROM (\n\tSELECT time, @curr:=consumption*(IF(@prevT IS NULL, 0, time-@prevT)) as ws, @e:=@e+@curr AS total_ws, @prevT:=time FROM (\n\t\tSELECT\n\t\tUNIX_TIMESTAMP(log_date) AS \"time\",\n\t\tbackup_p3 + IF(work_mode_label = \"Normal (On-Grid)\", ac_load_p3, 0) AS consumption\n\t\tFROM pv_inverter_record\n\t\tWHERE\n\t\t$__timeFilter(log_date)\n\t\tORDER BY log_date\n\t)r1, (SELECT@e:=0)e, (SELECT@prevT:=NULL)prevT\n)r2;",
  7847.           "refId": "C",
  7848.           "select": [
  7849.             [
  7850.               {
  7851.                 "params": [
  7852.                   "id"
  7853.                 ],
  7854.                 "type": "column"
  7855.               }
  7856.             ]
  7857.           ],
  7858.           "table": "_is_generic_admin_media_objects",
  7859.           "timeColumn": "date_of_creation",
  7860.           "timeColumnType": "timestamp",
  7861.           "where": [
  7862.             {
  7863.               "name": "$__timeFilter",
  7864.               "params": [],
  7865.               "type": "macro"
  7866.             }
  7867.           ]
  7868.         }
  7869.       ],
  7870.       "title": "House Consumption Sum",
  7871.       "type": "timeseries"
  7872.     },
  7873.     {
  7874.       "datasource": {
  7875.         "type": "mysql",
  7876.         "uid": "BjbJE3u7z"
  7877.       },
  7878.       "fieldConfig": {
  7879.         "defaults": {
  7880.           "color": {
  7881.             "mode": "palette-classic"
  7882.           },
  7883.           "custom": {
  7884.             "axisBorderShow": false,
  7885.             "axisCenteredZero": false,
  7886.             "axisColorMode": "text",
  7887.             "axisLabel": "",
  7888.             "axisPlacement": "auto",
  7889.             "barAlignment": 0,
  7890.             "drawStyle": "line",
  7891.             "fillOpacity": 0,
  7892.             "gradientMode": "none",
  7893.             "hideFrom": {
  7894.               "legend": false,
  7895.               "tooltip": false,
  7896.               "viz": false
  7897.             },
  7898.             "insertNulls": false,
  7899.             "lineInterpolation": "linear",
  7900.             "lineWidth": 1,
  7901.             "pointSize": 5,
  7902.             "scaleDistribution": {
  7903.               "type": "linear"
  7904.             },
  7905.             "showPoints": "auto",
  7906.             "spanNulls": false,
  7907.             "stacking": {
  7908.               "group": "A",
  7909.               "mode": "none"
  7910.             },
  7911.             "thresholdsStyle": {
  7912.               "mode": "line"
  7913.             }
  7914.           },
  7915.           "mappings": [],
  7916.           "thresholds": {
  7917.             "mode": "absolute",
  7918.             "steps": [
  7919.               {
  7920.                 "color": "green",
  7921.                 "value": null
  7922.               },
  7923.               {
  7924.                 "color": "#ffffff",
  7925.                 "value": 0
  7926.               }
  7927.             ]
  7928.           },
  7929.           "unit": "watt"
  7930.         },
  7931.         "overrides": []
  7932.       },
  7933.       "gridPos": {
  7934.         "h": 8,
  7935.         "w": 12,
  7936.         "x": 12,
  7937.         "y": 144
  7938.       },
  7939.       "id": 123191,
  7940.       "options": {
  7941.         "legend": {
  7942.           "calcs": [
  7943.             "mean",
  7944.             "last"
  7945.           ],
  7946.           "displayMode": "table",
  7947.           "placement": "bottom",
  7948.           "showLegend": true
  7949.         },
  7950.         "tooltip": {
  7951.           "mode": "multi",
  7952.           "sort": "desc"
  7953.         }
  7954.       },
  7955.       "targets": [
  7956.         {
  7957.           "datasource": {
  7958.             "type": "mysql",
  7959.             "uid": "BjbJE3u7z"
  7960.           },
  7961.           "editorMode": "code",
  7962.           "format": "time_series",
  7963.           "group": [],
  7964.           "metricColumn": "none",
  7965.           "rawQuery": true,
  7966.           "rawSql": "SELECT\n  UNIX_TIMESTAMP(log_date) AS \"time\",\n  backup_p1 AS L1, backup_p2 AS L2, backup_p3 AS L3, backup_ptotal AS total\nFROM pv_inverter_record\nWHERE\n  $__timeFilter(log_date)\n  AND pv_inverter_id = $pv_inverter_id \nORDER BY log_date",
  7967.           "refId": "A",
  7968.           "select": [
  7969.             [
  7970.               {
  7971.                 "params": [
  7972.                   "id"
  7973.                 ],
  7974.                 "type": "column"
  7975.               }
  7976.             ]
  7977.           ],
  7978.           "sql": {
  7979.             "columns": [
  7980.               {
  7981.                 "parameters": [],
  7982.                 "type": "function"
  7983.               }
  7984.             ],
  7985.             "groupBy": [
  7986.               {
  7987.                 "property": {
  7988.                   "type": "string"
  7989.                 },
  7990.                 "type": "groupBy"
  7991.               }
  7992.             ],
  7993.             "limit": 50
  7994.           },
  7995.           "table": "_is_generic_admin_media_objects",
  7996.           "timeColumn": "date_of_creation",
  7997.           "timeColumnType": "timestamp",
  7998.           "where": [
  7999.             {
  8000.               "name": "$__timeFilter",
  8001.               "params": [],
  8002.               "type": "macro"
  8003.             }
  8004.           ]
  8005.         }
  8006.       ],
  8007.       "title": "UPS Power",
  8008.       "type": "timeseries"
  8009.     },
  8010.     {
  8011.       "datasource": {
  8012.         "type": "mysql",
  8013.         "uid": "BjbJE3u7z"
  8014.       },
  8015.       "fieldConfig": {
  8016.         "defaults": {
  8017.           "color": {
  8018.             "mode": "palette-classic"
  8019.           },
  8020.           "custom": {
  8021.             "axisBorderShow": false,
  8022.             "axisCenteredZero": false,
  8023.             "axisColorMode": "text",
  8024.             "axisLabel": "",
  8025.             "axisPlacement": "auto",
  8026.             "barAlignment": 0,
  8027.             "drawStyle": "line",
  8028.             "fillOpacity": 0,
  8029.             "gradientMode": "none",
  8030.             "hideFrom": {
  8031.               "legend": false,
  8032.               "tooltip": false,
  8033.               "viz": false
  8034.             },
  8035.             "insertNulls": false,
  8036.             "lineInterpolation": "linear",
  8037.             "lineWidth": 1,
  8038.             "pointSize": 5,
  8039.             "scaleDistribution": {
  8040.               "type": "linear"
  8041.             },
  8042.             "showPoints": "auto",
  8043.             "spanNulls": false,
  8044.             "stacking": {
  8045.               "group": "A",
  8046.               "mode": "none"
  8047.             },
  8048.             "thresholdsStyle": {
  8049.               "mode": "line"
  8050.             }
  8051.           },
  8052.           "mappings": [],
  8053.           "max": 100,
  8054.           "thresholds": {
  8055.             "mode": "absolute",
  8056.             "steps": [
  8057.               {
  8058.                 "color": "green",
  8059.                 "value": null
  8060.               },
  8061.               {
  8062.                 "color": "#ffffff",
  8063.                 "value": 0
  8064.               }
  8065.             ]
  8066.           },
  8067.           "unit": "percent"
  8068.         },
  8069.         "overrides": []
  8070.       },
  8071.       "gridPos": {
  8072.         "h": 8,
  8073.         "w": 12,
  8074.         "x": 12,
  8075.         "y": 152
  8076.       },
  8077.       "id": 123192,
  8078.       "options": {
  8079.         "legend": {
  8080.           "calcs": [
  8081.             "mean",
  8082.             "last"
  8083.           ],
  8084.           "displayMode": "table",
  8085.           "placement": "bottom",
  8086.           "showLegend": true
  8087.         },
  8088.         "tooltip": {
  8089.           "mode": "multi",
  8090.           "sort": "desc"
  8091.         }
  8092.       },
  8093.       "targets": [
  8094.         {
  8095.           "datasource": {
  8096.             "type": "mysql",
  8097.             "uid": "BjbJE3u7z"
  8098.           },
  8099.           "editorMode": "code",
  8100.           "format": "time_series",
  8101.           "group": [],
  8102.           "metricColumn": "none",
  8103.           "rawQuery": true,
  8104.           "rawSql": "SELECT\n  UNIX_TIMESTAMP(log_date) AS \"time\",\n  backup_ups_load\nFROM pv_inverter_record\nWHERE\n  $__timeFilter(log_date)\n  AND pv_inverter_id = $pv_inverter_id \nORDER BY log_date",
  8105.           "refId": "A",
  8106.           "select": [
  8107.             [
  8108.               {
  8109.                 "params": [
  8110.                   "id"
  8111.                 ],
  8112.                 "type": "column"
  8113.               }
  8114.             ]
  8115.           ],
  8116.           "sql": {
  8117.             "columns": [
  8118.               {
  8119.                 "parameters": [],
  8120.                 "type": "function"
  8121.               }
  8122.             ],
  8123.             "groupBy": [
  8124.               {
  8125.                 "property": {
  8126.                   "type": "string"
  8127.                 },
  8128.                 "type": "groupBy"
  8129.               }
  8130.             ],
  8131.             "limit": 50
  8132.           },
  8133.           "table": "_is_generic_admin_media_objects",
  8134.           "timeColumn": "date_of_creation",
  8135.           "timeColumnType": "timestamp",
  8136.           "where": [
  8137.             {
  8138.               "name": "$__timeFilter",
  8139.               "params": [],
  8140.               "type": "macro"
  8141.             }
  8142.           ]
  8143.         }
  8144.       ],
  8145.       "title": "UPS Power Load",
  8146.       "type": "timeseries"
  8147.     },
  8148.     {
  8149.       "datasource": {
  8150.         "type": "mysql",
  8151.         "uid": "BjbJE3u7z"
  8152.       },
  8153.       "fieldConfig": {
  8154.         "defaults": {
  8155.           "color": {
  8156.             "mode": "palette-classic"
  8157.           },
  8158.           "custom": {
  8159.             "axisBorderShow": false,
  8160.             "axisCenteredZero": false,
  8161.             "axisColorMode": "text",
  8162.             "axisLabel": "",
  8163.             "axisPlacement": "auto",
  8164.             "barAlignment": 0,
  8165.             "drawStyle": "line",
  8166.             "fillOpacity": 0,
  8167.             "gradientMode": "none",
  8168.             "hideFrom": {
  8169.               "legend": false,
  8170.               "tooltip": false,
  8171.               "viz": false
  8172.             },
  8173.             "insertNulls": false,
  8174.             "lineInterpolation": "linear",
  8175.             "lineWidth": 1,
  8176.             "pointSize": 5,
  8177.             "scaleDistribution": {
  8178.               "type": "linear"
  8179.             },
  8180.             "showPoints": "auto",
  8181.             "spanNulls": false,
  8182.             "stacking": {
  8183.               "group": "A",
  8184.               "mode": "none"
  8185.             },
  8186.             "thresholdsStyle": {
  8187.               "mode": "line"
  8188.             }
  8189.           },
  8190.           "mappings": [],
  8191.           "thresholds": {
  8192.             "mode": "absolute",
  8193.             "steps": [
  8194.               {
  8195.                 "color": "green",
  8196.                 "value": null
  8197.               },
  8198.               {
  8199.                 "color": "#ffffff",
  8200.                 "value": 0
  8201.               }
  8202.             ]
  8203.           },
  8204.           "unit": "volt"
  8205.         },
  8206.         "overrides": []
  8207.       },
  8208.       "gridPos": {
  8209.         "h": 8,
  8210.         "w": 12,
  8211.         "x": 12,
  8212.         "y": 160
  8213.       },
  8214.       "id": 123184,
  8215.       "options": {
  8216.         "legend": {
  8217.           "calcs": [
  8218.             "last",
  8219.             "min",
  8220.             "max"
  8221.           ],
  8222.           "displayMode": "table",
  8223.           "placement": "bottom",
  8224.           "showLegend": true
  8225.         },
  8226.         "tooltip": {
  8227.           "mode": "multi",
  8228.           "sort": "desc"
  8229.         }
  8230.       },
  8231.       "targets": [
  8232.         {
  8233.           "datasource": {
  8234.             "type": "mysql",
  8235.             "uid": "BjbJE3u7z"
  8236.           },
  8237.           "editorMode": "code",
  8238.           "format": "time_series",
  8239.           "group": [],
  8240.           "metricColumn": "none",
  8241.           "rawQuery": true,
  8242.           "rawSql": "SELECT\n  UNIX_TIMESTAMP(log_date) AS \"time\",\n  ac_vgrid1 as L1, ac_vgrid2 as L2, ac_vgrid3 as L3\nFROM pv_inverter_record\nWHERE\n  $__timeFilter(log_date)\n  AND pv_inverter_id = $pv_inverter_id \nORDER BY log_date",
  8243.           "refId": "A",
  8244.           "select": [
  8245.             [
  8246.               {
  8247.                 "params": [
  8248.                   "id"
  8249.                 ],
  8250.                 "type": "column"
  8251.               }
  8252.             ]
  8253.           ],
  8254.           "sql": {
  8255.             "columns": [
  8256.               {
  8257.                 "parameters": [],
  8258.                 "type": "function"
  8259.               }
  8260.             ],
  8261.             "groupBy": [
  8262.               {
  8263.                 "property": {
  8264.                   "type": "string"
  8265.                 },
  8266.                 "type": "groupBy"
  8267.               }
  8268.             ],
  8269.             "limit": 50
  8270.           },
  8271.           "table": "_is_generic_admin_media_objects",
  8272.           "timeColumn": "date_of_creation",
  8273.           "timeColumnType": "timestamp",
  8274.           "where": [
  8275.             {
  8276.               "name": "$__timeFilter",
  8277.               "params": [],
  8278.               "type": "macro"
  8279.             }
  8280.           ]
  8281.         }
  8282.       ],
  8283.       "title": "Grid Voltage",
  8284.       "type": "timeseries"
  8285.     },
  8286.     {
  8287.       "datasource": {
  8288.         "type": "mysql",
  8289.         "uid": "BjbJE3u7z"
  8290.       },
  8291.       "fieldConfig": {
  8292.         "defaults": {
  8293.           "color": {
  8294.             "mode": "palette-classic"
  8295.           },
  8296.           "custom": {
  8297.             "axisBorderShow": false,
  8298.             "axisCenteredZero": false,
  8299.             "axisColorMode": "text",
  8300.             "axisLabel": "",
  8301.             "axisPlacement": "auto",
  8302.             "barAlignment": 0,
  8303.             "drawStyle": "line",
  8304.             "fillOpacity": 0,
  8305.             "gradientMode": "none",
  8306.             "hideFrom": {
  8307.               "legend": false,
  8308.               "tooltip": false,
  8309.               "viz": false
  8310.             },
  8311.             "insertNulls": false,
  8312.             "lineInterpolation": "linear",
  8313.             "lineWidth": 1,
  8314.             "pointSize": 5,
  8315.             "scaleDistribution": {
  8316.               "type": "linear"
  8317.             },
  8318.             "showPoints": "auto",
  8319.             "spanNulls": false,
  8320.             "stacking": {
  8321.               "group": "A",
  8322.               "mode": "none"
  8323.             },
  8324.             "thresholdsStyle": {
  8325.               "mode": "line"
  8326.             }
  8327.           },
  8328.           "mappings": [],
  8329.           "thresholds": {
  8330.             "mode": "absolute",
  8331.             "steps": [
  8332.               {
  8333.                 "color": "green",
  8334.                 "value": null
  8335.               },
  8336.               {
  8337.                 "color": "#ffffff",
  8338.                 "value": 0
  8339.               }
  8340.             ]
  8341.           },
  8342.           "unit": "rothz"
  8343.         },
  8344.         "overrides": []
  8345.       },
  8346.       "gridPos": {
  8347.         "h": 8,
  8348.         "w": 12,
  8349.         "x": 12,
  8350.         "y": 168
  8351.       },
  8352.       "id": 123187,
  8353.       "options": {
  8354.         "legend": {
  8355.           "calcs": [
  8356.             "last",
  8357.             "min",
  8358.             "max"
  8359.           ],
  8360.           "displayMode": "table",
  8361.           "placement": "bottom",
  8362.           "showLegend": true
  8363.         },
  8364.         "tooltip": {
  8365.           "mode": "multi",
  8366.           "sort": "desc"
  8367.         }
  8368.       },
  8369.       "targets": [
  8370.         {
  8371.           "datasource": {
  8372.             "type": "mysql",
  8373.             "uid": "BjbJE3u7z"
  8374.           },
  8375.           "editorMode": "code",
  8376.           "format": "time_series",
  8377.           "group": [],
  8378.           "metricColumn": "none",
  8379.           "rawQuery": true,
  8380.           "rawSql": "SELECT\n  UNIX_TIMESTAMP(log_date) AS \"time\",\n  ac_fgrid1 as L1, ac_fgrid2 as L2, ac_fgrid3 as L3\nFROM pv_inverter_record\nWHERE\n  $__timeFilter(log_date)\n  AND pv_inverter_id = $pv_inverter_id \nORDER BY log_date",
  8381.           "refId": "A",
  8382.           "select": [
  8383.             [
  8384.               {
  8385.                 "params": [
  8386.                   "id"
  8387.                 ],
  8388.                 "type": "column"
  8389.               }
  8390.             ]
  8391.           ],
  8392.           "sql": {
  8393.             "columns": [
  8394.               {
  8395.                 "parameters": [],
  8396.                 "type": "function"
  8397.               }
  8398.             ],
  8399.             "groupBy": [
  8400.               {
  8401.                 "property": {
  8402.                   "type": "string"
  8403.                 },
  8404.                 "type": "groupBy"
  8405.               }
  8406.             ],
  8407.             "limit": 50
  8408.           },
  8409.           "table": "_is_generic_admin_media_objects",
  8410.           "timeColumn": "date_of_creation",
  8411.           "timeColumnType": "timestamp",
  8412.           "where": [
  8413.             {
  8414.               "name": "$__timeFilter",
  8415.               "params": [],
  8416.               "type": "macro"
  8417.             }
  8418.           ]
  8419.         }
  8420.       ],
  8421.       "title": "Grid Frequency",
  8422.       "type": "timeseries"
  8423.     },
  8424.     {
  8425.       "collapsed": true,
  8426.       "datasource": {
  8427.         "type": "mysql",
  8428.         "uid": "BjbJE3u7z"
  8429.       },
  8430.       "gridPos": {
  8431.         "h": 1,
  8432.         "w": 24,
  8433.         "x": 0,
  8434.         "y": 176
  8435.       },
  8436.       "id": 123216,
  8437.       "panels": [
  8438.         {
  8439.           "datasource": {
  8440.             "type": "mysql",
  8441.             "uid": "BjbJE3u7z"
  8442.           },
  8443.           "fieldConfig": {
  8444.             "defaults": {
  8445.               "color": {
  8446.                 "mode": "palette-classic"
  8447.               },
  8448.               "custom": {
  8449.                 "axisLabel": "",
  8450.                 "axisPlacement": "auto",
  8451.                 "barAlignment": 0,
  8452.                 "drawStyle": "line",
  8453.                 "fillOpacity": 0,
  8454.                 "gradientMode": "none",
  8455.                 "hideFrom": {
  8456.                   "legend": false,
  8457.                   "tooltip": false,
  8458.                   "viz": false
  8459.                 },
  8460.                 "lineInterpolation": "linear",
  8461.                 "lineWidth": 1,
  8462.                 "pointSize": 5,
  8463.                 "scaleDistribution": {
  8464.                   "type": "linear"
  8465.                 },
  8466.                 "showPoints": "auto",
  8467.                 "spanNulls": false,
  8468.                 "stacking": {
  8469.                   "group": "A",
  8470.                   "mode": "none"
  8471.                 },
  8472.                 "thresholdsStyle": {
  8473.                   "mode": "line"
  8474.                 }
  8475.               },
  8476.               "decimals": 3,
  8477.               "mappings": [],
  8478.               "thresholds": {
  8479.                 "mode": "absolute",
  8480.                 "steps": [
  8481.                   {
  8482.                     "color": "green"
  8483.                   },
  8484.                   {
  8485.                     "color": "dark-red",
  8486.                     "value": 360
  8487.                   },
  8488.                   {
  8489.                     "color": "semi-dark-orange",
  8490.                     "value": 422
  8491.                   },
  8492.                   {
  8493.                     "color": "dark-red",
  8494.                     "value": 432
  8495.                   }
  8496.                 ]
  8497.               },
  8498.               "unit": "none"
  8499.             },
  8500.             "overrides": []
  8501.           },
  8502.           "gridPos": {
  8503.             "h": 8,
  8504.             "w": 12,
  8505.             "x": 0,
  8506.             "y": 2
  8507.           },
  8508.           "id": 123214,
  8509.           "options": {
  8510.             "legend": {
  8511.               "calcs": [
  8512.                 "last",
  8513.                 "min",
  8514.                 "max"
  8515.               ],
  8516.               "displayMode": "list",
  8517.               "placement": "bottom",
  8518.               "showLegend": false
  8519.             },
  8520.             "tooltip": {
  8521.               "mode": "multi",
  8522.               "sort": "desc"
  8523.             }
  8524.           },
  8525.           "targets": [
  8526.             {
  8527.               "datasource": {
  8528.                 "type": "mysql",
  8529.                 "uid": "BjbJE3u7z"
  8530.               },
  8531.               "format": "time_series",
  8532.               "group": [],
  8533.               "hide": true,
  8534.               "metricColumn": "none",
  8535.               "rawQuery": true,
  8536.               "rawSql": "SELECT\n  UNIX_TIMESTAMP(log_date) AS \"time\",\n  battery_vbattery1 as voltage\nFROM pv_inverter_record\nWHERE\n  $__timeFilter(log_date)\nORDER BY log_date",
  8537.               "refId": "A",
  8538.               "select": [
  8539.                 [
  8540.                   {
  8541.                     "params": [
  8542.                       "id"
  8543.                     ],
  8544.                     "type": "column"
  8545.                   }
  8546.                 ]
  8547.               ],
  8548.               "table": "_is_generic_admin_media_objects",
  8549.               "timeColumn": "date_of_creation",
  8550.               "timeColumnType": "timestamp",
  8551.               "where": [
  8552.                 {
  8553.                   "name": "$__timeFilter",
  8554.                   "params": [],
  8555.                   "type": "macro"
  8556.                 }
  8557.               ]
  8558.             },
  8559.             {
  8560.               "datasource": {
  8561.                 "type": "mysql",
  8562.                 "uid": "BjbJE3u7z"
  8563.               },
  8564.               "format": "time_series",
  8565.               "group": [],
  8566.               "hide": true,
  8567.               "metricColumn": "none",
  8568.               "rawQuery": true,
  8569.               "rawSql": "SELECT\n  UNIX_TIMESTAMP(log_date) AS \"time\",\n  s1/10 as bms_can_voltage\nFROM bms_can\nWHERE\n  $__timeFilter(log_date)\n  and cmd=4211\nORDER BY log_date",
  8570.               "refId": "B",
  8571.               "select": [
  8572.                 [
  8573.                   {
  8574.                     "params": [
  8575.                       "id"
  8576.                     ],
  8577.                     "type": "column"
  8578.                   }
  8579.                 ]
  8580.               ],
  8581.               "table": "_is_generic_admin_media_objects",
  8582.               "timeColumn": "date_of_creation",
  8583.               "timeColumnType": "timestamp",
  8584.               "where": [
  8585.                 {
  8586.                   "name": "$__timeFilter",
  8587.                   "params": [],
  8588.                   "type": "macro"
  8589.                 }
  8590.               ]
  8591.             },
  8592.             {
  8593.               "datasource": {
  8594.                 "type": "mysql",
  8595.                 "uid": "BjbJE3u7z"
  8596.               },
  8597.               "format": "time_series",
  8598.               "group": [],
  8599.               "hide": true,
  8600.               "metricColumn": "none",
  8601.               "rawQuery": true,
  8602.               "rawSql": "SELECT\n  UNIX_TIMESTAMP(log_date) AS \"time\",\n  battery_ibattery1 as current\nFROM pv_inverter_record\nWHERE\n  $__timeFilter(log_date)\nORDER BY log_date",
  8603.               "refId": "C",
  8604.               "select": [
  8605.                 [
  8606.                   {
  8607.                     "params": [
  8608.                       "id"
  8609.                     ],
  8610.                     "type": "column"
  8611.                   }
  8612.                 ]
  8613.               ],
  8614.               "table": "_is_generic_admin_media_objects",
  8615.               "timeColumn": "date_of_creation",
  8616.               "timeColumnType": "timestamp",
  8617.               "where": [
  8618.                 {
  8619.                   "name": "$__timeFilter",
  8620.                   "params": [],
  8621.                   "type": "macro"
  8622.                 }
  8623.               ]
  8624.             },
  8625.             {
  8626.               "datasource": {
  8627.                 "type": "mysql",
  8628.                 "uid": "BjbJE3u7z"
  8629.               },
  8630.               "format": "time_series",
  8631.               "group": [],
  8632.               "hide": true,
  8633.               "metricColumn": "none",
  8634.               "rawQuery": true,
  8635.               "rawSql": "SELECT\n  UNIX_TIMESTAMP(log_date) AS \"time\",\n  -1*current as pv_battery_state_record_current\nFROM pv_battery_state_record\nWHERE\n  $__timeFilter(log_date)\nORDER BY log_date",
  8636.               "refId": "F",
  8637.               "select": [
  8638.                 [
  8639.                   {
  8640.                     "params": [
  8641.                       "id"
  8642.                     ],
  8643.                     "type": "column"
  8644.                   }
  8645.                 ]
  8646.               ],
  8647.               "table": "_is_generic_admin_media_objects",
  8648.               "timeColumn": "date_of_creation",
  8649.               "timeColumnType": "timestamp",
  8650.               "where": [
  8651.                 {
  8652.                   "name": "$__timeFilter",
  8653.                   "params": [],
  8654.                   "type": "macro"
  8655.                 }
  8656.               ]
  8657.             },
  8658.             {
  8659.               "datasource": {
  8660.                 "type": "mysql",
  8661.                 "uid": "BjbJE3u7z"
  8662.               },
  8663.               "format": "time_series",
  8664.               "group": [],
  8665.               "hide": true,
  8666.               "metricColumn": "none",
  8667.               "rawQuery": true,
  8668.               "rawSql": "SELECT\n  UNIX_TIMESTAMP(log_date) AS \"time\",\n  -1*(b3-48 + (117-b4)*-256 )/10 as bms_can_current, b3 as b3, b4 /*, 117-b4*/\nFROM bms_can\nWHERE\n  $__timeFilter(log_date)\n  and cmd=4211\nORDER BY log_date",
  8669.               "refId": "D",
  8670.               "select": [
  8671.                 [
  8672.                   {
  8673.                     "params": [
  8674.                       "id"
  8675.                     ],
  8676.                     "type": "column"
  8677.                   }
  8678.                 ]
  8679.               ],
  8680.               "table": "_is_generic_admin_media_objects",
  8681.               "timeColumn": "date_of_creation",
  8682.               "timeColumnType": "timestamp",
  8683.               "where": [
  8684.                 {
  8685.                   "name": "$__timeFilter",
  8686.                   "params": [],
  8687.                   "type": "macro"
  8688.                 }
  8689.               ]
  8690.             },
  8691.             {
  8692.               "datasource": {
  8693.                 "type": "mysql",
  8694.                 "uid": "BjbJE3u7z"
  8695.               },
  8696.               "format": "time_series",
  8697.               "group": [],
  8698.               "hide": true,
  8699.               "metricColumn": "none",
  8700.               "rawQuery": true,
  8701.               "rawSql": "SELECT\n  UNIX_TIMESTAMP(log_date) AS \"time\",\n  b5\nFROM bms_can\nWHERE\n  $__timeFilter(log_date)\n  and cmd=4211\nORDER BY log_date",
  8702.               "refId": "E",
  8703.               "select": [
  8704.                 [
  8705.                   {
  8706.                     "params": [
  8707.                       "id"
  8708.                     ],
  8709.                     "type": "column"
  8710.                   }
  8711.                 ]
  8712.               ],
  8713.               "table": "_is_generic_admin_media_objects",
  8714.               "timeColumn": "date_of_creation",
  8715.               "timeColumnType": "timestamp",
  8716.               "where": [
  8717.                 {
  8718.                   "name": "$__timeFilter",
  8719.                   "params": [],
  8720.                   "type": "macro"
  8721.                 }
  8722.               ]
  8723.             },
  8724.             {
  8725.               "datasource": {
  8726.                 "type": "mysql",
  8727.                 "uid": "BjbJE3u7z"
  8728.               },
  8729.               "format": "time_series",
  8730.               "group": [],
  8731.               "hide": true,
  8732.               "metricColumn": "none",
  8733.               "rawQuery": true,
  8734.               "rawSql": "SELECT\n  UNIX_TIMESTAMP(log_date) AS \"time\",\n  b8\nFROM bms_can\nWHERE\n  $__timeFilter(log_date)\n  and cmd=4221\nORDER BY log_date",
  8735.               "refId": "G",
  8736.               "select": [
  8737.                 [
  8738.                   {
  8739.                     "params": [
  8740.                       "id"
  8741.                     ],
  8742.                     "type": "column"
  8743.                   }
  8744.                 ]
  8745.               ],
  8746.               "table": "_is_generic_admin_media_objects",
  8747.               "timeColumn": "date_of_creation",
  8748.               "timeColumnType": "timestamp",
  8749.               "where": [
  8750.                 {
  8751.                   "name": "$__timeFilter",
  8752.                   "params": [],
  8753.                   "type": "macro"
  8754.                 }
  8755.               ]
  8756.             },
  8757.             {
  8758.               "datasource": {
  8759.                 "type": "mysql",
  8760.                 "uid": "BjbJE3u7z"
  8761.               },
  8762.               "format": "time_series",
  8763.               "group": [],
  8764.               "hide": true,
  8765.               "metricColumn": "none",
  8766.               "rawQuery": true,
  8767.               "rawSql": "SELECT\n  UNIX_TIMESTAMP(log_date) AS \"time\",\n  battery_charge_limit AS battery_charge_limit\nFROM pv_inverter_record\nWHERE\n  $__timeFilter(log_date)\nORDER BY log_date ASC",
  8768.               "refId": "H",
  8769.               "select": [
  8770.                 [
  8771.                   {
  8772.                     "params": [
  8773.                       "id"
  8774.                     ],
  8775.                     "type": "column"
  8776.                   }
  8777.                 ]
  8778.               ],
  8779.               "table": "_is_generic_admin_media_objects",
  8780.               "timeColumn": "date_of_creation",
  8781.               "timeColumnType": "timestamp",
  8782.               "where": [
  8783.                 {
  8784.                   "name": "$__timeFilter",
  8785.                   "params": [],
  8786.                   "type": "macro"
  8787.                 }
  8788.               ]
  8789.             },
  8790.             {
  8791.               "datasource": {
  8792.                 "type": "mysql",
  8793.                 "uid": "BjbJE3u7z"
  8794.               },
  8795.               "format": "time_series",
  8796.               "group": [],
  8797.               "hide": false,
  8798.               "metricColumn": "none",
  8799.               "rawQuery": true,
  8800.               "rawSql": "SELECT\n  UNIX_TIMESTAMP(log_date) AS \"time\",\n  b1, b2, b3, b4, b5, b6, b7, b8\nFROM bms_can\nWHERE\n  $__timeFilter(log_date)\n  and cmd=4211\nORDER BY log_date",
  8801.               "refId": "I",
  8802.               "select": [
  8803.                 [
  8804.                   {
  8805.                     "params": [
  8806.                       "id"
  8807.                     ],
  8808.                     "type": "column"
  8809.                   }
  8810.                 ]
  8811.               ],
  8812.               "table": "_is_generic_admin_media_objects",
  8813.               "timeColumn": "date_of_creation",
  8814.               "timeColumnType": "timestamp",
  8815.               "where": [
  8816.                 {
  8817.                   "name": "$__timeFilter",
  8818.                   "params": [],
  8819.                   "type": "macro"
  8820.                 }
  8821.               ]
  8822.             }
  8823.           ],
  8824.           "title": "bms can test",
  8825.           "type": "timeseries"
  8826.         },
  8827.         {
  8828.           "datasource": {
  8829.             "type": "mysql",
  8830.             "uid": "BjbJE3u7z"
  8831.           },
  8832.           "fieldConfig": {
  8833.             "defaults": {
  8834.               "color": {
  8835.                 "mode": "palette-classic"
  8836.               },
  8837.               "custom": {
  8838.                 "axisLabel": "",
  8839.                 "axisPlacement": "auto",
  8840.                 "barAlignment": 0,
  8841.                 "drawStyle": "line",
  8842.                 "fillOpacity": 0,
  8843.                 "gradientMode": "none",
  8844.                 "hideFrom": {
  8845.                   "legend": false,
  8846.                   "tooltip": false,
  8847.                   "viz": false
  8848.                 },
  8849.                 "lineInterpolation": "linear",
  8850.                 "lineWidth": 1,
  8851.                 "pointSize": 5,
  8852.                 "scaleDistribution": {
  8853.                   "type": "linear"
  8854.                 },
  8855.                 "showPoints": "auto",
  8856.                 "spanNulls": false,
  8857.                 "stacking": {
  8858.                   "group": "A",
  8859.                   "mode": "none"
  8860.                 },
  8861.                 "thresholdsStyle": {
  8862.                   "mode": "line"
  8863.                 }
  8864.               },
  8865.               "mappings": [],
  8866.               "thresholds": {
  8867.                 "mode": "absolute",
  8868.                 "steps": [
  8869.                   {
  8870.                     "color": "green"
  8871.                   },
  8872.                   {
  8873.                     "color": "#ffffff",
  8874.                     "value": 0
  8875.                   }
  8876.                 ]
  8877.               },
  8878.               "unit": "watt"
  8879.             },
  8880.             "overrides": [
  8881.               {
  8882.                 "__systemRef": "hideSeriesFrom",
  8883.                 "matcher": {
  8884.                   "id": "byNames",
  8885.                   "options": {
  8886.                     "mode": "exclude",
  8887.                     "names": [
  8888.                       "missing_power",
  8889.                       "battery_power",
  8890.                       "grid_active_power"
  8891.                     ],
  8892.                     "prefix": "All except:",
  8893.                     "readOnly": true
  8894.                   }
  8895.                 },
  8896.                 "properties": [
  8897.                   {
  8898.                     "id": "custom.hideFrom",
  8899.                     "value": {
  8900.                       "legend": false,
  8901.                       "tooltip": false,
  8902.                       "viz": true
  8903.                     }
  8904.                   }
  8905.                 ]
  8906.               }
  8907.             ]
  8908.           },
  8909.           "gridPos": {
  8910.             "h": 8,
  8911.             "w": 12,
  8912.             "x": 12,
  8913.             "y": 2
  8914.           },
  8915.           "id": 123208,
  8916.           "options": {
  8917.             "legend": {
  8918.               "calcs": [
  8919.                 "last",
  8920.                 "min",
  8921.                 "max"
  8922.               ],
  8923.               "displayMode": "table",
  8924.               "placement": "bottom",
  8925.               "showLegend": true
  8926.             },
  8927.             "tooltip": {
  8928.               "mode": "multi",
  8929.               "sort": "desc"
  8930.             }
  8931.           },
  8932.           "targets": [
  8933.             {
  8934.               "datasource": {
  8935.                 "type": "mysql",
  8936.                 "uid": "BjbJE3u7z"
  8937.               },
  8938.               "format": "time_series",
  8939.               "group": [],
  8940.               "hide": false,
  8941.               "metricColumn": "none",
  8942.               "rawQuery": true,
  8943.               "rawSql": "SELECT\n  time,\n  grid_active_power,\n  ac_house_consumption_maxof,\n  pv_ppv,\n  ac_house_consumption_maxof - pv_ppv AS missing_power,\n  battery_power\nFROM (\n  SELECT\n    UNIX_TIMESTAMP(pv_battery_state_record.log_date) AS \"time\",\n    grid_active_power,\n    GREATEST((IF(work_mode_label = \"Normal (On-Grid)\", ac_load_p1, 0)+IF(work_mode_label = \"Normal (On-Grid)\", ac_load_p2, 0)+IF(work_mode_label = \"Normal (On-Grid)\", ac_load_p3, 0)) + (backup_p1+backup_p2+backup_p3), ac_house_consumption /*ac_pgrid1+ac_pgrid2+ac_pgrid3,*/) AS ac_house_consumption_maxof,\n    pv_inverter_record.pv_ppv,\n    pv_battery_state_record.voltage*pv_battery_state_record.current AS battery_power\n  FROM pv_battery_state_record\n  JOIN pv_inverter_record ON pv_inverter_record.log_date = pv_battery_state_record.log_date\n  WHERE\n    $__timeFilter(pv_battery_state_record.log_date)\n    -- AND pv_battery_state_record.base_state_label = 'Idle'\n    -- AND pv_inverter_record.grid_active_power < 100\n  ORDER BY pv_battery_state_record.log_date\n) x",
  8944.               "refId": "B",
  8945.               "select": [
  8946.                 [
  8947.                   {
  8948.                     "params": [
  8949.                       "id"
  8950.                     ],
  8951.                     "type": "column"
  8952.                   }
  8953.                 ]
  8954.               ],
  8955.               "table": "_is_generic_admin_media_objects",
  8956.               "timeColumn": "date_of_creation",
  8957.               "timeColumnType": "timestamp",
  8958.               "where": [
  8959.                 {
  8960.                   "name": "$__timeFilter",
  8961.                   "params": [],
  8962.                   "type": "macro"
  8963.                 }
  8964.               ]
  8965.             }
  8966.           ],
  8967.           "title": "Err Battery Idle Grid Importing",
  8968.           "type": "timeseries"
  8969.         }
  8970.       ],
  8971.       "targets": [
  8972.         {
  8973.           "datasource": {
  8974.             "type": "mysql",
  8975.             "uid": "BjbJE3u7z"
  8976.           },
  8977.           "refId": "A"
  8978.         }
  8979.       ],
  8980.       "title": "Tests",
  8981.       "type": "row"
  8982.     }
  8983.   ],
  8984.   "refresh": "",
  8985.   "schemaVersion": 38,
  8986.   "tags": [],
  8987.   "templating": {
  8988.     "list": [
  8989.       {
  8990.         "current": {
  8991.           "selected": false,
  8992.           "text": "1",
  8993.           "value": "1"
  8994.         },
  8995.         "datasource": {
  8996.           "type": "mysql",
  8997.           "uid": "BjbJE3u7z"
  8998.         },
  8999.         "definition": "SELECT id FROM pv_inverter",
  9000.         "hide": 0,
  9001.         "includeAll": false,
  9002.         "label": "PV Inverter",
  9003.         "multi": false,
  9004.         "name": "pv_inverter_id",
  9005.         "options": [],
  9006.         "query": "SELECT id FROM pv_inverter",
  9007.         "refresh": 1,
  9008.         "regex": "",
  9009.         "skipUrlSync": false,
  9010.         "sort": 0,
  9011.         "type": "query"
  9012.       }
  9013.     ]
  9014.   },
  9015.   "time": {
  9016.     "from": "now/d",
  9017.     "to": "now/d"
  9018.   },
  9019.   "timepicker": {
  9020.     "hidden": false,
  9021.     "refresh_intervals": [
  9022.       "5s",
  9023.       "10s",
  9024.       "30s",
  9025.       "1m",
  9026.       "5m",
  9027.       "15m",
  9028.       "30m",
  9029.       "1h",
  9030.       "2h",
  9031.       "1d"
  9032.     ],
  9033.     "time_options": [
  9034.       "5m",
  9035.       "15m",
  9036.       "1h",
  9037.       "6h",
  9038.       "12h",
  9039.       "24h",
  9040.       "2d",
  9041.       "7d",
  9042.       "30d"
  9043.     ],
  9044.     "type": "timepicker"
  9045.   },
  9046.   "timezone": "browser",
  9047.   "title": "PV Power Plant",
  9048.   "uid": "tvkQKVwnz",
  9049.   "version": 313,
  9050.   "weekStart": ""
  9051. }
Advertisement
Add Comment
Please, Sign In to add comment