@vowill
Danke für deine Scriptvorlage von dem Blockly Tibber Script.
Ich würde das Script gerne auch für den APG Adapter verwenden, tappe aber etwas im Dunkeln.
Könntest du mir etwas helfen wie ich zum Ziel komme ?
Ich habe alle Datenpunkte im Script entsprechend an die Datenpunkte des APG Adapters angepasst.
Im Log erhalte ich folgenden Output:
2024-11-06 00:00:37.390 - info: host.iobroker instance system.adapter.apg-info.0 terminated with code 0 (NO_ERROR)
2024-11-06 00:00:40.822 - info: javascript.0 (215) script.js.EPEX.Blockly-fuer-eCharts: Quelldatensatz: {"graphs":[{"type":"line","color":"gray","line_steppedLine":true,"xAxis_timeFormats":{"hour":"HH"},"xAxis_time_unit":"hour","yAxis_min":0,"yAxis_max":80,"datalabel_show":"auto","datalabel_minDigits":2,"datalabel_maxDigits":2,"xAxis_bounds":"data","line_pointSize":5,"line_PointColor":"rgba(0, 0, 0, 0)","datalabel_fontSize":10,"datalabel_color":"black","line_UseFillColor":true,"data":[{"y":10.582,"t":1730847600000},{"y":9.905,"t":1730851200000},{"y":9.55,"t":1730854800000},{"y":9.754,"t":1730858400000},{"y":10.121,"t":1730862000000},{"y":10.893,"t":1730865600000},{"y":15.554,"t":1730869200000},{"y":27.325,"t":1730872800000},{"y":22.36,"t":1730876400000},{"y":13.483,"t":1730880000000},{"y":12.258,"t":1730883600000},{"y":11.576,"t":1730887200000},{"y":11.1,"t":1730890800000},{"y":12.398,"t":1730894400000},{"y":14.055,"t":1730898000000},{"y":24.654,"t":1730901600000},{"y":46.002,"t":1730905200000},{"y":72.195,"t":1730908800000},{"y":71.407,"t":1730912400000},{"y":40.932,"t":1730916000000},{"y":19.545,"t":1730919600000},{"y":13.184,"t":1730923200000},{"y":11.868,"t":1730926800000},{"y":11.143,"t":1730930400000},{"y":11.143,"t":1730934000000}]}]}, "graphs":[{"type":"line","color":"gray","line_steppedLine":true,"xAxis_timeFormats":{"hour":"HH"},"xAxis_time_unit":"hour","yAxis_min":0,"yAxis_max":80,"datalabel_show":"auto","datalabel_minDigits":2,"datalabel_maxDigits":2,"xAxis_bounds":"data","line_pointSize":5,"line_PointColor":"rgba(0, 0, 0, 0)","datalabel_fontSize":10,"datalabel_color":"black","line_UseFillColor":true,"data":[]}]}
2024-11-06 00:00:40.822 - info: javascript.0 (215) script.js.EPEX.Blockly-fuer-eCharts: Länge des Quelldatensatzes: 1548
2024-11-06 00:00:40.823 - info: javascript.0 (215) script.js.EPEX.Blockly-fuer-eCharts: ]
2024-11-06 00:00:40.892 - info: javascript.0 (215) script.js.EPEX.Blockly-fuer-eCharts: Quelldatensatz: {"graphs":[{"type":"line","color":"gray","line_steppedLine":true,"xAxis_timeFormats":{"hour":"HH"},"xAxis_time_unit":"hour","yAxis_min":0,"yAxis_max":80,"datalabel_show":"auto","datalabel_minDigits":2,"datalabel_maxDigits":2,"xAxis_bounds":"data","line_pointSize":5,"line_PointColor":"rgba(0, 0, 0, 0)","datalabel_fontSize":10,"datalabel_color":"black","line_UseFillColor":true,"data":[{"y":10.582,"t":1730847600000},{"y":9.905,"t":1730851200000},{"y":9.55,"t":1730854800000},{"y":9.754,"t":1730858400000},{"y":10.121,"t":1730862000000},{"y":10.893,"t":1730865600000},{"y":15.554,"t":1730869200000},{"y":27.325,"t":1730872800000},{"y":22.36,"t":1730876400000},{"y":13.483,"t":1730880000000},{"y":12.258,"t":1730883600000},{"y":11.576,"t":1730887200000},{"y":11.1,"t":1730890800000},{"y":12.398,"t":1730894400000},{"y":14.055,"t":1730898000000},{"y":24.654,"t":1730901600000},{"y":46.002,"t":1730905200000},{"y":72.195,"t":1730908800000},{"y":71.407,"t":1730912400000},{"y":40.932,"t":1730916000000},{"y":19.545,"t":1730919600000},{"y":13.184,"t":1730923200000},{"y":11.868,"t":1730926800000},{"y":11.143,"t":1730930400000},{"y":11.143,"t":1730934000000}]}]}, "graphs":[{"type":"line","color":"gray","line_steppedLine":true,"xAxis_timeFormats":{"hour":"HH"},"xAxis_time_unit":"hour","yAxis_min":0,"yAxis_max":80,"datalabel_show":"auto","datalabel_minDigits":2,"datalabel_maxDigits":2,"xAxis_bounds":"data","line_pointSize":5,"line_PointColor":"rgba(0, 0, 0, 0)","datalabel_fontSize":10,"datalabel_color":"black","line_UseFillColor":true,"data":[]}]}
2024-11-06 00:00:40.892 - info: javascript.0 (215) script.js.EPEX.Blockly-fuer-eCharts: Länge des Quelldatensatzes: 1548
2024-11-06 00:00:40.892 - info: javascript.0 (215) script.js.EPEX.Blockly-fuer-eCharts: ]
Die Datenpunkte Mittelwert, Preise und Netzvorgabe schauen aber weniger gut aus:
Ist das soweit korrekt ?
Falls ja, wie kann ich das dann in eCharts darstellen ?
Danke.
Beste Grüße