Open DTU (Hoymiles) NodeRed MQTT WR Modul

Fragen zur Nutzung, Features, usw..
DirkS
Beiträge: 46
Registriert: Mi Aug 04, 2021 7:14 am

Open DTU (Hoymiles) NodeRed MQTT WR Modul

Beitrag von DirkS »

Edit 19.10.2022 - Aktueller Flow:

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"}]
Hi,

ich bräuchte mal etwas Hilfe um an die OpenWB über WR2 MQTT die Daten korrekt zu senden.

Ich habe mehrere Microwechselrichter von Hoymiles. Diese lese ich über OpenDTU aus. https://github.com/tbnobody/OpenDTU

Deren Daten landen über MQTT bei mir im HomeAssistant. Die Ertragsdaten bekomme ich für jeden Microwechselrichter einzeln. Um nun der OpenWB die Daten korrekt zu liefern muss ich diese also erstmal Summieren. Das wollte ich nun mit NodeRed als HASS AddOn machen. Das klappt aber nicht ganz zufriedenstellend.

Hier ist das was ich grade im NodeRed mache.

Code: Alles auswählen

[{"id":"2320459f59b642cf","type":"tab","label":"Hoymiles to OpenWB","disabled":false,"info":"","env":[]},{"id":"2ffed9e9209a0d26","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":"0","halt_if_type":"num","halt_if_compare":"gte","outputs":2,"x":100,"y":80,"wires":[["31c9f087.3438f"],[]]},{"id":"233d97a63db15276","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":"0","halt_if_type":"num","halt_if_compare":"gte","outputs":2,"x":110,"y":140,"wires":[["7b8e0037.f117a"],[]]},{"id":"efa413cb6787d4d2","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":"0","halt_if_type":"num","halt_if_compare":"gte","outputs":2,"x":80,"y":200,"wires":[["36c0a2a6770ef8ec"],[]]},{"id":"ce878c18.15589","type":"join","z":"2320459f59b642cf","name":"","mode":"custom","build":"array","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"3","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"num","reduceFixup":"","x":530,"y":140,"wires":[["bac9a9fd.bbd678"]]},{"id":"31c9f087.3438f","type":"change","z":"2320459f59b642cf","name":"","rules":[{"t":"set","p":"parts","pt":"msg","to":"1","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":320,"y":80,"wires":[["ce878c18.15589"]]},{"id":"7b8e0037.f117a","type":"change","z":"2320459f59b642cf","name":"","rules":[{"t":"set","p":"parts","pt":"msg","to":"2","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":320,"y":140,"wires":[["ce878c18.15589"]]},{"id":"bac9a9fd.bbd678","type":"change","z":"2320459f59b642cf","name":"$sum(payload)","rules":[{"t":"set","p":"payload","pt":"msg","to":"$sum(payload)","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":720,"y":140,"wires":[["5fc858e8.750c58","74c9c59ac92952d5"]]},{"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":940,"y":100,"wires":[]},{"id":"36c0a2a6770ef8ec","type":"change","z":"2320459f59b642cf","name":"","rules":[{"t":"set","p":"parts","pt":"msg","to":"3","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":320,"y":200,"wires":[["ce878c18.15589"]]},{"id":"28127b26f95e071e","type":"poll-state","z":"2320459f59b642cf","name":"Holzpalast Süd Wh","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_yieldday","state_type":"num","halt_if":"1","halt_if_type":"num","halt_if_compare":"gte","outputs":2,"x":110,"y":360,"wires":[["7beb00db0650a66c"],[]]},{"id":"7cff721b40b14fd2","type":"poll-state","z":"2320459f59b642cf","name":"Holzpalast Ost Links Wh","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_yieldday","state_type":"num","halt_if":"1","halt_if_type":"num","halt_if_compare":"gte","outputs":2,"x":130,"y":420,"wires":[["ca070c193b16bd7a"],[]]},{"id":"985938c4bb01be1a","type":"poll-state","z":"2320459f59b642cf","name":"Mülltonnen Wh","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_yieldday","state_type":"num","halt_if":"1","halt_if_type":"num","halt_if_compare":"gte","outputs":2,"x":100,"y":480,"wires":[["efcd25794231b672"],[]]},{"id":"8082767545c3b186","type":"join","z":"2320459f59b642cf","name":"","mode":"custom","build":"array","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"3","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"num","reduceFixup":"","x":590,"y":420,"wires":[["efd6d59c8e00201f"]]},{"id":"7beb00db0650a66c","type":"change","z":"2320459f59b642cf","name":"","rules":[{"t":"set","p":"parts","pt":"msg","to":"1","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":380,"y":360,"wires":[["8082767545c3b186"]]},{"id":"ca070c193b16bd7a","type":"change","z":"2320459f59b642cf","name":"","rules":[{"t":"set","p":"parts","pt":"msg","to":"2","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":380,"y":420,"wires":[["8082767545c3b186"]]},{"id":"efd6d59c8e00201f","type":"change","z":"2320459f59b642cf","name":"$sum(payload)","rules":[{"t":"set","p":"payload","pt":"msg","to":"$sum(payload)","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":780,"y":420,"wires":[["1fa5678e1e90a584","0c508bcf4a4e1f87"]]},{"id":"184d24fd615072f1","type":"debug","z":"2320459f59b642cf","name":"Debug Wh Float","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload","statusType":"auto","x":1300,"y":380,"wires":[]},{"id":"efcd25794231b672","type":"change","z":"2320459f59b642cf","name":"","rules":[{"t":"set","p":"parts","pt":"msg","to":"3","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":380,"y":480,"wires":[["8082767545c3b186"]]},{"id":"a94d47cc78fa8456","type":"comment","z":"2320459f59b642cf","name":"Power W","info":"","x":80,"y":20,"wires":[]},{"id":"da9974ede763e9e1","type":"comment","z":"2320459f59b642cf","name":"Daily Wh","info":"","x":80,"y":300,"wires":[]},{"id":"74c9c59ac92952d5","type":"mqtt out","z":"2320459f59b642cf","name":"","topic":"openWB/set/pv/2/W","qos":"2","retain":"true","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"0c113ab30c2c903e","x":980,"y":160,"wires":[]},{"id":"f756d863c3265918","type":"mqtt out","z":"2320459f59b642cf","name":"","topic":"openWB/set/pv/2/WhCounter","qos":"2","retain":"true","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"0c113ab30c2c903e","x":1340,"y":440,"wires":[]},{"id":"1fa5678e1e90a584","type":"toFloat","z":"2320459f59b642cf","name":"","toFixed":"","x":1050,"y":400,"wires":[["184d24fd615072f1"]]},{"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":1010,"y":340,"wires":[]},{"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"},{"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":""}]
Die Leistung wird relativ gut übermittelt. Mir ist aufgefallen, dass manchmal die Summe abweichend zu den Einzelwerten ist aber das ist dann nur relativ kurz. Hier geht es eher um Feintuning.

Probleme bereitet mir der Gesamtertrag. Summiere ich das Ganze genau so wie den Ertrag bekomme ich völlig abweichende Werte in der OpenWB als das was ich sende. Zudem rutscht plötzlich der Gesamtertrag der OpenWB ins Minus. Und das obwohl da noch 3 SMA als WR1 konfiguriert sind und die liefern deutlich mehr als die Hoymiles. Ich bin nun 26kwh im Minus obwohl ich nur ein paar Wh über MQTT übermittelt habe.
Man soll es ja Float schicken. Daher habe ich nun ein FloatModul von nodeRed genommen. Aber da kommen nur irgendwelche ganz eigenartige Werte raus ohne Sinn. Ich bin mir nun also absoult unsicher wie ich der OpenWB die Gesamtertragsdaten für WR2 senden soll damit auch plausibel gezählt werden kann.

Eventuell hat hier schon mal jemand etwas ähnliches gemacht und kann helfen?

Grüße
Dirk
Zuletzt geändert von DirkS am Mi Okt 19, 2022 9:45 am, insgesamt 5-mal geändert.
Gero
Beiträge: 3442
Registriert: Sa Feb 20, 2021 9:55 am
Has thanked: 4 times
Been thanked: 62 times

Re: Open DTU (Hoymiles) NodeRed MQTT WR Modul

Beitrag von Gero »

DirkS hat geschrieben: Mo Okt 17, 2022 9:55 am Man soll es ja Float schicken. Daher habe ich nun ein FloatModul von nodeRed genommen. Aber da kommen nur irgendwelche ganz eigenartige Werte raus ohne Sinn.
Am einfachsten bekommt man einen Float, indem man 0.001 oder so draufaddiert - es geht vermutlich nur um den Dezimalpunkt statt eines Kommas. Ob bei den PV-Modulen immer ein .0 am Ende stehen muss, kann ich nicht sagen - auf ein Tausendstel kommt's aber sicher nicht an.

Oh, eins noch zur Summierung. Die läuft ja node-lokal und der join macht nach drei messages eine neue Message - ungeachtet der Herkunft. Das kann die statistic-Node aus node-red-contrib-combine besser:

Code: Alles auswählen

[{"id":"d268cead936be71a","type":"debug","z":"2320459f59b642cf","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1000,"y":640,"wires":[]},{"id":"359c8b27738b4278","type":"combine-statistic","z":"2320459f59b642cf","name":"","topic":"","operator":"sum","falsy":"include","defer":250,"timeout":0,"distinction":"topic","x":740,"y":620,"wires":[["d268cead936be71a"]]},{"id":"862948ebdcb9feec","type":"change","z":"2320459f59b642cf","name":"","rules":[{"t":"set","p":"topic","pt":"msg","to":"1","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":400,"y":580,"wires":[["359c8b27738b4278"]]},{"id":"157e5ea69b81f7db","type":"change","z":"2320459f59b642cf","name":"","rules":[{"t":"set","p":"topic","pt":"msg","to":"2","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":400,"y":640,"wires":[["359c8b27738b4278"]]},{"id":"bc582b82a725f1c4","type":"change","z":"2320459f59b642cf","name":"","rules":[{"t":"set","p":"topic","pt":"msg","to":"3","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":400,"y":700,"wires":[["359c8b27738b4278"]]},{"id":"bcdda78d1aa2bea9","type":"inject","z":"2320459f59b642cf","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"13","payloadType":"num","x":150,"y":580,"wires":[["862948ebdcb9feec"]]},{"id":"e9217f739479e655","type":"inject","z":"2320459f59b642cf","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"15","payloadType":"num","x":150,"y":640,"wires":[["157e5ea69b81f7db"]]},{"id":"5e4e80451ce1344c","type":"inject","z":"2320459f59b642cf","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"8.01","payloadType":"num","x":150,"y":760,"wires":[["bc582b82a725f1c4"]]},{"id":"e850e406ed011821","type":"inject","z":"2320459f59b642cf","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"3","payloadType":"num","x":150,"y":700,"wires":[["157e5ea69b81f7db"]]}]
openWB-series2, openWB-Buchse, E3/DC S10pro+19.5kWh, 30kWp Ost-Süd, Model 3 und Ion
Becker
Beiträge: 769
Registriert: Mi Okt 07, 2020 4:34 pm

Re: Open DTU (Hoymiles) NodeRed MQTT WR Modul

Beitrag von Becker »

schreib mir mal ne pn, dann machen wir das eben fertig (Teamviewer oder Anydesk).
Am einfachsten bekommt man einen Float, indem man 0.001 oder so draufaddiert
äh nee
openWB series2 Buchse (2021)
go-eCharger HOME+ 22 kW (2022)
Gero
Beiträge: 3442
Registriert: Sa Feb 20, 2021 9:55 am
Has thanked: 4 times
Been thanked: 62 times

Re: Open DTU (Hoymiles) NodeRed MQTT WR Modul

Beitrag von Gero »

Becker hat geschrieben: Mo Okt 17, 2022 12:54 pmäh nee
Oh, stimmt. Ich war irrigerweise davon ausgegangen, dass in Javascript die Variablentypisierung immer passend zum zugewiesenen Wert gemacht wird. Dem ist aber nicht so.
openWB-series2, openWB-Buchse, E3/DC S10pro+19.5kWh, 30kWp Ost-Süd, Model 3 und Ion
Becker
Beiträge: 769
Registriert: Mi Okt 07, 2020 4:34 pm

Re: Open DTU (Hoymiles) NodeRed MQTT WR Modul

Beitrag von Becker »

ich sehe gerade, dass ich die Wh PV nicht als float sende und das schon seit Ewigkeiten ohne Probleme :lol:
openWB series2 Buchse (2021)
go-eCharger HOME+ 22 kW (2022)
DirkS
Beiträge: 46
Registriert: Mi Aug 04, 2021 7:14 am

Re: Open DTU (Hoymiles) NodeRed MQTT WR Modul

Beitrag von DirkS »

Gero hat geschrieben: Mo Okt 17, 2022 11:02 am
DirkS hat geschrieben: Mo Okt 17, 2022 9:55 am Man soll es ja Float schicken. Daher habe ich nun ein FloatModul von nodeRed genommen. Aber da kommen nur irgendwelche ganz eigenartige Werte raus ohne Sinn.
Oh, eins noch zur Summierung. Die läuft ja node-lokal und der join macht nach drei messages eine neue Message - ungeachtet der Herkunft. Das kann die statistic-Node aus node-red-contrib-combine besser:

Code: Alles auswählen

[{"id":"d268cead936be71a","type":"debug","z":"2320459f59b642cf","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1000,"y":640,"wires":[]},{"id":"359c8b27738b4278","type":"combine-statistic","z":"2320459f59b642cf","name":"","topic":"","operator":"sum","falsy":"include","defer":250,"timeout":0,"distinction":"topic","x":740,"y":620,"wires":[["d268cead936be71a"]]},{"id":"862948ebdcb9feec","type":"change","z":"2320459f59b642cf","name":"","rules":[{"t":"set","p":"topic","pt":"msg","to":"1","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":400,"y":580,"wires":[["359c8b27738b4278"]]},{"id":"157e5ea69b81f7db","type":"change","z":"2320459f59b642cf","name":"","rules":[{"t":"set","p":"topic","pt":"msg","to":"2","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":400,"y":640,"wires":[["359c8b27738b4278"]]},{"id":"bc582b82a725f1c4","type":"change","z":"2320459f59b642cf","name":"","rules":[{"t":"set","p":"topic","pt":"msg","to":"3","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":400,"y":700,"wires":[["359c8b27738b4278"]]},{"id":"bcdda78d1aa2bea9","type":"inject","z":"2320459f59b642cf","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"13","payloadType":"num","x":150,"y":580,"wires":[["862948ebdcb9feec"]]},{"id":"e9217f739479e655","type":"inject","z":"2320459f59b642cf","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"15","payloadType":"num","x":150,"y":640,"wires":[["157e5ea69b81f7db"]]},{"id":"5e4e80451ce1344c","type":"inject","z":"2320459f59b642cf","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"8.01","payloadType":"num","x":150,"y":760,"wires":[["bc582b82a725f1c4"]]},{"id":"e850e406ed011821","type":"inject","z":"2320459f59b642cf","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"3","payloadType":"num","x":150,"y":700,"wires":[["157e5ea69b81f7db"]]}]
Das erklärt auch die Differenzen die ich beobachtet habe! Vielen Dank
aiole
Beiträge: 7754
Registriert: Mo Okt 08, 2018 4:51 pm
Has thanked: 18 times
Been thanked: 33 times

Re: Open DTU (Hoymiles) NodeRed MQTT WR Modul

Beitrag von aiole »

Nette Decodierung des Hoymiles-Protokolls und schöne Hardware-Lösung zur Auslesung (ESP32 + RF-Modul) ;).
abudu
Beiträge: 20
Registriert: Mi Feb 24, 2021 9:39 pm
Wohnort: Kreis Heinsberg

Re: Open DTU (Hoymiles) NodeRed MQTT WR Modul

Beitrag von abudu »

aiole hat geschrieben: Mo Okt 17, 2022 9:03 pm Nette Decodierung des Hoymiles-Protokolls und schöne Hardware-Lösung zur Auslesung (ESP32 + RF-Modul) ;).
Ja das ist echt eine klasse Lösung. (Vor allem preislich: Original DTU ca.160€ , Nachbau mit ESP+RF-Modul ca.15€)
Das gibt es auch für den ESP-8266 /WEMOs-Mini und nennt sich AHOY [/size] :!:
https://github.com/lumapu/ahoy

Bei mir läuft AHOY seit gestern :D :D :D

Gerne würde ich diese PV-Werte auch zur openWB per MQTT senden.
Leider fehlt mir noch etwas KNOW HOW :(
Eine Grundsatzfrage:
-Ich habe in der openWB das PV-Modul auf MQTT eingestellt.
-Beim AHOY habe ich den MQTT-Client aktiviert und die openWB als Broker eingetragen, die Verbindung steht!
-Ich weiß nun nicht genau ob und wie ich die Werte zur openWB rüber bekommen.
? Geht das vl. nur mit einer weiteren Soft zB. NodeRed, oder weiteren Broker ?
? Geht das vl. mit einer Bridge ?

Ich hatte hier bereits einen Hinweis gefunden. Leider habe ich nicht ganz verstanden :(
Wäre schön wenn ich etwas Starthilfe ;) bekomme
viewtopic.php?p=72928#p72928
Gero
Beiträge: 3442
Registriert: Sa Feb 20, 2021 9:55 am
Has thanked: 4 times
Been thanked: 62 times

Re: Open DTU (Hoymiles) NodeRed MQTT WR Modul

Beitrag von Gero »

Wenn du nur einen WR hast und die Werte so sind, wie sie das PV-Modul „MQTT“ erwartet, müsste es reichen, wenn der Ahoy in die entsprechenden Topics des PV-Moduls schreibt.

Wenn da erst noch summiert oder sonstwie gerechnet werden muss (z.B. kW statt W) kommst du an nodeRED oder einer anderen Middleware nicht vorbei.

Für die Summierung nimm meinen kleinen Beispiel-Flow mit der statistic-Node von weiter oben. Damit das läuft, musst du aber erat noch node-red-contrib-combine installieren.
openWB-series2, openWB-Buchse, E3/DC S10pro+19.5kWh, 30kWp Ost-Süd, Model 3 und Ion
abudu
Beiträge: 20
Registriert: Mi Feb 24, 2021 9:39 pm
Wohnort: Kreis Heinsberg

Re: Open DTU (Hoymiles) NodeRed MQTT WR Modul

Beitrag von abudu »

Gero hat geschrieben: Di Okt 18, 2022 5:37 am Wenn du nur einen WR hast und die Werte so sind, wie sie das PV-Modul „MQTT“ erwartet, müsste es reichen, wenn der Ahoy in die entsprechenden Topics des PV-Moduls schreibt.
Noch eine Verständnissfrage:
Gesetzt der Fall dass die Werte vom Format OK sind. Woher weiß der AHOY-Client, dass er genau in diese Topics vom PV-Modul schreiben soll? :roll:
PVModul_MQTT_Konfig.PNG
Antworten