Mein Workaround geht über psa_car_controller auf dem Raspi4, gestartet in crontab mit der Zeile
Code: Alles auswählen
[
{
"id": "5dcd72290d5c99a5",
"type": "debug",
"z": "6440f0d1b248b507",
"name": "debug 1",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": true,
"complete": "payload",
"targetType": "msg",
"statusVal": "payload",
"statusType": "auto",
"x": 500,
"y": 840,
"wires": []
},
{
"id": "1845364c838762d0",
"type": "http request",
"z": "6440f0d1b248b507",
"name": "",
"method": "GET",
"ret": "obj",
"paytoqs": "ignore",
"url": "http://<ip:port>/get_vehicleinfo/<yourVIN>",
"tls": "",
"persist": false,
"proxy": "",
"insecureHTTPParser": false,
"authType": "",
"senderr": false,
"headers": [],
"x": 310,
"y": 760,
"wires": [
[
"5dcd72290d5c99a5",
"6110dd8833bebe9a"
]
]
},
{
"id": "23eff85f42d02611",
"type": "inject",
"z": "6440f0d1b248b507",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "600",
"crontab": "",
"once": true,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 110,
"y": 760,
"wires": [
[
"1845364c838762d0"
]
]
},
{
"id": "6110dd8833bebe9a",
"type": "rbe",
"z": "6440f0d1b248b507",
"name": "",
"func": "rbe",
"gap": "",
"start": "",
"inout": "out",
"septopics": true,
"property": "payload.energy[0].level",
"topi": "topic",
"x": 510,
"y": 760,
"wires": [
[
"368e52e00d381d88"
]
]
},
{
"id": "e71f227f0a178faf",
"type": "mqtt out",
"z": "6440f0d1b248b507",
"name": "SOC setzen",
"topic": "openWB/set/lp/1/%Soc",
"qos": "0",
"retain": "",
"respTopic": "",
"contentType": "",
"userProps": "",
"correl": "",
"expiry": "",
"broker": "cd7464abf11d1ee0",
"x": 950,
"y": 760,
"wires": []
},
{
"id": "368e52e00d381d88",
"type": "change",
"z": "6440f0d1b248b507",
"name": "",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "payload.energy[0].level",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 730,
"y": 760,
"wires": [
[
"e71f227f0a178faf",
"2aa901cced305946"
]
]
},
{
"id": "cd7464abf11d1ee0",
"type": "mqtt-broker",
"name": "OpenWB",
"broker": "<ip der OpenWB>",
"port": "1883",
"clientid": "",
"autoConnect": true,
"usetls": false,
"protocolVersion": "4",
"keepalive": "60",
"cleansession": true,
"birthTopic": "",
"birthQos": "0",
"birthPayload": "",
"birthMsg": {},
"closeTopic": "",
"closeQos": "0",
"closePayload": "",
"closeMsg": {},
"willTopic": "",
"willQos": "0",
"willPayload": "",
"willMsg": {},
"userProps": "",
"sessionExpiry": ""
}
]
Die machen eine Http-Abfrage auf den car_controller und schreiben den SOC mit MQTT auf die OpenWB.