{"id":136,"date":"2026-08-03T20:32:29","date_gmt":"2026-08-03T20:32:29","guid":{"rendered":"https:\/\/sjefke.synology.me\/?page_id=136"},"modified":"2026-08-03T20:38:32","modified_gmt":"2026-08-03T20:38:32","slug":"climate-on-falcon","status":"publish","type":"page","link":"https:\/\/sjefke.synology.me\/index.php\/climate-on-falcon\/","title":{"rendered":"Climate on Falcon"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Battery voltages, solar panel voltage and household battery state of charge:<\/p>\n\n\n\n<div style=\"width: 100%; height: 600px;\">\n    <canvas id=\"sensorChart\"><\/canvas>\n<\/div>\n\n<script src=\"https:\/\/cdn.jsdelivr.net\/npm\/chart.js\"><\/script>\n\n<script>\nfetch('https:\/\/sjefke.synology.me\/bms_sensordata.php')\n  .then(response => response.json())\n  .then(data => {\n\n    const labels = data.map(row => row.time);\n\n    const chartData = {\n      labels: labels,\n      datasets: [\n        {\n          label: 'V1',\n          data: data.map(row => row.V1),\n          borderColor: 'red',\n          fill: false\n        },\n        {\n          label: 'V2',\n          data: data.map(row => row.V2),\n          borderColor: 'blue',\n          fill: false\n        },\n        {\n          label: 'SOC',\n          data: data.map(row => row.SOC),\n          borderColor: 'green',\n          fill: false,\n          yAxisID: 'y1'\n        },\n        {\n          label: 'VPV',\n          data: data.map(row => row.VPV),\n          borderColor: 'purple',\n          fill: false\n        },\n\n      ]\n    };\n\n\t new Chart(document.getElementById('sensorChart'), {\n\t  type: 'line',\n\t  data: {\n\t\tlabels: labels,\n\t\tdatasets: [\n\t\t  {\n\t\t\tlabel: 'V1',\n\t\t\tdata: data.map(row => row.V1),\n\t\t\tborderColor: 'red',\n\t\t\tfill: false,\n\t\t\tyAxisID: 'y'\n\t\t  },\n\t\t  {\n\t\t\tlabel: 'V2',\n\t\t\tdata: data.map(row => row.V2),\n\t\t\tborderColor: 'blue',\n\t\t\tfill: false,\n\t\t\tyAxisID: 'y'\n\t\t  },\n\t\t  {\n\t\t\tlabel: 'SOC',\n\t\t\tdata: data.map(row => row.SOC),\n\t\t\tborderColor: 'green',\n\t\t\tfill: false,\n\t\t\tyAxisID: 'y1'   \/\/ <<< SOC op rechter Y-as\n\t\t  },\n\t\t  {\n\t\t\tlabel: 'VPV',\n\t\t\tdata: data.map(row => row.VPV),\n\t\t\tborderColor: 'purple',\n\t\t\tfill: false,\n\t\t\tyAxisID: 'y'\n\t\t  }\n\t\t]\n\t  },\n\t  options: {\n\t\tresponsive: true,\n\t\tmaintainAspectRatio: false,\n\t\tscales: {\n\t\t  y: {\n\t\t\ttype: 'linear',\n\t\t\tposition: 'left',\n\t\t\tbeginAtZero: false\n\t\t  },\n\t\t  y1: {\n\t\t\ttype: 'linear',\n\t\t\tposition: 'right',\n\t\t\tbeginAtZero: false,\n\t\t\tgrid: { drawOnChartArea: false } \/\/ <<< voorkomt dubbele gridlijnen\n\t\t  },\n\t\t  x: {\n\t\t\tticks: { maxRotation: 90, minRotation: 45 }\n\t\t  }\n\t\t}\n\t  }\n\t});\n\n  });\n<\/script>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Battery voltages, solar panel voltage and household battery state of charge:<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-136","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/sjefke.synology.me\/index.php\/wp-json\/wp\/v2\/pages\/136","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sjefke.synology.me\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/sjefke.synology.me\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/sjefke.synology.me\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sjefke.synology.me\/index.php\/wp-json\/wp\/v2\/comments?post=136"}],"version-history":[{"count":10,"href":"https:\/\/sjefke.synology.me\/index.php\/wp-json\/wp\/v2\/pages\/136\/revisions"}],"predecessor-version":[{"id":147,"href":"https:\/\/sjefke.synology.me\/index.php\/wp-json\/wp\/v2\/pages\/136\/revisions\/147"}],"wp:attachment":[{"href":"https:\/\/sjefke.synology.me\/index.php\/wp-json\/wp\/v2\/media?parent=136"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}