Good morning all,
How could I keep track of how many kW from the 'Shore Power' and from the 'Generator' were generated since the flow started on the following flow....... yes... off course.... this is my first time on this software.....
[{"id":"bed54a86.e409e8","type":"tab","label":"AC Inputs","disabled":false,"info":""},{"id":"ba984a01.c1aa38","type":"ui_chart","z":"bed54a86.e409e8","name":"","group":"3fc6eb51.f963c4","order":1,"width":10,"height":6,"label":"Shore Amp","chartType":"line","legend":"false","xformat":"auto","interpolate":"linear","nodata":"","dot":false,"ymin":"0","ymax":"100","removeOlder":"10","removeOlderPoints":"","removeOlderUnit":"60","cutout":0,"useOneColor":false,"useUTC":false,"colors":["#0080ff","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#ff0000","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"outputs":1,"x":670,"y":120,"wires":[[]]},{"id":"e814cc85.c3429","type":"inject","z":"bed54a86.e409e8","name":"Shore Power","topic":"shore","payload":"true","payloadType":"bool","repeat":"5","crontab":"","once":false,"onceDelay":0.1,"x":120,"y":100,"wires":[["80297fb4.cfb5e","6b324917.7f8fd8"]]},{"id":"586e7f8a.5c3e2","type":"debug","z":"bed54a86.e409e8","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":660,"y":220,"wires":[]},{"id":"26c4818f.c3578e","type":"ui_chart","z":"bed54a86.e409e8","name":"Generator Amp","group":"3fc6eb51.f963c4","order":2,"width":10,"height":6,"label":"Generator Amps","chartType":"line","legend":"false","xformat":"HH:mm:ss","interpolate":"linear","nodata":"wait for it....","dot":false,"ymin":"0","ymax":"100","removeOlder":"10","removeOlderPoints":"","removeOlderUnit":"60","cutout":0,"useOneColor":false,"colors":["#ffff00","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#ff0000","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"outputs":1,"x":680,"y":360,"wires":[[]]},{"id":"cec299d3.10b8a8","type":"inject","z":"bed54a86.e409e8","name":"Generator P","topic":"Generator","payload":"","payloadType":"num","repeat":"5","crontab":"","once":false,"onceDelay":0.1,"x":110,"y":320,"wires":[["4daaf3c1.daf11c","9f9774b2.a14768"]]},{"id":"a4bb74d6.c4fea8","type":"debug","z":"bed54a86.e409e8","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":640,"y":440,"wires":[]},{"id":"e86826a4.695ef8","type":"ui_chart","z":"bed54a86.e409e8","name":"","group":"746c664b.5bc378","order":1,"width":10,"height":6,"label":"Shore Volt","chartType":"line","legend":"false","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"0","ymax":"250","removeOlder":"10","removeOlderPoints":"","removeOlderUnit":"60","cutout":0,"useOneColor":false,"useUTC":false,"colors":["#0080ff","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"outputs":1,"x":660,"y":160,"wires":[[]]},{"id":"69c189b8.53e628","type":"ui_chart","z":"bed54a86.e409e8","name":"Generator Volt","group":"746c664b.5bc378","order":2,"width":10,"height":6,"label":"Generator Volts","chartType":"line","legend":"false","xformat":"HH:mm:ss","interpolate":"linear","nodata":"wait for it....","dot":false,"ymin":"0","ymax":"250","removeOlder":"10","removeOlderPoints":"","removeOlderUnit":"60","cutout":0,"useOneColor":false,"colors":["#ffff00","#aec7e8","#ff7f0e","#ffff00","#98df8a","#d62728","#ffff00","#9467bd","#c5b0d5"],"useOldStyle":false,"outputs":1,"x":680,"y":400,"wires":[[]]},{"id":"d940700.f4f499","type":"function","z":"bed54a86.e409e8","name":"reset","func":"msg.payload = [];\nreturn msg;\n","outputs":1,"noerr":0,"x":330,"y":200,"wires":[["e86826a4.695ef8","ba984a01.c1aa38"]]},{"id":"7f99bc73.97d794","type":"ui_button","z":"bed54a86.e409e8","name":"","group":"f63a9eca.ecd8d","order":11,"width":1,"height":1,"passthru":false,"label":"","tooltip":"","color":"red","bgcolor":"","icon":"fa-heartbeat","payload":"true","payloadType":"bool","topic":"","x":110,"y":200,"wires":[["d940700.f4f499"]],"info":"msg.payload = [];\r\nreturn msg;"},{"id":"1615d235.16d66e","type":"ui_button","z":"bed54a86.e409e8","name":"","group":"f63a9eca.ecd8d","order":4,"width":1,"height":1,"passthru":false,"label":"","tooltip":"","color":"red","bgcolor":"","icon":"fa-heartbeat","payload":"true","payloadType":"bool","topic":"","x":110,"y":440,"wires":[["1f04a4c1.43ee4b"]],"info":"msg.payload = [];\r\nreturn msg;"},{"id":"1f04a4c1.43ee4b","type":"function","z":"bed54a86.e409e8","name":"reset","func":"msg.payload = [];\nreturn msg;\n","outputs":1,"noerr":0,"x":330,"y":440,"wires":[["69c189b8.53e628","26c4818f.c3578e"]]},{"id":"aa52f0ba.b6384","type":"debug","z":"bed54a86.e409e8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":1030,"y":160,"wires":[]},{"id":"13085e6b.f2d5e2","type":"debug","z":"bed54a86.e409e8","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":850,"y":160,"wires":[]},{"id":"24d64d3b.f4a832","type":"join","z":"bed54a86.e409e8","name":"","mode":"custom","build":"object","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"2","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":810,"y":80,"wires":[["49b4bcfd.8bb3d4","13085e6b.f2d5e2"]]},{"id":"49b4bcfd.8bb3d4","type":"change","z":"bed54a86.e409e8","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.Amps*payload.Volt","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":1020,"y":80,"wires":[["aa52f0ba.b6384","103b3e62.f6e522"]]},{"id":"cdc1cb11.594c08","type":"random","z":"bed54a86.e409e8","name":"Volt","low":"195","high":"240","inte":"true","property":"payload","x":410,"y":120,"wires":[["e86826a4.695ef8","24d64d3b.f4a832"]],"info":"var msg = {};\nvar msg1 = {};\n\n\nmsg.payload = Math.round(Math.random()*100);\nmsg.topic = 'line1';\n\nmsg1.payload = Math.round(Math.random()*100);\nmsg1.topic = 'line2';\nreturn [msg,msg1];\n"},{"id":"f9f2336a.d8ff3","type":"random","z":"bed54a86.e409e8","name":"Amps","low":"20","high":"90","inte":"true","property":"payload","x":410,"y":60,"wires":[["ba984a01.c1aa38","24d64d3b.f4a832","a69b6882.b13698"]]},{"id":"80297fb4.cfb5e","type":"change","z":"bed54a86.e409e8","name":"","rules":[{"t":"set","p":"topic","pt":"msg","to":"Volt","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":290,"y":160,"wires":[["cdc1cb11.594c08"]]},{"id":"6b324917.7f8fd8","type":"change","z":"bed54a86.e409e8","name":"","rules":[{"t":"set","p":"topic","pt":"msg","to":"Amps","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":290,"y":20,"wires":[["f9f2336a.d8ff3"]]},{"id":"a69b6882.b13698","type":"ui_level","z":"bed54a86.e409e8","group":"f63a9eca.ecd8d","order":2,"width":3,"height":5,"name":"","label":"","colorHi":"#e60000","colorWarn":"#ff9900","colorNormal":"#00b33c","colorOff":"#595959","min":0,"max":"100","segWarn":"","segHigh":"","unit":"","layout":"sv","channelA":"","channelB":"","decimals":0,"animations":"soft","shape":"3","colorschema":"fixed","textoptions":"custom","colorText":"#00ff00","fontLabel":"","fontValue":"","fontSmall":"","colorFromTheme":false,"textAnimations":true,"hideValue":false,"tickmode":"segments","peakmode":true,"peaktime":"9000","x":650,"y":40,"wires":[]},{"id":"f41ee755.8e83f8","type":"random","z":"bed54a86.e409e8","name":"Volt","low":"195","high":"240","inte":"true","property":"payload","x":410,"y":360,"wires":[["69c189b8.53e628","f4e2512d.e761f"]],"info":"var msg = {};\nvar msg1 = {};\n\n\nmsg.payload = Math.round(Math.random()*100);\nmsg.topic = 'line1';\n\nmsg1.payload = Math.round(Math.random()*100);\nmsg1.topic = 'line2';\nreturn [msg,msg1];\n"},{"id":"32a99fc8.89cfd","type":"random","z":"bed54a86.e409e8","name":"Amps","low":"0","high":"100","inte":"true","property":"payload","x":410,"y":300,"wires":[["26c4818f.c3578e","f4e2512d.e761f","fbfe94ef.9ed088"]]},{"id":"9f9774b2.a14768","type":"change","z":"bed54a86.e409e8","name":"","rules":[{"t":"set","p":"topic","pt":"msg","to":"Volt","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":290,"y":400,"wires":[["f41ee755.8e83f8"]]},{"id":"4daaf3c1.daf11c","type":"change","z":"bed54a86.e409e8","name":"","rules":[{"t":"set","p":"topic","pt":"msg","to":"Amps","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":290,"y":260,"wires":[["32a99fc8.89cfd"]]},{"id":"6d9d6acd.a83234","type":"debug","z":"bed54a86.e409e8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":1030,"y":380,"wires":[]},{"id":"f9128c5.3a3667","type":"debug","z":"bed54a86.e409e8","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":850,"y":380,"wires":[]},{"id":"f4e2512d.e761f","type":"join","z":"bed54a86.e409e8","name":"","mode":"custom","build":"object","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"2","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":810,"y":300,"wires":[["8ef6d4eb.7caa28","f9128c5.3a3667"]]},{"id":"8ef6d4eb.7caa28","type":"change","z":"bed54a86.e409e8","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.Amps*payload.Volt","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":1020,"y":300,"wires":[["6d9d6acd.a83234","2a8a77a2.3754f8"]]},{"id":"fbfe94ef.9ed088","type":"ui_level","z":"bed54a86.e409e8","group":"f63a9eca.ecd8d","order":9,"width":3,"height":5,"name":"","label":"","colorHi":"#e60000","colorWarn":"#ff9900","colorNormal":"#00b33c","colorOff":"#595959","min":0,"max":100,"segWarn":"","segHigh":"","unit":"","layout":"sv","channelA":"","channelB":"","decimals":0,"animations":"soft","shape":"3","colorschema":"fixed","textoptions":"custom","colorText":"#ffff00","fontLabel":"","fontValue":"","fontSmall":"","colorFromTheme":false,"textAnimations":true,"hideValue":false,"tickmode":"segments","peakmode":false,"peaktime":3000,"x":650,"y":280,"wires":[]},{"id":"103b3e62.f6e522","type":"ui_artlessgauge","z":"bed54a86.e409e8","group":"ebbddeec.b2fd1","order":2,"width":4,"height":4,"name":"","icon":"fa-plug","label":"","unit":"Watt","layout":"radial","decimals":0,"differential":false,"minmax":true,"colorTrack":"#0080ff","colorFromTheme":true,"property":"payload","sectors":[{"val":0,"col":"#ffff00","t":"min","dot":0},{"val":5000,"col":"#ff80ff","t":"sec","dot":0},{"val":10000,"col":"#ff00ff","t":"sec","dot":0},{"val":16000,"col":"#ff0000","t":"sec","dot":0},{"val":22000,"col":"#ff0000","t":"max","dot":0}],"lineWidth":"5","bgcolorFromTheme":false,"diffCenter":"","x":1110,"y":20,"wires":[]},{"id":"2a8a77a2.3754f8","type":"ui_artlessgauge","z":"bed54a86.e409e8","group":"ebbddeec.b2fd1","order":5,"width":4,"height":4,"name":"","icon":"fa-plug","label":"","unit":"Watt","layout":"radial","decimals":0,"differential":false,"minmax":true,"colorTrack":"#ffff00","colorFromTheme":true,"property":"payload","sectors":[{"val":0,"col":"#ffff00","t":"min","dot":0},{"val":5000,"col":"#ff80ff","t":"sec","dot":0},{"val":10000,"col":"#ff0080","t":"sec","dot":0},{"val":16000,"col":"#ff0000","t":"sec","dot":0},{"val":22000,"col":"#ff0000","t":"max","dot":0}],"lineWidth":"5","bgcolorFromTheme":false,"diffCenter":"","x":1110,"y":240,"wires":[]},{"id":"3fc6eb51.f963c4","type":"ui_group","z":"","name":"Amps","tab":"80405ef.16a8aa","order":2,"disp":true,"width":10,"collapse":false},{"id":"746c664b.5bc378","type":"ui_group","z":"","name":"Graph Volt","tab":"80405ef.16a8aa","order":3,"disp":true,"width":10,"collapse":false},{"id":"f63a9eca.ecd8d","type":"ui_group","z":"","name":"Gauge","tab":"80405ef.16a8aa","order":1,"disp":true,"width":4,"collapse":false},{"id":"ebbddeec.b2fd1","type":"ui_group","z":"","name":"Power","tab":"80405ef.16a8aa","order":4,"disp":true,"width":"4","collapse":false},{"id":"80405ef.16a8aa","type":"ui_tab","z":"","name":"AC Input","icon":"fa-bolt ","order":1,"disabled":false,"hidden":false}]