Noch eine Änderung.
Hier wurde ich darauf hingewiesen, dass YieldTotal der DC Wert ist.
Daher nun noch den Wirkungsgrad beachten damit die OpenWB auch die korrekten Gesamtertragswerte erhält.
Code: Alles auswählen
[{"id":"2320459f59b642cf","type":"tab","label":"Hoymiles to OpenWB","disabled":false,"info":"","env":[]},{"id":"5fc858e8.750c58","type":"debug","z":"2320459f59b642cf","name":"Debug W","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload","statusType":"auto","x":1100,"y":140,"wires":[]},{"id":"a94d47cc78fa8456","type":"comment","z":"2320459f59b642cf","name":"Power W","info":"","x":80,"y":20,"wires":[]},{"id":"da9974ede763e9e1","type":"comment","z":"2320459f59b642cf","name":"Wh Counter","info":"","x":90,"y":340,"wires":[]},{"id":"74c9c59ac92952d5","type":"mqtt out","z":"2320459f59b642cf","name":"","topic":"openWB/set/pv/2/W","qos":"2","retain":"false","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"0c113ab30c2c903e","x":1140,"y":220,"wires":[]},{"id":"f756d863c3265918","type":"mqtt out","z":"2320459f59b642cf","name":"","topic":"openWB/set/pv/2/WhCounter","qos":"2","retain":"false","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"0c113ab30c2c903e","x":1420,"y":520,"wires":[]},{"id":"0c508bcf4a4e1f87","type":"debug","z":"2320459f59b642cf","name":"Debug Wh","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload","statusType":"auto","x":1370,"y":440,"wires":[]},{"id":"73e75fbd64a85302","type":"poll-state","z":"2320459f59b642cf","name":"Holzpalast Süd","server":"7029792c.ebefd8","version":2,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"updateinterval":"60","updateIntervalType":"num","updateIntervalUnits":"seconds","outputinitially":true,"outputonchanged":true,"entity_id":"sensor.holzpalast_power","state_type":"num","halt_if":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"x":120,"y":80,"wires":[["e8701232f6866482"]]},{"id":"987bcf3e274b488b","type":"poll-state","z":"2320459f59b642cf","name":"Holzpalast Ost Links","server":"7029792c.ebefd8","version":2,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"updateinterval":"60","updateIntervalType":"num","updateIntervalUnits":"seconds","outputinitially":true,"outputonchanged":true,"entity_id":"sensor.holzpalast_ost_power","state_type":"num","halt_if":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"x":130,"y":140,"wires":[["54f17bfaba4c7ee9"]]},{"id":"d1370ade22ee5e57","type":"poll-state","z":"2320459f59b642cf","name":"Mülltonnen","server":"7029792c.ebefd8","version":2,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"updateinterval":"60","updateIntervalType":"num","updateIntervalUnits":"seconds","outputinitially":true,"outputonchanged":true,"entity_id":"sensor.mulltonnen_power","state_type":"num","halt_if":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"x":100,"y":200,"wires":[["9df7196f6a030740"]]},{"id":"efbdf2800c77f228","type":"poll-state","z":"2320459f59b642cf","name":"Holzpalast Süd kWh","server":"7029792c.ebefd8","version":2,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"updateinterval":"60","updateIntervalType":"num","updateIntervalUnits":"seconds","outputinitially":true,"outputonchanged":true,"entity_id":"sensor.holzpalast_yieldtotal","state_type":"num","halt_if":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"x":130,"y":400,"wires":[["e1ab3ef2aa1ddd4d"]]},{"id":"40128ed1429017d0","type":"poll-state","z":"2320459f59b642cf","name":"Holzpalast Ost Links kWh","server":"7029792c.ebefd8","version":2,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"updateinterval":"60","updateIntervalType":"num","updateIntervalUnits":"seconds","outputinitially":true,"outputonchanged":true,"entity_id":"sensor.holzpalast_ost_yieldtotal","state_type":"num","halt_if":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"x":150,"y":460,"wires":[["2605eeda94afa297"]]},{"id":"c9a4f1a2b7b99d7e","type":"poll-state","z":"2320459f59b642cf","name":"Mülltonnen kWh","server":"7029792c.ebefd8","version":2,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"updateinterval":"60","updateIntervalType":"num","updateIntervalUnits":"seconds","outputinitially":true,"outputonchanged":true,"entity_id":"sensor.mulltonnen_yieldtotal","state_type":"num","halt_if":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"x":120,"y":520,"wires":[["387e3c84db8dfe2d"]]},{"id":"e1ab3ef2aa1ddd4d","type":"change","z":"2320459f59b642cf","name":"","rules":[{"t":"set","p":"topic","pt":"msg","to":"1","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":420,"y":400,"wires":[["ec27a42712c5bfe4"]]},{"id":"2605eeda94afa297","type":"change","z":"2320459f59b642cf","name":"","rules":[{"t":"set","p":"topic","pt":"msg","to":"2","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":420,"y":460,"wires":[["ec27a42712c5bfe4"]]},{"id":"387e3c84db8dfe2d","type":"change","z":"2320459f59b642cf","name":"","rules":[{"t":"set","p":"topic","pt":"msg","to":"3","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":420,"y":520,"wires":[["ec27a42712c5bfe4"]]},{"id":"e8701232f6866482","type":"change","z":"2320459f59b642cf","name":"","rules":[{"t":"set","p":"topic","pt":"msg","to":"1","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":360,"y":80,"wires":[["d0a213bb96ac06e2"]]},{"id":"54f17bfaba4c7ee9","type":"change","z":"2320459f59b642cf","name":"","rules":[{"t":"set","p":"topic","pt":"msg","to":"2","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":360,"y":140,"wires":[["d0a213bb96ac06e2"]]},{"id":"9df7196f6a030740","type":"change","z":"2320459f59b642cf","name":"","rules":[{"t":"set","p":"topic","pt":"msg","to":"3","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":360,"y":200,"wires":[["d0a213bb96ac06e2"]]},{"id":"ec27a42712c5bfe4","type":"combine-statistic","z":"2320459f59b642cf","name":"","topic":"","operator":"sum","falsy":"include","defer":250,"timeout":0,"distinction":"topic","x":640,"y":480,"wires":[["833a28e7e28556b0"]]},{"id":"d0a213bb96ac06e2","type":"combine-statistic","z":"2320459f59b642cf","name":"","topic":"","operator":"sum","falsy":"include","defer":250,"timeout":0,"distinction":"topic","x":600,"y":180,"wires":[["9ac976a16245cfdb"]]},{"id":"ce0aca2c1ae7e798","type":"rbe","z":"2320459f59b642cf","name":"entprellen","func":"deadband","gap":"","start":"","inout":"in","septopics":false,"property":"payload","topi":"topic","x":1180,"y":480,"wires":[["0c508bcf4a4e1f87","f756d863c3265918"]]},{"id":"49c19f8ee087e822","type":"rbe","z":"2320459f59b642cf","name":"entprellen","func":"rbe","gap":"","start":"","inout":"out","septopics":false,"property":"payload","topi":"topic","x":920,"y":180,"wires":[["74c9c59ac92952d5","5fc858e8.750c58"]]},{"id":"c4cc70536e68ba0a","type":"calculator","z":"2320459f59b642cf","name":"kwh in wh","inputMsgField":"payload","outputMsgField":"payload","operation":"mult","constant":"1000","round":true,"decimals":"2","x":1020,"y":480,"wires":[["ce0aca2c1ae7e798"]]},{"id":"9ac976a16245cfdb","type":"function","z":"2320459f59b642cf","name":"Runden","func":"msg.payload = Number(msg.payload.toFixed(2));\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":760,"y":180,"wires":[["49c19f8ee087e822"]]},{"id":"833a28e7e28556b0","type":"calculator","z":"2320459f59b642cf","name":"Wirkungsgrad 95,5%","inputMsgField":"payload","outputMsgField":"payload","operation":"mult","constant":"0.955","round":false,"decimals":"0","x":820,"y":480,"wires":[["c4cc70536e68ba0a"]]},{"id":"0c113ab30c2c903e","type":"mqtt-broker","name":"OpenWB","broker":"openwb.steingaesser.net","port":"1883","clientid":"","autoConnect":true,"usetls":false,"protocolVersion":"4","keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","birthMsg":{},"closeTopic":"","closeQos":"0","closePayload":"","closeMsg":{},"willTopic":"","willQos":"0","willPayload":"","willMsg":{},"userProps":"","sessionExpiry":""},{"id":"7029792c.ebefd8","type":"server","name":"Home Assistant","version":4,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":true,"heartbeatInterval":"30","areaSelector":"friendlyName","deviceSelector":"friendlyName","entitySelector":"friendlyName","statusSeparator":"at: ","statusYear":"hidden","statusMonth":"short","statusDay":"numeric","statusHourCycle":"h23","statusTimeFormat":"h:m"}]