[ { "id": "357e605774995ef0", "type": "victron-output-vebus", "z": "f871887bedfe6c15", "service": "com.victronenergy.vebus/276", "path": "/Mode", "serviceObj": { "service": "com.victronenergy.vebus/276", "name": "multiplus_2" }, "pathObj": { "path": "/Mode", "type": "enum", "name": "Switch Position", "remarks": "
Note that /ModeIsAdjustable needs to be set to 1.
", "enum": { "1": "Charger Only", "2": "Inverter Only", "3": "On", "4": "Off" }, "writable": true }, "initial": "3", "name": "", "onlyChanges": true, "x": 760, "y": 220, "wires": [] }, { "id": "18025bad2123c860", "type": "function", "z": "f871887bedfe6c15", "name": "Inverter Automatic", "func": " var SOMMER;\n var TAG;\n var NACHT;\n var ABEND;\n var MORGEN;\n var AUTO = context.AUTO;\n var MP = context.MP;\n var DATE = new Date();\n var DATE1 = context.DATE;\n var SOC_MIN,SOC_INSEL,PV_INSEL,PV,SOLL,SOC,SOC_SOMMER;\n if ((SOC = global.get(\"SOC\"))==null) SOC=40;\n if ((SOC_SOMMER = global.get(\"SOC_SOMMER\"))==null) SOC_SOMMER=30;\n if ((SOC_MIN = global.get(\"SOC_MIN\"))==null) SOC_MIN=30;\n if ((SOC_INSEL = global.get(\"SOC_INSEL\"))==null) SOC_INSEL=50;\n if ((PV_INSEL = global.get(\"PV_INSEL\"))==null) PV_INSEL=30;\n if ((PV = global.get(\"PV\"))==null) PV=30;\n if ((SOLL = global.get(\"SOLL\"))==null) SOLL=SOC_MIN;\n var P1O,P2O,P3O;\n if ((P1O = global.get(\"P1O\"))==null) P1O=1000;\n if ((P2O = global.get(\"P2O\"))==null) P2O=1000;\n if ((P3O = global.get(\"P3O\"))==null) P3O=1000;\n var P = P1O+P2O+P3O;\n var HAND = context.HAND;\n var STUNDE = DATE.getHours();\n var MONAT = DATE.getMonth()+1;\n var JAHR = DATE.getFullYear();\n switch (msg.topic) {\n case \"handsteuerung\":\n HAND = msg.payload;\n break;\n }\n SOMMER = (MONAT>3 && MONAT<10);\n NACHT = (STUNDE<8 || STUNDE>19);\n TAG = (STUNDE>=8 && STUNDE<=19);\nif ( HAND==0 || ((SOC<20 && !AUTO) || (AUTO && SOC<25)) || ((SOC>90 && !AUTO)||(AUTO && SOC>80)) ) {\n AUTO = true;\n // mp = 2 Inverter on\n if (SOMMER) {\n if (SOC<30) MP=3;\n else if (SOC>35 && PV>1000) MP=2;\n } else {\n if (SOC