[ { "id": "e2588b9d824334f7", "type": "tab", "label": "controller_calibration_charge", "disabled": false, "info": "", "env": [] }, { "id": "322b256f0daf33ef", "type": "tab", "label": "controller_hold_min_soc&&charge_to_min_soc", "disabled": false, "info": "", "env": [] }, { "id": "32b2f9d4415d82ce", "type": "tab", "label": "controller_max_discharge", "disabled": false, "info": "", "env": [] }, { "id": "812b3c1b3d3fa76b", "type": "tab", "label": "parse_warnings_and_alarms", "disabled": false, "info": "", "env": [] }, { "id": "dd75eef8547a776f", "type": "tab", "label": "Node Red Dashboard", "disabled": false, "info": "", "env": [] }, { "id": "victron-client-id", "type": "victron-client" }, { "id": "e177392401620838", "type": "ui_group", "name": "Controller and Battery Info", "tab": "157862d37ae585b5", "order": 2, "disp": true, "width": "13", "collapse": false, "className": "" }, { "id": "157862d37ae585b5", "type": "ui_tab", "name": "Home", "icon": "check", "disabled": false, "hidden": false }, { "id": "e0e675d533a148b7", "type": "ui_base", "theme": { "name": "theme-light", "lightTheme": { "default": "#0094CE", "baseColor": "#0094CE", "baseFont": "-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif", "edited": true, "reset": false }, "darkTheme": { "default": "#097479", "baseColor": "#097479", "baseFont": "-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif", "edited": false }, "customTheme": { "name": "Untitled Theme 1", "default": "#4B7930", "baseColor": "#4B7930", "baseFont": "-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif", "reset": false }, "themeState": { "base-color": { "default": "#0094CE", "value": "#0094CE", "edited": false }, "page-titlebar-backgroundColor": { "value": "#0094CE", "edited": false }, "page-backgroundColor": { "value": "#fafafa", "edited": false }, "page-sidebar-backgroundColor": { "value": "#ffffff", "edited": false }, "group-textColor": { "value": "#1bbfff", "edited": false }, "group-borderColor": { "value": "#ffffff", "edited": false }, "group-backgroundColor": { "value": "#ffffff", "edited": false }, "widget-textColor": { "value": "#111111", "edited": false }, "widget-backgroundColor": { "value": "#0094ce", "edited": false }, "widget-borderColor": { "value": "#ffffff", "edited": false }, "base-font": { "value": "-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif" } }, "angularTheme": { "primary": "indigo", "accents": "blue", "warn": "red", "background": "grey", "palette": "light" } }, "site": { "name": "Node-RED Dashboard", "hideToolbar": "false", "allowSwipe": "false", "lockMenu": "false", "allowTempTheme": "true", "dateFormat": "DD/MM/YYYY", "sizes": { "sx": 48, "sy": 48, "gx": 6, "gy": 6, "cx": 6, "cy": 6, "px": 0, "py": 0 } } }, { "id": "3290bd5996bd3175", "type": "ui_group", "name": "Easy Input", "tab": "157862d37ae585b5", "order": 3, "disp": true, "width": 13, "collapse": false, "className": "" }, { "id": "d610b26df84f336e", "type": "ui_group", "name": "Calibration Charge", "tab": "157862d37ae585b5", "order": 1, "disp": true, "width": "13", "collapse": false, "className": "" }, { "id": "1c76b68292d58d7a", "type": "victron-input-custom", "z": "e2588b9d824334f7", "service": "com.victronenergy.battery/1", "path": "/TimeToTOCRequest", "serviceObj": { "service": "com.victronenergy.battery/1", "name": "FZS 48TL200 x2 (1)" }, "pathObj": { "path": "/TimeToTOCRequest", "name": "/TimeToTOCRequest", "type": "number" }, "name": "", "onlyChanges": false, "x": 580, "y": 280, "wires": [ [ "b18eaae1b2cf532a" ] ] }, { "id": "374a9784b13e6b91", "type": "ui_switch", "z": "e2588b9d824334f7", "name": "Start Calibration Charge Now", "label": "Start Calibration Charge Now", "tooltip": "", "group": "d610b26df84f336e", "order": 5, "width": 0, "height": 0, "passthru": true, "decouple": "false", "topic": "#:(file)::start_calibration_charge_now_button", "topicType": "global", "style": "", "onvalue": "true", "onvalueType": "bool", "onicon": "", "oncolor": "", "offvalue": "false", "offvalueType": "bool", "officon": "", "offcolor": "", "animate": false, "className": "", "x": 2440, "y": 100, "wires": [ [ "0eda66dbeeaa1361", "ff621c398de790e9" ] ] }, { "id": "0eda66dbeeaa1361", "type": "switch", "z": "e2588b9d824334f7", "name": "Button is on", "property": "payload", "propertyType": "msg", "rules": [ { "t": "true" } ], "checkall": "true", "repair": false, "outputs": 1, "x": 2670, "y": 100, "wires": [ [ "38a3f85186c86064" ] ] }, { "id": "e6c8eb42a10e21a3", "type": "switch", "z": "e2588b9d824334f7", "name": "Need to do calibration charge or not", "property": "payload", "propertyType": "msg", "rules": [ { "t": "eq", "v": "0", "vt": "num" }, { "t": "eq", "v": "1", "vt": "num" }, { "t": "else" } ], "checkall": "true", "repair": false, "outputs": 3, "x": 1620, "y": 240, "wires": [ [ "a0d686b515f76cae", "65fc8a93c348bd1e", "7404973d10f3a10a", "644fe572f173602e" ], [ "e3e9b1f4b7cabc16", "8678a63acdb5ee29", "985f0a278ffd922c" ], [ "0eda2d25df727b9a", "ce4254f159092244" ] ] }, { "id": "3ff4ceaaebe9defb", "type": "ui_text", "z": "e2588b9d824334f7", "group": "d610b26df84f336e", "order": 2, "width": 0, "height": 0, "name": "Time To Calibration Charge", "label": "Time To Calibration Charge", "format": "{{msg.payload}}", "layout": "row-spread", "className": "", "style": false, "font": "", "fontSize": 16, "color": "#000000", "x": 3360, "y": 420, "wires": [] }, { "id": "0b6f77eecb110736", "type": "ui_text_input", "z": "e2588b9d824334f7", "name": "Calibration Charge Start Time (hh:mm)", "label": "Calibration Charge Start Time (hh:mm:ss.sss)", "tooltip": "", "group": "d610b26df84f336e", "order": 4, "width": 0, "height": 0, "passthru": true, "mode": "time", "delay": "0", "topic": "#:(file)::calibration_charge_start_time", "sendOnBlur": false, "className": "", "topicType": "global", "x": 510, "y": 80, "wires": [ [ "f32edc8e22e6c4a6" ] ] }, { "id": "ff621c398de790e9", "type": "change", "z": "e2588b9d824334f7", "name": "", "rules": [ { "t": "set", "p": "#:(file)::start_calibration_charge_now_button", "pt": "global", "to": "payload", "tot": "msg" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 2780, "y": 40, "wires": [ [ "8cd49df4ce393b99" ] ] }, { "id": "8cd49df4ce393b99", "type": "debug", "z": "e2588b9d824334f7", "name": "Debug for calibration button", "active": false, "tosidebar": true, "console": false, "tostatus": true, "complete": "payload", "targetType": "msg", "statusVal": "payload", "statusType": "auto", "x": 3180, "y": 40, "wires": [] }, { "id": "f32edc8e22e6c4a6", "type": "change", "z": "e2588b9d824334f7", "name": "", "rules": [ { "t": "set", "p": "#:(file)::calibration_charge_start_time", "pt": "global", "to": "payload", "tot": "msg" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 900, "y": 80, "wires": [ [ "c2e5b1ab69e8b817" ] ] }, { "id": "38a3f85186c86064", "type": "change", "z": "e2588b9d824334f7", "name": "Set \"Calibration charge now\" to Time To CalibrationCharge", "rules": [ { "t": "set", "p": "payload", "pt": "msg", "to": "Calibration charge now", "tot": "str" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 3010, "y": 100, "wires": [ [ "3ff4ceaaebe9defb" ] ] }, { "id": "28b4fe5478e59dcc", "type": "victron-input-custom", "z": "e2588b9d824334f7", "service": "com.victronenergy.settings", "path": "/Settings/Controller/LastEOC", "serviceObj": { "service": "com.victronenergy.settings", "name": "com.victronenergy.settings" }, "pathObj": { "path": "/Settings/Controller/LastEOC", "name": "/Settings/Controller/LastEOC", "type": "number" }, "name": "", "onlyChanges": false, "x": 530, "y": 360, "wires": [ [ "c08993a9535559b7", "5909342727c04466" ] ] }, { "id": "7404973d10f3a10a", "type": "change", "z": "e2588b9d824334f7", "name": "Get current timestamp to update LastEoc", "rules": [ { "t": "set", "p": "payload", "pt": "msg", "to": "", "tot": "date" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 2140, "y": 200, "wires": [ [ "466d0ead739c355d" ] ] }, { "id": "f0b91188bb162f98", "type": "victron-output-custom", "z": "e2588b9d824334f7", "service": "com.victronenergy.settings", "path": "/Settings/Controller/LastEOC", "serviceObj": { "service": "com.victronenergy.settings", "name": "com.victronenergy.settings" }, "pathObj": { "path": "/Settings/Controller/LastEOC", "name": "/Settings/Controller/LastEOC", "type": "number" }, "name": "", "onlyChanges": false, "x": 2790, "y": 200, "wires": [] }, { "id": "466d0ead739c355d", "type": "function", "z": "e2588b9d824334f7", "name": "Millisecond_to_second", "func": "current_timestamp_in_second=Math.floor(msg.payload/1000);\nmsg.payload = current_timestamp_in_second;\nreturn msg;", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 2440, "y": 200, "wires": [ [ "f0b91188bb162f98" ] ] }, { "id": "7339dc97983bb77b", "type": "comment", "z": "e2588b9d824334f7", "name": "EOC reached ", "info": "", "x": 1890, "y": 220, "wires": [] }, { "id": "0fff2085b1eb8dcb", "type": "comment", "z": "e2588b9d824334f7", "name": "Do calibration charge now", "info": "", "x": 2230, "y": 400, "wires": [] }, { "id": "ed2bb3eadfa27747", "type": "comment", "z": "e2588b9d824334f7", "name": "Still some time left to do calibration charge", "info": "", "x": 2160, "y": 480, "wires": [] }, { "id": "615bdf17da1a6422", "type": "debug", "z": "e2588b9d824334f7", "name": "Debug for calibration charge function", "active": false, "tosidebar": true, "console": false, "tostatus": true, "complete": "payload", "targetType": "msg", "statusVal": "payload.count", "statusType": "auto", "x": 1630, "y": 140, "wires": [] }, { "id": "8678a63acdb5ee29", "type": "victron-output-custom", "z": "e2588b9d824334f7", "service": "com.victronenergy.hub4/0", "path": "/Overrides/ForceCharge", "serviceObj": { "service": "com.victronenergy.hub4/0", "name": "com.victronenergy.hub4 (0)" }, "pathObj": { "path": "/Overrides/ForceCharge", "name": "/Overrides/ForceCharge", "type": "number" }, "name": "", "onlyChanges": false, "x": 2620, "y": 460, "wires": [] }, { "id": "65fc8a93c348bd1e", "type": "change", "z": "e2588b9d824334f7", "name": "EOC reached", "rules": [ { "t": "set", "p": "payload", "pt": "msg", "to": "EOC reached", "tot": "str" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 2060, "y": 240, "wires": [ [ "3ff4ceaaebe9defb" ] ] }, { "id": "e3e9b1f4b7cabc16", "type": "change", "z": "e2588b9d824334f7", "name": "Calibration charge now", "rules": [ { "t": "set", "p": "payload", "pt": "msg", "to": "Calibration charge now", "tot": "str" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 2520, "y": 420, "wires": [ [ "3ff4ceaaebe9defb" ] ] }, { "id": "b077a48ff0831b2a", "type": "ui_dropdown", "z": "e2588b9d824334f7", "name": "Calibration Charge Day", "label": "Calibration Charge Day", "tooltip": "", "place": "", "group": "d610b26df84f336e", "order": 3, "width": 0, "height": 0, "passthru": true, "multiple": false, "options": [ { "label": "Sunday", "value": 0, "type": "num" }, { "label": "Monday", "value": 1, "type": "num" }, { "label": "Tuesday", "value": 2, "type": "num" }, { "label": "Wednesday", "value": 3, "type": "num" }, { "label": "Thursday", "value": 4, "type": "num" }, { "label": "Friday", "value": 5, "type": "num" }, { "label": "Saturday", "value": 6, "type": "num" } ], "payload": "", "topic": "#:(file)::calibration_charge_weekday", "topicType": "global", "className": "", "x": 510, "y": 180, "wires": [ [ "10605f48b99030d0" ] ] }, { "id": "10605f48b99030d0", "type": "change", "z": "e2588b9d824334f7", "name": "", "rules": [ { "t": "set", "p": "#:(file)::calibration_charge_start_weekday", "pt": "global", "to": "payload", "tot": "msg" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 890, "y": 180, "wires": [ [ "c2e5b1ab69e8b817" ] ] }, { "id": "b18eaae1b2cf532a", "type": "change", "z": "e2588b9d824334f7", "name": "", "rules": [ { "t": "set", "p": "#:(file)::TimeToTOC", "pt": "global", "to": "payload", "tot": "msg" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 960, "y": 280, "wires": [ [ "c2e5b1ab69e8b817" ] ] }, { "id": "c08993a9535559b7", "type": "debug", "z": "e2588b9d824334f7", "name": "Debug for LastEOC", "active": false, "tosidebar": true, "console": false, "tostatus": false, "complete": "payload", "targetType": "msg", "statusVal": "", "statusType": "auto", "x": 1010, "y": 440, "wires": [] }, { "id": "6a3d4d1cb2651151", "type": "inject", "z": "e2588b9d824334f7", "name": "", "props": [ { "p": "payload" }, { "p": "topic", "vt": "str" } ], "repeat": "", "crontab": "", "once": true, "onceDelay": 0.1, "topic": "", "payload": "#:(file)::calibration_charge_start_time", "payloadType": "global", "x": 150, "y": 80, "wires": [ [ "0b6f77eecb110736" ] ] }, { "id": "fdd85619255f4e81", "type": "inject", "z": "e2588b9d824334f7", "name": "", "props": [ { "p": "payload" }, { "p": "topic", "vt": "str" } ], "repeat": "", "crontab": "", "once": true, "onceDelay": 0.1, "topic": "", "payload": "#:(file)::calibration_charge_start_weekday", "payloadType": "global", "x": 160, "y": 180, "wires": [ [ "b077a48ff0831b2a" ] ] }, { "id": "761a8f1f11727873", "type": "inject", "z": "e2588b9d824334f7", "name": "", "props": [ { "p": "payload" }, { "p": "topic", "vt": "str" } ], "repeat": "5", "crontab": "", "once": true, "onceDelay": "0", "topic": "", "payload": "#:(file)::start_calibration_charge_now_button", "payloadType": "global", "x": 2030, "y": 80, "wires": [ [ "374a9784b13e6b91" ] ] }, { "id": "c2e5b1ab69e8b817", "type": "function", "z": "e2588b9d824334f7", "name": "Cal time left to do calibration charge", "func": "// Get minutes per day\nvar minutes_per_day = 1440;\n\n// Battery setting\nmax_day_wihthout_EOC = 7;\nmax_minutes_without_EOC = max_day_wihthout_EOC*minutes_per_day;\n\n// Get TimeToTOC which stores minutes from last EOC reached\ntime_to_TOC=global.get('TimeToTOC','file');\n\nif (time_to_TOC ==0){//EOC reahced\n msg.payload=0;\n return msg;\n}\n\n// Get calibration charge time (hh:mm) from user setting\nif(global.get('calibration_charge_start_time','file')!= null){\n minutes_from_midnight_calibration_charge = Math.floor(global.get('calibration_charge_start_time','file'));\n}else{\n minutes_from_midnight_calibration_charge = 0;//default value from midnight\n}\n\n// Get calibration charge weekday from user setting\nif(global.get('calibration_charge_start_weekday','file')!=null){\n weekday_calibration_charge = global.get('calibration_charge_start_weekday','file');\n}else{\n weekday_calibration_charge = 0;//default value from Sunday\n}\n\nfunction nextScheduleDay(adate, w) {\n var daysToAdd = (w - adate.getDay() + 7) % 7;\n var nextDate = new Date(adate);\n nextDate.setDate(adate.getDate() + daysToAdd);\n nextDate.setHours(0);\n nextDate.setMinutes(0);\n nextDate.setSeconds(0);\n return nextDate;\n}\n\n\nfunction chargeWindows(currentTime, weekday, starttime, timeToTOC) {\n var d1 = nextScheduleDay(currentTime, weekday);\n\n // Convert starttime to a Date object\n var startTime = new Date(starttime);\n\n // Calculate the next ScheduleDay considering if the sum of timeToTOC and timeLeftMinutes is less than 7 days\n var timeLeftMinutes = Math.ceil((d1.getTime() - currentTime.getTime() + starttime) / (1000 * 60));\n\n if (timeToTOC + timeLeftMinutes < max_minutes_without_EOC) {\n // If the sum is less than 7 days, push next ScheduleDay to next week\n d1.setDate(d1.getDate() + 7);\n }\n\n var startDateTimeD1 = new Date(d1);\n startDateTimeD1.setHours(startTime.getUTCHours(), startTime.getUTCMinutes(), 0, 0);\n\n // Check if current time is within the charge window\n if (currentTime < startDateTimeD1) {\n // Calculate time left until the end of the window\n var timeLeftMillis = startDateTimeD1 - currentTime;\n var daysLeft = Math.floor(timeLeftMillis / (1000 * 60 * 60 * 24));\n var hoursLeft = Math.floor((timeLeftMillis % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));\n var minutesLeft = Math.ceil((timeLeftMillis % (1000 * 60 * 60)) / (1000 * 60));\n \n days_str = (daysLeft > 0) ? (daysLeft + \"d\") : \"\";\n hours_str = (hoursLeft > 0) ? (hoursLeft + \"h\") : \"\";\n minutes_str = (minutesLeft > 0) ? (minutesLeft + \"m\") : \"\";\n \n time_to_calibration_str = days_str+hours_str+minutes_str;\n\n return time_to_calibration_str;\n } else {\n return 1;\n }\n}\n\nvar today = new Date(); // Assuming today's date\nvar timeLeft = chargeWindows(today, weekday_calibration_charge, minutes_from_midnight_calibration_charge, time_to_TOC);\n\nmsg.payload = timeLeft;\nreturn msg;", "outputs": 1, "timeout": "", "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 1280, "y": 200, "wires": [ [ "615bdf17da1a6422", "e6c8eb42a10e21a3" ] ] }, { "id": "a0d686b515f76cae", "type": "function", "z": "e2588b9d824334f7", "name": "Turn off calibration charge now button when EOC", "func": "if(global.get('start_calibration_charge_now_button','file')==true)\n{\n msg.payload = false;\n}else{\n msg.payload = false;\n}\n\nreturn msg;\n\n", "outputs": 1, "timeout": "", "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 2090, "y": 140, "wires": [ [ "374a9784b13e6b91" ] ] }, { "id": "0eda2d25df727b9a", "type": "function", "z": "e2588b9d824334f7", "name": "Check whether the calibration charge now button is on", "func": "if(global.get('start_calibration_charge_now_button','file')==true)\n{\n text= \"Calibration charge now\";\n}else{\n text = msg.payload;\n}\nmsg.payload = text;\n\nreturn msg;\n", "outputs": 1, "timeout": 0, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 2620, "y": 560, "wires": [ [ "3ff4ceaaebe9defb" ] ] }, { "id": "5909342727c04466", "type": "change", "z": "e2588b9d824334f7", "name": "LastEOC", "rules": [ { "t": "set", "p": "#:(file)::LastEOC", "pt": "global", "to": "payload", "tot": "msg" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 1000, "y": 360, "wires": [ [ "c2e5b1ab69e8b817" ] ] }, { "id": "44264437fe17f23f", "type": "function", "z": "e2588b9d824334f7", "name": "Cal time left to do calibration charge_backup1", "func": "// Get minutes per day\nvar minutes_per_day = 1440;\n\n// Battery setting\nmax_day_wihthout_EOC = 7;\nmax_minutes_without_EOC = max_day_wihthout_EOC*minutes_per_day;\n\n// Get TimeToTOC which stores minutes from last EOC reached\ntime_to_TOC=global.get('TimeToTOC','file');\n//time_to_TOC=global.get('TimeToTOC');\n\nif (time_to_TOC ==0){//EOC reahced\n msg.payload=0;\n return msg;\n}\n\n// Get calibration charge time (hh:mm) from user setting\nif(global.get('calibration_charge_start_time','file')!= null){\n minutes_from_midnight_calibration_charge = Math.floor(global.get('calibration_charge_start_time','file')/1000/60);\n}else{\n minutes_from_midnight_calibration_charge = 0;//default value from midnight\n}\n\n// Get calibration charge weekday from user setting\nif(global.get('calibration_charge_start_weekday','file')!=null){\n weekday_calibration_charge = global.get('calibration_charge_start_weekday','file');\n}else{\n weekday_calibration_charge = 0;//default value from Sunday\n}\n\n// Get today's date\nvar today = new Date();\n\n// Find the current day of the week (0 = Sunday, 1 = Monday, ..., 6 = Saturday)\nvar currentDay = today.getDay();\nvar minutes_from_today_midnight = today.getHours()*60+today.getMinutes();\n\n// Calculate the number of days and minutes until next calibration weekday\nvar weekday_diff = weekday_calibration_charge - currentDay;\nvar minutes_diff = minutes_from_midnight_calibration_charge - minutes_from_today_midnight;\n\nif (weekday_diff < 0) {\n weekday_diff += 7; \n}\n\nif(weekday_diff==0 && minutes_diff<0){\n weekday_diff += 7;\n}\n\n// Calculate time difference in minutes from now to the set calibration charge time\nminutes_diff_all_from_now_to_calibration=weekday_diff*minutes_per_day+minutes_diff;\n\n// Calculate time difference in minutes from LastEOC to the set calibration charge time\nminutes_diff_all_from_LastEOC_to_calibration = time_to_TOC+ minutes_diff_all_from_now_to_calibration;\n\n// Set the time to next calibration time\nvar nextCalibrationDate = new Date(today);\nvar_setHours = Math.floor(minutes_from_midnight_calibration_charge/60);\nvar_setMinutes = minutes_from_midnight_calibration_charge - var_setHours*60;\n\nif(minutes_diff_all_from_LastEOC_to_calibration<max_minutes_without_EOC){\n weekday_diff += 7;\n}\n\nnextCalibrationDate.setDate(today.getDate() + weekday_diff);\nnextCalibrationDate.setHours(var_setHours);\nnextCalibrationDate.setMinutes(var_setMinutes);\nnextCalibrationDate.setSeconds(0);\n\nnextCalibrationDateTimestamp = nextCalibrationDate.getTime();\n//lastEOCTimestamp = global.get('LastEOC','file');\nlastEOCTimestamp = global.get('LastEOC','file');\nminutes_fromLastEOCtoNextCalibrationTimestamp = Math.floor((nextCalibrationDateTimestamp/1000-lastEOCTimestamp)/60);\n\nif(time_to_TOC>=minutes_fromLastEOCtoNextCalibrationTimestamp){// need to do first time calibration charge;if the calibration setting is too close to last EOC time, then skip the first time and do it next week\n msg.payload =1;\n return msg;\n}else{\n time_left_minutes_all = minutes_diff_all_from_now_to_calibration;\n time_left_days = Math.floor(time_left_minutes_all/60/24);\n time_left_days_display = time_left_days + (minutes_diff_all_from_LastEOC_to_calibration<max_minutes_without_EOC?7:0);\n time_left_hours = Math.floor((time_left_minutes_all-time_left_days*24*60)/60);\n time_left_minutes = Math.floor(time_left_minutes_all-time_left_days*24*60-time_left_hours*60);\n \n days_str = (time_left_days_display > 0) ? (time_left_days_display + \"d\") : \"\";\n hours_str = (time_left_hours > 0) ? (time_left_hours + \"h\") : \"\";\n minutes_str = (time_left_minutes > 0) ? (time_left_minutes + \"m\") : \"\";\n \n time_to_calibration_str = days_str+hours_str+minutes_str;\n msg.payload=time_to_calibration_str;\n}\n\nreturn msg;", "outputs": 1, "timeout": "", "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 600, "y": 560, "wires": [ [] ] }, { "id": "011bad015cb995db", "type": "function", "z": "e2588b9d824334f7", "name": "Cal time left to do calibration charge_backup2", "func": "// Get minutes per day\nvar minutes_per_day = 1440;\n\n// Battery setting\nmax_day_wihthout_EOC = 7;\nmax_minutes_without_EOC = max_day_wihthout_EOC*minutes_per_day;\n\n// Get TimeToTOC which stores minutes from last EOC reached\ntime_to_TOC=global.get('TimeToTOC','file');\n\nif (time_to_TOC ==0){//EOC reahced\n msg.payload=0;\n return msg;\n}\n\n// Get calibration charge time (hh:mm) from user setting\nif(global.get('calibration_charge_start_time','file')!= null){\n minutes_from_midnight_calibration_charge = Math.floor(global.get('calibration_charge_start_time','file'));\n}else{\n minutes_from_midnight_calibration_charge = 0;//default value from midnight\n}\n\n// Get calibration charge weekday from user setting\nif(global.get('calibration_charge_start_weekday','file')!=null){\n weekday_calibration_charge = global.get('calibration_charge_start_weekday','file');\n}else{\n weekday_calibration_charge = 0;//default value from Sunday\n}\n\nfunction nextScheduleDay(adate, w) {\n w = w % 7;\n var daysToAdd = (w - adate.getDay() - 1 + 7) % 7;\n var nextDate = new Date(adate);\n nextDate.setDate(adate.getDate() + daysToAdd);\n return nextDate;\n}\n\nfunction prevScheduleDay(adate, w) {\n w = w % 7;\n var daysToSubtract = (adate.getDay() + 7 - w) % 7 + 1;\n var prevDate = new Date(adate);\n prevDate.setDate(adate.getDate() - daysToSubtract);\n return prevDate;\n}\n\nfunction chargeWindows(currentTime, weekday, starttime, timeToTOC) {\n var d0 = prevScheduleDay(currentTime, weekday);\n var d1 = nextScheduleDay(currentTime, weekday);\n\n // Convert starttime to a Date object\n var startTime = new Date(starttime);\n\n // Calculate the next ScheduleDay considering if the sum of timeToTOC and timeLeftMinutes is less than 7 days\n var timeLeftMinutes = Math.ceil((d1.getTime() - currentTime.getTime() + starttime) / (1000 * 60));\n\n if (timeToTOC + timeLeftMinutes < max_minutes_without_EOC) {\n // If the sum is less than 7 days, push next ScheduleDay to next week\n d1.setDate(d1.getDate() + 7);\n }\n\n // Set the start time for d0 and d1\n var startDateTimeD0 = new Date(d0);\n startDateTimeD0.setHours(startTime.getUTCHours(), startTime.getUTCMinutes(), 0, 0);\n\n var startDateTimeD1 = new Date(d1);\n startDateTimeD1.setHours(startTime.getUTCHours(), startTime.getUTCMinutes(), 0, 0);\n\n // Check if current time is within the charge window\n if (currentTime >= startDateTimeD0 && currentTime < startDateTimeD1) {\n // Calculate time left until the end of the window\n var timeLeftMillis = startDateTimeD1 - currentTime;\n var daysLeft = Math.floor(timeLeftMillis / (1000 * 60 * 60 * 24));\n var hoursLeft = Math.floor((timeLeftMillis % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));\n var minutesLeft = Math.ceil((timeLeftMillis % (1000 * 60 * 60)) / (1000 * 60));\n\n return daysLeft + 'd' + hoursLeft + 'h' + minutesLeft + 'm';\n } else {\n return 1;\n }\n}\n\nvar today = new Date(); // Assuming today's date\nvar timeLeft = chargeWindows(today, weekday_calibration_charge, minutes_from_midnight_calibration_charge, time_to_TOC);\n\nmsg.payload = timeLeft;\n\nreturn msg;", "outputs": 1, "timeout": "", "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 600, "y": 640, "wires": [ [] ] }, { "id": "985f0a278ffd922c", "type": "change", "z": "e2588b9d824334f7", "name": "", "rules": [ { "t": "set", "p": "#:(file)::start_calibration_charge_now", "pt": "global", "to": "payload", "tot": "msg" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 2580, "y": 500, "wires": [ [ "3dc0dde6cbbd97c0" ] ] }, { "id": "de6a4357e8a1f15c", "type": "change", "z": "e2588b9d824334f7", "name": "", "rules": [ { "t": "set", "p": "#:(file)::start_calibration_charge_now", "pt": "global", "to": "payload", "tot": "msg" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 2900, "y": 620, "wires": [ [ "3e2692e252d4b7ce" ] ] }, { "id": "ce4254f159092244", "type": "change", "z": "e2588b9d824334f7", "name": "set start_calibration_charge_now to 0", "rules": [ { "t": "set", "p": "payload", "pt": "msg", "to": "0", "tot": "num" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 2570, "y": 620, "wires": [ [ "de6a4357e8a1f15c" ] ] }, { "id": "644fe572f173602e", "type": "change", "z": "e2588b9d824334f7", "name": "", "rules": [ { "t": "set", "p": "#:(file)::start_calibration_charge_now", "pt": "global", "to": "payload", "tot": "msg" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 2440, "y": 240, "wires": [ [ "d1f75adc62fbfadb" ] ] }, { "id": "d1f75adc62fbfadb", "type": "debug", "z": "e2588b9d824334f7", "name": "Debug for calibration", "active": false, "tosidebar": true, "console": false, "tostatus": true, "complete": "payload", "targetType": "msg", "statusVal": "payload", "statusType": "auto", "x": 2720, "y": 240, "wires": [] }, { "id": "3dc0dde6cbbd97c0", "type": "debug", "z": "e2588b9d824334f7", "name": "Debug for calibration", "active": false, "tosidebar": true, "console": false, "tostatus": true, "complete": "payload", "targetType": "msg", "statusVal": "payload", "statusType": "auto", "x": 2860, "y": 500, "wires": [] }, { "id": "3e2692e252d4b7ce", "type": "debug", "z": "e2588b9d824334f7", "name": "Debug for calibration", "active": false, "tosidebar": true, "console": false, "tostatus": true, "complete": "payload", "targetType": "msg", "statusVal": "payload", "statusType": "auto", "x": 3180, "y": 620, "wires": [] }, { "id": "edf59fb9886b1048", "type": "victron-input-custom", "z": "322b256f0daf33ef", "service": "com.victronenergy.settings", "path": "/Settings/CGwacs/BatteryLife/MinimumSocLimit", "serviceObj": { "service": "com.victronenergy.settings", "name": "com.victronenergy.settings" }, "pathObj": { "path": "/Settings/CGwacs/BatteryLife/MinimumSocLimit", "name": "/Settings/CGwacs/BatteryLife/MinimumSocLimit", "type": "number" }, "name": "", "onlyChanges": false, "x": 310, "y": 200, "wires": [ [ "e31bd3d3a1c25da5" ] ] }, { "id": "e31bd3d3a1c25da5", "type": "change", "z": "322b256f0daf33ef", "name": "min_soc", "rules": [ { "t": "set", "p": "topic", "pt": "msg", "to": "min_soc", "tot": "str" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 680, "y": 200, "wires": [ [ "ec4dfbf95393066c" ] ] }, { "id": "e96ae0338cc426e7", "type": "victron-input-custom", "z": "322b256f0daf33ef", "service": "com.victronenergy.battery/1", "path": "/Dc/0/Power", "serviceObj": { "service": "com.victronenergy.battery/1", "name": "com.victronenergy.battery (1)" }, "pathObj": { "path": "/Dc/0/Power", "name": "/Dc/0/Power", "type": "number" }, "name": "", "onlyChanges": false, "x": 200, "y": 260, "wires": [ [ "86d2d524dcca3330" ] ] }, { "id": "86d2d524dcca3330", "type": "change", "z": "322b256f0daf33ef", "name": "battery_power", "rules": [ { "t": "set", "p": "topic", "pt": "msg", "to": "battery_power", "tot": "str" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 580, "y": 260, "wires": [ [ "ec4dfbf95393066c" ] ] }, { "id": "c21a992cf80c2d6f", "type": "function", "z": "322b256f0daf33ef", "name": "controller_hold_min_soc_&_charge_to_min_soc&heating", "func": "// get max charge power\nif(msg.payload.max_configured_charge_power==null ||msg.payload.max_configured_charge_power<0){\n max_charge_power=msg.payload.max_battery_charge_power;\n}else{\n max_charge_power=Math.min(msg.payload.max_configured_charge_power,msg.payload.max_battery_charge_power);\n}\n\nmax_inverter_power = msg.payload.num_phases*msg.payload.inverter_power;\n\n// variables for hold_min_soc controller\nBatterySelfDischargePower=200;//W\nn_batteries=msg.payload.num_batteries;\nHoldSocZone=1;\na=-2*BatterySelfDischargePower*n_batteries/HoldSocZone;\nb=-a*(msg.payload.min_soc+HoldSocZone);\nP_CONST = 0.5;\n// min soc among batteries\nsoc = msg.payload.lowest_soc;\ntarget_dc_power_to_hold_min_soc=soc*a+b;\n\n// current power setpoint\ninverter_power_setpoint= msg.payload.L1_AcPowerSetpoint+msg.payload.L2_AcPowerSetpoint+msg.payload.L3_AcPowerSetpoint;\n\nAC_in = msg.payload.AC_In;\nAC_out = msg.payload.AC_Out;\nPV_production =msg.payload.PVs_Power;\n\nif(global.get('start_calibration_charge_now_button','file') == true || global.get('start_calibration_charge_now','file')==1){\n d_p = max_charge_power-n_batteries*msg.payload.battery_power;\n power = AC_out+d_p;\n msg.payload.ess_mode =3;\n msg.payload.controller_info = \"Calibrtaion charge\";\n powerperphase=power/3;\n powerperphase=Math.max(powerperphase,-max_inverter_power);\n powerperphase=Math.floor(Math.min(powerperphase,max_inverter_power));\n msg.payload.power=powerperphase;\n return msg;\n}\n\nif(msg.payload.min_soc<=soc&&soc<=msg.payload.min_soc+1){\n d_p = target_dc_power_to_hold_min_soc-n_batteries*msg.payload.battery_power;\n delta = d_p*P_CONST;\n if(msg.payload.grid_setpoint>0){\n power = inverter_power_setpoint+delta;\n msg.payload.ess_mode =1;\n msg.payload.controller_info = \"Hold min SOC - ESS control\";\n }else{\n power = AC_out+delta-PV_production;\n msg.payload.ess_mode =3;\n msg.payload.controller_info = \"Hold min SOC - external control\";\n }\n}else if(soc<msg.payload.min_soc){\n d_p = max_charge_power-n_batteries*msg.payload.battery_power;\n //delta = d_p*P_CONST;\n //power = AC_out+d_p-PV_production;\n power = AC_out+d_p;\n msg.payload.ess_mode =3;\n msg.payload.controller_info = \"Charge to min SOC\";\n}else if(msg.payload.lowest_battery_temperature<250){\n d_p = max_charge_power-n_batteries*msg.payload.battery_power;\n //delta = d_p*P_CONST;\n power = AC_out+d_p;\n msg.payload.ess_mode =3;\n msg.payload.controller_info = \"Heat Battery\";\n}else{\n msg.payload.ess_mode =1;\n msg.payload.controller_info = \"ESS self-consumption\";\n msg.payload.power = inverter_power_setpoint/3;\n return msg;\n}\n\npowerperphase=power/3;\npowerperphase=Math.max(powerperphase,-max_inverter_power);\npowerperphase=Math.floor(Math.min(powerperphase,max_inverter_power));\n\nmsg.payload.power=powerperphase;\n\nreturn msg;\n\n\n", "outputs": 1, "timeout": "", "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 1290, "y": 420, "wires": [ [ "9e0230711eebbce6", "68ad1a7bcb0734ee", "2232724007eb535b", "bec4a18419d01326", "d16a932fea27e966", "c006ba1786cbb219" ] ] }, { "id": "ec4dfbf95393066c", "type": "join", "z": "322b256f0daf33ef", "name": "", "mode": "custom", "build": "object", "property": "payload", "propertyType": "msg", "key": "topic", "joiner": "\\n", "joinerType": "str", "accumulate": true, "timeout": "", "count": "16", "reduceRight": false, "reduceExp": "", "reduceInit": "", "reduceInitType": "", "reduceFixup": "", "x": 980, "y": 420, "wires": [ [ "c21a992cf80c2d6f" ] ] }, { "id": "42e7099d9e923743", "type": "victron-input-custom", "z": "322b256f0daf33ef", "service": "com.victronenergy.vebus/276", "path": "/Hub4/L1/AcPowerSetpoint", "serviceObj": { "service": "com.victronenergy.vebus/276", "name": "MultiPlus-II 48/3000/35-32 (276)" }, "pathObj": { "path": "/Hub4/L1/AcPowerSetpoint", "name": "/Hub4/L1/AcPowerSetpoint", "type": "number" }, "name": "", "onlyChanges": false, "x": 260, "y": 560, "wires": [ [ "3ad3750432ea80d6" ] ] }, { "id": "f87a6888f8e28402", "type": "victron-input-custom", "z": "322b256f0daf33ef", "service": "com.victronenergy.vebus/276", "path": "/Hub4/L2/AcPowerSetpoint", "serviceObj": { "service": "com.victronenergy.vebus/276", "name": "MultiPlus-II 48/3000/35-32 (276)" }, "pathObj": { "path": "/Hub4/L2/AcPowerSetpoint", "name": "/Hub4/L2/AcPowerSetpoint", "type": "number" }, "name": "", "onlyChanges": false, "x": 260, "y": 620, "wires": [ [ "7d1a5748311f693d" ] ] }, { "id": "4c9343aff34eed8a", "type": "victron-input-custom", "z": "322b256f0daf33ef", "service": "com.victronenergy.vebus/276", "path": "/Hub4/L3/AcPowerSetpoint", "serviceObj": { "service": "com.victronenergy.vebus/276", "name": "MultiPlus-II 48/3000/35-32 (276)" }, "pathObj": { "path": "/Hub4/L3/AcPowerSetpoint", "name": "/Hub4/L3/AcPowerSetpoint", "type": "number" }, "name": "", "onlyChanges": false, "x": 260, "y": 680, "wires": [ [ "3c08647bb2af3e60" ] ] }, { "id": "3ad3750432ea80d6", "type": "change", "z": "322b256f0daf33ef", "name": "L1_AcPowerSetpoint", "rules": [ { "t": "set", "p": "topic", "pt": "msg", "to": "L1_AcPowerSetpoint", "tot": "str" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 620, "y": 560, "wires": [ [ "ec4dfbf95393066c" ] ] }, { "id": "7d1a5748311f693d", "type": "change", "z": "322b256f0daf33ef", "name": "L2_AcPowerSetpoint", "rules": [ { "t": "set", "p": "topic", "pt": "msg", "to": "L2_AcPowerSetpoint", "tot": "str" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 620, "y": 620, "wires": [ [ "ec4dfbf95393066c" ] ] }, { "id": "3c08647bb2af3e60", "type": "change", "z": "322b256f0daf33ef", "name": "L3_AcPowerSetpoint", "rules": [ { "t": "set", "p": "topic", "pt": "msg", "to": "L3_AcPowerSetpoint", "tot": "str" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 620, "y": 680, "wires": [ [ "ec4dfbf95393066c" ] ] }, { "id": "9e0230711eebbce6", "type": "debug", "z": "322b256f0daf33ef", "name": "Debug for inverter power setpoint", "active": false, "tosidebar": true, "console": false, "tostatus": true, "complete": "payload", "targetType": "msg", "statusVal": "payload", "statusType": "auto", "x": 1780, "y": 440, "wires": [] }, { "id": "e233b1d2514ed9b2", "type": "victron-input-custom", "z": "322b256f0daf33ef", "service": "com.victronenergy.battery/1", "path": "/Info/MaxChargePower", "serviceObj": { "service": "com.victronenergy.battery/1", "name": "com.victronenergy.battery (1)" }, "pathObj": { "path": "/Info/MaxChargePower", "name": "/Info/MaxChargePower", "type": "number" }, "name": "", "onlyChanges": false, "x": 240, "y": 320, "wires": [ [ "307477049fed68a7" ] ] }, { "id": "27953b50225828d6", "type": "victron-input-custom", "z": "322b256f0daf33ef", "service": "com.victronenergy.settings", "path": "/Settings/CGwacs/MaxChargePower", "serviceObj": { "service": "com.victronenergy.settings", "name": "com.victronenergy.settings" }, "pathObj": { "path": "/Settings/CGwacs/MaxChargePower", "name": "/Settings/CGwacs/MaxChargePower", "type": "number" }, "name": "", "onlyChanges": false, "x": 270, "y": 380, "wires": [ [ "1204ed34a3b5a0cf" ] ] }, { "id": "307477049fed68a7", "type": "change", "z": "322b256f0daf33ef", "name": "max_battery_charge_power", "rules": [ { "t": "set", "p": "topic", "pt": "msg", "to": "max_battery_charge_power", "tot": "str" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 620, "y": 320, "wires": [ [ "ec4dfbf95393066c" ] ] }, { "id": "1204ed34a3b5a0cf", "type": "change", "z": "322b256f0daf33ef", "name": "max_configured_charge_power", "rules": [ { "t": "set", "p": "topic", "pt": "msg", "to": "max_configured_charge_power", "tot": "str" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 650, "y": 380, "wires": [ [ "ec4dfbf95393066c" ] ] }, { "id": "9bc82e5e6e1533c4", "type": "victron-output-custom", "z": "322b256f0daf33ef", "service": "com.victronenergy.vebus/276", "path": "/Hub4/L1/AcPowerSetpoint", "serviceObj": { "service": "com.victronenergy.vebus/276", "name": "MultiPlus-II 48/3000/35-32 (276)" }, "pathObj": { "path": "/Hub4/L1/AcPowerSetpoint", "name": "/Hub4/L1/AcPowerSetpoint", "type": "number" }, "name": "", "onlyChanges": false, "x": 2220, "y": 320, "wires": [] }, { "id": "59ccefdf248431a4", "type": "victron-output-custom", "z": "322b256f0daf33ef", "service": "com.victronenergy.vebus/276", "path": "/Hub4/L2/AcPowerSetpoint", "serviceObj": { "service": "com.victronenergy.vebus/276", "name": "MultiPlus-II 48/3000/35-32 (276)" }, "pathObj": { "path": "/Hub4/L2/AcPowerSetpoint", "name": "/Hub4/L2/AcPowerSetpoint", "type": "number" }, "name": "", "onlyChanges": false, "x": 2220, "y": 380, "wires": [] }, { "id": "eb55a558bcade512", "type": "victron-output-custom", "z": "322b256f0daf33ef", "service": "com.victronenergy.vebus/276", "path": "/Hub4/L3/AcPowerSetpoint", "serviceObj": { "service": "com.victronenergy.vebus/276", "name": "MultiPlus-II 48/3000/35-32 (276)" }, "pathObj": { "path": "/Hub4/L3/AcPowerSetpoint", "name": "/Hub4/L3/AcPowerSetpoint", "type": "number" }, "name": "", "onlyChanges": false, "x": 2220, "y": 440, "wires": [] }, { "id": "5493bb5ebb5575a2", "type": "change", "z": "322b256f0daf33ef", "name": "lowest_battery_temperature", "rules": [ { "t": "set", "p": "topic", "pt": "msg", "to": "lowest_battery_temperature", "tot": "str" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 640, "y": 440, "wires": [ [ "ec4dfbf95393066c" ] ] }, { "id": "47dc96f07a26cb54", "type": "victron-input-custom", "z": "322b256f0daf33ef", "service": "com.victronenergy.battery/1", "path": "/LowestSoc", "serviceObj": { "service": "com.victronenergy.battery/1", "name": "FZS 48TL200 x2 (1)" }, "pathObj": { "path": "/LowestSoc", "name": "/LowestSoc", "type": "number" }, "name": "", "onlyChanges": false, "x": 170, "y": 140, "wires": [ [ "9ca3830858243254" ] ] }, { "id": "9ca3830858243254", "type": "change", "z": "322b256f0daf33ef", "name": "lowest_soc", "rules": [ { "t": "set", "p": "topic", "pt": "msg", "to": "lowest_soc", "tot": "str" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 510, "y": 140, "wires": [ [ "ec4dfbf95393066c" ] ] }, { "id": "f4d06320d2637ed8", "type": "victron-input-custom", "z": "322b256f0daf33ef", "service": "com.victronenergy.battery/1", "path": "/NumOfBatteries", "serviceObj": { "service": "com.victronenergy.battery/1", "name": "FZS 48TL200 x2 (1)" }, "pathObj": { "path": "/NumOfBatteries", "name": "/NumOfBatteries", "type": "number" }, "name": "", "onlyChanges": false, "x": 190, "y": 80, "wires": [ [ "bb64aef92bbd2765" ] ] }, { "id": "bb64aef92bbd2765", "type": "change", "z": "322b256f0daf33ef", "name": "num_batteries", "rules": [ { "t": "set", "p": "topic", "pt": "msg", "to": "num_batteries", "tot": "str" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 460, "y": 80, "wires": [ [ "ec4dfbf95393066c" ] ] }, { "id": "2232724007eb535b", "type": "ui_text", "z": "322b256f0daf33ef", "group": "e177392401620838", "order": 1, "width": 0, "height": 0, "name": "Controller Info", "label": "Controller Info", "format": "{{msg.payload.controller_info}}", "layout": "row-spread", "className": "", "style": false, "font": "Arial,Arial,Helvetica,sans-serif", "fontSize": "20", "color": "#000000", "x": 1720, "y": 220, "wires": [] }, { "id": "68ad1a7bcb0734ee", "type": "function", "z": "322b256f0daf33ef", "name": "Get corrected inverter power setpoint", "func": "msg.payload = msg.payload.power;\nreturn msg;", "outputs": 1, "timeout": "", "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 1790, "y": 380, "wires": [ [ "9bc82e5e6e1533c4", "59ccefdf248431a4", "eb55a558bcade512" ] ] }, { "id": "4650c97f969e0db2", "type": "victron-input-custom", "z": "322b256f0daf33ef", "service": "com.victronenergy.battery/1", "path": "/Dc/0/LowestTemperature", "serviceObj": { "service": "com.victronenergy.battery/1", "name": "FZS 48TL200 x2 (1)" }, "pathObj": { "path": "/Dc/0/LowestTemperature", "name": "/Dc/0/LowestTemperature", "type": "number" }, "name": "", "onlyChanges": false, "x": 220, "y": 440, "wires": [ [ "5493bb5ebb5575a2" ] ] }, { "id": "1555eb02fa5903f2", "type": "comment", "z": "322b256f0daf33ef", "name": "salidomo controllers will ignore grid setpoint setting", "info": "", "x": 1270, "y": 380, "wires": [] }, { "id": "112368177dccd027", "type": "victron-output-custom", "z": "322b256f0daf33ef", "service": "com.victronenergy.settings", "path": "/Settings/CGwacs/Hub4Mode", "serviceObj": { "service": "com.victronenergy.settings", "name": "com.victronenergy.settings" }, "pathObj": { "path": "/Settings/CGwacs/Hub4Mode", "name": "/Settings/CGwacs/Hub4Mode", "type": "number" }, "name": "", "onlyChanges": false, "x": 2190, "y": 580, "wires": [] }, { "id": "bec4a18419d01326", "type": "function", "z": "322b256f0daf33ef", "name": "Get ESS mode", "func": "msg.payload = msg.payload.ess_mode;\nreturn msg;", "outputs": 1, "timeout": "", "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 1720, "y": 580, "wires": [ [ "112368177dccd027", "c6526d18e03abf60" ] ] }, { "id": "c6526d18e03abf60", "type": "debug", "z": "322b256f0daf33ef", "name": "Debug for ESS mode", "active": false, "tosidebar": true, "console": false, "tostatus": true, "complete": "payload", "targetType": "msg", "statusVal": "payload", "statusType": "auto", "x": 2080, "y": 520, "wires": [] }, { "id": "7887f8d8f1b95425", "type": "victron-input-custom", "z": "322b256f0daf33ef", "service": "com.victronenergy.vebus/276", "path": "/Ac/Out/P", "serviceObj": { "service": "com.victronenergy.vebus/276", "name": "MultiPlus-II 48/3000/35-32 (276)" }, "pathObj": { "path": "/Ac/Out/P", "name": "/Ac/Out/P", "type": "number" }, "name": "", "onlyChanges": false, "x": 210, "y": 880, "wires": [ [ "88b94b58284f6e59" ] ] }, { "id": "14774be09f2702cb", "type": "change", "z": "322b256f0daf33ef", "name": "PVs_Power", "rules": [ { "t": "set", "p": "topic", "pt": "msg", "to": "PVs_Power", "tot": "str" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 550, "y": 1020, "wires": [ [ "ec4dfbf95393066c" ] ] }, { "id": "6ca9ae5cc145bf6c", "type": "victron-input-custom", "z": "322b256f0daf33ef", "service": "com.victronenergy.system/0", "path": "/Dc/Pv/Power", "serviceObj": { "service": "com.victronenergy.system/0", "name": "com.victronenergy.system (0)" }, "pathObj": { "path": "/Dc/Pv/Power", "name": "/Dc/Pv/Power", "type": "number" }, "name": "", "onlyChanges": false, "x": 210, "y": 1020, "wires": [ [ "14774be09f2702cb" ] ] }, { "id": "d16a932fea27e966", "type": "ui_text", "z": "322b256f0daf33ef", "group": "e177392401620838", "order": 2, "width": 0, "height": 0, "name": "Lowest SOC", "label": "Lowest_SOC", "format": "{{msg.payload.lowest_soc}}", "layout": "row-spread", "className": "", "style": false, "font": "Arial,Arial,Helvetica,sans-serif", "fontSize": "20", "color": "#000000", "x": 1710, "y": 300, "wires": [] }, { "id": "b3bbeb9c09af7c8b", "type": "victron-output-custom", "z": "322b256f0daf33ef", "service": "com.victronenergy.settings", "path": "/Settings/CGwacs/BatteryLife/State", "serviceObj": { "service": "com.victronenergy.settings", "name": "com.victronenergy.settings" }, "pathObj": { "path": "/Settings/CGwacs/BatteryLife/State", "name": "/Settings/CGwacs/BatteryLife/State", "type": "number" }, "name": "", "onlyChanges": false, "x": 2330, "y": 660, "wires": [] }, { "id": "c006ba1786cbb219", "type": "function", "z": "322b256f0daf33ef", "name": "Set BatteryLife state to 10 - without BatteryLife", "func": "//msg.payload = msg.payload.BatteryLife_state;\nmsg.payload = 10;\nreturn msg;", "outputs": 1, "timeout": "", "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 1820, "y": 660, "wires": [ [ "b3bbeb9c09af7c8b", "7cbd2c5af31569a2" ] ] }, { "id": "7cbd2c5af31569a2", "type": "debug", "z": "322b256f0daf33ef", "name": "Debug for BatteryLife state", "active": false, "tosidebar": true, "console": false, "tostatus": true, "complete": "payload", "targetType": "msg", "statusVal": "payload", "statusType": "auto", "x": 2220, "y": 720, "wires": [] }, { "id": "0b031aa1edee7bf3", "type": "comment", "z": "322b256f0daf33ef", "name": "Battery Related Info", "info": "", "x": 130, "y": 40, "wires": [] }, { "id": "7f85ce0ea68e4ff3", "type": "comment", "z": "322b256f0daf33ef", "name": "Ac Power Setpoint", "info": "", "x": 130, "y": 500, "wires": [] }, { "id": "7a4db64fbb9bed91", "type": "comment", "z": "322b256f0daf33ef", "name": "Ac Out", "info": "", "x": 90, "y": 820, "wires": [] }, { "id": "f434795c9ab1b58a", "type": "comment", "z": "322b256f0daf33ef", "name": "PV Power", "info": "", "x": 100, "y": 960, "wires": [] }, { "id": "88b94b58284f6e59", "type": "change", "z": "322b256f0daf33ef", "name": "AC_Out", "rules": [ { "t": "set", "p": "topic", "pt": "msg", "to": "AC_Out", "tot": "str" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 480, "y": 880, "wires": [ [ "ec4dfbf95393066c" ] ] }, { "id": "55dfa73b801bef97", "type": "victron-input-custom", "z": "322b256f0daf33ef", "service": "com.victronenergy.vebus/276", "path": "/ProductName", "serviceObj": { "service": "com.victronenergy.vebus/276", "name": "MultiPlus-II 48/3000/35-32 (276)" }, "pathObj": { "path": "/ProductName", "name": "/ProductName", "type": "string" }, "name": "", "onlyChanges": false, "x": 220, "y": 1180, "wires": [ [ "e629bf512e18a20a" ] ] }, { "id": "0e7f87ce40b61ee3", "type": "victron-input-custom", "z": "322b256f0daf33ef", "service": "com.victronenergy.vebus/276", "path": "/Ac/NumberOfPhases", "serviceObj": { "service": "com.victronenergy.vebus/276", "name": "MultiPlus-II 48/3000/35-32 (276)" }, "pathObj": { "path": "/Ac/NumberOfPhases", "name": "/Ac/NumberOfPhases", "type": "number" }, "name": "", "onlyChanges": false, "x": 240, "y": 1240, "wires": [ [ "3d827e465503237c" ] ] }, { "id": "90ce1991b97db54c", "type": "comment", "z": "322b256f0daf33ef", "name": "Calculate Max Inverter Power", "info": "", "x": 160, "y": 1120, "wires": [] }, { "id": "e629bf512e18a20a", "type": "function", "z": "322b256f0daf33ef", "name": "get_inverter_power", "func": "str = msg.payload;\nfirstIndex = str.indexOf(\"/\");\nsecondIndex = str.indexOf(\"/\", firstIndex + 1);\n\nif (firstIndex !== -1 && secondIndex !== -1) {\n substring = str.substring(firstIndex + 1, secondIndex);\n msg.payload = Number(substring);\n}else{\n msg.payload = 0;\n}\n\nreturn msg;", "outputs": 1, "timeout": 0, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 530, "y": 1180, "wires": [ [ "7cc14538a34f4226" ] ] }, { "id": "7cc14538a34f4226", "type": "change", "z": "322b256f0daf33ef", "name": "inverter_power", "rules": [ { "t": "set", "p": "topic", "pt": "msg", "to": "inverter_power", "tot": "str" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 760, "y": 1180, "wires": [ [ "ec4dfbf95393066c" ] ] }, { "id": "3d827e465503237c", "type": "change", "z": "322b256f0daf33ef", "name": "num_phases", "rules": [ { "t": "set", "p": "topic", "pt": "msg", "to": "num_phases", "tot": "str" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 570, "y": 1240, "wires": [ [ "ec4dfbf95393066c" ] ] }, { "id": "ca614a4e091b6469", "type": "victron-input-custom", "z": "322b256f0daf33ef", "service": "com.victronenergy.vebus/276", "path": "/Ac/ActiveIn/P", "serviceObj": { "service": "com.victronenergy.vebus/276", "name": "MultiPlus-II 48/3000/35-32 (276)" }, "pathObj": { "path": "/Ac/ActiveIn/P", "name": "/Ac/ActiveIn/P", "type": "number" }, "name": "", "onlyChanges": false, "roundValues": "no", "x": 220, "y": 740, "wires": [ [ "63358306618f97ea" ] ] }, { "id": "63358306618f97ea", "type": "change", "z": "322b256f0daf33ef", "name": "AC_In", "rules": [ { "t": "set", "p": "topic", "pt": "msg", "to": "AC_In", "tot": "str" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 530, "y": 740, "wires": [ [ "ec4dfbf95393066c" ] ] }, { "id": "2978db68222aa8e5", "type": "victron-input-custom", "z": "322b256f0daf33ef", "service": "com.victronenergy.settings", "path": "/Settings/CGwacs/AcPowerSetPoint", "serviceObj": { "service": "com.victronenergy.settings", "name": "com.victronenergy.settings" }, "pathObj": { "path": "/Settings/CGwacs/AcPowerSetPoint", "name": "/Settings/CGwacs/AcPowerSetPoint", "type": "number" }, "name": "", "onlyChanges": false, "x": 270, "y": 1360, "wires": [ [ "68fa76cd115eee72" ] ] }, { "id": "08e103d823555f04", "type": "comment", "z": "322b256f0daf33ef", "name": "Grid Setpoint", "info": "", "x": 110, "y": 1320, "wires": [] }, { "id": "68fa76cd115eee72", "type": "change", "z": "322b256f0daf33ef", "name": "grid_setpoint", "rules": [ { "t": "set", "p": "topic", "pt": "msg", "to": "grid_setpoint", "tot": "str" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 590, "y": 1360, "wires": [ [ "ec4dfbf95393066c" ] ] }, { "id": "43c4baa311f48203", "type": "function", "z": "32b2f9d4415d82ce", "name": "cal_max_discharge_power", "func": "configured_max_inverter_power = msg.payload.num_phases*msg.payload.inverter_power;\nn_batteries=msg.payload.num_batteries;\ndischarge_Power_PVs = msg.payload.PVs_Power;\nmax_discharge_current_batteries = 15*(5*n_batteries-msg.payload.num_limb_string);\nDC_BUS_Voltage = msg.payload.DC_BUS_Voltage;\n\nif(44.1<DC_BUS_Voltage && DC_BUS_Voltage <=45){\n max_discharge_current_batteries -=(45-DC_BUS_Voltage)*20*n_batteries;\n}\n\nif(DC_BUS_Voltage <=44.1){\n max_discharge_current_batteries = 0;\n}\n \nmax_discharge_power_inverter = Math.floor(msg.payload.DC_BUS_Voltage*max_discharge_current_batteries+discharge_Power_PVs);\nmsg.payload = Math.min(max_discharge_power_inverter,configured_max_inverter_power);\n//msg.payload = max_discharge_current_batteries;\nreturn msg;", "outputs": 1, "timeout": "", "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 1960, "y": 560, "wires": [ [ "6378e5de6ad21fcd", "b305754081d60953" ] ] }, { "id": "b305754081d60953", "type": "victron-output-custom", "z": "32b2f9d4415d82ce", "service": "com.victronenergy.settings", "path": "/Settings/CGwacs/MaxDischargePower", "serviceObj": { "service": "com.victronenergy.settings", "name": "com.victronenergy.settings" }, "pathObj": { "path": "/Settings/CGwacs/MaxDischargePower", "name": "/Settings/CGwacs/MaxDischargePower", "type": "number" }, "name": "", "onlyChanges": false, "x": 2400, "y": 600, "wires": [] }, { "id": "e946ebc65cb86f48", "type": "join", "z": "32b2f9d4415d82ce", "name": "all message topics", "mode": "custom", "build": "object", "property": "payload", "propertyType": "msg", "key": "topic", "joiner": "\\n", "joinerType": "str", "accumulate": true, "timeout": "", "count": "10", "reduceRight": false, "reduceExp": "", "reduceInit": "", "reduceInitType": "", "reduceFixup": "", "x": 940, "y": 560, "wires": [ [ "83e42c33509f7c21" ] ] }, { "id": "cec33f72f0191df8", "type": "victron-input-custom", "z": "32b2f9d4415d82ce", "service": "com.victronenergy.vebus/276", "path": "/Dc/0/Voltage", "serviceObj": { "service": "com.victronenergy.vebus/276", "name": "MultiPlus-II 48/3000/35-32 (276)" }, "pathObj": { "path": "/Dc/0/Voltage", "name": "/Dc/0/Voltage", "type": "number" }, "name": "", "onlyChanges": false, "x": 240, "y": 720, "wires": [ [ "74bc65311e479c3d" ] ] }, { "id": "7298a183c5c9521c", "type": "change", "z": "32b2f9d4415d82ce", "name": "PVs_Power", "rules": [ { "t": "set", "p": "topic", "pt": "msg", "to": "PVs_Power", "tot": "str" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 550, "y": 600, "wires": [ [ "e946ebc65cb86f48" ] ] }, { "id": "74bc65311e479c3d", "type": "change", "z": "32b2f9d4415d82ce", "name": "DC_BUS_Voltage", "rules": [ { "t": "set", "p": "topic", "pt": "msg", "to": "DC_BUS_Voltage", "tot": "str" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 590, "y": 720, "wires": [ [ "e946ebc65cb86f48" ] ] }, { "id": "88a83948dc7d3819", "type": "ui_text", "z": "32b2f9d4415d82ce", "group": "e177392401620838", "order": 3, "width": 0, "height": 0, "name": "", "label": "Battery Health", "format": "{{msg.payload.battery_health}}", "layout": "row-spread", "className": "", "style": false, "font": "Arial,Arial,Helvetica,sans-serif", "fontSize": "20", "color": "#000000", "x": 1520, "y": 500, "wires": [] }, { "id": "4947a0f8f2b4940b", "type": "victron-input-custom", "z": "32b2f9d4415d82ce", "service": "com.victronenergy.vebus/276", "path": "/Hub4/L1/AcPowerSetpoint", "serviceObj": { "service": "com.victronenergy.vebus/276", "name": "MultiPlus-II 48/3000/35-32 (276)" }, "pathObj": { "path": "/Hub4/L1/AcPowerSetpoint", "name": "/Hub4/L1/AcPowerSetpoint", "type": "number" }, "name": "", "onlyChanges": false, "x": 280, "y": 840, "wires": [ [ "ba9ffbf9cd06fe9c" ] ] }, { "id": "b338670f5c9310e3", "type": "victron-input-custom", "z": "32b2f9d4415d82ce", "service": "com.victronenergy.vebus/276", "path": "/Hub4/L2/AcPowerSetpoint", "serviceObj": { "service": "com.victronenergy.vebus/276", "name": "MultiPlus-II 48/3000/35-32 (276)" }, "pathObj": { "path": "/Hub4/L2/AcPowerSetpoint", "name": "/Hub4/L2/AcPowerSetpoint", "type": "number" }, "name": "", "onlyChanges": false, "x": 280, "y": 900, "wires": [ [ "ee9a0bab1240743d" ] ] }, { "id": "78acb0cb0aca3a45", "type": "victron-input-custom", "z": "32b2f9d4415d82ce", "service": "com.victronenergy.vebus/276", "path": "/Hub4/L3/AcPowerSetpoint", "serviceObj": { "service": "com.victronenergy.vebus/276", "name": "MultiPlus-II 48/3000/35-32 (276)" }, "pathObj": { "path": "/Hub4/L3/AcPowerSetpoint", "name": "/Hub4/L3/AcPowerSetpoint", "type": "number" }, "name": "", "onlyChanges": false, "x": 280, "y": 960, "wires": [ [ "0789753bcf77148d" ] ] }, { "id": "ba9ffbf9cd06fe9c", "type": "change", "z": "32b2f9d4415d82ce", "name": "L1_AcPowerSetpoint", "rules": [ { "t": "set", "p": "topic", "pt": "msg", "to": "L1_AcPowerSetpoint", "tot": "str" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 637, "y": 840, "wires": [ [ "e946ebc65cb86f48" ] ] }, { "id": "ee9a0bab1240743d", "type": "change", "z": "32b2f9d4415d82ce", "name": "L2_AcPowerSetpoint", "rules": [ { "t": "set", "p": "topic", "pt": "msg", "to": "L2_AcPowerSetpoint", "tot": "str" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 640, "y": 900, "wires": [ [ "e946ebc65cb86f48" ] ] }, { "id": "0789753bcf77148d", "type": "change", "z": "32b2f9d4415d82ce", "name": "L3_AcPowerSetpoint", "rules": [ { "t": "set", "p": "topic", "pt": "msg", "to": "L3_AcPowerSetpoint", "tot": "str" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 640, "y": 960, "wires": [ [ "e946ebc65cb86f48" ] ] }, { "id": "9d0c50d6661ed767", "type": "comment", "z": "32b2f9d4415d82ce", "name": "PV Power", "info": "", "x": 120, "y": 560, "wires": [] }, { "id": "eeff15118537abb2", "type": "comment", "z": "32b2f9d4415d82ce", "name": "Ac Power Setpoint", "info": "", "x": 150, "y": 800, "wires": [] }, { "id": "248284788085e727", "type": "victron-input-custom", "z": "32b2f9d4415d82ce", "service": "com.victronenergy.system/0", "path": "/Dc/Pv/Power", "serviceObj": { "service": "com.victronenergy.system/0", "name": "com.victronenergy.system (0)" }, "pathObj": { "path": "/Dc/Pv/Power", "name": "/Dc/Pv/Power", "type": "number" }, "name": "", "onlyChanges": false, "x": 230, "y": 600, "wires": [ [ "7298a183c5c9521c" ] ] }, { "id": "f6f1cef7ea0c68bf", "type": "victron-input-custom", "z": "32b2f9d4415d82ce", "service": "com.victronenergy.battery/1", "path": "/NumOfLimbStrings", "serviceObj": { "service": "com.victronenergy.battery/1", "name": "FZS 48TL200 x2 (1)" }, "pathObj": { "path": "/NumOfLimbStrings", "name": "/NumOfLimbStrings", "type": "object" }, "name": "", "onlyChanges": false, "x": 220, "y": 280, "wires": [ [ "ac12caf306430294" ] ] }, { "id": "ba9a71d41b31a262", "type": "comment", "z": "32b2f9d4415d82ce", "name": "DBus Voltage", "info": "", "x": 130, "y": 660, "wires": [] }, { "id": "5094d7152f3846a8", "type": "switch", "z": "32b2f9d4415d82ce", "name": "only_move_on_when_batteries_are_healthy", "property": "payload.num_limb_string", "propertyType": "msg", "rules": [ { "t": "gte", "v": "0", "vt": "str" } ], "checkall": "true", "repair": false, "outputs": 1, "x": 1610, "y": 560, "wires": [ [ "43c4baa311f48203" ] ] }, { "id": "43999600211c7ec5", "type": "victron-input-custom", "z": "32b2f9d4415d82ce", "service": "com.victronenergy.battery/1", "path": "/NumOfBatteries", "serviceObj": { "service": "com.victronenergy.battery/1", "name": "FZS 48TL200 x2 (1)" }, "pathObj": { "path": "/NumOfBatteries", "name": "/NumOfBatteries", "type": "number" }, "name": "", "onlyChanges": false, "x": 210, "y": 360, "wires": [ [ "c0c3a26169fd6a2b" ] ] }, { "id": "fd833061b942ecc3", "type": "comment", "z": "32b2f9d4415d82ce", "name": "Battery Info", "info": "", "x": 130, "y": 220, "wires": [] }, { "id": "c0c3a26169fd6a2b", "type": "change", "z": "32b2f9d4415d82ce", "name": "num_batteries", "rules": [ { "t": "set", "p": "topic", "pt": "msg", "to": "num_batteries", "tot": "str" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 500, "y": 360, "wires": [ [ "e946ebc65cb86f48" ] ] }, { "id": "83e42c33509f7c21", "type": "function", "z": "32b2f9d4415d82ce", "name": "get_total_number_of_limb_strings", "func": "let total_num_limb_string=0;\nlimb_string_list = msg.payload.limb_string_list;\nmain_switch_state_list = msg.payload.main_switch_state;\nbattery_health = [];\n\nfor (let i = 0; i < limb_string_list.length; i++) {\n num_limb_string = limb_string_list[i][1][0];\n main_switch_state=main_switch_state_list[i][1][0];\n if(num_limb_string<=1){\n total_num_limb_string+=num_limb_string;\n battery_health.push(\"Battery \"+(i+2)+\" has \" + num_limb_string+ \" limb strings.\");\n }else if(main_switch_state == true){\n total_num_limb_string = -1;//no meaning here, just used for stopping calculating max discharge power\n battery_health.push(\"Battery \"+(i+2)+\" has main switch open!\");\n return msg;\n }\n else{\n total_num_limb_string = -1;//if there are more than 1 limb string in a battery, should give alarm to stop use this battery\n battery_health.push(\"Battery \"+(i+2)+\" has more than 1 limb string!\");\n return msg;\n }\n}\nmsg.payload.num_limb_string = total_num_limb_string;\nmsg.payload.battery_health = battery_health;\n\nreturn msg;", "outputs": 1, "timeout": 0, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 1220, "y": 560, "wires": [ [ "5094d7152f3846a8", "88a83948dc7d3819" ] ] }, { "id": "6378e5de6ad21fcd", "type": "debug", "z": "32b2f9d4415d82ce", "name": "Debug for Max Discharge Power", "active": false, "tosidebar": true, "console": false, "tostatus": true, "complete": "payload", "targetType": "msg", "statusVal": "payload", "statusType": "auto", "x": 2290, "y": 500, "wires": [] }, { "id": "ac12caf306430294", "type": "change", "z": "32b2f9d4415d82ce", "name": "limb_string_list", "rules": [ { "t": "set", "p": "topic", "pt": "msg", "to": "limb_string_list", "tot": "str" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 500, "y": 280, "wires": [ [ "e946ebc65cb86f48" ] ] }, { "id": "6e6ac3c77f24e878", "type": "victron-input-custom", "z": "32b2f9d4415d82ce", "service": "com.victronenergy.battery/1", "path": "/Diagnostics/IoStatus/MainSwitchClosed", "serviceObj": { "service": "com.victronenergy.battery/1", "name": "FZS 48TL200 x2 (1)" }, "pathObj": { "path": "/Diagnostics/IoStatus/MainSwitchClosed", "name": "/Diagnostics/IoStatus/MainSwitchClosed", "type": "object" }, "name": "", "onlyChanges": false, "x": 280, "y": 440, "wires": [ [ "e09d62c9dfd48398" ] ] }, { "id": "e09d62c9dfd48398", "type": "change", "z": "32b2f9d4415d82ce", "name": "main_switch_state", "rules": [ { "t": "set", "p": "topic", "pt": "msg", "to": "main_switch_state", "tot": "str" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 630, "y": 440, "wires": [ [ "e946ebc65cb86f48" ] ] }, { "id": "e29be84b4acceab6", "type": "victron-input-custom", "z": "32b2f9d4415d82ce", "service": "com.victronenergy.vebus/276", "path": "/ProductName", "serviceObj": { "service": "com.victronenergy.vebus/276", "name": "MultiPlus-II 48/3000/35-32 (276)" }, "pathObj": { "path": "/ProductName", "name": "/ProductName", "type": "string" }, "name": "", "onlyChanges": false, "x": 240, "y": 1100, "wires": [ [ "60d904f7b9264e32" ] ] }, { "id": "8a6b3d4d62ae91dc", "type": "victron-input-custom", "z": "32b2f9d4415d82ce", "service": "com.victronenergy.vebus/276", "path": "/Ac/NumberOfPhases", "serviceObj": { "service": "com.victronenergy.vebus/276", "name": "MultiPlus-II 48/3000/35-32 (276)" }, "pathObj": { "path": "/Ac/NumberOfPhases", "name": "/Ac/NumberOfPhases", "type": "number" }, "name": "", "onlyChanges": false, "x": 260, "y": 1160, "wires": [ [ "9f2b4a19a3193a2b" ] ] }, { "id": "98dd4cfc79b2ea67", "type": "comment", "z": "32b2f9d4415d82ce", "name": "Calculate Max Inverter Power", "info": "", "x": 180, "y": 1040, "wires": [] }, { "id": "60d904f7b9264e32", "type": "function", "z": "32b2f9d4415d82ce", "name": "get_inverter_power", "func": "str = msg.payload;\nfirstIndex = str.indexOf(\"/\");\nsecondIndex = str.indexOf(\"/\", firstIndex + 1);\n\nif (firstIndex !== -1 && secondIndex !== -1) {\n substring = str.substring(firstIndex + 1, secondIndex);\n msg.payload = Number(substring);\n}else{\n msg.payload = 0;\n}\n\nreturn msg;", "outputs": 1, "timeout": 0, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 550, "y": 1100, "wires": [ [ "8ce7f1993cecc835" ] ] }, { "id": "8ce7f1993cecc835", "type": "change", "z": "32b2f9d4415d82ce", "name": "inverter_power", "rules": [ { "t": "set", "p": "topic", "pt": "msg", "to": "inverter_power", "tot": "str" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 780, "y": 1100, "wires": [ [ "e946ebc65cb86f48" ] ] }, { "id": "9f2b4a19a3193a2b", "type": "change", "z": "32b2f9d4415d82ce", "name": "num_phases", "rules": [ { "t": "set", "p": "topic", "pt": "msg", "to": "num_phases", "tot": "str" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 590, "y": 1160, "wires": [ [ "e946ebc65cb86f48" ] ] }, { "id": "ab3e15b7fa7336e4", "type": "comment", "z": "32b2f9d4415d82ce", "name": "Max Discharge Power of Inverter(Battery+PV)", "info": "", "x": 2330, "y": 560, "wires": [] }, { "id": "4a421b5a9efccf75", "type": "comment", "z": "812b3c1b3d3fa76b", "name": "Parse Alarms: 26", "info": "", "x": 240, "y": 80, "wires": [] }, { "id": "8596c0dc478b1b02", "type": "victron-input-custom", "z": "812b3c1b3d3fa76b", "service": "com.victronenergy.battery/1", "path": "/AlarmFlags/CME", "serviceObj": { "service": "com.victronenergy.battery/1", "name": "FZS 48TL200 x2 (1)" }, "pathObj": { "path": "/AlarmFlags/CME", "name": "/AlarmFlags/CME", "type": "object" }, "name": "", "onlyChanges": false, "x": 310, "y": 920, "wires": [ [ "644fd6453eeca4be" ] ] }, { "id": "3e09054f0e54a588", "type": "victron-input-custom", "z": "812b3c1b3d3fa76b", "service": "com.victronenergy.battery/1", "path": "/AlarmFlags/DATA", "serviceObj": { "service": "com.victronenergy.battery/1", "name": "FZS 48TL200 x2 (1)" }, "pathObj": { "path": "/AlarmFlags/DATA", "name": "/AlarmFlags/DATA", "type": "object" }, "name": "", "onlyChanges": false, "x": 310, "y": 1480, "wires": [ [ "30d43b7beebf9bb9" ] ] }, { "id": "75f1ef23840fe7a9", "type": "victron-input-custom", "z": "812b3c1b3d3fa76b", "service": "com.victronenergy.battery/1", "path": "/AlarmFlags/FUSE", "serviceObj": { "service": "com.victronenergy.battery/1", "name": "FZS 48TL200 x2 (1)" }, "pathObj": { "path": "/AlarmFlags/FUSE", "name": "/AlarmFlags/FUSE", "type": "object" }, "name": "", "onlyChanges": false, "x": 320, "y": 680, "wires": [ [ "f3e5be9d70303fd9" ] ] }, { "id": "21b93e5c756c9a60", "type": "victron-input-custom", "z": "812b3c1b3d3fa76b", "service": "com.victronenergy.battery/1", "path": "/AlarmFlags/HEBT", "serviceObj": { "service": "com.victronenergy.battery/1", "name": "FZS 48TL200 x2 (1)" }, "pathObj": { "path": "/AlarmFlags/HEBT", "name": "/AlarmFlags/HEBT", "type": "object" }, "name": "", "onlyChanges": false, "x": 320, "y": 1580, "wires": [ [ "b22ce8dbee5ca745" ] ] }, { "id": "cfc5a92164354a07", "type": "victron-input-custom", "z": "812b3c1b3d3fa76b", "service": "com.victronenergy.battery/1", "path": "/AlarmFlags/HTFS", "serviceObj": { "service": "com.victronenergy.battery/1", "name": "FZS 48TL200 x2 (1)" }, "pathObj": { "path": "/AlarmFlags/HTFS", "name": "/AlarmFlags/HTFS", "type": "object" }, "name": "", "onlyChanges": false, "x": 320, "y": 1440, "wires": [ [ "e996de028f2a9e80" ] ] }, { "id": "d6e422e6f274f8bb", "type": "victron-input-custom", "z": "812b3c1b3d3fa76b", "service": "com.victronenergy.battery/1", "path": "/AlarmFlags/HTRE", "serviceObj": { "service": "com.victronenergy.battery/1", "name": "FZS 48TL200 x2 (1)" }, "pathObj": { "path": "/AlarmFlags/HTRE", "name": "/AlarmFlags/HTRE", "type": "object" }, "name": "", "onlyChanges": false, "x": 320, "y": 740, "wires": [ [ "c54215196b096586" ] ] }, { "id": "31ea89722d0b4664", "type": "victron-input-custom", "z": "812b3c1b3d3fa76b", "service": "com.victronenergy.battery/1", "path": "/AlarmFlags/HWEM", "serviceObj": { "service": "com.victronenergy.battery/1", "name": "FZS 48TL200 x2 (1)" }, "pathObj": { "path": "/AlarmFlags/HWEM", "name": "/AlarmFlags/HWEM", "type": "object" }, "name": "", "onlyChanges": false, "x": 320, "y": 1040, "wires": [ [ "8f8fd0429cee609e" ] ] }, { "id": "c569c9d1ab910233", "type": "victron-input-custom", "z": "812b3c1b3d3fa76b", "service": "com.victronenergy.battery/1", "path": "/AlarmFlags/HWFL", "serviceObj": { "service": "com.victronenergy.battery/1", "name": "FZS 48TL200 x2 (1)" }, "pathObj": { "path": "/AlarmFlags/HWFL", "name": "/AlarmFlags/HWFL", "type": "object" }, "name": "", "onlyChanges": false, "x": 320, "y": 980, "wires": [ [ "478c1c46dcd45a31" ] ] }, { "id": "e7062b99bef916be", "type": "victron-input-custom", "z": "812b3c1b3d3fa76b", "service": "com.victronenergy.battery/1", "path": "/AlarmFlags/IDM2", "serviceObj": { "service": "com.victronenergy.battery/1", "name": "FZS 48TL200 x2 (1)" }, "pathObj": { "path": "/AlarmFlags/IDM2", "name": "/AlarmFlags/IDM2", "type": "object" }, "name": "", "onlyChanges": false, "x": 310, "y": 500, "wires": [ [ "4f4f5ad0a98541db" ] ] }, { "id": "43c83a0c3f8b9062", "type": "victron-input-custom", "z": "812b3c1b3d3fa76b", "service": "com.victronenergy.battery/1", "path": "/AlarmFlags/ISOB", "serviceObj": { "service": "com.victronenergy.battery/1", "name": "FZS 48TL200 x2 (1)" }, "pathObj": { "path": "/AlarmFlags/ISOB", "name": "/AlarmFlags/ISOB", "type": "object" }, "name": "", "onlyChanges": false, "x": 310, "y": 560, "wires": [ [ "23008a02e8e7da76" ] ] }, { "id": "0c8cf7e25d76c2bb", "type": "victron-input-custom", "z": "812b3c1b3d3fa76b", "service": "com.victronenergy.battery/1", "path": "/AlarmFlags/LMPA", "serviceObj": { "service": "com.victronenergy.battery/1", "name": "FZS 48TL200 x2 (1)" }, "pathObj": { "path": "/AlarmFlags/LMPA", "name": "/AlarmFlags/LMPA", "type": "object" }, "name": "", "onlyChanges": false, "x": 320, "y": 1540, "wires": [ [ "87e8ae20b843c381" ] ] }, { "id": "a947047c597fb003", "type": "victron-input-custom", "z": "812b3c1b3d3fa76b", "service": "com.victronenergy.battery/1", "path": "/AlarmFlags/MID2", "serviceObj": { "service": "com.victronenergy.battery/1", "name": "FZS 48TL200 x2 (1)" }, "pathObj": { "path": "/AlarmFlags/MID2", "name": "/AlarmFlags/MID2", "type": "object" }, "name": "", "onlyChanges": false, "x": 310, "y": 1380, "wires": [ [ "943a0ba24db0fab4" ] ] }, { "id": "b537a788864448e2", "type": "victron-input-custom", "z": "812b3c1b3d3fa76b", "service": "com.victronenergy.battery/1", "path": "/AlarmFlags/MSWE", "serviceObj": { "service": "com.victronenergy.battery/1", "name": "FZS 48TL200 x2 (1)" }, "pathObj": { "path": "/AlarmFlags/MSWE", "name": "/AlarmFlags/MSWE", "type": "object" }, "name": "", "onlyChanges": false, "x": 320, "y": 620, "wires": [ [ "e104c979769c9e92" ] ] }, { "id": "8453c5b3a2515d71", "type": "victron-input-custom", "z": "812b3c1b3d3fa76b", "service": "com.victronenergy.battery/1", "path": "/AlarmFlags/STRE", "serviceObj": { "service": "com.victronenergy.battery/1", "name": "FZS 48TL200 x2 (1)" }, "pathObj": { "path": "/AlarmFlags/STRE", "name": "/AlarmFlags/STRE", "type": "object" }, "name": "", "onlyChanges": false, "x": 320, "y": 860, "wires": [ [ "00b4380b1ae68023" ] ] }, { "id": "2b6ae98d1f9327d1", "type": "victron-input-custom", "z": "812b3c1b3d3fa76b", "service": "com.victronenergy.battery/1", "path": "/AlarmFlags/TCPE", "serviceObj": { "service": "com.victronenergy.battery/1", "name": "FZS 48TL200 x2 (1)" }, "pathObj": { "path": "/AlarmFlags/TCPE", "name": "/AlarmFlags/TCPE", "type": "object" }, "name": "", "onlyChanges": false, "x": 320, "y": 800, "wires": [ [ "9603499ff1d02af5" ] ] }, { "id": "c5c363f24fdb8e5b", "type": "victron-input-custom", "z": "812b3c1b3d3fa76b", "service": "com.victronenergy.battery/1", "path": "/AlarmFlags/TaM2", "serviceObj": { "service": "com.victronenergy.battery/1", "name": "FZS 48TL200 x2 (1)" }, "pathObj": { "path": "/AlarmFlags/TaM2", "name": "/AlarmFlags/TaM2", "type": "object" }, "name": "", "onlyChanges": false, "x": 310, "y": 200, "wires": [ [ "3f6cc0eea8917fc6" ] ] }, { "id": "21173aa9d7b7a996", "type": "victron-input-custom", "z": "812b3c1b3d3fa76b", "service": "com.victronenergy.battery/1", "path": "/AlarmFlags/Tam", "serviceObj": { "service": "com.victronenergy.battery/1", "name": "FZS 48TL200 x2 (1)" }, "pathObj": { "path": "/AlarmFlags/Tam", "name": "/AlarmFlags/Tam", "type": "object" }, "name": "", "onlyChanges": false, "x": 310, "y": 140, "wires": [ [ "894cd30780eeff13" ] ] }, { "id": "5374532911ad6bbf", "type": "victron-input-custom", "z": "812b3c1b3d3fa76b", "service": "com.victronenergy.battery/1", "path": "/AlarmFlags/TbM2", "serviceObj": { "service": "com.victronenergy.battery/1", "name": "FZS 48TL200 x2 (1)" }, "pathObj": { "path": "/AlarmFlags/TbM2", "name": "/AlarmFlags/TbM2", "type": "object" }, "name": "", "onlyChanges": false, "x": 320, "y": 320, "wires": [ [ "d45457b5810a9327" ] ] }, { "id": "46dff9c084aea665", "type": "victron-input-custom", "z": "812b3c1b3d3fa76b", "service": "com.victronenergy.battery/1", "path": "/AlarmFlags/Tbm", "serviceObj": { "service": "com.victronenergy.battery/1", "name": "FZS 48TL200 x2 (1)" }, "pathObj": { "path": "/AlarmFlags/Tbm", "name": "/AlarmFlags/Tbm", "type": "object" }, "name": "", "onlyChanges": false, "x": 310, "y": 260, "wires": [ [ "c49f4275f033343e" ] ] }, { "id": "030d713b96e8cc5e", "type": "function", "z": "812b3c1b3d3fa76b", "name": "Parse_alarms_and_warnings", "func": "//battery health list\nbattery_health = [];\n\n//alarm list initialization\nTam_list = [];\nTaM2_list=[];\nTbm_list=[];\nTbM2_list=[];\nVBm2_list=[];\nVBM2_list=[];\nIDM2_list=[];\nISOB_list=[];\nMSWE_list=[];\nFUSE_list=[];\nHTRE_list=[];\nTCPE_list=[];\nSTRE_list=[];\nCME_list=[];\nHWFL_list=[];\nHWEM_list=[];\nThM_list=[];\nvsm2_list=[];\nvsM2_list=[];\niCM2_list=[];\niDM2_list=[];\nMID2_list=[];\nHTFS_list=[];\nDATA_list=[];\nLMPA_list=[];\nHEBT_list=[];\n\n//warning list initialization\nTaM1_list=[];\nTbM1_list=[];\nVBm1_list=[];\nVBM1_list=[];\nIDM1_list=[];\nvsm1_list=[];\nvsM1_list=[];\niCM1_list=[];\niDM1_list=[];\nMID1_list=[];\nBLPW_list=[];\nCCBF_list=[];\nAh_W_list=[];\nMPMM_list=[];\nTCdi_list=[];\nLMPW_list=[];\nTOCW_list=[];\n\n//read alarm data\nalarm_Tam = msg.payload.Tam;\nalarm_TaM2 = msg.payload.TaM2;\nalarm_Tbm = msg.payload.Tbm;\nalarm_TbM2 = msg.payload.TbM2;\nalarm_VBm2 = msg.payload.VBm2;\nalarm_VBM2 = msg.payload.VBM2;\nalarm_IDM2 = msg.payload.IDM2;\nalarm_ISOB = msg.payload.ISOB;\nalarm_MSWE = msg.payload.MSWE;\nalarm_FUSE = msg.payload.FUSE;\nalarm_HTRE = msg.payload.HTRE;\nalarm_TCPE = msg.payload.TCPE;\nalarm_STRE = msg.payload.STRE;\nalarm_CME = msg.payload.CME;\nalarm_HWFL = msg.payload.HWFL;\nalarm_HWEM = msg.payload.HWEM;\nalarm_ThM = msg.payload.ThM;\nalarm_vsm2 = msg.payload.vsm2;\nalarm_vsM2 = msg.payload.vsM2;\nalarm_iCM2 = msg.payload.iCM2;\nalarm_iDM2 = msg.payload.iDM2;\nalarm_MID2 = msg.payload.MID2;\nalarm_HTFS = msg.payload.HTFS;\nalarm_DATA = msg.payload.DATA;\nalarm_LMPA = msg.payload.LMPA;\nalarm_HEBT = msg.payload.HEBT;\n\n//read warning data\nwar_TaM1=msg.payload.TaM1;\nwar_TbM1=msg.payload.TbM1;\nwar_VBm1=msg.payload.VBm1;\nwar_VBM1=msg.payload.VBM1;\nwar_IDM1=msg.payload.IDM1;\nwar_vsm1=msg.payload.vsm1;\nwar_vsM1=msg.payload.vsM1;\nwar_iCM1=msg.payload.iCM1;\nwar_iDM1=msg.payload.iDM1;\nwar_MID1=msg.payload.MID1;\nwar_BLPW=msg.payload.BLPW;\nwar_CCBF=msg.payload.CCBF;\nwar_Ah_W=msg.payload.Ah_W;\nwar_MPMM=msg.payload.MPMM;\nwar_TCdi=msg.payload.TCdi;\nwar_LMPW=msg.payload.LMPW;\nwar_TOCW=msg.payload.TOCW;\n\n//equals to the number of battery\nn=alarm_Tam.length;\n\nfor (i = 0; i < n; i++) {\n Tam_list.push(alarm_Tam[i][1][0]);\n TaM2_list.push(alarm_TaM2[i][1][0]);\n Tbm_list.push(alarm_Tbm[i][1][0]);\n TbM2_list.push(alarm_TbM2[i][1][0]);\n VBm2_list.push(alarm_VBm2[i][1][0]);\n VBM2_list.push(alarm_VBM2[i][1][0]);\n IDM2_list.push(alarm_IDM2[i][1][0]);\n ISOB_list.push(alarm_ISOB[i][1][0]);\n MSWE_list.push(alarm_MSWE[i][1][0]);\n FUSE_list.push(alarm_FUSE[i][1][0]);\n HTRE_list.push(alarm_HTRE[i][1][0]);\n TCPE_list.push(alarm_TCPE[i][1][0]);\n STRE_list.push(alarm_STRE[i][1][0]);\n CME_list.push(alarm_CME[i][1][0]);\n HWFL_list.push(alarm_HWFL[i][1][0]);\n HWEM_list.push(alarm_HWEM[i][1][0]);\n ThM_list.push(alarm_ThM[i][1][0]);\n vsm2_list.push(alarm_vsm2[i][1][0]);\n vsM2_list.push(alarm_vsM2[i][1][0]);\n iCM2_list.push(alarm_iCM2[i][1][0]);\n iDM2_list.push(alarm_iDM2[i][1][0]);\n MID2_list.push(alarm_MID2[i][1][0]);\n HTFS_list.push(alarm_HTFS[i][1][0]);\n DATA_list.push(alarm_DATA[i][1][0]);\n LMPA_list.push(alarm_LMPA[i][1][0]);\n HEBT_list.push(alarm_HEBT[i][1][0]);\n \n TaM1_list.push(war_TaM1[i][1][0]);\n TbM1_list.push(war_TbM1[i][1][0]);\n VBm1_list.push(war_VBm1[i][1][0]);\n VBM1_list.push(war_VBM1[i][1][0]);\n IDM1_list.push(war_IDM1[i][1][0]);\n vsm1_list.push(war_vsm1[i][1][0]);\n vsM1_list.push(war_vsM1[i][1][0]);\n iCM1_list.push(war_iCM1[i][1][0]);\n iDM1_list.push(war_iDM1[i][1][0]);\n MID1_list.push(war_TaM1[i][1][0]);\n BLPW_list.push(war_BLPW[i][1][0]);\n CCBF_list.push(war_CCBF[i][1][0]);\n Ah_W_list.push(war_Ah_W[i][1][0]);\n MPMM_list.push(war_MPMM[i][1][0]);\n TCdi_list.push(war_TCdi[i][1][0]);\n LMPW_list.push(war_LMPW[i][1][0]);\n TOCW_list.push(war_TOCW[i][1][0]);\n}\n\nif(Tam_list.includes(\"true\")){\n battery_health.push(\"Recoverable: BMS temperature too low\");\n}else if(TaM2_list.includes(\"true\")){\n battery_health.push(\"Recoverable: BMS temperature too high\");\n}else if(Tbm_list.includes(\"true\")){\n battery_health.push(\"Recoverable: Battery temperature too low\");\n}else if(TbM2_list.includes(\"true\")){\n battery_health.push(\"Recoverable: Battery temperature too high\");\n}else if(VBm2_list.includes(\"true\")){\n battery_health.push(\"Recoverable: Bus voltage too low\");\n}else if(VBM2_list.includes(\"true\")){\n battery_health.push(\"Recoverable: Bus voltage too high\");\n}else if(IDM2_list.includes(\"true\")){\n battery_health.push(\"Recoverable: Discharge current too high\");\n}else if(ISOB_list.includes(\"true\")){\n battery_health.push(\"Unrecoverable: Electrical insulation failure\");\n}else if(MSWE_list.includes(\"true\")){\n battery_health.push(\"Unrecoverable: Main switch failure\");\n}else if(FUSE_list.includes(\"true\")){\n battery_health.push(\"Unrecoverable: Main fuse blown\");\n}else if(HTRE_list.includes(\"true\")){\n battery_health.push(\"Recoverable: Battery failed to warm up\");\n}else if(TCPE_list.includes(\"true\")){\n battery_health.push(\"Unrecoverable: Temperature sensor failure\");\n}else if(STRE_list.includes(\"true\")){\n battery_health.push(\"Recoverable: Voltage measurement circuit fails\");\n}else if(CME_list.includes(\"true\")){\n battery_health.push(\"Recoverable: Current sensor failure\");\n}else if(HWFL_list.includes(\"true\")){\n battery_health.push(\"Recoverable: BMS hardware failure\");\n}else if(HWEM_list.includes(\"true\")){\n battery_health.push(\"Recoverable: Hardware protection tripped\");\n}else if(ThM_list.includes(\"true\")){\n battery_health.push(\"Recoverable: Heatsink temperature too high\");\n}else if(vsm2_list.includes(\"true\")){\n battery_health.push(\"Unrecoverable: Low string voltage failure\");\n}else if(vsM2_list.includes(\"true\")){\n battery_health.push(\"Recoverable: String voltage too high\");\n}else if(iCM2_list.includes(\"true\")){\n battery_health.push(\"Unrecoverable: Charge current too high\");\n}else if(iDM2_list.includes(\"true\")){\n battery_health.push(\"Recoverable: Discharge current too high\");\n}else if(MID2_list.includes(\"true\")){\n battery_health.push(\"Recoverable: String voltage unbalance too high\");\n}else if(HTFS_list.includes(\"true\")){\n battery_health.push(\"Unrecoverable: Heater Fuse Blown\");\n}else if(DATA_list.includes(\"true\")){\n battery_health.push(\"Unrecoverable: Parameters out of range\");\n}else if(LMPA_list.includes(\"true\")){\n battery_health.push(\"Unrecoverable: String voltages unbalance alarm\");\n}else if(HEBT_list.includes(\"true\")){\n battery_health.push(\"Recoverable: Loss of heartbeat\");\n}else if(TaM1_list.includes(\"true\")){\n battery_health.push(\"Warning: BMS temperature high\");\n}else if(TbM1_list.includes(\"true\")){\n battery_health.push(\"Warning: Battery temperature high\");\n}else if(VBm1_list.includes(\"true\")){\n battery_health.push(\"Warning: Bus voltage low\");\n}else if(VBM1_list.includes(\"true\")){\n battery_health.push(\"Warning: Bus voltage high\");\n}else if(IDM1_list.includes(\"true\")){\n battery_health.push(\"Warning: Discharge current high\");\n}else if(vsm1_list.includes(\"true\")){\n battery_health.push(\"Warning: String voltage too low\");\n}else if(vsM1_list.includes(\"true\")){\n battery_health.push(\"Warning: String voltage high\");\n}else if(iCM1_list.includes(\"true\")){\n battery_health.push(\"Warning: Charge current high\");\n}else if(iDM1_list.includes(\"true\")){\n battery_health.push(\"Warning: Discharge current high\");\n}else if(MID1_list.includes(\"true\")){\n battery_health.push(\"Warning: String voltages unbalanced\");\n}else if(BLPW_list.includes(\"true\")){\n battery_health.push(\"Warning: Not enough charging power on bus\");\n}else if(CCBF_list.includes(\"true\")){\n battery_health.push(\"Warning: Internal charger hardware failure\");\n}else if(Ah_W_list.includes(\"true\")){\n battery_health.push(\"Warning: String SOC low\");\n}else if(MPMM_list.includes(\"true\")){\n battery_health.push(\"Warning: Midpoint wiring problem\");\n}else if(TCdi_list.includes(\"true\")){\n battery_health.push(\"Warning: Temperature difference between strings high\");\n}else if(LMPW_list.includes(\"true\")){\n battery_health.push(\"Warning: String voltages unbalance warning\");\n}else if(TOCW_list.includes(\"true\")){\n battery_health.push(\"Warning: Top of Charge requested\");\n}else{\n battery_health.push(\"No warning and no alarm\")\n}\n\nmsg.payload = battery_health;\nreturn msg;", "outputs": 1, "timeout": 0, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 1220, "y": 1700, "wires": [ [ "31d2ccfc88f34577" ] ] }, { "id": "894cd30780eeff13", "type": "change", "z": "812b3c1b3d3fa76b", "name": "Tam", "rules": [ { "t": "set", "p": "topic", "pt": "msg", "to": "Tam", "tot": "str" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 550, "y": 140, "wires": [ [ "a81c3a74b362e5f6" ] ] }, { "id": "a81c3a74b362e5f6", "type": "join", "z": "812b3c1b3d3fa76b", "name": "", "mode": "custom", "build": "object", "property": "payload", "propertyType": "msg", "key": "topic", "joiner": "\\n", "joinerType": "str", "accumulate": true, "timeout": "", "count": "43", "reduceRight": false, "reduceExp": "", "reduceInit": "", "reduceInitType": "", "reduceFixup": "", "x": 980, "y": 1700, "wires": [ [ "030d713b96e8cc5e" ] ] }, { "id": "3f6cc0eea8917fc6", "type": "change", "z": "812b3c1b3d3fa76b", "name": "TaM2", "rules": [ { "t": "set", "p": "topic", "pt": "msg", "to": "TaM2", "tot": "str" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 550, "y": 200, "wires": [ [ "a81c3a74b362e5f6" ] ] }, { "id": "31d2ccfc88f34577", "type": "ui_text", "z": "812b3c1b3d3fa76b", "group": "e177392401620838", "order": 4, "width": 0, "height": 0, "name": "", "label": "Warnings and Alarms", "format": "{{msg.payload}}", "layout": "row-spread", "className": "", "style": false, "font": "Arial,Arial,Helvetica,sans-serif", "fontSize": "20", "color": "#000000", "x": 1520, "y": 1700, "wires": [] }, { "id": "c49f4275f033343e", "type": "change", "z": "812b3c1b3d3fa76b", "name": "Tbm", "rules": [ { "t": "set", "p": "topic", "pt": "msg", "to": "Tbm", "tot": "str" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 550, "y": 260, "wires": [ [ "a81c3a74b362e5f6" ] ] }, { "id": "994d8e0ea718bc6d", "type": "victron-input-custom", "z": "812b3c1b3d3fa76b", "service": "com.victronenergy.battery/1", "path": "/AlarmFlags/VBm2", "serviceObj": { "service": "com.victronenergy.battery/1", "name": "FZS 48TL200 x2 (1)" }, "pathObj": { "path": "/AlarmFlags/VBm2", "name": "/AlarmFlags/VBm2", "type": "object" }, "name": "", "onlyChanges": false, "x": 320, "y": 380, "wires": [ [ "18bd214be6e83186" ] ] }, { "id": "bfe694db786e0b7b", "type": "victron-input-custom", "z": "812b3c1b3d3fa76b", "service": "com.victronenergy.battery/1", "path": "/AlarmFlags/VBM2", "serviceObj": { "service": "com.victronenergy.battery/1", "name": "FZS 48TL200 x2 (1)" }, "pathObj": { "path": "/AlarmFlags/VBM2", "name": "/AlarmFlags/VBM2", "type": "object" }, "name": "", "onlyChanges": false, "x": 320, "y": 440, "wires": [ [ "0fbc9bb6fb67ec89" ] ] }, { "id": "09eb3b6ca994d987", "type": "victron-input-custom", "z": "812b3c1b3d3fa76b", "service": "com.victronenergy.battery/1", "path": "/AlarmFlags/ThM", "serviceObj": { "service": "com.victronenergy.battery/1", "name": "FZS 48TL200 x2 (1)" }, "pathObj": { "path": "/AlarmFlags/ThM", "name": "/AlarmFlags/ThM", "type": "object" }, "name": "", "onlyChanges": false, "x": 310, "y": 1100, "wires": [ [ "1b1f83e8b2991535" ] ] }, { "id": "1de58d8c4751e1be", "type": "victron-input-custom", "z": "812b3c1b3d3fa76b", "service": "com.victronenergy.battery/1", "path": "/AlarmFlags/vsm2", "serviceObj": { "service": "com.victronenergy.battery/1", "name": "FZS 48TL200 x2 (1)" }, "pathObj": { "path": "/AlarmFlags/vsm2", "name": "/AlarmFlags/vsm2", "type": "object" }, "name": "", "onlyChanges": false, "x": 310, "y": 1160, "wires": [ [ "1b0e39d1628ab7bd" ] ] }, { "id": "ec723389362c7503", "type": "victron-input-custom", "z": "812b3c1b3d3fa76b", "service": "com.victronenergy.battery/1", "path": "/AlarmFlags/vsM2", "serviceObj": { "service": "com.victronenergy.battery/1", "name": "FZS 48TL200 x2 (1)" }, "pathObj": { "path": "/AlarmFlags/vsM2", "name": "/AlarmFlags/vsM2", "type": "object" }, "name": "", "onlyChanges": false, "x": 310, "y": 1220, "wires": [ [ "c7ecd3f162a8522d" ] ] }, { "id": "112f05465eebdf01", "type": "victron-input-custom", "z": "812b3c1b3d3fa76b", "service": "com.victronenergy.battery/1", "path": "/AlarmFlags/iCM2", "serviceObj": { "service": "com.victronenergy.battery/1", "name": "FZS 48TL200 x2 (1)" }, "pathObj": { "path": "/AlarmFlags/iCM2", "name": "/AlarmFlags/iCM2", "type": "object" }, "name": "", "onlyChanges": false, "x": 310, "y": 1280, "wires": [ [ "755ac176bd905084" ] ] }, { "id": "72455b894e977db6", "type": "victron-input-custom", "z": "812b3c1b3d3fa76b", "service": "com.victronenergy.battery/1", "path": "/AlarmFlags/iDM2", "serviceObj": { "service": "com.victronenergy.battery/1", "name": "FZS 48TL200 x2 (1)" }, "pathObj": { "path": "/AlarmFlags/iDM2", "name": "/AlarmFlags/iDM2", "type": "object" }, "name": "", "onlyChanges": false, "x": 310, "y": 1340, "wires": [ [ "c8d63cbf665caf02" ] ] }, { "id": "d45457b5810a9327", "type": "change", "z": "812b3c1b3d3fa76b", "name": "TbM2", "rules": [ { "t": "set", "p": "topic", "pt": "msg", "to": "TbM2", "tot": "str" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 550, "y": 320, "wires": [ [ "a81c3a74b362e5f6" ] ] }, { "id": "18bd214be6e83186", "type": "change", "z": "812b3c1b3d3fa76b", "name": "VBm2", "rules": [ { "t": "set", "p": "topic", "pt": "msg", "to": "VBm2", "tot": "str" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 550, "y": 380, "wires": [ [ "a81c3a74b362e5f6" ] ] }, { "id": "0fbc9bb6fb67ec89", "type": "change", "z": "812b3c1b3d3fa76b", "name": "VBM2", "rules": [ { "t": "set", "p": "topic", "pt": "msg", "to": "VBM2", "tot": "str" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 550, "y": 440, "wires": [ [ "a81c3a74b362e5f6" ] ] }, { "id": "4f4f5ad0a98541db", "type": "change", "z": "812b3c1b3d3fa76b", "name": "IDM2", "rules": [ { "t": "set", "p": "topic", "pt": "msg", "to": "IDM2", "tot": "str" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 550, "y": 500, "wires": [ [ "a81c3a74b362e5f6" ] ] }, { "id": "23008a02e8e7da76", "type": "change", "z": "812b3c1b3d3fa76b", "name": "ISOB", "rules": [ { "t": "set", "p": "topic", "pt": "msg", "to": "ISOB", "tot": "str" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 550, "y": 560, "wires": [ [ "a81c3a74b362e5f6" ] ] }, { "id": "e104c979769c9e92", "type": "change", "z": "812b3c1b3d3fa76b", "name": "MSWE", "rules": [ { "t": "set", "p": "topic", "pt": "msg", "to": "MSWE", "tot": "str" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 560, "y": 620, "wires": [ [ "a81c3a74b362e5f6" ] ] }, { "id": "f3e5be9d70303fd9", "type": "change", "z": "812b3c1b3d3fa76b", "name": "FUSE", "rules": [ { "t": "set", "p": "topic", "pt": "msg", "to": "FUSE", "tot": "str" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 550, "y": 680, "wires": [ [ "a81c3a74b362e5f6" ] ] }, { "id": "c54215196b096586", "type": "change", "z": "812b3c1b3d3fa76b", "name": "HTRE", "rules": [ { "t": "set", "p": "topic", "pt": "msg", "to": "HTRE", "tot": "str" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 550, "y": 740, "wires": [ [ "a81c3a74b362e5f6" ] ] }, { "id": "9603499ff1d02af5", "type": "change", "z": "812b3c1b3d3fa76b", "name": "TCPE", "rules": [ { "t": "set", "p": "topic", "pt": "msg", "to": "TCPE", "tot": "str" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 550, "y": 800, "wires": [ [ "a81c3a74b362e5f6" ] ] }, { "id": "00b4380b1ae68023", "type": "change", "z": "812b3c1b3d3fa76b", "name": "STRE", "rules": [ { "t": "set", "p": "topic", "pt": "msg", "to": "STRE", "tot": "str" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 550, "y": 860, "wires": [ [ "a81c3a74b362e5f6" ] ] }, { "id": "644fd6453eeca4be", "type": "change", "z": "812b3c1b3d3fa76b", "name": "CME", "rules": [ { "t": "set", "p": "topic", "pt": "msg", "to": "CME", "tot": "str" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 550, "y": 920, "wires": [ [ "a81c3a74b362e5f6" ] ] }, { "id": "478c1c46dcd45a31", "type": "change", "z": "812b3c1b3d3fa76b", "name": "HWFL", "rules": [ { "t": "set", "p": "topic", "pt": "msg", "to": "HWFL", "tot": "str" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 550, "y": 980, "wires": [ [ "a81c3a74b362e5f6" ] ] }, { "id": "8f8fd0429cee609e", "type": "change", "z": "812b3c1b3d3fa76b", "name": "HWEM", "rules": [ { "t": "set", "p": "topic", "pt": "msg", "to": "HWEM", "tot": "str" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 560, "y": 1040, "wires": [ [ "a81c3a74b362e5f6" ] ] }, { "id": "1b1f83e8b2991535", "type": "change", "z": "812b3c1b3d3fa76b", "name": "ThM", "rules": [ { "t": "set", "p": "topic", "pt": "msg", "to": "ThM", "tot": "str" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 550, "y": 1100, "wires": [ [ "a81c3a74b362e5f6" ] ] }, { "id": "1b0e39d1628ab7bd", "type": "change", "z": "812b3c1b3d3fa76b", "name": "vsm2", "rules": [ { "t": "set", "p": "topic", "pt": "msg", "to": "vsm2", "tot": "str" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 550, "y": 1160, "wires": [ [ "a81c3a74b362e5f6" ] ] }, { "id": "c7ecd3f162a8522d", "type": "change", "z": "812b3c1b3d3fa76b", "name": "vsM2", "rules": [ { "t": "set", "p": "topic", "pt": "msg", "to": "vsM2", "tot": "str" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 550, "y": 1220, "wires": [ [ "a81c3a74b362e5f6" ] ] }, { "id": "755ac176bd905084", "type": "change", "z": "812b3c1b3d3fa76b", "name": "iCM2", "rules": [ { "t": "set", "p": "topic", "pt": "msg", "to": "iCM2", "tot": "str" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 550, "y": 1280, "wires": [ [ "a81c3a74b362e5f6" ] ] }, { "id": "c8d63cbf665caf02", "type": "change", "z": "812b3c1b3d3fa76b", "name": "iDM2", "rules": [ { "t": "set", "p": "topic", "pt": "msg", "to": "iDM2", "tot": "str" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 550, "y": 1340, "wires": [ [ "a81c3a74b362e5f6" ] ] }, { "id": "943a0ba24db0fab4", "type": "change", "z": "812b3c1b3d3fa76b", "name": "MID2", "rules": [ { "t": "set", "p": "topic", "pt": "msg", "to": "MID2", "tot": "str" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 550, "y": 1380, "wires": [ [ "a81c3a74b362e5f6" ] ] }, { "id": "e996de028f2a9e80", "type": "change", "z": "812b3c1b3d3fa76b", "name": "HTFS", "rules": [ { "t": "set", "p": "topic", "pt": "msg", "to": "HTFS", "tot": "str" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 550, "y": 1440, "wires": [ [ "a81c3a74b362e5f6" ] ] }, { "id": "30d43b7beebf9bb9", "type": "change", "z": "812b3c1b3d3fa76b", "name": "DATA", "rules": [ { "t": "set", "p": "topic", "pt": "msg", "to": "DATA", "tot": "str" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 550, "y": 1480, "wires": [ [ "a81c3a74b362e5f6" ] ] }, { "id": "87e8ae20b843c381", "type": "change", "z": "812b3c1b3d3fa76b", "name": "LMPA", "rules": [ { "t": "set", "p": "topic", "pt": "msg", "to": "LMPA", "tot": "str" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 550, "y": 1540, "wires": [ [ "a81c3a74b362e5f6" ] ] }, { "id": "b22ce8dbee5ca745", "type": "change", "z": "812b3c1b3d3fa76b", "name": "HEBT", "rules": [ { "t": "set", "p": "topic", "pt": "msg", "to": "HEBT", "tot": "str" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 550, "y": 1580, "wires": [ [ "a81c3a74b362e5f6" ] ] }, { "id": "4b522112c9a3e00e", "type": "victron-input-custom", "z": "812b3c1b3d3fa76b", "service": "com.victronenergy.battery/1", "path": "/WarningFlags/TaM1", "serviceObj": { "service": "com.victronenergy.battery/1", "name": "FZS 48TL200 x2 (1)" }, "pathObj": { "path": "/WarningFlags/TaM1", "name": "/WarningFlags/TaM1", "type": "object" }, "name": "", "onlyChanges": false, "x": 320, "y": 1700, "wires": [ [ "d51013c9024393c2" ] ] }, { "id": "0b0601f7912f4ded", "type": "comment", "z": "812b3c1b3d3fa76b", "name": "Parse Warnings: 17", "info": "", "x": 250, "y": 1660, "wires": [] }, { "id": "b04314be6aa4d486", "type": "victron-input-custom", "z": "812b3c1b3d3fa76b", "service": "com.victronenergy.battery/1", "path": "/WarningFlags/TbM1", "serviceObj": { "service": "com.victronenergy.battery/1", "name": "FZS 48TL200 x2 (1)" }, "pathObj": { "path": "/WarningFlags/TbM1", "name": "/WarningFlags/TbM1", "type": "object" }, "name": "", "onlyChanges": false, "x": 320, "y": 1760, "wires": [ [ "44369ffe6af08526" ] ] }, { "id": "dd9526f3fae49939", "type": "victron-input-custom", "z": "812b3c1b3d3fa76b", "service": "com.victronenergy.battery/1", "path": "/WarningFlags/VBm1", "serviceObj": { "service": "com.victronenergy.battery/1", "name": "FZS 48TL200 x2 (1)" }, "pathObj": { "path": "/WarningFlags/VBm1", "name": "/WarningFlags/VBm1", "type": "object" }, "name": "", "onlyChanges": false, "x": 320, "y": 1820, "wires": [ [ "9a0ad343ba27a8d8" ] ] }, { "id": "927c6342055e28b3", "type": "victron-input-custom", "z": "812b3c1b3d3fa76b", "service": "com.victronenergy.battery/1", "path": "/WarningFlags/VBM1", "serviceObj": { "service": "com.victronenergy.battery/1", "name": "FZS 48TL200 x2 (1)" }, "pathObj": { "path": "/WarningFlags/VBM1", "name": "/WarningFlags/VBM1", "type": "object" }, "name": "", "onlyChanges": false, "x": 320, "y": 1880, "wires": [ [ "e77dad2d329159c7" ] ] }, { "id": "9faf41489bfa5cb7", "type": "victron-input-custom", "z": "812b3c1b3d3fa76b", "service": "com.victronenergy.battery/1", "path": "/WarningFlags/IDM1", "serviceObj": { "service": "com.victronenergy.battery/1", "name": "FZS 48TL200 x2 (1)" }, "pathObj": { "path": "/WarningFlags/IDM1", "name": "/WarningFlags/IDM1", "type": "object" }, "name": "", "onlyChanges": false, "x": 320, "y": 1940, "wires": [ [ "40f85c56d33f4c07" ] ] }, { "id": "69cd4e171b1e45f4", "type": "victron-input-custom", "z": "812b3c1b3d3fa76b", "service": "com.victronenergy.battery/1", "path": "/WarningFlags/vsm1", "serviceObj": { "service": "com.victronenergy.battery/1", "name": "FZS 48TL200 x2 (1)" }, "pathObj": { "path": "/WarningFlags/vsm1", "name": "/WarningFlags/vsm1", "type": "object" }, "name": "", "onlyChanges": false, "x": 320, "y": 2000, "wires": [ [ "0e04636407a5958a" ] ] }, { "id": "9b2ed9f2d58f6366", "type": "victron-input-custom", "z": "812b3c1b3d3fa76b", "service": "com.victronenergy.battery/1", "path": "/WarningFlags/vsM1", "serviceObj": { "service": "com.victronenergy.battery/1", "name": "FZS 48TL200 x2 (1)" }, "pathObj": { "path": "/WarningFlags/vsM1", "name": "/WarningFlags/vsM1", "type": "object" }, "name": "", "onlyChanges": false, "x": 320, "y": 2060, "wires": [ [ "f8aeb00b6b7b7507" ] ] }, { "id": "d9809a44cf6f943d", "type": "victron-input-custom", "z": "812b3c1b3d3fa76b", "service": "com.victronenergy.battery/1", "path": "/WarningFlags/iCM1", "serviceObj": { "service": "com.victronenergy.battery/1", "name": "FZS 48TL200 x2 (1)" }, "pathObj": { "path": "/WarningFlags/iCM1", "name": "/WarningFlags/iCM1", "type": "object" }, "name": "", "onlyChanges": false, "x": 320, "y": 2120, "wires": [ [ "9e849ea69b4c800c" ] ] }, { "id": "e96a379add9c8cf7", "type": "victron-input-custom", "z": "812b3c1b3d3fa76b", "service": "com.victronenergy.battery/1", "path": "/WarningFlags/iDM1", "serviceObj": { "service": "com.victronenergy.battery/1", "name": "FZS 48TL200 x2 (1)" }, "pathObj": { "path": "/WarningFlags/iDM1", "name": "/WarningFlags/iDM1", "type": "object" }, "name": "", "onlyChanges": false, "x": 320, "y": 2180, "wires": [ [ "b6c5033f770dd82e" ] ] }, { "id": "8af913c74e11c847", "type": "victron-input-custom", "z": "812b3c1b3d3fa76b", "service": "com.victronenergy.battery/1", "path": "/WarningFlags/MID1", "serviceObj": { "service": "com.victronenergy.battery/1", "name": "FZS 48TL200 x2 (1)" }, "pathObj": { "path": "/WarningFlags/MID1", "name": "/WarningFlags/MID1", "type": "object" }, "name": "", "onlyChanges": false, "x": 320, "y": 2240, "wires": [ [ "d7023b57a6070ec2" ] ] }, { "id": "7804c68a85f2d79d", "type": "victron-input-custom", "z": "812b3c1b3d3fa76b", "service": "com.victronenergy.battery/1", "path": "/WarningFlags/BLPW", "serviceObj": { "service": "com.victronenergy.battery/1", "name": "FZS 48TL200 x2 (1)" }, "pathObj": { "path": "/WarningFlags/BLPW", "name": "/WarningFlags/BLPW", "type": "object" }, "name": "", "onlyChanges": false, "x": 320, "y": 2300, "wires": [ [ "1e50dc0d0b135ae7" ] ] }, { "id": "f6c2902c5b53eff4", "type": "victron-input-custom", "z": "812b3c1b3d3fa76b", "service": "com.victronenergy.battery/1", "path": "/WarningFlags/CCBF", "serviceObj": { "service": "com.victronenergy.battery/1", "name": "FZS 48TL200 x2 (1)" }, "pathObj": { "path": "/WarningFlags/CCBF", "name": "/WarningFlags/CCBF", "type": "object" }, "name": "", "onlyChanges": false, "x": 320, "y": 2360, "wires": [ [ "8a84c7dd92f14c6c" ] ] }, { "id": "fab0d9eba4a64aac", "type": "victron-input-custom", "z": "812b3c1b3d3fa76b", "service": "com.victronenergy.battery/1", "path": "/WarningFlags/Ah_W", "serviceObj": { "service": "com.victronenergy.battery/1", "name": "FZS 48TL200 x2 (1)" }, "pathObj": { "path": "/WarningFlags/Ah_W", "name": "/WarningFlags/Ah_W", "type": "object" }, "name": "", "onlyChanges": false, "x": 320, "y": 2420, "wires": [ [ "5e1d4266f1aca1b2" ] ] }, { "id": "b475f90f9e578717", "type": "victron-input-custom", "z": "812b3c1b3d3fa76b", "service": "com.victronenergy.battery/1", "path": "/WarningFlags/MPMM", "serviceObj": { "service": "com.victronenergy.battery/1", "name": "FZS 48TL200 x2 (1)" }, "pathObj": { "path": "/WarningFlags/MPMM", "name": "/WarningFlags/MPMM", "type": "object" }, "name": "", "onlyChanges": false, "x": 330, "y": 2480, "wires": [ [ "bffcd0ca2610ae9d" ] ] }, { "id": "f6c914a6970ff165", "type": "victron-input-custom", "z": "812b3c1b3d3fa76b", "service": "com.victronenergy.battery/1", "path": "/WarningFlags/TCdi", "serviceObj": { "service": "com.victronenergy.battery/1", "name": "FZS 48TL200 x2 (1)" }, "pathObj": { "path": "/WarningFlags/TCdi", "name": "/WarningFlags/TCdi", "type": "object" }, "name": "", "onlyChanges": false, "x": 320, "y": 2540, "wires": [ [ "2f1ff34c055b36ca" ] ] }, { "id": "2e8241d774096460", "type": "victron-input-custom", "z": "812b3c1b3d3fa76b", "service": "com.victronenergy.battery/1", "path": "/WarningFlags/LMPW", "serviceObj": { "service": "com.victronenergy.battery/1", "name": "FZS 48TL200 x2 (1)" }, "pathObj": { "path": "/WarningFlags/LMPW", "name": "/WarningFlags/LMPW", "type": "object" }, "name": "", "onlyChanges": false, "x": 330, "y": 2600, "wires": [ [ "7ddee613ebbb38a7" ] ] }, { "id": "cce2f7beba26a94e", "type": "victron-input-custom", "z": "812b3c1b3d3fa76b", "service": "com.victronenergy.battery/1", "path": "/WarningFlags/TOCW", "serviceObj": { "service": "com.victronenergy.battery/1", "name": "FZS 48TL200 x2 (1)" }, "pathObj": { "path": "/WarningFlags/TOCW", "name": "/WarningFlags/TOCW", "type": "object" }, "name": "", "onlyChanges": false, "x": 330, "y": 2660, "wires": [ [ "b7e75846443cc632" ] ] }, { "id": "d51013c9024393c2", "type": "change", "z": "812b3c1b3d3fa76b", "name": "TaM1", "rules": [ { "t": "set", "p": "topic", "pt": "msg", "to": "TaM1", "tot": "str" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 550, "y": 1700, "wires": [ [ "a81c3a74b362e5f6" ] ] }, { "id": "44369ffe6af08526", "type": "change", "z": "812b3c1b3d3fa76b", "name": "TbM1", "rules": [ { "t": "set", "p": "topic", "pt": "msg", "to": "TbM1", "tot": "str" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 550, "y": 1760, "wires": [ [ "a81c3a74b362e5f6" ] ] }, { "id": "9a0ad343ba27a8d8", "type": "change", "z": "812b3c1b3d3fa76b", "name": "VBm1", "rules": [ { "t": "set", "p": "topic", "pt": "msg", "to": "VBm1", "tot": "str" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 550, "y": 1820, "wires": [ [ "a81c3a74b362e5f6" ] ] }, { "id": "e77dad2d329159c7", "type": "change", "z": "812b3c1b3d3fa76b", "name": "VBM1", "rules": [ { "t": "set", "p": "topic", "pt": "msg", "to": "VBM1", "tot": "str" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 550, "y": 1880, "wires": [ [ "a81c3a74b362e5f6" ] ] }, { "id": "40f85c56d33f4c07", "type": "change", "z": "812b3c1b3d3fa76b", "name": "IDM1", "rules": [ { "t": "set", "p": "topic", "pt": "msg", "to": "IDM1", "tot": "str" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 550, "y": 1940, "wires": [ [ "a81c3a74b362e5f6" ] ] }, { "id": "0e04636407a5958a", "type": "change", "z": "812b3c1b3d3fa76b", "name": "vsm1", "rules": [ { "t": "set", "p": "topic", "pt": "msg", "to": "vsm1", "tot": "str" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 550, "y": 2000, "wires": [ [ "a81c3a74b362e5f6" ] ] }, { "id": "f8aeb00b6b7b7507", "type": "change", "z": "812b3c1b3d3fa76b", "name": "vsM1", "rules": [ { "t": "set", "p": "topic", "pt": "msg", "to": "vsM1", "tot": "str" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 550, "y": 2060, "wires": [ [ "a81c3a74b362e5f6" ] ] }, { "id": "9e849ea69b4c800c", "type": "change", "z": "812b3c1b3d3fa76b", "name": "iCM1", "rules": [ { "t": "set", "p": "topic", "pt": "msg", "to": "iCM1", "tot": "str" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 550, "y": 2120, "wires": [ [ "a81c3a74b362e5f6" ] ] }, { "id": "b6c5033f770dd82e", "type": "change", "z": "812b3c1b3d3fa76b", "name": "iDM1", "rules": [ { "t": "set", "p": "topic", "pt": "msg", "to": "iDM1", "tot": "str" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 550, "y": 2180, "wires": [ [ "a81c3a74b362e5f6" ] ] }, { "id": "d7023b57a6070ec2", "type": "change", "z": "812b3c1b3d3fa76b", "name": "MID1", "rules": [ { "t": "set", "p": "topic", "pt": "msg", "to": "MID1", "tot": "str" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 550, "y": 2240, "wires": [ [ "a81c3a74b362e5f6" ] ] }, { "id": "1e50dc0d0b135ae7", "type": "change", "z": "812b3c1b3d3fa76b", "name": "BLPW", "rules": [ { "t": "set", "p": "topic", "pt": "msg", "to": "BLPW", "tot": "str" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 550, "y": 2300, "wires": [ [ "a81c3a74b362e5f6" ] ] }, { "id": "8a84c7dd92f14c6c", "type": "change", "z": "812b3c1b3d3fa76b", "name": "CCBF", "rules": [ { "t": "set", "p": "topic", "pt": "msg", "to": "CCBF", "tot": "str" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 550, "y": 2360, "wires": [ [ "a81c3a74b362e5f6" ] ] }, { "id": "5e1d4266f1aca1b2", "type": "change", "z": "812b3c1b3d3fa76b", "name": "Ah_W", "rules": [ { "t": "set", "p": "topic", "pt": "msg", "to": "Ah_W", "tot": "str" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 550, "y": 2420, "wires": [ [ "a81c3a74b362e5f6" ] ] }, { "id": "bffcd0ca2610ae9d", "type": "change", "z": "812b3c1b3d3fa76b", "name": "MPMM", "rules": [ { "t": "set", "p": "topic", "pt": "msg", "to": "MPMM", "tot": "str" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 580, "y": 2480, "wires": [ [ "a81c3a74b362e5f6" ] ] }, { "id": "2f1ff34c055b36ca", "type": "change", "z": "812b3c1b3d3fa76b", "name": "TCdi", "rules": [ { "t": "set", "p": "topic", "pt": "msg", "to": "TCdi", "tot": "str" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 550, "y": 2540, "wires": [ [ "a81c3a74b362e5f6" ] ] }, { "id": "7ddee613ebbb38a7", "type": "change", "z": "812b3c1b3d3fa76b", "name": "LMPW", "rules": [ { "t": "set", "p": "topic", "pt": "msg", "to": "LMPW", "tot": "str" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 570, "y": 2600, "wires": [ [ "a81c3a74b362e5f6" ] ] }, { "id": "b7e75846443cc632", "type": "change", "z": "812b3c1b3d3fa76b", "name": "TOCW", "rules": [ { "t": "set", "p": "topic", "pt": "msg", "to": "TOCW", "tot": "str" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 570, "y": 2660, "wires": [ [ "a81c3a74b362e5f6" ] ] }, { "id": "b24e3f9e55310caa", "type": "ui_text_input", "z": "dd75eef8547a776f", "name": "Grid Setpoint", "label": "Grid Setpoint", "tooltip": "", "group": "3290bd5996bd3175", "order": 1, "width": 0, "height": 0, "passthru": true, "mode": "number", "delay": "0", "topic": "topic", "sendOnBlur": false, "className": "", "topicType": "msg", "x": 710, "y": 320, "wires": [ [ "c0d1f3cc766406f9" ] ] }, { "id": "c0d1f3cc766406f9", "type": "victron-output-custom", "z": "dd75eef8547a776f", "service": "com.victronenergy.settings", "path": "/Settings/CGwacs/AcPowerSetPoint", "serviceObj": { "service": "com.victronenergy.settings", "name": "com.victronenergy.settings" }, "pathObj": { "path": "/Settings/CGwacs/AcPowerSetPoint", "name": "/Settings/CGwacs/AcPowerSetPoint", "type": "number" }, "name": "", "onlyChanges": false, "x": 1070, "y": 320, "wires": [] }, { "id": "7aa9ca6b5a7a4b84", "type": "victron-input-custom", "z": "dd75eef8547a776f", "service": "com.victronenergy.settings", "path": "/Settings/CGwacs/AcPowerSetPoint", "serviceObj": { "service": "com.victronenergy.settings", "name": "com.victronenergy.settings" }, "pathObj": { "path": "/Settings/CGwacs/AcPowerSetPoint", "name": "/Settings/CGwacs/AcPowerSetPoint", "type": "number" }, "name": "", "onlyChanges": true, "x": 350, "y": 320, "wires": [ [ "b24e3f9e55310caa" ] ] }, { "id": "351a4c8e3b05e80b", "type": "victron-input-custom", "z": "dd75eef8547a776f", "service": "com.victronenergy.settings", "path": "/Settings/CGwacs/BatteryLife/MinimumSocLimit", "serviceObj": { "service": "com.victronenergy.settings", "name": "com.victronenergy.settings" }, "pathObj": { "path": "/Settings/CGwacs/BatteryLife/MinimumSocLimit", "name": "/Settings/CGwacs/BatteryLife/MinimumSocLimit", "type": "number" }, "name": "", "onlyChanges": true, "x": 390, "y": 380, "wires": [ [ "ccfa1e9e74d45f5d" ] ] }, { "id": "ccfa1e9e74d45f5d", "type": "ui_text_input", "z": "dd75eef8547a776f", "name": "Min SOC", "label": "Min SOC", "tooltip": "", "group": "3290bd5996bd3175", "order": 2, "width": 0, "height": 0, "passthru": true, "mode": "number", "delay": "0", "topic": "topic", "sendOnBlur": false, "className": "", "topicType": "msg", "x": 760, "y": 380, "wires": [ [ "11baf8f4cdfc9eed" ] ] }, { "id": "11baf8f4cdfc9eed", "type": "victron-output-custom", "z": "dd75eef8547a776f", "service": "com.victronenergy.settings", "path": "/Settings/CGwacs/BatteryLife/MinimumSocLimit", "serviceObj": { "service": "com.victronenergy.settings", "name": "com.victronenergy.settings" }, "pathObj": { "path": "/Settings/CGwacs/BatteryLife/MinimumSocLimit", "name": "/Settings/CGwacs/BatteryLife/MinimumSocLimit", "type": "number" }, "name": "", "onlyChanges": false, "x": 1130, "y": 380, "wires": [] }, { "id": "6397816a6019c94c", "type": "ui_template", "z": "dd75eef8547a776f", "group": "e177392401620838", "name": "Battery Monitor", "order": 5, "width": 0, "height": 0, "format": "<a href=\"https://monitor.innov.energy/salidomo_installations/list/\" target=\"_blank\" class=\"button\"> Battery Monitor </a>\n", "storeOutMessages": true, "fwdInMessages": true, "resendOnRefresh": true, "templateScope": "local", "className": "", "x": 200, "y": 480, "wires": [ [] ], "icon": "node-red/arrow-in.svg" } ]