Je nachdem.... Die Batteriewerte aus dem Emulator (via openWB MQTT Broker), die Ladewerte aus openWB und die Einspeisewerte aus dem Fronius (virtueller Zähler in node-red)
Falls von interesse, hier der node-red Code. Hat mich ein paar Stunden gekostet, weil ich vorher nie mit Dashboards gearbeitet hatte.
Code: Alles auswählen
[{"id":"c0259f4054b12973","type":"tab","label":"Dashboard","disabled":false,"info":"","env":[]},{"id":"9bf6576bf7237c44","type":"group","z":"c0259f4054b12973","name":"Data of solar statistics on dashboard","style":{"label":true},"nodes":["62ade17c24a7cc9b","a7d7e5529fc4542f","01aa2830926312ae","65d0480b821d2c32","b31ef074cf4719d8"],"x":34,"y":19,"w":792,"h":122},{"id":"4e99a71af7d13046","type":"group","z":"c0259f4054b12973","name":"Get battery statistics for dashboard","style":{"label":true},"nodes":["a6e4e423371a4d8d","b7ea97418c819b9b","c8eb78f3f4f8ce81","f0f11dc794384752","8752075f9e8b4b99","5f3b905aee46e9dd"],"x":34,"y":159,"w":792,"h":202},{"id":"c64883302466f7a6","type":"group","z":"c0259f4054b12973","name":"Get grid data for dashboard","style":{"label":true},"nodes":["81e9a2124707d031","1e83132a90063b27","c180f8e5c815c007","75807a19b76866df"],"x":34,"y":379,"w":752,"h":122},{"id":"b299b520082cda12","type":"group","z":"c0259f4054b12973","name":"Get EV charging values for dashboard","style":{"label":true},"nodes":["3af13defcf892f25","5eb22245b09582d1","9820426a41c90c56","687f63487d2bfb23"],"x":34,"y":519,"w":732,"h":122},{"id":"a6e4e423371a4d8d","type":"mqtt in","z":"c0259f4054b12973","g":"4e99a71af7d13046","name":"Battery Emulator","topic":"BE/info","qos":"2","datatype":"auto-detect","broker":"7a4dd03f.f90ad","nl":false,"rap":true,"rh":0,"inputs":0,"x":140,"y":220,"wires":[["f0f11dc794384752"]]},{"id":"81e9a2124707d031","type":"link in","z":"c0259f4054b12973","g":"c64883302466f7a6","name":"ToSolarDashboard","links":["0c57f5582d74fe40"],"x":75,"y":440,"wires":[["1e83132a90063b27","75807a19b76866df"]]},{"id":"1e83132a90063b27","type":"ui_gauge","z":"c0259f4054b12973","g":"c64883302466f7a6","name":" Aktuelle Einspeisewerte","group":"82f2b399ec752d35","order":3,"width":0,"height":0,"gtype":"gage","title":"Aktuelle Einspeisung (-) / Bezug (+)","label":"Watt","format":"{{value}}","min":"-5000","max":"5000","colors":["#00ff04","#00e6cb","#fff700"],"seg1":"0","seg2":"0","diff":true,"className":"","x":650,"y":420,"wires":[]},{"id":"c180f8e5c815c007","type":"ui_chart","z":"c0259f4054b12973","g":"c64883302466f7a6","name":"Chart Netzleistung","group":"82f2b399ec752d35","order":1,"width":0,"height":0,"label":"Netzleistung in Watt","chartType":"line","legend":"false","xformat":"HH:mm:ss","interpolate":"linear","nodata":"Warten auf Daten","dot":false,"ymin":"-5000","ymax":"5000","removeOlder":"6","removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":true,"useUTC":false,"colors":["#00b500","#ff8800","#fffb00","#00b500","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"outputs":1,"useDifferentColor":false,"className":"","x":630,"y":460,"wires":[[]]},{"id":"b7ea97418c819b9b","type":"ui_gauge","z":"c0259f4054b12973","g":"4e99a71af7d13046","name":"","group":"1f2e27d8e73b7422","order":2,"width":0,"height":0,"gtype":"gage","title":"Aktueller Bezug (-) / Ladung (+)","label":"Watt","format":"{{value}}","min":"-8000","max":"+8000","colors":["#fbff00","#fbfa00","#00b500"],"seg1":"0","seg2":"0","diff":true,"className":"","x":670,"y":200,"wires":[]},{"id":"c8eb78f3f4f8ce81","type":"ui_chart","z":"c0259f4054b12973","g":"4e99a71af7d13046","name":"","group":"1f2e27d8e73b7422","order":1,"width":0,"height":0,"label":"Batterieleistung in Watt","chartType":"line","legend":"false","xformat":"HH:mm:ss","interpolate":"linear","nodata":"Warten auf Daten","dot":false,"ymin":"-8500","ymax":"8500","removeOlder":"6","removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"useUTC":false,"colors":["#fbff00","#00b500","#ff8800","#fbff00","#00b500","#d62728","#ff9896","#9467bd","#c5b0d5"],"outputs":1,"useDifferentColor":false,"className":"","x":640,"y":240,"wires":[[]]},{"id":"f0f11dc794384752","type":"function","z":"c0259f4054b12973","g":"4e99a71af7d13046","name":"Split of Data","func":"//This function takes an array of objects from the\n//battery emulator and splits them up in new\n//objects for the charts\n\nconst KeyValues = msg.payload;\nvar Power = new Object();\nvar Temperature = new Object();\nvar SoC = new Object();\nvar ZeroLine = new Object();\n\nPower.payload = KeyValues[\"stat_batt_power\"];\nif (Power.payload < 0) {\n Power.topic = \"Bezug\";\n} else {\n Power.topic = \"Ladung\";\n}\nTemperature.payload = KeyValues[\"temperature_max\"];\nSoC.payload = KeyValues[\"SOC\"];\nZeroLine.payload = 0; \nZeroLine.topic = \"Zero\";\n\nreturn [Power, ZeroLine, Temperature, SoC];","outputs":4,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":350,"y":220,"wires":[["b7ea97418c819b9b","c8eb78f3f4f8ce81"],["c8eb78f3f4f8ce81","c180f8e5c815c007"],["8752075f9e8b4b99"],["5f3b905aee46e9dd"]]},{"id":"3af13defcf892f25","type":"inject","z":"c0259f4054b12973","g":"b299b520082cda12","name":"","props":[{"p":"payload"}],"repeat":"30","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":150,"y":560,"wires":[["5eb22245b09582d1"]]},{"id":"5eb22245b09582d1","type":"function","z":"c0259f4054b12973","g":"b299b520082cda12","name":"Build sum of values","func":"//this function gets the charging power for all\n//EV's from global and sum's them up\n\nconst EVChargingState = new Object(global.get(\"EVCharging\")); //current charging power of all charging points in an array\nconst TotalChargingPower = Object.values(EVChargingState).reduce((a, b) => a + b, 0); //Sum of charging power of all charging points\n\nmsg.payload = TotalChargingPower;\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":370,"y":560,"wires":[["9820426a41c90c56","687f63487d2bfb23"]]},{"id":"9820426a41c90c56","type":"ui_gauge","z":"c0259f4054b12973","g":"b299b520082cda12","name":"","group":"114451c50229c662","order":0,"width":0,"height":0,"gtype":"gage","title":"Aktueller Ladeleistung","label":"Watt","format":"{{value}}","min":"0","max":"15000","colors":["#00b500","#00b500","#fff700"],"seg1":"5000","seg2":"10000","diff":false,"className":"","x":640,"y":560,"wires":[]},{"id":"687f63487d2bfb23","type":"ui_chart","z":"c0259f4054b12973","g":"b299b520082cda12","name":"","group":"114451c50229c662","order":1,"width":0,"height":0,"label":"Ladeleistung in Watt","chartType":"line","legend":"false","xformat":"HH:mm:ss","interpolate":"linear","nodata":"Warten auf Daten","dot":false,"ymin":"0","ymax":"15000","removeOlder":"12","removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"useUTC":false,"colors":["#ff9500","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"outputs":1,"useDifferentColor":false,"className":"","x":640,"y":600,"wires":[[]]},{"id":"62ade17c24a7cc9b","type":"mqtt in","z":"c0259f4054b12973","g":"9bf6576bf7237c44","name":"PV Leistung","topic":"openWB/pv/W","qos":"2","datatype":"auto-detect","broker":"7a4dd03f.f90ad","nl":false,"rap":true,"rh":0,"inputs":0,"x":130,"y":60,"wires":[["a7d7e5529fc4542f"]]},{"id":"8752075f9e8b4b99","type":"ui_gauge","z":"c0259f4054b12973","g":"4e99a71af7d13046","name":"","group":"3e733c75193a1cc2","order":4,"width":0,"height":0,"gtype":"gage","title":"Batterietemperatur","label":"°C","format":"{{value}}","min":0,"max":"50","colors":["#00b500","#e6e600","#ca3838"],"seg1":"35","seg2":"45","diff":false,"className":"","x":630,"y":280,"wires":[]},{"id":"5f3b905aee46e9dd","type":"ui_gauge","z":"c0259f4054b12973","g":"4e99a71af7d13046","name":"","group":"3e733c75193a1cc2","order":3,"width":0,"height":0,"gtype":"gage","title":"Batterie Ladestand","label":"%","format":"{{value}}","min":0,"max":"100","colors":["#b30000","#e6e600","#00b500"],"seg1":"10","seg2":"50","diff":false,"className":"","x":630,"y":320,"wires":[]},{"id":"a7d7e5529fc4542f","type":"range","z":"c0259f4054b12973","g":"9bf6576bf7237c44","minin":"-20000","maxin":"0","minout":"20000","maxout":"0","action":"scale","round":false,"property":"payload","name":"change sign","x":330,"y":60,"wires":[["65d0480b821d2c32","b31ef074cf4719d8"]]},{"id":"01aa2830926312ae","type":"ui_gauge","z":"c0259f4054b12973","g":"9bf6576bf7237c44","name":"","group":"ca65494d4cb5e109","order":0,"width":0,"height":0,"gtype":"gage","title":"PV Leistung","label":"Watt","format":"{{value}}","min":0,"max":"20000","colors":["#ffff00","#ffff00","#ffff00"],"seg1":"10000","seg2":"10000","diff":false,"className":"","x":730,"y":60,"wires":[]},{"id":"65d0480b821d2c32","type":"ui_chart","z":"c0259f4054b12973","g":"9bf6576bf7237c44","name":"","group":"ca65494d4cb5e109","order":1,"width":0,"height":0,"label":"Solare Leistung in Watt","chartType":"line","legend":"false","xformat":"HH:mm:ss","interpolate":"linear","nodata":"Warten auf Daten","dot":false,"ymin":"0","ymax":"20000","removeOlder":"12","removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"useUTC":false,"colors":["#fff700","#aec7e8","#fbff00","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"outputs":1,"useDifferentColor":false,"className":"","x":690,"y":100,"wires":[[]]},{"id":"b31ef074cf4719d8","type":"simplejs","z":"c0259f4054b12973","g":"9bf6576bf7237c44","func":"parse-int","property":"payload","name":"make Integer","x":510,"y":60,"wires":[["01aa2830926312ae"]]},{"id":"75807a19b76866df","type":"function","z":"c0259f4054b12973","g":"c64883302466f7a6","name":"Set different topics for pos/neg values","func":"var Power = new Object();\nPower.payload = msg.payload;\n\nif (Power.payload < 0) {\n Power.topic = \"Bezug\";\n} else {\n Power.topic = \"Einspeisung\";\n}\n\n\nreturn Power;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":330,"y":460,"wires":[["c180f8e5c815c007"]]},{"id":"7a4dd03f.f90ad","type":"mqtt-broker","name":"OpenWB","broker":"192.168.1.65","port":"1883","clientid":"","autoConnect":true,"usetls":false,"protocolVersion":"4","keepalive":"60","cleansession":true,"autoUnsubscribe":true,"birthTopic":"","birthQos":"0","birthPayload":"","birthMsg":{},"closeTopic":"","closeQos":"0","closePayload":"","closeMsg":{},"willTopic":"","willQos":"0","willPayload":"","willMsg":{},"userProps":"","sessionExpiry":""},{"id":"82f2b399ec752d35","type":"ui_group","name":"Netzstatistik","tab":"80cd4062.93a5","order":4,"disp":true,"width":"6","collapse":false,"className":""},{"id":"1f2e27d8e73b7422","type":"ui_group","name":"Leistung Solarbatterie","tab":"80cd4062.93a5","order":2,"disp":true,"width":"6","collapse":false,"className":""},{"id":"114451c50229c662","type":"ui_group","name":"Ladeleistung Elektrofahrzeuge","tab":"80cd4062.93a5","order":5,"disp":true,"width":"6","collapse":false,"className":""},{"id":"3e733c75193a1cc2","type":"ui_group","name":"Batteriekennwerte","tab":"80cd4062.93a5","order":3,"disp":true,"width":"6","collapse":false,"className":""},{"id":"ca65494d4cb5e109","type":"ui_group","name":"Solare Leistung","tab":"80cd4062.93a5","order":1,"disp":true,"width":"6","collapse":false,"className":""},{"id":"80cd4062.93a5","type":"ui_tab","name":"Leistung PV Anlage Hintere Gasse 2/3","icon":"dashboard","disabled":false,"hidden":false}]
Die übergeordneten Einstellungen wie Hintergrund etc, stellt man oben rechts ein: