[ { "id": "e25f82be01062b84", "type": "tab", "label": "ImportExport", "disabled": false, "info": "", "env": [] }, { "id": "86a7c9d8bb82a2a8", "type": "group", "z": "e25f82be01062b84", "style": { "stroke": "#999999", "stroke-opacity": "1", "fill": "none", "fill-opacity": "1", "label": true, "label-position": "nw", "color": "#a4a4a4" }, "nodes": [ "896306693dfbf8f0", "3f632f44ea967db8", "08240466f9fddbb9" ], "x": 94, "y": 1639, "w": 692, "h": 82 }, { "id": "cc4a9fdfab6988e8", "type": "group", "z": "e25f82be01062b84", "style": { "stroke": "#999999", "stroke-opacity": "1", "fill": "none", "fill-opacity": "1", "label": true, "label-position": "nw", "color": "#a4a4a4" }, "nodes": [ "a17ec17dea643d87", "b7545d334c4515cf", "369e995ae6460a64" ], "x": 134, "y": 1499, "w": 632, "h": 82 }, { "id": "a83dc1f09627df3a", "type": "group", "z": "e25f82be01062b84", "style": { "stroke": "#999999", "stroke-opacity": "1", "fill": "none", "fill-opacity": "1", "label": true, "label-position": "nw", "color": "#a4a4a4" }, "nodes": [ "1e6eb25390689039", "1054a87c734ab0b1", "2db40c0e0d8e0be2", "18d182df5a9d0590" ], "x": 814, "y": 1679, "w": 532, "h": 122 }, { "id": "f5d848ad077df112", "type": "group", "z": "e25f82be01062b84", "style": { "stroke": "#999999", "stroke-opacity": "1", "fill": "none", "fill-opacity": "1", "label": true, "label-position": "nw", "color": "#a4a4a4" }, "nodes": [ "2cb2df0bd1afb879", "8e43ec6481f8ee7f", "5f56febcee8056d3" ], "x": 94, "y": 1759, "w": 692, "h": 82 }, { "id": "330b8db578071d1d", "type": "group", "z": "e25f82be01062b84", "style": { "stroke": "#999999", "stroke-opacity": "1", "fill": "none", "fill-opacity": "1", "label": true, "label-position": "nw", "color": "#a4a4a4" }, "nodes": [ "ca2bd7cd871392de", "37d86b75344581a1", "af4cdfe85b286d19" ], "x": 154, "y": 1299, "w": 912, "h": 82 }, { "id": "3fe171c877541607", "type": "group", "z": "e25f82be01062b84", "style": { "stroke": "#999999", "stroke-opacity": "1", "fill": "none", "fill-opacity": "1", "label": true, "label-position": "nw", "color": "#a4a4a4" }, "nodes": [ "35947eecb1d0b110", "ce4480d9a639ed75", "9aee2466a3ca908d", "cd8237d842ade8f6" ], "x": 114, "y": 1839, "w": 872, "h": 82 }, { "id": "f431b32cd050618c", "type": "group", "z": "e25f82be01062b84", "name": "", "style": { "label": true }, "nodes": [ "f0646dac074ba7e5", "caecc95bb871baf6", "02a9f0a7f5efbd1f", "f4e79787a975f3ec" ], "x": 154, "y": 1219, "w": 1112, "h": 82 }, { "id": "5bef7905d805c52f", "type": "group", "z": "e25f82be01062b84", "style": { "stroke": "#999999", "stroke-opacity": "1", "fill": "none", "fill-opacity": "1", "label": true, "label-position": "nw", "color": "#a4a4a4" }, "nodes": [ "5210e15080c7a1ce", "988273ed87ee7dae", "ccfbf62e8083d698" ], "x": 634, "y": 559, "w": 652, "h": 82 }, { "id": "68b51b7c895eb9f8", "type": "group", "z": "e25f82be01062b84", "style": { "stroke": "#999999", "stroke-opacity": "1", "fill": "none", "fill-opacity": "1", "label": true, "label-position": "nw", "color": "#a4a4a4" }, "nodes": [ "7ff275a1b45a8336", "f09dc1eaf8c38640", "32e4dfb117472464" ], "x": 634, "y": 459, "w": 652, "h": 82 }, { "id": "48fb37fda80e1277", "type": "group", "z": "e25f82be01062b84", "style": { "stroke": "#999999", "stroke-opacity": "1", "fill": "none", "fill-opacity": "1", "label": true, "label-position": "nw", "color": "#a4a4a4" }, "nodes": [ "b546d2dec1561ed4", "628a650311244579", "96b66238eefc4493" ], "x": 634, "y": 359, "w": 652, "h": 82 }, { "id": "91d123a69c032a35", "type": "group", "z": "e25f82be01062b84", "style": { "stroke": "#999999", "stroke-opacity": "1", "fill": "none", "fill-opacity": "1", "label": true, "label-position": "nw", "color": "#a4a4a4" }, "nodes": [ "5f43269c0e99934e", "79326346dbaa33b6", "a5776e04564df3f2" ], "x": 634, "y": 259, "w": 652, "h": 82 }, { "id": "f7467c0f121f1e2e", "type": "group", "z": "e25f82be01062b84", "style": { "stroke": "#999999", "stroke-opacity": "1", "fill": "none", "fill-opacity": "1", "label": true, "label-position": "nw", "color": "#a4a4a4" }, "nodes": [ "612767853e3e5f8c", "863d49fc70dfa93d", "053b1016d118bff6" ], "x": 634, "y": 159, "w": 652, "h": 82 }, { "id": "1d84642d061dabcb", "type": "group", "z": "e25f82be01062b84", "style": { "stroke": "#999999", "stroke-opacity": "1", "fill": "none", "fill-opacity": "1", "label": true, "label-position": "nw", "color": "#a4a4a4" }, "nodes": [ "cc45c42a8fed5a33", "c27ee793fd88e1d3", "2835a9c19aa84d9c" ], "x": 54, "y": 859, "w": 512, "h": 142 }, { "id": "88bec70e6a7669cd", "type": "group", "z": "e25f82be01062b84", "style": { "stroke": "#999999", "stroke-opacity": "1", "fill": "none", "fill-opacity": "1", "label": true, "label-position": "nw", "color": "#a4a4a4" }, "nodes": [ "f6bb0848ecb88d67", "d4972062819025fe" ], "x": 754, "y": 899, "w": 492, "h": 82 }, { "id": "e2742ad9929a2123", "type": "group", "z": "e25f82be01062b84", "style": { "stroke": "#999999", "stroke-opacity": "1", "fill": "none", "fill-opacity": "1", "label": true, "label-position": "nw", "color": "#a4a4a4" }, "nodes": [ "a70db3825d9ff516", "3be4efce9febeb57" ], "x": 734, "y": 799, "w": 512, "h": 82 }, { "id": "0fbfed365596c127", "type": "group", "z": "e25f82be01062b84", "style": { "stroke": "#999999", "stroke-opacity": "1", "fill": "none", "fill-opacity": "1", "label": true, "label-position": "nw", "color": "#a4a4a4" }, "nodes": [ "85ee9e304c7a6dc5", "2215973c23b03a05" ], "x": 814, "y": 699, "w": 432, "h": 82 }, { "id": "cae76f680939fe23", "type": "group", "z": "e25f82be01062b84", "style": { "stroke": "#999999", "stroke-opacity": "1", "fill": "none", "fill-opacity": "1", "label": true, "label-position": "nw", "color": "#a4a4a4" }, "nodes": [ "f5111cdb5c6d1200", "7a2e022519ef04c5", "300645f3e35fc264" ], "x": 34, "y": 659, "w": 592, "h": 82 }, { "id": "43525cc10b5d3394", "type": "group", "z": "e25f82be01062b84", "style": { "stroke": "#999999", "stroke-opacity": "1", "fill": "none", "fill-opacity": "1", "label": true, "label-position": "nw", "color": "#a4a4a4" }, "nodes": [ "d41ddeb5d699ab1c", "c6f546b12a6561e4" ], "x": 54, "y": 759, "w": 532, "h": 82 }, { "id": "6cb40e0be308125b", "type": "group", "z": "e25f82be01062b84", "style": { "stroke": "#999999", "stroke-opacity": "1", "fill": "none", "fill-opacity": "1", "label": true, "label-position": "nw", "color": "#a4a4a4" }, "nodes": [ "408755dcce89962e", "dc37e1aa0c5315ba", "0c317b37b0d1e5a3" ], "x": 14, "y": 259, "w": 612, "h": 82 }, { "id": "bf2b937335ed62fa", "type": "group", "z": "e25f82be01062b84", "style": { "stroke": "#999999", "stroke-opacity": "1", "fill": "none", "fill-opacity": "1", "label": true, "label-position": "nw", "color": "#a4a4a4" }, "nodes": [ "3ed789104b0a8f68", "ea781b02ab10e585" ], "x": 174, "y": 359, "w": 452, "h": 82 }, { "id": "3de02213912af430", "type": "group", "z": "e25f82be01062b84", "style": { "stroke": "#999999", "stroke-opacity": "1", "fill": "none", "fill-opacity": "1", "label": true, "label-position": "nw", "color": "#a4a4a4" }, "nodes": [ "d3717631ee9eeb83", "e2a9ddd38787749a", "c00c8fa4a2d1ebaf" ], "x": 14, "y": 559, "w": 612, "h": 82 }, { "id": "a17ec17dea643d87", "type": "victron-input-battery", "z": "e25f82be01062b84", "g": "cc4a9fdfab6988e8", "service": "com.victronenergy.battery/512", "path": "/Soc", "serviceObj": { "service": "com.victronenergy.battery/512", "name": "Fogstar Battery" }, "pathObj": { "path": "/Soc", "type": "float", "name": "State of charge (%)" }, "name": "Fogstar SOC", "onlyChanges": true, "roundValues": "no", "x": 230, "y": 1540, "wires": [ [ "b7545d334c4515cf" ] ] }, { "id": "b7545d334c4515cf", "type": "change", "z": "e25f82be01062b84", "g": "cc4a9fdfab6988e8", "name": "Save BattSOC", "rules": [ { "t": "set", "p": "BattSOC", "pt": "flow", "to": "payload", "tot": "msg" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 480, "y": 1540, "wires": [ [ "369e995ae6460a64", "57d3932ed5342021" ] ] }, { "id": "3239c7248b53e76c", "type": "victron-output-ess", "z": "e25f82be01062b84", "service": "com.victronenergy.settings", "path": "/Settings/CGwacs/AcPowerSetPoint", "serviceObj": { "service": "com.victronenergy.settings", "name": "Venus settings" }, "pathObj": { "path": "/Settings/CGwacs/AcPowerSetPoint", "type": "integer", "name": "Grid set-point (W)", "writable": true }, "name": "Venus Setpoint control", "onlyChanges": false, "x": 1050, "y": 2280, "wires": [] }, { "id": "4df97d7719f30c5b", "type": "comment", "z": "e25f82be01062b84", "name": "Dashboard displays", "info": "Get battery SOC from Fogstar CAN input to GX, and record it in global variable 'BattSOC'", "x": 190, "y": 1160, "wires": [] }, { "id": "2038654115385209", "type": "ui_switch", "z": "e25f82be01062b84", "name": "", "label": "Export now", "tooltip": "Turn on/off export right now", "group": "a9f7fa35bab4923e", "order": 1, "width": "0", "height": "0", "passthru": true, "decouple": "false", "topic": "topic", "topicType": "msg", "style": "", "onvalue": "true", "onvalueType": "bool", "onicon": "", "oncolor": "", "offvalue": "false", "offvalueType": "bool", "officon": "", "offcolor": "", "animate": false, "className": "", "x": 930, "y": 100, "wires": [ [ "6e448e2bf7de11bb" ] ] }, { "id": "b546d2dec1561ed4", "type": "ui_slider", "z": "e25f82be01062b84", "g": "48fb37fda80e1277", "name": "", "label": "Export Power (W)", "tooltip": "Adjust power level for export", "group": "a9f7fa35bab4923e", "order": 2, "width": "6", "height": "1", "passthru": true, "outs": "end", "topic": "topic", "topicType": "msg", "min": 0, "max": "5000", "step": "100", "className": "", "x": 950, "y": 400, "wires": [ [ "628a650311244579" ] ] }, { "id": "6e448e2bf7de11bb", "type": "change", "z": "e25f82be01062b84", "name": "Set forced export", "rules": [ { "t": "set", "p": "ExportForce", "pt": "flow", "to": "payload", "tot": "msg" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 1170, "y": 100, "wires": [ [] ] }, { "id": "628a650311244579", "type": "change", "z": "e25f82be01062b84", "g": "48fb37fda80e1277", "name": "Set Export power", "rules": [ { "t": "set", "p": "ExportSetpoint", "pt": "flow", "to": "payload", "tot": "msg" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 1170, "y": 400, "wires": [ [] ] }, { "id": "3ed789104b0a8f68", "type": "ui_slider", "z": "e25f82be01062b84", "g": "bf2b937335ed62fa", "name": "", "label": "Import Power (W)", "tooltip": "Adjust power level for import", "group": "ff64920d7506ac94", "order": 2, "width": "6", "height": "1", "passthru": true, "outs": "end", "topic": "topic", "topicType": "msg", "min": 0, "max": "10000", "step": "100", "className": "", "x": 290, "y": 400, "wires": [ [ "ea781b02ab10e585" ] ] }, { "id": "150dfeb0534f3cc7", "type": "change", "z": "e25f82be01062b84", "name": "Set forced import", "rules": [ { "t": "set", "p": "ImportForce", "pt": "flow", "to": "payload", "tot": "msg" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 470, "y": 100, "wires": [ [] ] }, { "id": "ea781b02ab10e585", "type": "change", "z": "e25f82be01062b84", "g": "bf2b937335ed62fa", "name": "Set Import power", "rules": [ { "t": "set", "p": "ImportSetpoint", "pt": "flow", "to": "payload", "tot": "msg" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 510, "y": 400, "wires": [ [] ] }, { "id": "447c1ef2ca44d3b8", "type": "ui_switch", "z": "e25f82be01062b84", "name": "", "label": "Import now", "tooltip": "Turn on/off import right now", "group": "ff64920d7506ac94", "order": 1, "width": "0", "height": "0", "passthru": true, "decouple": "false", "topic": "topic", "topicType": "msg", "style": "", "onvalue": "true", "onvalueType": "bool", "onicon": "", "oncolor": "", "offvalue": "false", "offvalueType": "bool", "officon": "", "offcolor": "", "animate": false, "className": "", "x": 230, "y": 100, "wires": [ [ "150dfeb0534f3cc7", "78ab68e80ebad11d" ] ] }, { "id": "4feed3ab6d4697c1", "type": "comment", "z": "e25f82be01062b84", "name": "Dashboard controls", "info": "", "x": 150, "y": 40, "wires": [] }, { "id": "408755dcce89962e", "type": "change", "z": "e25f82be01062b84", "g": "6cb40e0be308125b", "name": "Set Import state", "rules": [ { "t": "set", "p": "ImportEnable", "pt": "flow", "to": "payload", "tot": "msg" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 510, "y": 300, "wires": [ [] ] }, { "id": "dc37e1aa0c5315ba", "type": "ui_switch", "z": "e25f82be01062b84", "g": "6cb40e0be308125b", "name": "", "label": "Enable scheduled", "tooltip": "Turn on/off import right now", "group": "ff64920d7506ac94", "order": 1, "width": "0", "height": "0", "passthru": true, "decouple": "false", "topic": "topic", "topicType": "msg", "style": "", "onvalue": "true", "onvalueType": "bool", "onicon": "", "oncolor": "", "offvalue": "false", "offvalueType": "bool", "officon": "", "offcolor": "", "animate": false, "className": "", "x": 290, "y": 300, "wires": [ [ "408755dcce89962e" ] ] }, { "id": "5f43269c0e99934e", "type": "ui_switch", "z": "e25f82be01062b84", "g": "91d123a69c032a35", "name": "", "label": "Enable scheduled", "tooltip": "Turn on/off export right now", "group": "a9f7fa35bab4923e", "order": 1, "width": "0", "height": "0", "passthru": true, "decouple": "false", "topic": "topic", "topicType": "msg", "style": "", "onvalue": "true", "onvalueType": "bool", "onicon": "", "oncolor": "", "offvalue": "false", "offvalueType": "bool", "officon": "", "offcolor": "", "animate": false, "className": "", "x": 950, "y": 300, "wires": [ [ "79326346dbaa33b6" ] ] }, { "id": "79326346dbaa33b6", "type": "change", "z": "e25f82be01062b84", "g": "91d123a69c032a35", "name": "Set Export state", "rules": [ { "t": "set", "p": "ExportEnable", "pt": "flow", "to": "payload", "tot": "msg" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 1170, "y": 300, "wires": [ [] ] }, { "id": "78ab68e80ebad11d", "type": "change", "z": "e25f82be01062b84", "name": "turn off other switch", "rules": [ { "t": "set", "p": "payload", "pt": "msg", "to": "ExportForce", "tot": "flow" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 640, "y": 40, "wires": [ [ "2038654115385209" ] ] }, { "id": "ca2bd7cd871392de", "type": "victron-input-battery", "z": "e25f82be01062b84", "g": "330b8db578071d1d", "service": "com.victronenergy.battery/512", "path": "/Dc/0/Power", "serviceObj": { "service": "com.victronenergy.battery/512", "name": "Fogstar Battery" }, "pathObj": { "path": "/Dc/0/Power", "type": "float", "name": "Battery power (W)" }, "name": "Charging rate", "onlyChanges": true, "x": 250, "y": 1340, "wires": [ [ "37d86b75344581a1" ] ] }, { "id": "8dc7d9e219853180", "type": "debug", "z": "e25f82be01062b84", "name": "devexportfn", "active": false, "tosidebar": true, "console": false, "tostatus": false, "complete": "payload", "targetType": "msg", "statusVal": "", "statusType": "auto", "x": 770, "y": 2440, "wires": [] }, { "id": "f0646dac074ba7e5", "type": "delay", "z": "e25f82be01062b84", "g": "f431b32cd050618c", "name": "", "pauseType": "rate", "timeout": "5", "timeoutUnits": "seconds", "rate": "1", "nbRateUnits": "1", "rateUnits": "second", "randomFirst": "1", "randomLast": "5", "randomUnits": "seconds", "drop": true, "allowrate": false, "outputs": 1, "x": 540, "y": 1260, "wires": [ [ "02a9f0a7f5efbd1f" ] ] }, { "id": "37d86b75344581a1", "type": "change", "z": "e25f82be01062b84", "g": "330b8db578071d1d", "name": "Save BatteryRate (Charging Rate)", "rules": [ { "t": "set", "p": "BattRate", "pt": "flow", "to": "payload", "tot": "msg" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 540, "y": 1340, "wires": [ [ "af4cdfe85b286d19", "c95dd2484f35fba7" ] ] }, { "id": "4354e69bbf8754b6", "type": "change", "z": "e25f82be01062b84", "name": "Set Feed-in Setpoint", "rules": [ { "t": "set", "p": "Setpoint", "pt": "flow", "to": "payload", "tot": "msg" }, { "t": "set", "p": "payload", "pt": "msg", "to": "$round(msg.payload)", "tot": "jsonata" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 800, "y": 2280, "wires": [ [ "3239c7248b53e76c", "e0f2d482ac70716f" ] ] }, { "id": "4036a0522268e067", "type": "inject", "z": "e25f82be01062b84", "name": "", "props": [], "repeat": "8", "crontab": "", "once": true, "onceDelay": 0.1, "topic": "", "x": 220, "y": 2280, "wires": [ [ "8dc3afa24a5ff6ed" ] ] }, { "id": "f00fa447664652e8", "type": "comment", "z": "e25f82be01062b84", "name": "Import/export control function", "info": "", "x": 210, "y": 2180, "wires": [] }, { "id": "612767853e3e5f8c", "type": "ui_switch", "z": "e25f82be01062b84", "g": "f7467c0f121f1e2e", "name": "", "label": "Auto Export when full", "tooltip": "Turn on/off export limit battery charge", "group": "a9f7fa35bab4923e", "order": 1, "width": "0", "height": "0", "passthru": true, "decouple": "false", "topic": "topic", "topicType": "msg", "style": "", "onvalue": "true", "onvalueType": "bool", "onicon": "", "oncolor": "", "offvalue": "false", "offvalueType": "bool", "officon": "", "offcolor": "", "animate": false, "className": "", "x": 960, "y": 200, "wires": [ [ "863d49fc70dfa93d" ] ] }, { "id": "863d49fc70dfa93d", "type": "change", "z": "e25f82be01062b84", "g": "f7467c0f121f1e2e", "name": "Set auto export", "rules": [ { "t": "set", "p": "ExportAuto", "pt": "flow", "to": "payload", "tot": "msg" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 1180, "y": 200, "wires": [ [] ] }, { "id": "7ff275a1b45a8336", "type": "change", "z": "e25f82be01062b84", "g": "68b51b7c895eb9f8", "name": "Set default 'Full' SOC", "rules": [ { "t": "set", "p": "FullEnough", "pt": "flow", "to": "payload", "tot": "msg" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 1160, "y": 500, "wires": [ [] ] }, { "id": "5210e15080c7a1ce", "type": "change", "z": "e25f82be01062b84", "g": "5bef7905d805c52f", "name": "Set Min SOC", "rules": [ { "t": "set", "p": "SchedExportMinSOC", "pt": "flow", "to": "payload", "tot": "msg" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 1190, "y": 600, "wires": [ [] ] }, { "id": "caecc95bb871baf6", "type": "victron-input-system", "z": "e25f82be01062b84", "g": "f431b32cd050618c", "service": "com.victronenergy.system/0", "path": "/Ac/Grid/L1/Power", "serviceObj": { "service": "com.victronenergy.system/0", "name": "Venus system" }, "pathObj": { "path": "/Ac/Grid/L1/Power", "type": "float", "name": "Grid L1 (W)" }, "name": "", "onlyChanges": false, "x": 300, "y": 1260, "wires": [ [ "f0646dac074ba7e5" ] ] }, { "id": "f09dc1eaf8c38640", "type": "ui_numeric", "z": "e25f82be01062b84", "g": "68b51b7c895eb9f8", "name": "", "label": "Battery 'Full' Level", "tooltip": "Set SOC level deemed 'full'", "group": "a9f7fa35bab4923e", "order": 8, "width": 0, "height": 0, "wrap": false, "passthru": true, "topic": "topic", "topicType": "msg", "format": "{{value}}%", "min": "70", "max": "100", "step": 1, "className": "", "x": 950, "y": 500, "wires": [ [ "7ff275a1b45a8336" ] ] }, { "id": "988273ed87ee7dae", "type": "ui_numeric", "z": "e25f82be01062b84", "g": "5bef7905d805c52f", "name": "", "label": "Min discharge SOC", "tooltip": "Don't export below this level", "group": "a9f7fa35bab4923e", "order": 8, "width": 0, "height": 0, "wrap": false, "passthru": true, "topic": "topic", "topicType": "msg", "format": "{{value}}%", "min": "6", "max": "100", "step": 1, "className": "", "x": 960, "y": 600, "wires": [ [ "5210e15080c7a1ce" ] ] }, { "id": "534ab8b06dda3eb1", "type": "vrm-api", "z": "e25f82be01062b84", "vrm": "aa16b72a42443445", "name": "Solar Forecast", "api_type": "installations", "idUser": "", "users": "", "idSite": "999999", "installations": "stats", "attribute": "vrm_solar_irradiance_fc", "stats_interval": "15mins", "show_instance": false, "stats_start": "bod", "stats_end": "eod", "use_utc": false, "gps_start": "", "gps_end": "", "widgets": "", "instance": "", "vrm_id": "", "country": "", "b_max": "", "tb_max": "", "fb_max": "", "tg_max": "", "fg_max": "", "b_cycle_cost": "", "buy_price_formula": "", "sell_price_formula": "", "green_mode_on": "", "feed_in_possible": "", "feed_in_control_on": "", "b_goal_hour": "", "b_goal_SOC": "", "store_in_global_context": false, "verbose": true, "x": 480, "y": 1960, "wires": [ [ "ba7877e427c6b6e4", "ab3f7972ec3527d9" ] ] }, { "id": "ba7877e427c6b6e4", "type": "ui_text", "z": "e25f82be01062b84", "group": "031655afc3e48225", "order": 10, "width": 0, "height": 0, "name": "", "label": "Solar forecast (today)", "format": "{{msg.payload}}", "layout": "col-center", "className": "", "style": false, "font": "", "fontSize": 16, "color": "#000000", "x": 760, "y": 1960, "wires": [] }, { "id": "ab3f7972ec3527d9", "type": "debug", "z": "e25f82be01062b84", "name": "solarforecast", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "payload", "targetType": "msg", "statusVal": "", "statusType": "auto", "x": 760, "y": 2020, "wires": [] }, { "id": "f57e412e344643e3", "type": "inject", "z": "e25f82be01062b84", "name": "", "props": [ { "p": "payload" }, { "p": "topic", "vt": "str" } ], "repeat": "", "crontab": "", "once": true, "onceDelay": 0.1, "topic": "", "payload": "", "payloadType": "date", "x": 250, "y": 1960, "wires": [ [ "534ab8b06dda3eb1" ] ] }, { "id": "f5111cdb5c6d1200", "type": "inject", "z": "e25f82be01062b84", "g": "cae76f680939fe23", "name": "", "props": [ { "p": "payload" }, { "p": "topic", "v": "", "vt": "date" } ], "repeat": "", "crontab": "*/1 0-23 * * *", "once": true, "onceDelay": 0.1, "topic": "", "payload": "", "payloadType": "date", "x": 150, "y": 700, "wires": [ [ "300645f3e35fc264" ] ] }, { "id": "7a2e022519ef04c5", "type": "ui_text", "z": "e25f82be01062b84", "g": "cae76f680939fe23", "group": "031655afc3e48225", "order": 11, "width": 0, "height": 0, "name": "", "label": "Time", "format": "{{msg.payload}}", "layout": "row-spread", "className": "", "style": false, "font": "", "fontSize": 16, "color": "#000000", "x": 550, "y": 700, "wires": [] }, { "id": "d41ddeb5d699ab1c", "type": "victron-output-relay", "z": "e25f82be01062b84", "g": "43525cc10b5d3394", "service": "com.victronenergy.system/0", "path": "/Relay/0/State", "serviceObj": { "service": "com.victronenergy.system/0", "name": "Venus device" }, "pathObj": { "path": "/Relay/0/State", "type": "enum", "name": "Venus relay 1 state", "enum": { "0": "Open", "1": "Closed" }, "writable": true, "disabled": false }, "initial": "", "name": "Immersion (Hot water)", "onlyChanges": false, "x": 450, "y": 800, "wires": [] }, { "id": "c6f546b12a6561e4", "type": "ui_switch", "z": "e25f82be01062b84", "g": "43525cc10b5d3394", "name": "", "label": "Hot Water Immersion", "tooltip": "", "group": "031655afc3e48225", "order": 12, "width": 0, "height": 0, "passthru": true, "decouple": "false", "topic": "topic", "topicType": "msg", "style": "", "onvalue": "1", "onvalueType": "num", "onicon": "", "oncolor": "", "offvalue": "0", "offvalueType": "num", "officon": "", "offcolor": "", "animate": false, "className": "", "x": 180, "y": 800, "wires": [ [ "d41ddeb5d699ab1c" ] ] }, { "id": "32e4dfb117472464", "type": "inject", "z": "e25f82be01062b84", "g": "68b51b7c895eb9f8", "name": "", "props": [ { "p": "payload" }, { "p": "topic", "vt": "str" } ], "repeat": "", "crontab": "", "once": true, "onceDelay": 0.1, "topic": "", "payload": "100", "payloadType": "num", "x": 730, "y": 500, "wires": [ [ "f09dc1eaf8c38640" ] ] }, { "id": "ccfbf62e8083d698", "type": "inject", "z": "e25f82be01062b84", "g": "5bef7905d805c52f", "name": "", "props": [ { "p": "payload" }, { "p": "topic", "vt": "str" } ], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "payload": "20", "payloadType": "num", "x": 730, "y": 600, "wires": [ [ "988273ed87ee7dae" ] ] }, { "id": "85ee9e304c7a6dc5", "type": "ui_switch", "z": "e25f82be01062b84", "g": "0fbfed365596c127", "name": "", "label": "Export PV%", "tooltip": "Proportional export of current PV power", "group": "a9f7fa35bab4923e", "order": 1, "width": "0", "height": "0", "passthru": true, "decouple": "false", "topic": "topic", "topicType": "msg", "style": "", "onvalue": "true", "onvalueType": "bool", "onicon": "", "oncolor": "", "offvalue": "false", "offvalueType": "bool", "officon": "", "offcolor": "", "animate": false, "className": "", "x": 910, "y": 740, "wires": [ [ "2215973c23b03a05" ] ] }, { "id": "2215973c23b03a05", "type": "change", "z": "e25f82be01062b84", "g": "0fbfed365596c127", "name": "Set PV% export ", "rules": [ { "t": "set", "p": "ExportPV", "pt": "flow", "to": "payload", "tot": "msg" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 1140, "y": 740, "wires": [ [] ] }, { "id": "f6bb0848ecb88d67", "type": "ui_switch", "z": "e25f82be01062b84", "d": true, "g": "88bec70e6a7669cd", "name": "", "label": "Enable battery balancing", "tooltip": "Allow current for battery balancing", "group": "a9f7fa35bab4923e", "order": 1, "width": "0", "height": "0", "passthru": true, "decouple": "false", "topic": "topic", "topicType": "msg", "style": "", "onvalue": "true", "onvalueType": "bool", "onicon": "", "oncolor": "", "offvalue": "false", "offvalueType": "bool", "officon": "", "offcolor": "", "animate": false, "className": "", "x": 890, "y": 940, "wires": [ [ "d4972062819025fe" ] ] }, { "id": "d4972062819025fe", "type": "change", "z": "e25f82be01062b84", "g": "88bec70e6a7669cd", "name": "Set Balancing", "rules": [ { "t": "set", "p": "EnableBalancing", "pt": "flow", "to": "payload", "tot": "msg" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 1140, "y": 940, "wires": [ [] ] }, { "id": "a70db3825d9ff516", "type": "ui_slider", "z": "e25f82be01062b84", "g": "e2742ad9929a2123", "name": "", "label": "PV export fraction", "tooltip": "Adjust power level for export", "group": "a9f7fa35bab4923e", "order": 2, "width": "6", "height": "1", "passthru": true, "outs": "end", "topic": "topic", "topicType": "msg", "min": 0, "max": "100", "step": "5", "className": "", "x": 850, "y": 840, "wires": [ [ "3be4efce9febeb57" ] ] }, { "id": "3be4efce9febeb57", "type": "change", "z": "e25f82be01062b84", "g": "e2742ad9929a2123", "name": "Set PV export percentage", "rules": [ { "t": "set", "p": "ExportPVfraction", "pt": "flow", "to": "payload", "tot": "msg" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 1100, "y": 840, "wires": [ [] ] }, { "id": "cc45c42a8fed5a33", "type": "victron-input-battery", "z": "e25f82be01062b84", "g": "1d84642d061dabcb", "service": "com.victronenergy.battery/512", "path": "/System/MaxCellVoltage", "serviceObj": { "service": "com.victronenergy.battery/512", "name": "Fogstar Battery" }, "pathObj": { "path": "/System/MaxCellVoltage", "type": "float", "name": "System; maximum cell voltage (V DC)" }, "name": "Max cell voltage", "onlyChanges": false, "x": 160, "y": 900, "wires": [ [ "c27ee793fd88e1d3", "2835a9c19aa84d9c" ] ] }, { "id": "c27ee793fd88e1d3", "type": "debug", "z": "e25f82be01062b84", "g": "1d84642d061dabcb", "name": "Cellvoltage debug", "active": false, "tosidebar": true, "console": false, "tostatus": false, "complete": "payload", "targetType": "msg", "statusVal": "", "statusType": "auto", "x": 430, "y": 960, "wires": [] }, { "id": "2835a9c19aa84d9c", "type": "change", "z": "e25f82be01062b84", "g": "1d84642d061dabcb", "name": "Set Higest Cell voltage", "rules": [ { "t": "set", "p": "HighestCellV", "pt": "flow", "to": "payload", "tot": "msg" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 430, "y": 900, "wires": [ [] ] }, { "id": "f0e33a18c46e226c", "type": "inject", "z": "e25f82be01062b84", "name": "", "props": [], "repeat": "2", "crontab": "", "once": true, "onceDelay": 0.1, "topic": "", "x": 200, "y": 2440, "wires": [ [] ] }, { "id": "896306693dfbf8f0", "type": "change", "z": "e25f82be01062b84", "g": "86a7c9d8bb82a2a8", "name": "Save DCPVPower", "rules": [ { "t": "set", "p": "DCPVPower", "pt": "flow", "to": "payload", "tot": "msg" }, { "t": "set", "p": "payload", "pt": "msg", "to": "$round(msg.payload)", "tot": "jsonata" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 430, "y": 1680, "wires": [ [ "08240466f9fddbb9" ] ] }, { "id": "3f632f44ea967db8", "type": "victron-input-solarcharger", "z": "e25f82be01062b84", "g": "86a7c9d8bb82a2a8", "service": "com.victronenergy.solarcharger/289", "path": "/Yield/Power", "serviceObj": { "service": "com.victronenergy.solarcharger/289", "name": "SmartSolar Charger MPPT 250/70 rev2" }, "pathObj": { "path": "/Yield/Power", "type": "float", "name": "PV Power (W)" }, "name": "PV power", "onlyChanges": false, "x": 180, "y": 1680, "wires": [ [ "896306693dfbf8f0", "1e6eb25390689039" ] ] }, { "id": "300645f3e35fc264", "type": "change", "z": "e25f82be01062b84", "g": "cae76f680939fe23", "name": "", "rules": [ { "t": "set", "p": "payload", "pt": "msg", "to": "$fromMillis(msg.payload,'[H01]:[m01]')", "tot": "jsonata" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 350, "y": 700, "wires": [ [ "7a2e022519ef04c5" ] ] }, { "id": "369e995ae6460a64", "type": "ui_text", "z": "e25f82be01062b84", "g": "cc4a9fdfab6988e8", "group": "031655afc3e48225", "order": 1, "width": 0, "height": 0, "name": "", "label": "SOC %", "format": "{{msg.payload}}", "layout": "row-spread", "className": "batterysoc", "style": false, "font": "Arial,Arial,Helvetica,sans-serif", "fontSize": "15", "color": "#000000", "x": 690, "y": 1540, "wires": [] }, { "id": "96b66238eefc4493", "type": "inject", "z": "e25f82be01062b84", "g": "48fb37fda80e1277", "name": "", "props": [ { "p": "payload" }, { "p": "topic", "vt": "str" } ], "repeat": "", "crontab": "", "once": true, "onceDelay": 0.1, "topic": "", "payload": "5000", "payloadType": "num", "x": 730, "y": 400, "wires": [ [ "b546d2dec1561ed4" ] ] }, { "id": "053b1016d118bff6", "type": "inject", "z": "e25f82be01062b84", "g": "f7467c0f121f1e2e", "name": "", "props": [ { "p": "payload" }, { "p": "topic", "vt": "str" } ], "repeat": "", "crontab": "", "once": true, "onceDelay": 0.1, "topic": "", "payload": "true", "payloadType": "bool", "x": 730, "y": 200, "wires": [ [ "612767853e3e5f8c" ] ] }, { "id": "a5776e04564df3f2", "type": "inject", "z": "e25f82be01062b84", "g": "91d123a69c032a35", "name": "", "props": [ { "p": "payload" }, { "p": "topic", "vt": "str" } ], "repeat": "", "crontab": "", "once": true, "onceDelay": 0.1, "topic": "", "payload": "true", "payloadType": "bool", "x": 730, "y": 300, "wires": [ [ "5f43269c0e99934e" ] ] }, { "id": "69037ae2e7773e31", "type": "inject", "z": "e25f82be01062b84", "name": "", "props": [ { "p": "payload" }, { "p": "topic", "vt": "str" } ], "repeat": "", "crontab": "", "once": true, "onceDelay": 0.1, "topic": "", "payload": "false", "payloadType": "bool", "x": 70, "y": 100, "wires": [ [ "447c1ef2ca44d3b8" ] ] }, { "id": "0c317b37b0d1e5a3", "type": "inject", "z": "e25f82be01062b84", "g": "6cb40e0be308125b", "name": "", "props": [ { "p": "payload" }, { "p": "topic", "vt": "str" } ], "repeat": "", "crontab": "", "once": true, "onceDelay": 0.1, "topic": "", "payload": "false", "payloadType": "bool", "x": 110, "y": 300, "wires": [ [ "dc37e1aa0c5315ba" ] ] }, { "id": "ebe31cc2099ec5ca", "type": "inject", "z": "e25f82be01062b84", "name": "", "props": [ { "p": "payload" }, { "p": "topic", "vt": "str" } ], "repeat": "", "crontab": "", "once": true, "onceDelay": 0.1, "topic": "", "payload": "false", "payloadType": "bool", "x": 730, "y": 100, "wires": [ [ "2038654115385209" ] ] }, { "id": "23a396facf673951", "type": "function", "z": "e25f82be01062b84", "name": "consolidated export control", "func": "\n//peak rate times\n//Cosy, FLux, Go, import: 16-19\n//Cosy, Flux, Go export : 16-19\n\n//cheap rates times\n//Flux import: 02-05\n//Cosy import:04-07, 13-16, 22-24\n//Go import: 00:30-05:30\n//iGo import 11:30-05:30\n//Flux export: 02-05\n\nlet SOC = flow.get('BattSOC');\nlet exportsetpoint = -flow.get('ExportSetpoint');\nlet exportenable = flow.get('ExportEnable');\nlet exportforce = flow.get('ExportForce');\nlet importsetpoint = flow.get('ImportSetpoint');\nlet importenable = flow.get('ImportEnable');\nlet importforce = flow.get('ImportForce');\nlet exportauto = flow.get('ExportAuto');\nlet battrate = flow.get('BattRate'); //current battery charging rate\nlet consumption = flow.get('ACConsumption');\nlet setpoint = flow.get('Setpoint');\nlet fullenough = flow.get('FullEnough');\n//let DNOExportlimit = flow.get('DNOExportlimit');\nlet DNOExportlimit = 5000;\nlet balancing = flow.get('EnableBalancing');\nlet highestcellv = flow.get('HighestCellV');\nlet exportPV = flow.get('ExportPV');\nlet exportPVfraction = flow.get('ExportPVfraction')/100;\nlet PVpower = flow.get('PVpower'); //currently using 1.7 factor to get approx total power.\nlet exportPVcutoff = flow.get('ExportPVcutoff');\n\nlet hysteresis = 40; //watts\nlet balancepower = 300; //watts\nlet balancethreshold = 3.40; //volts\nlet solarfactor = 1.7; //componsate for unmeasured AC PV\nlet exportminSOC = flow.get('SchedExportMinSOC');\nlet importmaxSOC = 40; //don't import above 40% (should depend on solar today)\n\nlet time = new Date();\nlet hour = time.getHours();\n\n//+ve import from grid, -ve means export to grid ('feed-in')\n\nlet zerosetpoint = -30;\n\n//flag for sending new setpoint - not sure we need this? \nlet sendupdate = false;\n\n//rate of change for iterative adjustments\n//let changerate = 50; //watts\nlet changerate = Math.min(Math.abs(battrate)/5, 200);\n//node.warn (changerate);\n//node.status (changerate);\n\n\n\n//If balancing enabled charge at 200W rather than zero\n//Balancing state occurs when one cell is > 3.45V and enabled in interface\nif (balancing && (highestcellv > balancethreshold)) \n { chargetarget = balancepower }\nelse \n ( chargetarget = 0 )\n//node.status (chargetarget);\n\n\n// Default to 'do nothing' if nothing else overrides \nlet newsetpoint = zerosetpoint;\nsendupdate = true;\n\n//time < exportPVcutoff \n//set fractional PV export if 'Export PV %' is set\nif (exportPV && hour>=6 && hour <16 && PVpower>100 ) {\n // not fullenough\n // export set fraction of PV. (should allow for current local consumption here)\n //newsetpoint = -PVpower*exportPVfraction\n // Allow for current consumption. If this means importing, clamp to 0\n // (Generation - consumption) * export fraction (we thought about this!)\n newsetpoint = Math.min(zerosetpoint-(PVpower*exportPVfraction),0)\n //newsetpoint = Math.min(zerosetpoint-((PVpower+consumption)*exportPVfraction),0)\n sendupdate = true\n}\n//Once we get above 'fullenough' SOC adjust grid setpoint \n//to keep charge around zero. \nif (SOC >= fullenough && exportauto) {\n newsetpoint = setpoint-battrate+chargetarget\n sendupdate = true\n//iterative algorithm \n// if (battrate > (chargetarget+hysteresis) ) {\n// //limit setpoint to DNO requirement\n// newsetpoint = setpoint-changerate\n// sendupdate = true\n// } else if (battrate < (chargetarget-hysteresis) ) {\n// //limit setpoint to DNO requirement\n// newsetpoint = setpoint+changerate\n// sendupdate = true\n// }\n}\n\n// 'import/export now' buttons get highest priority. \nif (exportforce || (exportenable && hour>=16 && hour <19 && SOC > exportminSOC)) {\n //At peak time set exporting rate\n newsetpoint = exportsetpoint\n sendupdate = true\n} else if (importforce || (importenable && hour>=2 && hour <5 && SOC < importmaxSOC)) { \n //At cheap time set import rate\n newsetpoint = importsetpoint\n sendupdate = true\n}\n\n//if any logic set a new value (capped at DNO limit), and send it\nif (sendupdate) {\n let newMsg = {\n topic: \"Setpoint\",\n payload: Math.max(newsetpoint, -DNOExportlimit)\n };\n return newMsg;\n}", "outputs": 1, "timeout": 0, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 460, "y": 2440, "wires": [ [ "8dc7d9e219853180" ] ] }, { "id": "ef6ca93247a02628", "type": "debug", "z": "e25f82be01062b84", "name": "mainexportfn", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "payload", "targetType": "msg", "statusVal": "", "statusType": "auto", "x": 780, "y": 2340, "wires": [] }, { "id": "02a9f0a7f5efbd1f", "type": "change", "z": "e25f82be01062b84", "g": "f431b32cd050618c", "name": "Save Current Grid Power", "rules": [ { "t": "set", "p": "CurrentGridPower", "pt": "flow", "to": "payload", "tot": "msg" }, { "t": "set", "p": "payload", "pt": "msg", "to": "$round(msg.payload)", "tot": "jsonata" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 790, "y": 1260, "wires": [ [ "f4e79787a975f3ec" ] ] }, { "id": "e0f2d482ac70716f", "type": "ui_text", "z": "e25f82be01062b84", "group": "a9f7fa35bab4923e", "order": 3, "width": 0, "height": 0, "name": "", "label": "Current setpoint", "format": "{{msg.payload}}", "layout": "row-spread", "className": "", "style": false, "font": "", "fontSize": 16, "color": "#000000", "x": 1030, "y": 2220, "wires": [] }, { "id": "f4e79787a975f3ec", "type": "ui_text", "z": "e25f82be01062b84", "g": "f431b32cd050618c", "group": "a9f7fa35bab4923e", "order": 3, "width": 0, "height": 0, "name": "", "label": "Actual grid power (import +ve)", "format": "{{msg.payload}}", "layout": "row-spread", "className": "", "style": false, "font": "", "fontSize": 16, "color": "#000000", "x": 1110, "y": 1260, "wires": [] }, { "id": "8dc3afa24a5ff6ed", "type": "function", "z": "e25f82be01062b84", "name": "consolidated export control", "func": "\n//peak rate times\n//Cosy, FLux, Go, import: 16-19\n//Cosy, Flux, Go export : 16-19\n\n//cheap rates times\n//Flux import: 02-05\n//Cosy import:04-07, 13-16, 22-24\n//Go import: 00:30-05:30\n//iGo import 11:30-05:30\n//Flux export: 02-05\n\nlet SOC = flow.get('BattSOC');\nlet exportsetpoint = -flow.get('ExportSetpoint');\nlet exportenable = flow.get('ExportEnable');\nlet exportforce = flow.get('ExportForce');\nlet importsetpoint = flow.get('ImportSetpoint');\nlet importenable = flow.get('ImportEnable');\nlet importforce = flow.get('ImportForce');\nlet exportauto = flow.get('ExportAuto');\nlet battrate = flow.get('BattRate'); //current battery charging rate\nlet consumption = flow.get('ACConsumption');\nlet setpoint = flow.get('Setpoint');\nlet fullenough = flow.get('FullEnough');\n//let DNOExportlimit = flow.get('DNOExportlimit');\nlet DNOExportlimit = 5000;\nlet balancing = flow.get('EnableBalancing');\nlet highestcellv = flow.get('HighestCellV');\nlet exportPV = flow.get('ExportPV');\nlet exportPVfraction = flow.get('ExportPVfraction')/100;\nlet PVpower = flow.get('PVpower');\nlet exportPVcutoff = flow.get('ExportPVcutoff');\n\nlet hysteresis = 40; //watts\nlet balancepower = 300; //watts\nlet balancethreshold = 3.40; //volts\nlet solarfactor = 1.7; //componsate for unmeasured AC PV\nlet exportminSOC = flow.get('SchedExportMinSOC'); //don't scheduled export below this \nlet importmaxSOC = flow.get('SchedImportMaxSOC'); //don't import above this (should depend on solar today)\n\nlet time = new Date();\nlet hour = time.getHours();\n\n//+ve import from grid, -ve means export to grid ('feed-in')\n\nlet zerosetpoint = -30;\n\n//flag for sending new setpoint - not sure we need this? \nlet sendupdate = false;\n\n\n//If balancing enabled charge at 200W rather than zero\n//Balancing state occurs when one cell is > 3.45V and enabled in interface\nif (balancing && (highestcellv > balancethreshold)) \n { chargetarget = balancepower }\nelse \n ( chargetarget = 0 )\n//node.status (chargetarget);\n\n\n// Default to 'do nothing' if nothing else overrides \nlet newsetpoint = zerosetpoint;\nsendupdate = true;\n\n//time < exportPVcutoff \n//set fractional PV export if 'Export PV %' is set\nif (exportPV && hour>=6 && hour <16 && PVpower>100 ) {\n // not fullenough\n // export set fraction of PV.\n // newsetpoint = Math.min(-(PVpower*exportPVfraction),zerosetpoint)\n // Allow for current consumption. If this means importing, clamp to 0\n newsetpoint = Math.min(-((PVpower-consumption)*exportPVfraction),zerosetpoint)\n sendupdate = true\n}\n//Once we get above 'fullenough' SOC adjust grid setpoint \n//to keep charge around zero. \nif (SOC >= fullenough && exportauto) {\n newsetpoint = setpoint-battrate+chargetarget\n sendupdate = true\n}\n\n// 'import/export now' buttons get highest priority. \nif (exportforce || (exportenable && hour>=16 && hour <19 && SOC > exportminSOC)) {\n //At peak time set exporting rate\n newsetpoint = exportsetpoint\n sendupdate = true\n} else if (importforce || (importenable && hour>=2 && hour <5 && SOC < importmaxSOC)) { \n //At cheap time set import rate\n newsetpoint = importsetpoint\n sendupdate = true\n}\n\n//if any logic set a new value (capped at DNO limit), and send it\nif (sendupdate) {\n let newMsg = {\n topic: \"Setpoint\",\n payload: Math.max(newsetpoint, -DNOExportlimit)\n };\n return newMsg;\n}", "outputs": 1, "timeout": 0, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 460, "y": 2280, "wires": [ [ "4354e69bbf8754b6", "ef6ca93247a02628" ] ] }, { "id": "35947eecb1d0b110", "type": "victron-input-system", "z": "e25f82be01062b84", "g": "3fe171c877541607", "service": "com.victronenergy.system/0", "path": "/Ac/Consumption/L1/Power", "serviceObj": { "service": "com.victronenergy.system/0", "name": "Venus system" }, "pathObj": { "path": "/Ac/Consumption/L1/Power", "type": "float", "name": "AC Consumption L1 (W)" }, "name": "Consumption", "onlyChanges": false, "x": 210, "y": 1880, "wires": [ [ "9aee2466a3ca908d" ] ] }, { "id": "ce4480d9a639ed75", "type": "change", "z": "e25f82be01062b84", "g": "3fe171c877541607", "name": "Save ACConsumption", "rules": [ { "t": "set", "p": "ACConsumption", "pt": "flow", "to": "payload", "tot": "msg" }, { "t": "set", "p": "payload", "pt": "msg", "to": "$round(msg.payload)", "tot": "jsonata" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 620, "y": 1880, "wires": [ [ "cd8237d842ade8f6" ] ] }, { "id": "9aee2466a3ca908d", "type": "delay", "z": "e25f82be01062b84", "g": "3fe171c877541607", "name": "", "pauseType": "rate", "timeout": "5", "timeoutUnits": "seconds", "rate": "1", "nbRateUnits": "1", "rateUnits": "second", "randomFirst": "1", "randomLast": "5", "randomUnits": "seconds", "drop": true, "allowrate": false, "outputs": 1, "x": 400, "y": 1880, "wires": [ [ "ce4480d9a639ed75" ] ] }, { "id": "cd8237d842ade8f6", "type": "ui_text", "z": "e25f82be01062b84", "g": "3fe171c877541607", "group": "031655afc3e48225", "order": 7, "width": 0, "height": 0, "name": "", "label": "Consumption (W)", "format": "{{msg.payload}}", "layout": "row-spread", "className": "", "style": false, "font": "Arial Black,Arial Black,Gadget,sans-serif", "fontSize": "23", "color": "#000000", "x": 870, "y": 1880, "wires": [] }, { "id": "2cb2df0bd1afb879", "type": "change", "z": "e25f82be01062b84", "g": "f5d848ad077df112", "name": "Save ACPVPower", "rules": [ { "t": "set", "p": "ACPVPower", "pt": "flow", "to": "payload", "tot": "msg" }, { "t": "set", "p": "payload", "pt": "msg", "to": "$round(msg.payload)", "tot": "jsonata" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 430, "y": 1800, "wires": [ [ "8e43ec6481f8ee7f" ] ] }, { "id": "8e43ec6481f8ee7f", "type": "ui_text", "z": "e25f82be01062b84", "g": "f5d848ad077df112", "group": "031655afc3e48225", "order": 8, "width": 0, "height": 0, "name": "", "label": "AC PV Power (Fronius)", "format": "{{msg.payload}}", "layout": "row-spread", "className": "", "style": false, "font": "Arial Black,Arial Black,Gadget,sans-serif", "fontSize": "23", "color": "#000000", "x": 650, "y": 1800, "wires": [] }, { "id": "5f56febcee8056d3", "type": "victron-input-pvinverter", "z": "e25f82be01062b84", "g": "f5d848ad077df112", "service": "com.victronenergy.pvinverter/31", "path": "/Ac/Power", "serviceObj": { "service": "com.victronenergy.pvinverter/31", "name": "ET112" }, "pathObj": { "path": "/Ac/Power", "type": "float", "name": "Total Power (W)" }, "name": "AC Inverter meter", "onlyChanges": false, "x": 210, "y": 1800, "wires": [ [ "2cb2df0bd1afb879", "1e6eb25390689039" ] ] }, { "id": "1e6eb25390689039", "type": "change", "z": "e25f82be01062b84", "g": "a83dc1f09627df3a", "name": "sum", "rules": [ { "t": "set", "p": "payload", "pt": "msg", "to": "$flowContext('DCPVPower')+$flowContext('ACPVPower')", "tot": "jsonata" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 890, "y": 1740, "wires": [ [ "1054a87c734ab0b1" ] ] }, { "id": "1054a87c734ab0b1", "type": "change", "z": "e25f82be01062b84", "g": "a83dc1f09627df3a", "name": "Save PVpower", "rules": [ { "t": "set", "p": "PVpower", "pt": "flow", "to": "$round(msg.payload)", "tot": "jsonata" }, { "t": "set", "p": "payload", "pt": "msg", "to": "$round(msg.payload)", "tot": "jsonata" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 1040, "y": 1740, "wires": [ [ "2db40c0e0d8e0be2", "18d182df5a9d0590" ] ] }, { "id": "2db40c0e0d8e0be2", "type": "ui_gauge", "z": "e25f82be01062b84", "d": true, "g": "a83dc1f09627df3a", "name": "", "group": "031655afc3e48225", "order": 3, "width": 0, "height": 0, "gtype": "gage", "title": "Total PV (W)", "label": "W", "format": "{{value}}", "min": 0, "max": "7000", "colors": [ "#00b500", "#e6e600", "#ca3838" ], "seg1": "", "seg2": "", "diff": false, "className": "", "x": 1250, "y": 1760, "wires": [] }, { "id": "08240466f9fddbb9", "type": "ui_text", "z": "e25f82be01062b84", "g": "86a7c9d8bb82a2a8", "group": "031655afc3e48225", "order": 9, "width": 0, "height": 0, "name": "", "label": "DC PV Power (Victron)", "format": "{{msg.payload}}", "layout": "row-spread", "className": "", "style": false, "font": "Arial Black,Arial Black,Gadget,sans-serif", "fontSize": "23", "color": "#000000", "x": 660, "y": 1680, "wires": [] }, { "id": "af4cdfe85b286d19", "type": "ui_text", "z": "e25f82be01062b84", "g": "330b8db578071d1d", "group": "031655afc3e48225", "order": 4, "width": 0, "height": 0, "name": "", "label": "Battery charge rate", "format": "{{msg.payload}}", "layout": "row-spread", "className": "", "style": false, "font": "Arial Black,Arial Black,Gadget,sans-serif", "fontSize": "23", "color": "#000000", "x": 940, "y": 1340, "wires": [] }, { "id": "c95dd2484f35fba7", "type": "function", "z": "e25f82be01062b84", "name": "Time till full", "func": "let SOC = flow.get('BattSOC');\nlet battrate = flow.get('BattRate'); //current battery charging rate\nlet fullenough = flow.get('FullEnough');\n\nlet battsize = 16000; //Watt-hours\n\nlet time = new Date();\nlet hour = time.getHours();\nlet string='';\n//calculate time till battery fills at current rate\n//Show 'Full' or 'Discharging' in those states\n\n\nremaining=battsize-(battsize*SOC/100); //remaining capacity in Wh \n//node.warn('remaining='+remaining/1000);\nif (SOC>fullenough) msg.payload='Full';\nif (battrate < 0) msg.payload='Discharging';\nelse {\n time=remaining/battrate; //remaining time in hours\n time=time*60;\n //node.warn('time='+time);\n hours = Math.trunc (time / 60);\n mins = Math.round (time % 60)\n msg.payload = string.concat(hours,'h',' ',mins,'m');\n}\n\n\nreturn msg;", "outputs": 1, "timeout": 0, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 850, "y": 1420, "wires": [ [ "2f0e21e51f05c847", "a67400e29d79d08a" ] ] }, { "id": "2f0e21e51f05c847", "type": "ui_text", "z": "e25f82be01062b84", "group": "031655afc3e48225", "order": 6, "width": 0, "height": 0, "name": "", "label": "Time till full", "format": "{{msg.payload}}", "layout": "row-spread", "className": "", "style": false, "font": "Arial Black,Arial Black,Gadget,sans-serif", "fontSize": "23", "color": "#000000", "x": 1170, "y": 1420, "wires": [] }, { "id": "a67400e29d79d08a", "type": "debug", "z": "e25f82be01062b84", "name": "TimeTillFull", "active": false, "tosidebar": true, "console": false, "tostatus": false, "complete": "payload", "targetType": "msg", "statusVal": "", "statusType": "auto", "x": 1170, "y": 1480, "wires": [] }, { "id": "18d182df5a9d0590", "type": "ui_text", "z": "e25f82be01062b84", "g": "a83dc1f09627df3a", "group": "031655afc3e48225", "order": 2, "width": 0, "height": 0, "name": "", "label": "Total PV (W)", "format": "{{msg.payload}}", "layout": "row-spread", "className": "", "style": false, "font": "Arial,Arial,Helvetica,sans-serif", "fontSize": "15", "color": "#000000", "x": 1250, "y": 1720, "wires": [] }, { "id": "57d3932ed5342021", "type": "change", "z": "e25f82be01062b84", "name": "convert to kWh unfilled", "rules": [ { "t": "set", "p": "payload", "pt": "msg", "to": "($round(16-(16*(msg.payload/100)))*10)/10", "tot": "jsonata" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 710, "y": 1500, "wires": [ [ "8c2ece7dfceab48a" ] ] }, { "id": "8c2ece7dfceab48a", "type": "ui_text", "z": "e25f82be01062b84", "group": "031655afc3e48225", "order": 5, "width": 0, "height": 0, "name": "", "label": "kWh to full", "format": "{{msg.payload}}", "layout": "row-spread", "className": "", "style": false, "font": "Arial,Arial,Helvetica,sans-serif", "fontSize": "15", "color": "#000000", "x": 950, "y": 1500, "wires": [] }, { "id": "d3717631ee9eeb83", "type": "change", "z": "e25f82be01062b84", "g": "3de02213912af430", "name": "Set Max SOC", "rules": [ { "t": "set", "p": "SchedImportMaxSOC", "pt": "flow", "to": "payload", "tot": "msg" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 530, "y": 600, "wires": [ [] ] }, { "id": "e2a9ddd38787749a", "type": "ui_numeric", "z": "e25f82be01062b84", "g": "3de02213912af430", "name": "", "label": "Max import charge SOC", "tooltip": "Don't export below this level", "group": "ff64920d7506ac94", "order": 8, "width": 0, "height": 0, "wrap": false, "passthru": true, "topic": "topic", "topicType": "msg", "format": "{{value}}%", "min": "6", "max": "100", "step": 1, "className": "", "x": 310, "y": 600, "wires": [ [ "d3717631ee9eeb83" ] ] }, { "id": "c00c8fa4a2d1ebaf", "type": "inject", "z": "e25f82be01062b84", "g": "3de02213912af430", "name": "", "props": [ { "p": "payload" }, { "p": "topic", "vt": "str" } ], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "payload": "40", "payloadType": "num", "x": 110, "y": 600, "wires": [ [ "e2a9ddd38787749a" ] ] }, { "id": "a9f7fa35bab4923e", "type": "ui_group", "name": "Export", "tab": "de3c7c75729ef4fe", "order": 2, "disp": true, "width": "7", "collapse": false, "className": "" }, { "id": "ff64920d7506ac94", "type": "ui_group", "name": "Import", "tab": "de3c7c75729ef4fe", "order": 1, "disp": true, "width": "7", "collapse": true, "className": "" }, { "id": "aa16b72a42443445", "type": "config-vrm-api", "name": "VRM" }, { "id": "031655afc3e48225", "type": "ui_group", "name": "Status", "tab": "de3c7c75729ef4fe", "order": 3, "disp": true, "width": "7", "collapse": false, "className": "" }, { "id": "de3c7c75729ef4fe", "type": "ui_tab", "name": "Victron", "icon": "dashboard", "disabled": false, "hidden": false } ]