Habe jetzt daly-bms-cli über Python genutzt. Habt ihr in Version 1.2 auch, nutzt es aber nicht? Oder verstehe ich das falsch. Hier mein Flow für die Nachwelt, falls jemand sowas sucht.
[
{
"id": "37b2e81f6c349df5",
"type": "tab",
"label": "BMS",
"disabled": false,
"info": "",
"env": []
},
{
"id": "20e7495a049cc583",
"type": "inject",
"z": "37b2e81f6c349df5",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 100,
"y": 180,
"wires": [
[
"bca69661d54db249"
]
]
},
{
"id": "acd34d45df354fdd",
"type": "exec",
"z": "37b2e81f6c349df5",
"command": "daly-bms-cli -d /dev/ttyUSB0 --all",
"addpay": "",
"append": "",
"useSpawn": "false",
"timer": "",
"winHide": false,
"oldrc": false,
"name": "",
"x": 400,
"y": 180,
"wires": [
[
"3637b439b61bd8cd",
"73241ebe60e6d918"
],
[],
[]
]
},
{
"id": "3637b439b61bd8cd",
"type": "debug",
"z": "37b2e81f6c349df5",
"name": "debug 1",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 740,
"y": 200,
"wires": []
},
{
"id": "131a988d7745023a",
"type": "ui_gauge",
"z": "37b2e81f6c349df5",
"name": "",
"group": "43ad4dbfa179c0a8",
"order": 0,
"width": 0,
"height": 0,
"gtype": "gage",
"title": "SOC",
"label": "Prozent",
"format": "{{msg.payload.soc.soc_percent}}",
"min": 0,
"max": "100",
"colors": [
"#b30000",
"#e6e600",
"#00b500"
],
"seg1": "30",
"seg2": "70",
"className": "",
"x": 730,
"y": 520,
"wires": []
},
{
"id": "73241ebe60e6d918",
"type": "json",
"z": "37b2e81f6c349df5",
"name": "",
"property": "payload",
"action": "",
"pretty": false,
"x": 470,
"y": 400,
"wires": [
[
"3d176f061326532c",
"1f42a103112b8ebb",
"064423a4ba7a2c86",
"d99c3b105e830dc6",
"9583d01f419d5c0c",
"131a988d7745023a"
]
]
},
{
"id": "3d176f061326532c",
"type": "debug",
"z": "37b2e81f6c349df5",
"name": "debug 3",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 700,
"y": 440,
"wires": []
},
{
"id": "554a10ae3784ad66",
"type": "comment",
"z": "37b2e81f6c349df5",
"name": "WICHTIG OBERE VERBINDUNG NUTZEN",
"info": "",
"x": 570,
"y": 140,
"wires": []
},
{
"id": "1f42a103112b8ebb",
"type": "ui_gauge",
"z": "37b2e81f6c349df5",
"name": "",
"group": "43ad4dbfa179c0a8",
"order": 1,
"width": 0,
"height": 0,
"gtype": "gage",
"title": "Gesamtspannung",
"label": "Volt",
"format": "{{msg.payload.soc.total_voltage}}",
"min": 0,
"max": "30",
"colors": [
"#b30000",
"#e6e600",
"#00b500"
],
"seg1": "",
"seg2": "24",
"className": "",
"x": 770,
"y": 560,
"wires": []
},
{
"id": "064423a4ba7a2c86",
"type": "ui_gauge",
"z": "37b2e81f6c349df5",
"name": "",
"group": "43ad4dbfa179c0a8",
"order": 2,
"width": 0,
"height": 0,
"gtype": "gage",
"title": "Höchste Zellspannung",
"label": "Volt",
"format": "{{msg.payload.cell_voltage_range.highest_voltage}}",
"min": 0,
"max": "4",
"colors": [
"#00b500",
"#e6e600",
"#ca3838"
],
"seg1": "",
"seg2": "",
"className": "",
"x": 780,
"y": 600,
"wires": []
},
{
"id": "d99c3b105e830dc6",
"type": "ui_gauge",
"z": "37b2e81f6c349df5",
"name": "",
"group": "43ad4dbfa179c0a8",
"order": 3,
"width": 0,
"height": 0,
"gtype": "gage",
"title": "Niedrigste Zellspannung",
"label": "Volt",
"format": "{{msg.payload.cell_voltage_range.lowest_voltage}}",
"min": 0,
"max": "4",
"colors": [
"#00b500",
"#e6e600",
"#ca3838"
],
"seg1": "",
"seg2": "",
"className": "",
"x": 790,
"y": 640,
"wires": []
},
{
"id": "9583d01f419d5c0c",
"type": "ui_gauge",
"z": "37b2e81f6c349df5",
"name": "",
"group": "43ad4dbfa179c0a8",
"order": 4,
"width": 0,
"height": 0,
"gtype": "gage",
"title": "Batterietemperatur",
"label": "Grad Celsius",
"format": "{{msg.payload.temperatures[\"1\"]}}",
"min": "20",
"max": "30",
"colors": [
"#00b500",
"#e6e600",
"#ca3838"
],
"seg1": "",
"seg2": "",
"className": "",
"x": 770,
"y": 680,
"wires": []
},
{
"id": "bca69661d54db249",
"type": "trigger",
"z": "37b2e81f6c349df5",
"name": "",
"op1": "1",
"op2": "0",
"op1type": "str",
"op2type": "str",
"duration": "-1",
"extend": false,
"overrideDelay": false,
"units": "min",
"reset": "",
"bytopic": "all",
"topic": "topic",
"outputs": 1,
"x": 250,
"y": 240,
"wires": [
[
"acd34d45df354fdd"
]
]
},
{
"id": "43ad4dbfa179c0a8",
"type": "ui_group",
"name": "BMS",
"tab": "0fd702fdfe53e9c0",
"order": 1,
"disp": true,
"width": "6",
"collapse": false,
"className": ""
},
{
"id": "0fd702fdfe53e9c0",
"type": "ui_tab",
"name": "Home",
"icon": "dashboard",
"disabled": false,
"hidden": false
}
]