Hi zusammen,
in Anlehnung an das große Simulationsprojekt von @stfnhmplr, will ich hier nur kurz eine spezielle Anwendung vorstellen:
Trotz homee Energiemanager, war es mir nicht möglich die Werte meiner PV Anlage suffizient in homee abzubilden, obwohl Wechselrichter von SMA „unterstützt“ werden. Allerdings wird mir nur der Wert „PV Produktion“ übermittelt, vom Batteriewechselrichter der Wert für Ladung/ Entladung.
An dieser Stelle war ich enttäuscht und hätte echt mehr erwartet.
Zu meinem Setting:
- PV Wechelrichter SMA Sunny Tripower 25000
- Batterie Wechselrichter SMA Sunny Island 6.0H
- Batterie BYD B-Box 10.5 LV
Mit der homee in homee Simulation (kurz hih) ändert sich das jetzt… So kann ich jetzt alle Werte der PV Anlage von beiden WR auslesen und in einen simulierten Energiemanager übertragen.
Hier ein paar Impressionen:
Jetzt macht die Verwendung in Homeegrammen auch richtig Sinn, um Dinge im Haus automatisiert in Anlehnung an die Stromsituation zu steuern.
Das ganze läuft natürlich in NodeRed. Für die Auslesung der Daten ist ein Modbus node notwendig. Hier mal der Flow für Interessierte:
[{"id":"94c29a05.895178","type":"modbustcp-read","z":"fd6d95c1.d70ae8","name":"Batterie Ladung","topic":"","dataType":"HoldingRegister","adr":"30845","quantity":"2","rate":"25","rateUnit":"s","server":"8eb3ef23.af869","ieeeType":"off","ieeeBE":"true","x":190,"y":4380,"wires":[["74129c2c.a3f334"]]},{"id":"c2e1fd11.95835","type":"modbustcp-read","z":"fd6d95c1.d70ae8","name":"Einspeisung","topic":"","dataType":"HoldingRegister","adr":"30867","quantity":"2","rate":"25","rateUnit":"s","server":"8eb3ef23.af869","ieeeType":"off","ieeeBE":"true","x":190,"y":4560,"wires":[["bb218aeb.7204f8"]]},{"id":"6dcc21e.5e688e","type":"modbustcp-read","z":"fd6d95c1.d70ae8","name":"Netzbezug","topic":"","dataType":"HoldingRegister","adr":"30865","quantity":"2","rate":"25","rateUnit":"s","server":"8eb3ef23.af869","ieeeType":"off","ieeeBE":"true","x":190,"y":4500,"wires":[["84ece0d0.ea8e8"]]},{"id":"209df9b9.00a856","type":"modbustcp-read","z":"fd6d95c1.d70ae8","name":"PV Erzeugung","topic":"","dataType":"HoldingRegister","adr":"30775","quantity":"2","rate":"25","rateUnit":"s","server":"38eec1f5.1e71ee","ieeeType":"off","ieeeBE":"true","x":180,"y":4620,"wires":[["d7bfa086.5a044"]]},{"id":"5793819c.e8de5","type":"modbustcp-read","z":"fd6d95c1.d70ae8","name":"Bewegung Batterie","topic":"","dataType":"HoldingRegister","adr":"30775","quantity":"2","rate":"25","rateUnit":"s","server":"8eb3ef23.af869","ieeeType":"off","ieeeBE":true,"x":170,"y":4440,"wires":[["95a33646.6f5588"]]},{"id":"74129c2c.a3f334","type":"function","z":"fd6d95c1.d70ae8","name":"Filter","func":"return{payload:msg.payload[1]}","outputs":1,"noerr":0,"x":350,"y":4380,"wires":[["abf6aad6.4d9268"]]},{"id":"d7bfa086.5a044","type":"function","z":"fd6d95c1.d70ae8","name":"Filter","func":"return{payload:msg.payload[1]}","outputs":1,"noerr":0,"x":350,"y":4620,"wires":[["1e7fbd44.061a53","c785586d.cc6178"]]},{"id":"84ece0d0.ea8e8","type":"function","z":"fd6d95c1.d70ae8","name":"Filter","func":"return{payload:msg.payload[1]}","outputs":1,"noerr":0,"x":350,"y":4500,"wires":[["346d8c3d.3c2e44","ea1bf7ca.911dc8"]]},{"id":"bb218aeb.7204f8","type":"function","z":"fd6d95c1.d70ae8","name":"Filter","func":"return{payload:msg.payload[1]}","outputs":1,"noerr":0,"x":350,"y":4560,"wires":[["1d5c374c.3f6439","c785586d.cc6178"]]},{"id":"95a33646.6f5588","type":"function","z":"fd6d95c1.d70ae8","name":"Filter","func":"msg.payload = msg.payload[1] - msg.payload[0];\nreturn msg;","outputs":1,"noerr":0,"x":350,"y":4440,"wires":[["20e012f7.ccbabe","ac683148.cba1e"]]},{"id":"e98dfae1.7ab698","type":"homeeDevice","z":"fd6d95c1.d70ae8","homee-sim":"236538fb.027108","name":"Energy Meter","nodeId":"280","profile":"38","icon":"","attributes":"[{\"id\":282,\"node_id\":280,\"instance\":0,\"minimum\":0,\"maximum\":50000,\"current_value\":1700,\"target_value\":1700,\"last_value\":0,\"unit\":\"W\",\"step_value\":100,\"editable\":0,\"type\":264,\"state\":1,\"last_changed\":1572785482,\"changed_by\":1,\"changed_by_id\":0,\"based_on\":4,\"data\":\"\"},{\"id\":283,\"node_id\":280,\"instance\":0,\"minimum\":0,\"maximum\":50000,\"current_value\":2500,\"target_value\":2500,\"last_value\":0,\"unit\":\"W\",\"step_value\":100,\"editable\":0,\"type\":265,\"state\":1,\"last_changed\":1572785482,\"changed_by\":1,\"changed_by_id\":0,\"based_on\":4,\"data\":\"\"},{\"id\":284,\"node_id\":280,\"instance\":0,\"minimum\":-50000,\"maximum\":50000,\"current_value\":258,\"target_value\":258,\"last_value\":0,\"unit\":\"W\",\"step_value\":100,\"editable\":0,\"type\":267,\"state\":1,\"last_changed\":1572785482,\"changed_by\":1,\"changed_by_id\":0,\"based_on\":4,\"data\":\"\"},{\"id\":285,\"node_id\":280,\"instance\":0,\"minimum\":0,\"maximum\":50000,\"current_value\":200,\"target_value\":200,\"last_value\":0,\"unit\":\"W\",\"step_value\":100,\"editable\":0,\"type\":268,\"state\":1,\"last_changed\":1572785482,\"changed_by\":1,\"changed_by_id\":0,\"based_on\":4,\"data\":\"\"},{\"id\":286,\"node_id\":280,\"instance\":0,\"minimum\":0,\"maximum\":50000,\"current_value\":980,\"target_value\":980,\"last_value\":0,\"unit\":\"W\",\"step_value\":100,\"editable\":0,\"type\":269,\"state\":1,\"last_changed\":1572785482,\"changed_by\":1,\"changed_by_id\":0,\"based_on\":4,\"data\":\"\"},{\"id\":287,\"node_id\":280,\"instance\":0,\"minimum\":0,\"maximum\":100,\"current_value\":37,\"target_value\":37,\"last_value\":0,\"unit\":\"%25\",\"step_value\":1,\"editable\":0,\"type\":273,\"state\":1,\"last_changed\":1572785482,\"changed_by\":1,\"changed_by_id\":0,\"based_on\":4,\"data\":\"\"},{\"id\":288,\"node_id\":280,\"instance\":0,\"minimum\":-50000,\"maximum\":50000,\"current_value\":1180,\"target_value\":1180,\"last_value\":1240,\"unit\":\"W\",\"step_value\":100,\"editable\":0,\"type\":266,\"state\":1,\"last_changed\":1572785663,\"changed_by\":1,\"changed_by_id\":0,\"based_on\":4,\"data\":\"\"},{\"id\":289,\"node_id\":280,\"instance\":0,\"minimum\":0,\"maximum\":9999999,\"current_value\":0,\"target_value\":0,\"last_value\":0,\"unit\":\"kWh\",\"step_value\":1,\"editable\":0,\"type\":274,\"state\":6,\"last_changed\":1572785482,\"changed_by\":1,\"changed_by_id\":0,\"based_on\":4,\"data\":\"\"},{\"id\":290,\"node_id\":280,\"instance\":0,\"minimum\":0,\"maximum\":9999999,\"current_value\":0,\"target_value\":0,\"last_value\":0,\"unit\":\"kWh\",\"step_value\":1,\"editable\":0,\"type\":275,\"state\":6,\"last_changed\":1572785482,\"changed_by\":1,\"changed_by_id\":0,\"based_on\":4,\"data\":\"\"},{\"id\":291,\"node_id\":280,\"instance\":0,\"minimum\":0,\"maximum\":9999999,\"current_value\":0,\"target_value\":0,\"last_value\":0,\"unit\":\"kWh\",\"step_value\":1,\"editable\":0,\"type\":276,\"state\":6,\"last_changed\":1572785482,\"changed_by\":1,\"changed_by_id\":0,\"based_on\":4,\"data\":\"\"},{\"id\":292,\"node_id\":280,\"instance\":0,\"minimum\":0,\"maximum\":9999999,\"current_value\":0,\"target_value\":0,\"last_value\":0,\"unit\":\"kWh\",\"step_value\":1,\"editable\":0,\"type\":277,\"state\":6,\"last_changed\":1572785482,\"changed_by\":1,\"changed_by_id\":0,\"based_on\":4,\"data\":\"\"},{\"id\":293,\"node_id\":280,\"instance\":0,\"minimum\":0,\"maximum\":9999999,\"current_value\":0,\"target_value\":0,\"last_value\":0,\"unit\":\"kWh\",\"step_value\":1,\"editable\":0,\"type\":278,\"state\":6,\"last_changed\":1572785482,\"changed_by\":1,\"changed_by_id\":0,\"based_on\":4,\"data\":\"\"},{\"id\":294,\"node_id\":280,\"instance\":0,\"minimum\":0,\"maximum\":9999999,\"current_value\":0,\"target_value\":0,\"last_value\":0,\"unit\":\"kWh\",\"step_value\":1,\"editable\":0,\"type\":279,\"state\":6,\"last_changed\":1572785482,\"changed_by\":1,\"changed_by_id\":0,\"based_on\":4,\"data\":\"\"}]","x":750,"y":4500,"wires":[[]]},{"id":"346d8c3d.3c2e44","type":"function","z":"fd6d95c1.d70ae8","name":"Wert an EM","func":"var wert = msg.payload\n\nnode.send({payload:{\"id\":282,\"value\":msg.payload}})\n","outputs":1,"noerr":0,"x":510,"y":4500,"wires":[["e98dfae1.7ab698"]]},{"id":"1d5c374c.3f6439","type":"function","z":"fd6d95c1.d70ae8","name":"Wert an EM","func":"var wert = msg.payload\n\nnode.send({payload:{\"id\":283,\"value\":msg.payload}})\n","outputs":1,"noerr":0,"x":510,"y":4560,"wires":[["e98dfae1.7ab698"]]},{"id":"1e7fbd44.061a53","type":"function","z":"fd6d95c1.d70ae8","name":"Wert an EM","func":"var wert = msg.payload\n\nnode.send({payload:{\"id\":288,\"value\":msg.payload}})\n","outputs":1,"noerr":0,"x":510,"y":4620,"wires":[["e98dfae1.7ab698"]]},{"id":"abf6aad6.4d9268","type":"function","z":"fd6d95c1.d70ae8","name":"Wert an EM","func":"var wert = msg.payload\n\nnode.send({payload:{\"id\":287,\"value\":msg.payload}})\n","outputs":1,"noerr":0,"x":510,"y":4380,"wires":[["e98dfae1.7ab698"]]},{"id":"20e012f7.ccbabe","type":"function","z":"fd6d95c1.d70ae8","name":"Wert an EM","func":"var wert = msg.payload\nvar msg1 = {payload:{ \"id\": 286, \"value\":-wert}};\nvar msg2 = {payload:{ \"id\": 285, \"value\": 0 }};\nvar msg3 = {payload:{ \"id\": 285, \"value\":wert}};\nvar msg4 = {payload:{ \"id\": 286, \"value\": 0 }};\n\nif (wert < 0){\nreturn [[msg1,msg2]]\n}\nif (wert >= 0){\nreturn [[msg3,msg4]]\n}","outputs":1,"noerr":0,"x":510,"y":4440,"wires":[["e98dfae1.7ab698"]]},{"id":"c785586d.cc6178","type":"join","z":"fd6d95c1.d70ae8","name":"","mode":"custom","build":"array","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"2","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":310,"y":4700,"wires":[["eea9b379.4220a"]]},{"id":"ea1bf7ca.911dc8","type":"join","z":"fd6d95c1.d70ae8","name":"","mode":"custom","build":"array","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"2","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":510,"y":4300,"wires":[["d90862bd.34975"]]},{"id":"ac683148.cba1e","type":"function","z":"fd6d95c1.d70ae8","name":"Vorzeichen +/-","func":"var wert = msg.payload\n\nif (wert < 0){\nreturn {payload:-wert};\n}\nif (wert >= 0){\nreturn {payload:wert};\n}\n\n","outputs":1,"noerr":0,"x":340,"y":4300,"wires":[["ea1bf7ca.911dc8"]]},{"id":"8b65e5aa.d98318","type":"function","z":"fd6d95c1.d70ae8","name":"Vorzeichen +/-","func":"var wert = msg.payload\n\nif (wert < 0){\nreturn {payload:wert};\n}\nif (wert >= 0){\nreturn {payload:-wert};\n}","outputs":1,"noerr":0,"x":640,"y":4700,"wires":[["5b4833ee.a4325c"]]},{"id":"eea9b379.4220a","type":"function","z":"fd6d95c1.d70ae8","name":"Differenz","func":"msg.payload = msg.payload[1] - msg.payload[0];\nreturn msg;","outputs":1,"noerr":0,"x":460,"y":4700,"wires":[["8b65e5aa.d98318"]]},{"id":"d90862bd.34975","type":"function","z":"fd6d95c1.d70ae8","name":"Summe","func":"msg.payload = msg.payload[1] + msg.payload[0];\nreturn msg;","outputs":1,"noerr":0,"x":660,"y":4300,"wires":[["5b4833ee.a4325c"]]},{"id":"5b4833ee.a4325c","type":"join","z":"fd6d95c1.d70ae8","name":"","mode":"custom","build":"array","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"2","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":940,"y":4500,"wires":[["fa8bea64.a8ea48"]]},{"id":"fa8bea64.a8ea48","type":"function","z":"fd6d95c1.d70ae8","name":"Summe","func":"msg.payload = msg.payload[1] + msg.payload[0];\nreturn msg;","outputs":1,"noerr":0,"x":1080,"y":4500,"wires":[["991fc4e7.e3c7c"]]},{"id":"b6e98277.f1b2f","type":"function","z":"fd6d95c1.d70ae8","name":"Wert an EM","func":"var wert = msg.payload\n\nnode.send({payload:{\"id\":284,\"value\":msg.payload}})\n","outputs":1,"noerr":0,"x":1490,"y":4500,"wires":[["e98dfae1.7ab698"]]},{"id":"991fc4e7.e3c7c","type":"function","z":"fd6d95c1.d70ae8","name":"Vorzeichen +/-","func":"var wert = msg.payload\n\nreturn {payload:-wert};\n\n\n","outputs":1,"noerr":0,"x":1280,"y":4500,"wires":[["b6e98277.f1b2f"]]},{"id":"8eb3ef23.af869","type":"modbustcp-server","z":"","name":"Batterie Ladung","host":"192.168.1.186","port":"502","unit_id":"3","reconnecttimeout":"1"},{"id":"38eec1f5.1e71ee","type":"modbustcp-server","z":"","name":"STP","host":"192.168.1.185","port":"502","unit_id":"3","reconnecttimeout":"1"},{"id":"236538fb.027108","type":"virtualHomee","z":"","name":"12345QWERT"}]
Viel Spaß beim Nachmachen!
Grüße
Michael