Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [
- {
- "id": "44b9230f.2c8964",
- "type": "tab",
- "label": "Read Victron BMV",
- "disabled": false,
- "info": ""
- },
- {
- "id": "d62bd87f.a8e1e8",
- "type": "serial in",
- "z": "44b9230f.2c8964",
- "name": "Victron Monitor",
- "serial": "ea3dd41c.5929b",
- "x": 100,
- "y": 20,
- "wires": [
- [
- "5316a6bf.e51378",
- "9fc1d53.4d7b1a8",
- "be888a68.1ba178"
- ]
- ]
- },
- {
- "id": "5316a6bf.e51378",
- "type": "debug",
- "z": "44b9230f.2c8964",
- "name": "",
- "active": false,
- "tosidebar": true,
- "console": false,
- "tostatus": false,
- "complete": "payload",
- "x": 596,
- "y": 20,
- "wires": []
- },
- {
- "id": "be3519ce.a1dc98",
- "type": "debug",
- "z": "44b9230f.2c8964",
- "name": "",
- "active": false,
- "tosidebar": true,
- "console": false,
- "tostatus": false,
- "complete": "payload",
- "x": 596,
- "y": 60,
- "wires": []
- },
- {
- "id": "9fc1d53.4d7b1a8",
- "type": "function",
- "z": "44b9230f.2c8964",
- "name": "Convert_obj",
- "func": "// 'msg' is the message object the Function node receives\nvar myVars = msg.payload.split(\"\\r\\n\");\nvar result = {};\nmyVars.forEach(function(v) {\n // The following split uses ' = ' - because your example output appears to\n // have spaces around the equals sign.\n var parts = v.split(\"\\t\");\n result[parts[0]] = parts[1];\n});\nmsg.payload = result;\n// The Function node returns the message to be sent to the next node(s) in the flow\nreturn msg;",
- "outputs": 1,
- "noerr": 0,
- "x": 210,
- "y": 60,
- "wires": [
- [
- "be3519ce.a1dc98",
- "f4317c41.c022e"
- ]
- ]
- },
- {
- "id": "367d85f1.c139fa",
- "type": "debug",
- "z": "44b9230f.2c8964",
- "name": "",
- "active": false,
- "tosidebar": true,
- "console": false,
- "tostatus": false,
- "complete": "true",
- "x": 576,
- "y": 120,
- "wires": []
- },
- {
- "id": "f4317c41.c022e",
- "type": "split",
- "z": "44b9230f.2c8964",
- "name": "",
- "splt": "\\n",
- "spltType": "str",
- "arraySplt": 1,
- "arraySpltType": "len",
- "stream": true,
- "addname": "topic",
- "x": 190,
- "y": 120,
- "wires": [
- [
- "367d85f1.c139fa",
- "b6e286d6.f7417"
- ]
- ]
- },
- {
- "id": "b6e286d6.f7417",
- "type": "switch",
- "z": "44b9230f.2c8964",
- "name": "Route",
- "property": "parts.key",
- "propertyType": "msg",
- "rules": [
- {
- "t": "eq",
- "v": "V",
- "vt": "str"
- },
- {
- "t": "eq",
- "v": "I",
- "vt": "str"
- },
- {
- "t": "eq",
- "v": "SOC",
- "vt": "str"
- },
- {
- "t": "eq",
- "v": "VS",
- "vt": "str"
- }
- ],
- "checkall": "true",
- "repair": false,
- "outputs": 4,
- "x": 190,
- "y": 256,
- "wires": [
- [
- "f94a1dec.4a7d08"
- ],
- [
- "ae90aa66.d1e3a"
- ],
- [
- "5d93068d.967258"
- ],
- [
- "5c574c66.f5f594"
- ]
- ]
- },
- {
- "id": "a5a94137.753d68",
- "type": "debug",
- "z": "44b9230f.2c8964",
- "name": "",
- "active": false,
- "tosidebar": true,
- "console": false,
- "tostatus": false,
- "complete": "false",
- "x": 728,
- "y": 188,
- "wires": []
- },
- {
- "id": "7a21b561.166514",
- "type": "debug",
- "z": "44b9230f.2c8964",
- "name": "",
- "active": false,
- "tosidebar": true,
- "console": false,
- "tostatus": false,
- "complete": "payload",
- "x": 729,
- "y": 270,
- "wires": []
- },
- {
- "id": "f94a1dec.4a7d08",
- "type": "change",
- "z": "44b9230f.2c8964",
- "name": "V to num",
- "rules": [
- {
- "t": "set",
- "p": "payload",
- "pt": "msg",
- "to": "$number(msg.payload)/1000",
- "tot": "jsonata"
- }
- ],
- "action": "",
- "property": "",
- "from": "",
- "to": "",
- "reg": false,
- "x": 400,
- "y": 224,
- "wires": [
- [
- "9c0d0bf2.af71c"
- ]
- ]
- },
- {
- "id": "ae90aa66.d1e3a",
- "type": "change",
- "z": "44b9230f.2c8964",
- "name": "I to num",
- "rules": [
- {
- "t": "set",
- "p": "payload",
- "pt": "msg",
- "to": "$number(msg.payload)/1000",
- "tot": "jsonata"
- }
- ],
- "action": "",
- "property": "",
- "from": "",
- "to": "",
- "reg": false,
- "x": 400,
- "y": 304,
- "wires": [
- [
- "aadd1be0.5932f8"
- ]
- ]
- },
- {
- "id": "bf9ef81e.200508",
- "type": "debug",
- "z": "44b9230f.2c8964",
- "name": "",
- "active": false,
- "tosidebar": true,
- "console": false,
- "tostatus": false,
- "complete": "false",
- "x": 731,
- "y": 371,
- "wires": []
- },
- {
- "id": "5d93068d.967258",
- "type": "change",
- "z": "44b9230f.2c8964",
- "name": "SoC to num",
- "rules": [
- {
- "t": "set",
- "p": "payload",
- "pt": "msg",
- "to": "$number(msg.payload)/10",
- "tot": "jsonata"
- }
- ],
- "action": "",
- "property": "",
- "from": "",
- "to": "",
- "reg": false,
- "x": 410,
- "y": 404,
- "wires": [
- [
- "166dfc03.216b14"
- ]
- ]
- },
- {
- "id": "aadd1be0.5932f8",
- "type": "smooth",
- "z": "44b9230f.2c8964",
- "name": "Two dec",
- "property": "payload",
- "action": "mean",
- "count": "5",
- "round": "2",
- "mult": "multi",
- "x": 560,
- "y": 304,
- "wires": [
- [
- "82f40943.e1196",
- "7a21b561.166514"
- ]
- ]
- },
- {
- "id": "166dfc03.216b14",
- "type": "smooth",
- "z": "44b9230f.2c8964",
- "name": "No dec",
- "property": "payload",
- "action": "mean",
- "count": "5",
- "round": "0",
- "mult": "multi",
- "x": 560,
- "y": 404,
- "wires": [
- [
- "3f684bb.e167d34",
- "c88b0201.31eb6",
- "bf9ef81e.200508"
- ]
- ]
- },
- {
- "id": "5c574c66.f5f594",
- "type": "change",
- "z": "44b9230f.2c8964",
- "name": "V to num",
- "rules": [
- {
- "t": "set",
- "p": "payload",
- "pt": "msg",
- "to": "$number(msg.payload)/1000",
- "tot": "jsonata"
- }
- ],
- "action": "",
- "property": "",
- "from": "",
- "to": "",
- "reg": false,
- "x": 400,
- "y": 484,
- "wires": [
- [
- "a123011e.34ddc8"
- ]
- ]
- },
- {
- "id": "43b9c2ec.e48424",
- "type": "debug",
- "z": "44b9230f.2c8964",
- "name": "",
- "active": false,
- "tosidebar": true,
- "console": false,
- "tostatus": false,
- "complete": "false",
- "x": 730,
- "y": 450,
- "wires": []
- },
- {
- "id": "9c0d0bf2.af71c",
- "type": "smooth",
- "z": "44b9230f.2c8964",
- "name": "Two dec",
- "property": "payload",
- "action": "mean",
- "count": "5",
- "round": "2",
- "mult": "multi",
- "x": 560,
- "y": 224,
- "wires": [
- [
- "a5a94137.753d68",
- "4276ce64.c77d68"
- ]
- ]
- },
- {
- "id": "a123011e.34ddc8",
- "type": "smooth",
- "z": "44b9230f.2c8964",
- "name": "Two dec",
- "property": "payload",
- "action": "mean",
- "count": "5",
- "round": "2",
- "mult": "multi",
- "x": 560,
- "y": 484,
- "wires": [
- [
- "2a0cd436.75c7ac",
- "43b9c2ec.e48424"
- ]
- ]
- },
- {
- "id": "c88b0201.31eb6",
- "type": "link out",
- "z": "44b9230f.2c8964",
- "name": "SOC",
- "links": [
- "cc3be543.17c228"
- ],
- "x": 799,
- "y": 405,
- "wires": []
- },
- {
- "id": "be888a68.1ba178",
- "type": "serial out",
- "z": "44b9230f.2c8964",
- "name": "CCGX",
- "serial": "ad449943.39b8a8",
- "x": 432.0078315734863,
- "y": 40.24609565734863,
- "wires": []
- },
- {
- "id": "3f684bb.e167d34",
- "type": "ha-entity",
- "z": "44b9230f.2c8964",
- "name": "SOC",
- "server": "b630c8e7.1510e",
- "version": 1,
- "debugenabled": false,
- "outputs": 1,
- "entityType": "sensor",
- "config": [
- {
- "property": "name",
- "value": "victron_SOC"
- },
- {
- "property": "device_class",
- "value": "battery"
- },
- {
- "property": "icon",
- "value": ""
- },
- {
- "property": "unit_of_measurement",
- "value": "%"
- }
- ],
- "state": "payload",
- "stateType": "msg",
- "attributes": [],
- "resend": true,
- "outputLocation": "",
- "outputLocationType": "none",
- "inputOverride": "allow",
- "x": 710,
- "y": 405,
- "wires": [
- []
- ]
- },
- {
- "id": "2a0cd436.75c7ac",
- "type": "ha-entity",
- "z": "44b9230f.2c8964",
- "name": "Spenning Startbatteri",
- "server": "b630c8e7.1510e",
- "version": 1,
- "debugenabled": false,
- "outputs": 1,
- "entityType": "sensor",
- "config": [
- {
- "property": "name",
- "value": "victron_V_start"
- },
- {
- "property": "device_class",
- "value": ""
- },
- {
- "property": "icon",
- "value": "icon:current-dc"
- },
- {
- "property": "unit_of_measurement",
- "value": "V"
- }
- ],
- "state": "payload",
- "stateType": "msg",
- "attributes": [],
- "resend": true,
- "outputLocation": "",
- "outputLocationType": "none",
- "inputOverride": "allow",
- "x": 759,
- "y": 484,
- "wires": [
- []
- ]
- },
- {
- "id": "82f40943.e1196",
- "type": "ha-entity",
- "z": "44b9230f.2c8964",
- "name": "Øyeblikksforbruk",
- "server": "f139d2be.9db9b8",
- "version": 1,
- "debugenabled": false,
- "outputs": 1,
- "entityType": "sensor",
- "config": [
- {
- "property": "name",
- "value": "victron_current"
- },
- {
- "property": "device_class",
- "value": ""
- },
- {
- "property": "icon",
- "value": "mdi:resistor"
- },
- {
- "property": "unit_of_measurement",
- "value": "A"
- }
- ],
- "state": "payload",
- "stateType": "msg",
- "attributes": [],
- "resend": true,
- "outputLocation": "",
- "outputLocationType": "none",
- "inputOverride": "allow",
- "x": 748,
- "y": 304,
- "wires": [
- []
- ]
- },
- {
- "id": "4276ce64.c77d68",
- "type": "ha-entity",
- "z": "44b9230f.2c8964",
- "name": "Spenning Forbruksbatteri",
- "server": "b630c8e7.1510e",
- "version": 1,
- "debugenabled": false,
- "outputs": 1,
- "entityType": "sensor",
- "config": [
- {
- "property": "name",
- "value": "victron_V_utility"
- },
- {
- "property": "device_class",
- "value": ""
- },
- {
- "property": "icon",
- "value": "current-dc"
- },
- {
- "property": "unit_of_measurement",
- "value": "V"
- }
- ],
- "state": "payload",
- "stateType": "msg",
- "attributes": [],
- "resend": true,
- "outputLocation": "",
- "outputLocationType": "none",
- "inputOverride": "allow",
- "x": 767,
- "y": 223,
- "wires": [
- []
- ]
- },
- {
- "id": "ea3dd41c.5929b",
- "type": "serial-port",
- "serialport": "/dev/serial/by-id/usb-VictronEnergy_BV_VE_Direct_cable_VE26ZM61-if00-port0",
- "serialbaud": "19200",
- "databits": "8",
- "parity": "none",
- "stopbits": "1",
- "waitfor": "",
- "newline": "\\n",
- "bin": "false",
- "out": "char",
- "addchar": "",
- "responsetimeout": "10000"
- },
- {
- "id": "ad449943.39b8a8",
- "type": "serial-port",
- "serialport": "/dev/ttyNR",
- "serialbaud": "115200",
- "databits": "8",
- "parity": "none",
- "stopbits": "1",
- "waitfor": "",
- "newline": "\\n",
- "bin": "false",
- "out": "char",
- "addchar": "",
- "responsetimeout": "10000"
- },
- {
- "id": "b630c8e7.1510e",
- "type": "server",
- "name": "Home Assistant",
- "legacy": true,
- "addon": true,
- "rejectUnauthorizedCerts": true,
- "ha_boolean": "y|yes|true|on|home|open",
- "connectionDelay": true,
- "cacheJson": true
- },
- {
- "id": "f139d2be.9db9b8",
- "type": "server",
- "name": "Home Assistant",
- "legacy": false,
- "addon": true,
- "rejectUnauthorizedCerts": true,
- "ha_boolean": "y|yes|true|on|home|open",
- "connectionDelay": true,
- "cacheJson": true
- }
- ]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement