Hier mal der Flow, wie es aktuell aussieht. Der Send an den HM-300 stimmt noch nicht, der ist noch nicht da.
Code: Alles auswählen
[{"id":"82119491.05bc9","type":"tab","label":"Shelly Ladepunkt","disabled":false,"info":""},{"id":"ea537576.f6855","type":"mqtt in","z":"82119491.05bc9","name":"Bezug EVU","topic":"openWB/evu/W","qos":"2","datatype":"json","broker":"c4cb83c8.1bd0c","nl":false,"rap":true,"rh":0,"x":330,"y":280,"wires":[["411eecd0.951cdc","c46b2a4f.08f8d","ada02d11.0493a"]]},{"id":"411eecd0.951cdc","type":"ui_gauge","z":"82119491.05bc9","name":"","group":"910cd9b8.54f308","order":0,"width":0,"height":0,"gtype":"gage","title":"Einspeisung | Netzbezug","label":"Watt","format":"{{value}}","min":"-10000","max":"+10000","colors":["#00b500","#e6e600","#ca3838"],"seg1":"0","seg2":"300","diff":true,"className":"","x":750,"y":280,"wires":[]},{"id":"c46b2a4f.08f8d","type":"function","z":"82119491.05bc9","name":"if-Filter","func":"m = msg.payload;\nif (m > 300)\n{\nmsg.payload=(300 + m);\n}\nif (m > 800)\n{\nmsg.payload=(0 + m);\n}\nif (m <= 0)\n{\nmsg.payload=(0 + m);\n}\nelse if (m < 300)\n{\nmsg.payload=(m + m);\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":460,"y":380,"wires":[["dbc25041.070998"]]},{"id":"bfee6647.327bd8","type":"ui_text","z":"82119491.05bc9","group":"910cd9b8.54f308","order":1,"width":"0","height":"0","name":"","label":"Vorgabe Einspeisung: ","format":"{{msg.payload}} W","layout":"row-center","className":"","x":740,"y":320,"wires":[]},{"id":"2363eec9.805eba","type":"mqtt out","z":"82119491.05bc9","name":"HM-300 Ahoy-DTU","topic":"/ctrl/limit_persistent_absolute/","qos":"","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"c4cb83c8.1bd0c","x":930,"y":580,"wires":[]},{"id":"37734c32.6c474c","type":"debug","z":"82119491.05bc9","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":910,"y":640,"wires":[]},{"id":"dbc25041.070998","type":"delay","z":"82119491.05bc9","name":"","pauseType":"rate","timeout":"60","timeoutUnits":"seconds","rate":"1","nbRateUnits":"60","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":610,"y":500,"wires":[["2363eec9.805eba","37734c32.6c474c","f10aab1e.f21d3"]]},{"id":"ada02d11.0493a","type":"function","z":"82119491.05bc9","name":"","func":"m = msg.payload;\nif (m > 300)\n{\nmsg.payload=(300);\n}\nif (m > 800)\n{\nmsg.payload=(0);\n}\nif (m <= 0)\n{\nmsg.payload=(0);\n}\nelse if (m < 300)\n{\nmsg.payload=(m);\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":520,"y":320,"wires":[["bfee6647.327bd8"]]},{"id":"f10aab1e.f21d3","type":"ui_text","z":"82119491.05bc9","group":"910cd9b8.54f308","order":2,"width":0,"height":0,"name":"","label":"Send an WR: ","format":"{{msg.payload}}","layout":"row-center","className":"","x":720,"y":360,"wires":[]},{"id":"c4cb83c8.1bd0c","type":"mqtt-broker","name":"OpenWB","broker":"192.168.178.61","port":"1883","tls":"","clientid":"","usetls":false,"compatmode":false,"protocolVersion":"4","keepalive":"30","cleansession":true,"birthTopic":"","birthQos":"0","birthRetain":"false","birthPayload":"","birthMsg":{},"closeTopic":"","closeQos":"0","closeRetain":"false","closePayload":"","closeMsg":{},"willTopic":"","willQos":"0","willRetain":"false","willPayload":"","willMsg":{},"sessionExpiry":""},{"id":"910cd9b8.54f308","type":"ui_group","name":"EVU","tab":"d55078b2.26bcd8","order":1,"disp":true,"width":"9","collapse":false},{"id":"d55078b2.26bcd8","type":"ui_tab","name":"OPENWB","icon":"dashboard","order":2,"disabled":false,"hidden":false}]