[ { "id": "13c93906.416317", "type": "tab", "label": "Flow 1", "disabled": false, "info": "" }, { "id": "5037b7f7.c57d28", "type": "server-state-changed", "z": "13c93906.416317", "name": "Manual charge", "server": "3e613117.408b3e", "version": 3, "exposeToHomeAssistant": false, "haConfig": [ { "property": "name", "value": "" }, { "property": "icon", "value": "" } ], "entityidfilter": "switch.charge_batteries", "entityidfiltertype": "exact", "outputinitially": true, "state_type": "habool", "haltifstate": "true", "halt_if_type": "bool", "halt_if_compare": "is", "outputs": 2, "output_only_on_state_change": true, "for": 0, "forType": "num", "forUnits": "minutes", "ignorePrevStateNull": false, "ignorePrevStateUnknown": false, "ignorePrevStateUnavailable": false, "ignoreCurrentStateUnknown": false, "ignoreCurrentStateUnavailable": false, "outputProperties": [ { "property": "payload", "propertyType": "msg", "value": "", "valueType": "entityState" }, { "property": "data", "propertyType": "msg", "value": "", "valueType": "eventData" }, { "property": "topic", "propertyType": "msg", "value": "", "valueType": "triggerId" } ], "x": 150, "y": 140, "wires": [ [ "3d808f4b.25c28" ], [ "f67495da.0c3388", "1c9c1179.22442f" ] ] }, { "id": "72f1373f.676038", "type": "api-call-service", "z": "13c93906.416317", "name": "Setpoint", "server": "3e613117.408b3e", "version": 3, "debugenabled": false, "service_domain": "modbus", "service": "write_register", "entityId": "", "data": "{\"hub\":\"victron\",\"unit\":100,\"address\":2700}", "dataType": "json", "mergecontext": "", "mustacheAltTags": false, "outputProperties": [], "queue": "last", "x": 680, "y": 40, "wires": [ [] ] }, { "id": "3d808f4b.25c28", "type": "change", "z": "13c93906.416317", "name": "value=3500", "rules": [ { "t": "set", "p": "payload", "pt": "msg", "to": "{\"data\":{\"value\":3500}}", "tot": "json" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 370, "y": 40, "wires": [ [ "72f1373f.676038" ] ] }, { "id": "f67495da.0c3388", "type": "change", "z": "13c93906.416317", "name": "value=10", "rules": [ { "t": "set", "p": "payload", "pt": "msg", "to": "{\"data\":{\"value\":10}}", "tot": "json" }, { "t": "set", "p": "data", "pt": "msg", "to": "null", "tot": "jsonata" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 380, "y": 120, "wires": [ [ "72f1373f.676038" ] ] }, { "id": "1e26db2f.d8da45", "type": "server-state-changed", "z": "13c93906.416317", "name": "SOC % changed", "server": "3e613117.408b3e", "version": 3, "exposeToHomeAssistant": false, "haConfig": [ { "property": "name", "value": "" }, { "property": "icon", "value": "" } ], "entityidfilter": "sensor.battery_charge", "entityidfiltertype": "exact", "outputinitially": false, "state_type": "num", "haltifstate": "55", "halt_if_type": "num", "halt_if_compare": "gte", "outputs": 2, "output_only_on_state_change": true, "for": 0, "forType": "num", "forUnits": "minutes", "ignorePrevStateNull": false, "ignorePrevStateUnknown": false, "ignorePrevStateUnavailable": false, "ignoreCurrentStateUnknown": false, "ignoreCurrentStateUnavailable": false, "outputProperties": [ { "property": "SOC", "propertyType": "msg", "value": "", "valueType": "entityState" } ], "x": 140, "y": 320, "wires": [ [ "a5deebf5.37bf58" ], [] ] }, { "id": "1c9c1179.22442f", "type": "api-call-service", "z": "13c93906.416317", "name": "Switch off", "server": "3e613117.408b3e", "version": 3, "debugenabled": false, "service_domain": "switch", "service": "turn_off", "entityId": "switch.charge_batteries", "data": "", "dataType": "jsonata", "mergecontext": "", "mustacheAltTags": false, "outputProperties": [], "queue": "last", "x": 680, "y": 220, "wires": [ [] ] }, { "id": "a5deebf5.37bf58", "type": "api-current-state", "z": "13c93906.416317", "name": "Only if charging", "server": "3e613117.408b3e", "version": 2, "outputs": 2, "halt_if": "true", "halt_if_type": "bool", "halt_if_compare": "is", "entity_id": "switch.charge_batteries", "state_type": "habool", "blockInputOverrides": false, "outputProperties": [ { "property": "payload", "propertyType": "msg", "value": "", "valueType": "entityState" }, { "property": "data", "propertyType": "msg", "value": "", "valueType": "entity" } ], "override_topic": false, "state_location": "payload", "override_payload": "msg", "entity_location": "data", "override_data": "msg", "x": 340, "y": 320, "wires": [ [ "5092a0af.9a918" ], [] ] }, { "id": "5092a0af.9a918", "type": "api-current-state", "z": "13c93906.416317", "name": "Reached Target?", "server": "3e613117.408b3e", "version": 2, "outputs": 2, "halt_if": "SOC", "halt_if_type": "msg", "halt_if_compare": "lte", "entity_id": "input_number.finish_charge", "state_type": "num", "blockInputOverrides": false, "outputProperties": [ { "property": "Target", "propertyType": "msg", "value": "", "valueType": "entityState" }, { "property": "data", "propertyType": "msg", "value": "null", "valueType": "jsonata" } ], "override_topic": false, "state_location": "payload", "override_payload": "msg", "entity_location": "data", "override_data": "msg", "x": 550, "y": 320, "wires": [ [ "1c9c1179.22442f" ], [] ] }, { "id": "16f9829e.cf51dd", "type": "timerswitch", "z": "13c93906.416317", "name": "Auto Charge trigger", "ontopic": "", "offtopic": "", "onpayload": "", "offpayload": "", "disabled": false, "schedules": [ { "on_h": "16", "on_m": "00", "on_s": "00", "off_h": "18", "off_m": "00", "off_s": "00", "valid": true } ], "x": 130, "y": 500, "wires": [ [ "93e0cb0a.068b68" ] ] }, { "id": "e7726879.4e3e68", "type": "comment", "z": "13c93906.416317", "name": "Start charger to charge batteries to 85% if end of day", "info": "", "x": 240, "y": 440, "wires": [] }, { "id": "93e0cb0a.068b68", "type": "switch", "z": "13c93906.416317", "name": "on/off", "property": "payload", "propertyType": "msg", "rules": [ { "t": "eq", "v": "on", "vt": "str" }, { "t": "eq", "v": "off", "vt": "str" } ], "checkall": "true", "repair": false, "outputs": 2, "x": 310, "y": 500, "wires": [ [ "dda32da1.967e4" ], [] ] }, { "id": "dda32da1.967e4", "type": "api-current-state", "z": "13c93906.416317", "name": "SOC<85?", "server": "3e613117.408b3e", "version": 2, "outputs": 2, "halt_if": "85", "halt_if_type": "num", "halt_if_compare": "lte", "entity_id": "sensor.battery_charge", "state_type": "num", "blockInputOverrides": false, "outputProperties": [ { "property": "Target", "propertyType": "msg", "value": "", "valueType": "entityState" } ], "override_topic": false, "state_location": "payload", "override_payload": "msg", "entity_location": "data", "override_data": "msg", "x": 480, "y": 500, "wires": [ [ "4d88793c.3057b8" ], [] ] }, { "id": "4d88793c.3057b8", "type": "api-call-service", "z": "13c93906.416317", "name": "Setpoint to 85%", "server": "3e613117.408b3e", "version": 3, "debugenabled": false, "service_domain": "input_number", "service": "set_value", "entityId": "input_number.finish_charge", "data": "{ \"value\": 85 }", "dataType": "jsonata", "mergecontext": "", "mustacheAltTags": false, "outputProperties": [], "queue": "last", "x": 640, "y": 540, "wires": [ [ "a74f89d2.f30c58" ] ] }, { "id": "a74f89d2.f30c58", "type": "api-call-service", "z": "13c93906.416317", "name": "Manual charge", "server": "3e613117.408b3e", "version": 3, "debugenabled": false, "service_domain": "switch", "service": "turn_on", "entityId": "switch.charge_batteries", "data": "", "dataType": "jsonata", "mergecontext": "", "mustacheAltTags": false, "outputProperties": [], "queue": "last", "x": 820, "y": 500, "wires": [ [] ] }, { "id": "13bba32e.9dc39d", "type": "inject", "z": "13c93906.416317", "name": "", "props": [ { "p": "payload" } ], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "payload": "on", "payloadType": "str", "x": 150, "y": 560, "wires": [ [ "93e0cb0a.068b68" ] ] }, { "id": "3e613117.408b3e", "type": "server", "name": "Home Assistant", "version": 1, "legacy": false, "addon": false, "rejectUnauthorizedCerts": false, "ha_boolean": "y|yes|true|on|home|open", "connectionDelay": true, "cacheJson": true } ]