E-Auto Hyundai Bluelink / Bluelinky (Hilfe zu Node.js)

Begonnen von mnl1234, 26 November 2020, 08:50:37

Vorheriges Thema - Nächstes Thema

ch.eick

#90
Zitat von: xerion am 28 Oktober 2021, 14:46:11
Also sieh erstmal von hier nicht falsch aus. Ob überhaupt Daten kommen kannst du in der Debug Ausgabe sehen wenn du einen Request abgesendet hast.
siehe Screenshot.

Wenn das der Fall ist kannst du  mit MQTT-Explorer(https://www.microsoft.com/de-de/p/mqtt-explorer/9pp8sfm082wd?activetab=pivot:overviewtab)
mal schauen ob überhaupt Daten bei den Topics ankommen, wenn das auch der Fall musst du dich in der readingList umschauen ob dort alles richtig gesetzt ist.
Beim Debug kommt schon nichts.
Nach meiner Vorstellung läuft der Flow jetzt permanent im node-red , nachdem ich ihn "deployed" habe.
Da muss ich wohl erstmal einige tutorials suchen...

Die "node kia.js" Verbindung aus dem FHEM container liefert zumindest Daten ins MQTT, sodaß die generelle Konfiguration bei Kia und im MQTT2 ja schonmal klappen sollte.
RPI4; Docker; CUNX; Eltako FSB61NP; SamsungTV H-Serie; Sonos; Vallox; Luxtronik; 3x FB7490; Stromzähler mit DvLIR; wunderground; Plenticore 10 mit BYD; EM410; SMAEM; Modbus TCP
Contrib: https://svn.fhem.de/trac/browser/trunk/fhem/contrib/ch.eick

xerion

Nein der Flow läuft nicht dauerhaft und wenn du nicht von Kia/Hyundai  gesperrt werden möchtest, solltest du das auch tunlichst vermeiden. ;-)
In deinem Screenshot siehst du auf der linken Seite die MQTT IN`s das sind quasi deine Schalter via MQTT um den jeweiligen Flow zu auszuführen.

Das sind Daten die in deinem fhem Device unter setList stehen die solltest du laut deinem list per webCmd ausführen können und dann solltest du Daten bekommen.
Ich würde mich  freuen, wenn du meinen Einladungscode für Tibber, der Stromanbieter, der dir hilft, deinen Stromverbrauch zu verstehen und zu reduzieren, nutzt: https://invite.tibber.com/5fc08jbs. So bekommen wir beide 50 Euro und 100 % Ökostrom / https://geld-fuer-eauto.de/ref/334561880

mnl1234

Zitat von: xerion am 28 Oktober 2021, 15:02:29
Nein der Flow läuft nicht dauerhaft und wenn du nicht von Kia/Hyundai  gesperrt werden möchtest, solltest du das auch tunlichst vermeiden. ;-)
In deinem Screenshot siehst du auf der linken Seite die MQTT IN`s das sind quasi deine Schalter via MQTT um den jeweiligen Flow zu auszuführen.

Das sind Daten die in deinem fhem Device unter setList stehen die solltest du laut deinem list per webCmd ausführen können und dann solltest du Daten bekommen.

Hmmm... naja, der Flow ansich läuft in dem Sinne schon dauerhaft. Aber die Bluelinky-Funktionen müssen eben von außen getriggert werden, damit sie auch was tun.
Das geht bei mir entweder aus dem MQTT raus oder der Login-Knoten wird stündlich getriggert.

mnl1234

Zitat von: ch.eick am 28 Oktober 2021, 14:52:57
Beim Debug kommt schon nichts.
Nach meiner Vorstellung läuft der Flow jetzt permanent im node-red , nachdem ich ihn "deployed" habe.

Hast du denn das "Ready" unter den Bluelinky-Knoten?
Wenn ja kannst du ja mal einen Inject-Knoten reinziehen und mit z.B. Get_Status verbinden (siehe Bild) und dann manuell triggern über das Fähnchen links von "timestamp". Danach sollte was im Debugfenster kommen.

mnl1234

Um das an der Stelle vielliecht noch abzuschließen und nicht in der Luft hängen zu lassen:

Es ist inzwischen gelöst. Im Grunde lief alles, so wie es sollte. :-)
Nun kommen die Trigger per MQTT vom FHEM, werden im Nodered via Bluelinky ans Auto geschickt und kommen dann via MQTT wieder zum FHEM zurück.

ch.eick

Zitat von: mnl1234 am 29 Oktober 2021, 08:53:52
Um das an der Stelle vielliecht noch abzuschließen und nicht in der Luft hängen zu lassen:

Es ist inzwischen gelöst. Im Grunde lief alles, so wie es sollte. :-)
Nun kommen die Trigger per MQTT vom FHEM, werden im Nodered via Bluelinky ans Auto geschickt und kommen dann via MQTT wieder zum FHEM zurück.
Ich muss jetzt nur noch weiter testen :-)
RPI4; Docker; CUNX; Eltako FSB61NP; SamsungTV H-Serie; Sonos; Vallox; Luxtronik; 3x FB7490; Stromzähler mit DvLIR; wunderground; Plenticore 10 mit BYD; EM410; SMAEM; Modbus TCP
Contrib: https://svn.fhem.de/trac/browser/trunk/fhem/contrib/ch.eick

mnl1234

Zitat von: ch.eick am 29 Oktober 2021, 09:20:37
Ich muss jetzt nur noch weiter testen :-)

Bahalte deine 12V Batterie im Auge. Die leidet unter zu vielen Anfragen.
Und der Hyundai-Server lässt auch nur 200 Anfragen pro 24 Stunden zu. Zumindest ist das die Zahl, die ich so im Kopf habe.

ch.eick

Hallo zusammen,
ich habe mir mal Ideen durch den Kopf gehen lassen und finde den Ansatz mit dem node-red als Übersetzer sehr gut.
Im stateFormat von @mnl1234 ist aus dem Ergebnis ja schon eine kleine Bedienoberfläche hervorgegangen.
Da nun das triggern mit einem DOIF erfolgt und dort uiTable integriert ist könnte man das ganze noch etwas anhübschen. Dann agiert das MQTT2 Device als Schnittstelle und die Steuerung und Präsentation wird vom DOIF gemacht. Da gibt es dann Pull Down Menüs und Buttons, wie ich es bei meiner Batteriesteuerung umgesetzt habe.
Hier mal ein Screenshot als Muster.

Wenn ich mich da ran setze würde ich gerne Eure Top 10 der Automatismen haben, damit es für möglichst viele als Basis passt.

@mnl1234 hat sein DOIF bereits geliefert
@ch.eick
  - ich interessiere mich für das Aufheizen am Morgen, eventuell nach Verwendungskalender
  - eventuell würde ich meinen Haus Speicher noch gegen das Entladen schützen, da er im Winter
    gerade so durch die Nacht reicht und ansonsten sofort leer wäre
  - nach dem Muster zum Fremdladen aus dem userreading (Ortsüberprüfung) würde ich das Abfragen bei Kia
    auf ein Minimum reduzieren, was die 12V Batterie wohl schonen wird.

VG
    Christian
RPI4; Docker; CUNX; Eltako FSB61NP; SamsungTV H-Serie; Sonos; Vallox; Luxtronik; 3x FB7490; Stromzähler mit DvLIR; wunderground; Plenticore 10 mit BYD; EM410; SMAEM; Modbus TCP
Contrib: https://svn.fhem.de/trac/browser/trunk/fhem/contrib/ch.eick

michisa86888

@ch.eick

könntest du evtl. deinen aktuellen NodeRedFlow hier einstellen?

ch.eick

Zitat von: michisa86888 am 29 Oktober 2021, 10:26:25
@ch.eick

könntest du evtl. deinen aktuellen NodeRedFlow hier einstellen?
Das würde ich gerne an @mnl1234 weiter reichen, ich bin komplett neu in dem Thema.
RPI4; Docker; CUNX; Eltako FSB61NP; SamsungTV H-Serie; Sonos; Vallox; Luxtronik; 3x FB7490; Stromzähler mit DvLIR; wunderground; Plenticore 10 mit BYD; EM410; SMAEM; Modbus TCP
Contrib: https://svn.fhem.de/trac/browser/trunk/fhem/contrib/ch.eick

mnl1234

Zitat von: ch.eick am 29 Oktober 2021, 10:28:31
Das würde ich gerne an @mnl1234 weiter reichen, ich bin komplett neu in dem Thema.

Du kannst gerne den Flow hier posten, so wie ich ihn dir gestern geschickt habe. Komme igendwie an die Nachricht nicht mehr dran. Das war aber schon soweit anonymisiert, dass man es veröffentlichen kann.

ch.eick

Zitat von: mnl1234 am 29 Oktober 2021, 10:33:15
Du kannst gerne den Flow hier posten, so wie ich ihn dir gestern geschickt habe. Komme igendwie an die Nachricht nicht mehr dran. Das war aber schon soweit anonymisiert, dass man es veröffentlichen kann.
Here we are...


[
    {
        "id": "866c75dd.edd9a8",
        "type": "tab",
        "label": "Dein Flow Label z.b. Kona oder Kia e-Niro",
        "disabled": false,
        "info": ""
    },
    {
        "id": "91a345fa.5757a8",
        "type": "mqtt in",
        "z": "866c75dd.edd9a8",
        "name": "",
        "topic": "req/bluelinky/get_status",
        "qos": "0",
        "datatype": "auto",
        "broker": "bb13a99d.68b8f8",
        "x": 460,
        "y": 280,
        "wires": [
            [
                "15dfb508.c6497b",
                "ce62ba4f.d86548",
                "3f82a275.5a0b6e",
                "24d5e0b.3aafc2"
            ]
        ]
    },
    {
        "id": "5ad085b9.05739c",
        "type": "mqtt in",
        "z": "866c75dd.edd9a8",
        "name": "",
        "topic": "req/bluelinky/start_climate",
        "qos": "0",
        "datatype": "auto",
        "broker": "bb13a99d.68b8f8",
        "x": 470,
        "y": 680,
        "wires": [
            [
                "b27d74de.38c808",
                "33b1bc85.662694",
                "ce62ba4f.d86548",
                "24d5e0b.3aafc2"
            ]
        ]
    },
    {
        "id": "15dfb508.c6497b",
        "type": "car-status",
        "z": "866c75dd.edd9a8",
        "name": "Get status",
        "dorefresh": true,
        "parsed": false,
        "bluelinky": "452a3304.58c8fc",
        "x": 830,
        "y": 280,
        "wires": [
            [
                "cccc9476.d56dd8",
                "226ed925.607bb6"
            ]
        ]
    },
    {
        "id": "87abdd88.8ff4d",
        "type": "car-odometer",
        "z": "866c75dd.edd9a8",
        "name": "Get car odometer",
        "bluelinky": "452a3304.58c8fc",
        "x": 850,
        "y": 200,
        "wires": [
            [
                "40d2361c.579588",
                "226ed925.607bb6"
            ]
        ]
    },
    {
        "id": "31100f9a.40008",
        "type": "function",
        "z": "866c75dd.edd9a8",
        "name": "locationWrapper",
        "func": "if(msg.payload.hasOwnProperty(\"body\")) {\n    msg.payload = {\"error\":true};\n    return msg;\n}\nelse {\n\n    msg.payload = { \n        \"location\": msg.payload,\n        \"error\": false\n    };\n    \n    return msg;\n}",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "x": 1460,
        "y": 120,
        "wires": [
            [
                "85a07155.a0f9f",
                "262df5dc.57916a",
                "f487d6d6.a4d568"
            ]
        ]
    },
    {
        "id": "bea1d927.0f3908",
        "type": "car-location",
        "z": "866c75dd.edd9a8",
        "name": "Get car location",
        "bluelinky": "452a3304.58c8fc",
        "x": 850,
        "y": 120,
        "wires": [
            [
                "31100f9a.40008",
                "226ed925.607bb6"
            ]
        ]
    },
    {
        "id": "3c949d67.0d83b2",
        "type": "mqtt in",
        "z": "866c75dd.edd9a8",
        "name": "",
        "topic": "req/bluelinky/get_location",
        "qos": "0",
        "datatype": "auto",
        "broker": "bb13a99d.68b8f8",
        "x": 470,
        "y": 120,
        "wires": [
            [
                "bea1d927.0f3908",
                "ce62ba4f.d86548",
                "3f82a275.5a0b6e",
                "24d5e0b.3aafc2"
            ]
        ]
    },
    {
        "id": "cccc9476.d56dd8",
        "type": "function",
        "z": "866c75dd.edd9a8",
        "name": "analyseStatus",
        "func": "if(msg.payload.hasOwnProperty(\"body\")) {\n    msg.payload = {\"error\":true};\n    return msg;\n}\nelse {\n    let status = msg.payload;\n    status.airTemp.value = 14+(parseInt(status.airTemp.value,16)/2);\n    try{\n    status.evStatus.reservChargeInfos.reservChargeInfo.reservChargeInfoDetail.reservFatcSet.airTemp.value = 14+(parseInt(status.evStatus.reservChargeInfos.reservChargeInfo.reservChargeInfoDetail.reservFatcSet.airTemp.value,16)/2);\n    status.evStatus.reservChargeInfos.reserveChargeInfo2.reservChargeInfoDetail.reservFatcSet.airTemp.value = 14+(parseInt(status.evStatus.reservChargeInfos.reserveChargeInfo2.reservChargeInfoDetail.reservFatcSet.airTemp.value,16)/2);\n    } catch(e) {}\n\n    let time = status.evStatus.remainTime2.atc.value/60;\n    let result = { \n                 \"batSOC\": status.evStatus.batteryStatus,\n                 \"connected\": (status.evStatus.batteryPlugin !== 0),\n                 \"charging\": status.evStatus.batteryCharge,\n                 \"targetSOC\": status.evStatus.reservChargeInfos.targetSOClist[1].targetSOClevel,\n                 \"time2targetSOC\": (Math.floor(time) + \":\" + (\"0\" + Math.floor((time % 1)*60)).slice(-2)), // h:mm\n                 \"range\": status.evStatus.drvDistance[0].rangeByFuel.totalAvailableRange.value,\n                 \"bat12v\": status.battery.batSoc\n                };\n    \n    //msg.payload = result;\n    msg.payload = {\n        \"status\": status,\n        \"error\": false\n        \n    };\n    return msg;\n}",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "x": 1460,
        "y": 280,
        "wires": [
            [
                "3efceea0.c81b12",
                "262df5dc.57916a",
                "f487d6d6.a4d568"
            ]
        ]
    },
    {
        "id": "85a07155.a0f9f",
        "type": "mqtt out",
        "z": "866c75dd.edd9a8",
        "name": "",
        "topic": "bluelinky/location",
        "qos": "",
        "retain": "",
        "broker": "bb13a99d.68b8f8",
        "x": 1870,
        "y": 120,
        "wires": []
    },
    {
        "id": "3efceea0.c81b12",
        "type": "mqtt out",
        "z": "866c75dd.edd9a8",
        "name": "",
        "topic": "bluelinky/status",
        "qos": "",
        "retain": "",
        "broker": "bb13a99d.68b8f8",
        "x": 1860,
        "y": 280,
        "wires": []
    },
    {
        "id": "327104fc.71e1bc",
        "type": "mqtt out",
        "z": "866c75dd.edd9a8",
        "name": "",
        "topic": "bluelinky/odometer",
        "qos": "",
        "retain": "",
        "broker": "bb13a99d.68b8f8",
        "x": 1870,
        "y": 200,
        "wires": []
    },
    {
        "id": "844a32f4.2e029",
        "type": "mqtt in",
        "z": "866c75dd.edd9a8",
        "name": "",
        "topic": "req/bluelinky/stop_climate",
        "qos": "0",
        "datatype": "auto",
        "broker": "bb13a99d.68b8f8",
        "x": 470,
        "y": 760,
        "wires": [
            [
                "7d3ae860.d8c9a8",
                "33b1bc85.662694",
                "ce62ba4f.d86548",
                "24d5e0b.3aafc2"
            ]
        ]
    },
    {
        "id": "57d91e50.7e96",
        "type": "mqtt in",
        "z": "866c75dd.edd9a8",
        "name": "",
        "topic": "req/bluelinky/start_charging",
        "qos": "0",
        "datatype": "auto",
        "broker": "bb13a99d.68b8f8",
        "x": 480,
        "y": 820,
        "wires": [
            [
                "6eebc52c.ee23dc",
                "33b1bc85.662694",
                "ce62ba4f.d86548",
                "24d5e0b.3aafc2"
            ]
        ]
    },
    {
        "id": "6029f0a0.b73e",
        "type": "mqtt in",
        "z": "866c75dd.edd9a8",
        "name": "",
        "topic": "req/bluelinky/stop_charging",
        "qos": "0",
        "datatype": "auto",
        "broker": "bb13a99d.68b8f8",
        "x": 470,
        "y": 880,
        "wires": [
            [
                "84a1ae.74912e5",
                "33b1bc85.662694",
                "ce62ba4f.d86548",
                "24d5e0b.3aafc2"
            ]
        ]
    },
    {
        "id": "c5ecf76c.e753c8",
        "type": "start-car",
        "z": "866c75dd.edd9a8",
        "name": "Start car",
        "bluelinky": "452a3304.58c8fc",
        "x": 1100,
        "y": 680,
        "wires": [
            [
                "811aa567.e89f98",
                "f487d6d6.a4d568"
            ]
        ]
    },
    {
        "id": "6eebc52c.ee23dc",
        "type": "start-charge",
        "z": "866c75dd.edd9a8",
        "name": "Start Charging",
        "bluelinky": "452a3304.58c8fc",
        "x": 1120,
        "y": 820,
        "wires": [
            [
                "811aa567.e89f98",
                "f487d6d6.a4d568"
            ]
        ]
    },
    {
        "id": "84a1ae.74912e5",
        "type": "stop-charge",
        "z": "866c75dd.edd9a8",
        "name": "Stop Charging",
        "bluelinky": "452a3304.58c8fc",
        "x": 1120,
        "y": 880,
        "wires": [
            [
                "811aa567.e89f98",
                "f487d6d6.a4d568"
            ]
        ]
    },
    {
        "id": "7d3ae860.d8c9a8",
        "type": "stop-car",
        "z": "866c75dd.edd9a8",
        "name": "Stop car",
        "bluelinky": "452a3304.58c8fc",
        "x": 1100,
        "y": 760,
        "wires": [
            [
                "811aa567.e89f98",
                "f487d6d6.a4d568"
            ]
        ]
    },
    {
        "id": "b27d74de.38c808",
        "type": "json",
        "z": "866c75dd.edd9a8",
        "name": "",
        "property": "payload",
        "action": "obj",
        "pretty": false,
        "x": 710,
        "y": 680,
        "wires": [
            [
                "c5ecf76c.e753c8",
                "33b1bc85.662694"
            ]
        ]
    },
    {
        "id": "45a6a8e6.2abfd8",
        "type": "mqtt in",
        "z": "866c75dd.edd9a8",
        "name": "",
        "topic": "req/bluelinky/get_odometer",
        "qos": "0",
        "datatype": "auto",
        "broker": "bb13a99d.68b8f8",
        "x": 470,
        "y": 200,
        "wires": [
            [
                "87abdd88.8ff4d",
                "ce62ba4f.d86548",
                "3f82a275.5a0b6e",
                "24d5e0b.3aafc2"
            ]
        ]
    },
    {
        "id": "33b1bc85.662694",
        "type": "debug",
        "z": "866c75dd.edd9a8",
        "name": "",
        "active": false,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 950,
        "y": 940,
        "wires": []
    },
    {
        "id": "ce62ba4f.d86548",
        "type": "mqtt out",
        "z": "866c75dd.edd9a8",
        "name": "",
        "topic": "bluelinky/req_received",
        "qos": "",
        "retain": "",
        "broker": "bb13a99d.68b8f8",
        "x": 880,
        "y": 600,
        "wires": []
    },
    {
        "id": "1babee6c.1c2982",
        "type": "mqtt in",
        "z": "866c75dd.edd9a8",
        "name": "",
        "topic": "req/bluelinky/get_all",
        "qos": "0",
        "datatype": "auto",
        "broker": "bb13a99d.68b8f8",
        "x": 450,
        "y": 400,
        "wires": [
            [
                "ce62ba4f.d86548",
                "3f82a275.5a0b6e",
                "24d5e0b.3aafc2",
                "4375fbb9.00fb44"
            ]
        ]
    },
    {
        "id": "262df5dc.57916a",
        "type": "debug",
        "z": "866c75dd.edd9a8",
        "name": "",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 1810,
        "y": 60,
        "wires": []
    },
    {
        "id": "811aa567.e89f98",
        "type": "debug",
        "z": "866c75dd.edd9a8",
        "name": "",
        "active": false,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 1450,
        "y": 1040,
        "wires": []
    },
    {
        "id": "3f82a275.5a0b6e",
        "type": "debug",
        "z": "866c75dd.edd9a8",
        "name": "",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 830,
        "y": 80,
        "wires": []
    },
    {
        "id": "24d5e0b.3aafc2",
        "type": "change",
        "z": "866c75dd.edd9a8",
        "name": "",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "pending",
                "tot": "str"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 790,
        "y": 1200,
        "wires": [
            [
                "4dd1ea4a.52f144",
                "fecad185.324f8"
            ]
        ]
    },
    {
        "id": "f487d6d6.a4d568",
        "type": "change",
        "z": "866c75dd.edd9a8",
        "name": "",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "idle",
                "tot": "str"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 1770,
        "y": 500,
        "wires": [
            [
                "4dd1ea4a.52f144",
                "fecad185.324f8"
            ]
        ]
    },
    {
        "id": "4dd1ea4a.52f144",
        "type": "mqtt out",
        "z": "866c75dd.edd9a8",
        "name": "",
        "topic": "bluelinky/req_active",
        "qos": "",
        "retain": "",
        "broker": "bb13a99d.68b8f8",
        "x": 2290,
        "y": 1200,
        "wires": []
    },
    {
        "id": "fecad185.324f8",
        "type": "debug",
        "z": "866c75dd.edd9a8",
        "name": "",
        "active": false,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 2270,
        "y": 1260,
        "wires": []
    },
    {
        "id": "40d2361c.579588",
        "type": "function",
        "z": "866c75dd.edd9a8",
        "name": "odometerWrapper",
        "func": "if(msg.payload.hasOwnProperty(\"body\")) {\n    msg.payload = {\"error\":true};\n    return msg;\n}\nelse {\n    msg.payload = { \n        \"odometer\": msg.payload,\n        \"error\": false\n        };\n\n    return msg;\n}",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "x": 1470,
        "y": 200,
        "wires": [
            [
                "327104fc.71e1bc",
                "262df5dc.57916a",
                "f487d6d6.a4d568"
            ]
        ]
    },
    {
        "id": "226ed925.607bb6",
        "type": "debug",
        "z": "866c75dd.edd9a8",
        "name": "",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 1150,
        "y": 80,
        "wires": []
    },
    {
        "id": "4375fbb9.00fb44",
        "type": "car-fullstatus",
        "z": "866c75dd.edd9a8",
        "name": "Get full status",
        "dorefresh": true,
        "bluelinky": "452a3304.58c8fc",
        "x": 930,
        "y": 360,
        "wires": [
            [
                "226ed925.607bb6",
                "69b6c4df.ea6bcc",
                "89681a97.9e24d8",
                "92dc3ff4.1d6e3"
            ]
        ]
    },
    {
        "id": "69b6c4df.ea6bcc",
        "type": "function",
        "z": "866c75dd.edd9a8",
        "name": "locationFromFullstatus",
        "func": "if(msg.payload.hasOwnProperty(\"body\")) {\n    msg.payload = {\"error\":true};\n    return msg;\n}\nelse {\n\n    msg.payload = { \n        \"location\": msg.payload.vehicleLocation,\n        \"error\": false\n    };\n    \n    return msg;\n}\n",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "x": 1440,
        "y": 360,
        "wires": [
            [
                "85a07155.a0f9f",
                "331e5860.907808"
            ]
        ]
    },
    {
        "id": "92dc3ff4.1d6e3",
        "type": "function",
        "z": "866c75dd.edd9a8",
        "name": "statusFromFullstatus",
        "func": "if(msg.payload.hasOwnProperty(\"body\")) {\n    msg.payload = {\"error\":true};\n    return msg;\n}\nelse {\n    let status = msg.payload.vehicleStatus;\n    try{\n        status.airTemp.value = 14+(parseInt(status.airTemp.value,16)/2);\n        status.evStatus.reservChargeInfos.reservChargeInfo.reservChargeInfoDetail.reservFatcSet.airTemp.value = 14+(parseInt(status.evStatus.reservChargeInfos.reservChargeInfo.reservChargeInfoDetail.reservFatcSet.airTemp.value,16)/2);\n        status.evStatus.reservChargeInfos.reserveChargeInfo2.reservChargeInfoDetail.reservFatcSet.airTemp.value = 14+(parseInt(status.evStatus.reservChargeInfos.reserveChargeInfo2.reservChargeInfoDetail.reservFatcSet.airTemp.value,16)/2);\n    } catch(e) {}\n\n    msg.payload = { \n        \"status\": status,\n        \"error\": false\n    };\n    \n    return msg;\n}\n",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "x": 1440,
        "y": 480,
        "wires": [
            [
                "3efceea0.c81b12",
                "f487d6d6.a4d568",
                "331e5860.907808"
            ]
        ]
    },
    {
        "id": "89681a97.9e24d8",
        "type": "function",
        "z": "866c75dd.edd9a8",
        "name": "odometerFromFullstatus",
        "func": "if(msg.payload.hasOwnProperty(\"body\")) {\n    msg.payload = {\"error\":true};\n    return msg;\n}\nelse {\n\n    msg.payload = { \n        \"odometer\": msg.payload.odometer,\n        \"error\": false\n    };\n    \n    return msg;\n}\n",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "x": 1430,
        "y": 420,
        "wires": [
            [
                "327104fc.71e1bc",
                "331e5860.907808"
            ]
        ]
    },
    {
        "id": "331e5860.907808",
        "type": "debug",
        "z": "866c75dd.edd9a8",
        "name": "",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 1770,
        "y": 420,
        "wires": []
    },
    {
        "id": "aa4d220b.f7e19",
        "type": "set-chargetargets",
        "z": "866c75dd.edd9a8",
        "name": "Set charge targets",
        "bluelinky": "452a3304.58c8fc",
        "x": 1140,
        "y": 1060,
        "wires": [
            [
                "811aa567.e89f98",
                "f487d6d6.a4d568"
            ]
        ]
    },
    {
        "id": "4c03338d.2f15ec",
        "type": "login",
        "z": "866c75dd.edd9a8",
        "name": "Login",
        "bluelinky": "452a3304.58c8fc",
        "x": 1090,
        "y": 1120,
        "wires": [
            [
                "811aa567.e89f98"
            ]
        ]
    },
    {
        "id": "28b868f5.16cb48",
        "type": "inject",
        "z": "866c75dd.edd9a8",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "43200",
        "crontab": "",
        "once": true,
        "onceDelay": "12",
        "topic": "",
        "payload": "",
        "payloadType": "date",
        "x": 890,
        "y": 1120,
        "wires": [
            [
                "4c03338d.2f15ec"
            ]
        ]
    },
    {
        "id": "db9ecdb5.a9683",
        "type": "mqtt in",
        "z": "866c75dd.edd9a8",
        "name": "",
        "topic": "req/bluelinky/set_chargetargets",
        "qos": "0",
        "datatype": "auto",
        "broker": "bb13a99d.68b8f8",
        "x": 490,
        "y": 1060,
        "wires": [
            [
                "aa4d220b.f7e19"
            ]
        ]
    },
    {
        "id": "bb13a99d.68b8f8",
        "type": "mqtt-broker",
        "name": "mqtt_Server",
        "broker": "127.0.0.1",
        "port": "1883",
        "clientid": "",
        "usetls": false,
        "compatmode": false,
        "keepalive": "60",
        "cleansession": true,
        "birthTopic": "",
        "birthQos": "0",
        "birthPayload": "",
        "closeTopic": "",
        "closeQos": "0",
        "closePayload": "",
        "willTopic": "",
        "willQos": "0",
        "willPayload": ""
    },
    {
        "id": "452a3304.58c8fc",
        "type": "bluelinky",
        "username": "deinBluelinkUser",
        "password": "deinBluelinkPass",
        "region": "EU",
        "pin": "DeinePIN",
        "vin": "DeineVIN",
        "brand": "[hyundai|kia]"
    }
]
RPI4; Docker; CUNX; Eltako FSB61NP; SamsungTV H-Serie; Sonos; Vallox; Luxtronik; 3x FB7490; Stromzähler mit DvLIR; wunderground; Plenticore 10 mit BYD; EM410; SMAEM; Modbus TCP
Contrib: https://svn.fhem.de/trac/browser/trunk/fhem/contrib/ch.eick

mnl1234

Zitat von: ch.eick am 29 Oktober 2021, 10:49:25
Here we are...


Top! Danke Dir!

Kleine Erklärungen für alle "Erstimportierer":

  • Ich nutze derzeit Version 0.25 vom nodered-contrib-bluelinky. Könnte also sein, dass neue Versionen auch neue oder geänderte Funktionen bieten, die hier nicht abgebildet sind.
  • Der Login wird alle paar Stunden getriggert, weil Bluelinky nicht merkt, wenn die Session ausläuft. Ein Request würde dann in einen Fehler laufen. Alle anderen Blocks müssen via MQTT getriggert werden.
  • Die Scripts machen ein paar Vorbereitungen und Umrechnungen, die mir die Verarbeitung in FHEM später erleichtern. Z.B. werden die Temperaturwerte direkt in °C umgerechnet.
  • Außerdem habe ich ein error-Flag in den Antworten, um im FHEM zu sehen, falls ein Request mal Mist liefert
  • Bei jedem Request wird ein Flag auf Pending gesetzt und per MQTT gesendet. Nach Erhalt der Antwort wird es wieder auf idle gesetzt. Dadurch sieht man im FHEM ganz gut, dass ein Request noch aktiv ist. Und es lässt sich natürlich auch für Sequenzen von Requests aus FHEM heraus nutzen.

ch.eick

Hier mal meine Versionen Stand 28.10.2021:

node-red 2.1.3
bluelinky 0.0.27

Das kuvork linkt direkt auf bluelinky.
RPI4; Docker; CUNX; Eltako FSB61NP; SamsungTV H-Serie; Sonos; Vallox; Luxtronik; 3x FB7490; Stromzähler mit DvLIR; wunderground; Plenticore 10 mit BYD; EM410; SMAEM; Modbus TCP
Contrib: https://svn.fhem.de/trac/browser/trunk/fhem/contrib/ch.eick

xerion

Zitat von: ch.eick am 29 Oktober 2021, 10:49:25
Here we are...


[
    {
        "id": "866c75dd.edd9a8",
        "type": "tab",
        "label": "Dein Flow Label z.b. Kona oder Kia e-Niro",
        "disabled": false,
        "info": ""
    },
    {
        "id": "91a345fa.5757a8",
        "type": "mqtt in",
        "z": "866c75dd.edd9a8",
        "name": "",
        "topic": "req/bluelinky/get_status",
        "qos": "0",
        "datatype": "auto",
        "broker": "bb13a99d.68b8f8",
        "x": 460,
        "y": 280,
        "wires": [
            [
                "15dfb508.c6497b",
                "ce62ba4f.d86548",
                "3f82a275.5a0b6e",
                "24d5e0b.3aafc2"
            ]
        ]
    },
    {
        "id": "5ad085b9.05739c",
        "type": "mqtt in",
        "z": "866c75dd.edd9a8",
        "name": "",
        "topic": "req/bluelinky/start_climate",
        "qos": "0",
        "datatype": "auto",
        "broker": "bb13a99d.68b8f8",
        "x": 470,
        "y": 680,
        "wires": [
            [
                "b27d74de.38c808",
                "33b1bc85.662694",
                "ce62ba4f.d86548",
                "24d5e0b.3aafc2"
            ]
        ]
    },
    {
        "id": "15dfb508.c6497b",
        "type": "car-status",
        "z": "866c75dd.edd9a8",
        "name": "Get status",
        "dorefresh": true,
        "parsed": false,
        "bluelinky": "452a3304.58c8fc",
        "x": 830,
        "y": 280,
        "wires": [
            [
                "cccc9476.d56dd8",
                "226ed925.607bb6"
            ]
        ]
    },
    {
        "id": "87abdd88.8ff4d",
        "type": "car-odometer",
        "z": "866c75dd.edd9a8",
        "name": "Get car odometer",
        "bluelinky": "452a3304.58c8fc",
        "x": 850,
        "y": 200,
        "wires": [
            [
                "40d2361c.579588",
                "226ed925.607bb6"
            ]
        ]
    },
    {
        "id": "31100f9a.40008",
        "type": "function",
        "z": "866c75dd.edd9a8",
        "name": "locationWrapper",
        "func": "if(msg.payload.hasOwnProperty(\"body\")) {\n    msg.payload = {\"error\":true};\n    return msg;\n}\nelse {\n\n    msg.payload = { \n        \"location\": msg.payload,\n        \"error\": false\n    };\n    \n    return msg;\n}",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "x": 1460,
        "y": 120,
        "wires": [
            [
                "85a07155.a0f9f",
                "262df5dc.57916a",
                "f487d6d6.a4d568"
            ]
        ]
    },
    {
        "id": "bea1d927.0f3908",
        "type": "car-location",
        "z": "866c75dd.edd9a8",
        "name": "Get car location",
        "bluelinky": "452a3304.58c8fc",
        "x": 850,
        "y": 120,
        "wires": [
            [
                "31100f9a.40008",
                "226ed925.607bb6"
            ]
        ]
    },
    {
        "id": "3c949d67.0d83b2",
        "type": "mqtt in",
        "z": "866c75dd.edd9a8",
        "name": "",
        "topic": "req/bluelinky/get_location",
        "qos": "0",
        "datatype": "auto",
        "broker": "bb13a99d.68b8f8",
        "x": 470,
        "y": 120,
        "wires": [
            [
                "bea1d927.0f3908",
                "ce62ba4f.d86548",
                "3f82a275.5a0b6e",
                "24d5e0b.3aafc2"
            ]
        ]
    },
    {
        "id": "cccc9476.d56dd8",
        "type": "function",
        "z": "866c75dd.edd9a8",
        "name": "analyseStatus",
        "func": "if(msg.payload.hasOwnProperty(\"body\")) {\n    msg.payload = {\"error\":true};\n    return msg;\n}\nelse {\n    let status = msg.payload;\n    status.airTemp.value = 14+(parseInt(status.airTemp.value,16)/2);\n    try{\n    status.evStatus.reservChargeInfos.reservChargeInfo.reservChargeInfoDetail.reservFatcSet.airTemp.value = 14+(parseInt(status.evStatus.reservChargeInfos.reservChargeInfo.reservChargeInfoDetail.reservFatcSet.airTemp.value,16)/2);\n    status.evStatus.reservChargeInfos.reserveChargeInfo2.reservChargeInfoDetail.reservFatcSet.airTemp.value = 14+(parseInt(status.evStatus.reservChargeInfos.reserveChargeInfo2.reservChargeInfoDetail.reservFatcSet.airTemp.value,16)/2);\n    } catch(e) {}\n\n    let time = status.evStatus.remainTime2.atc.value/60;\n    let result = { \n                 \"batSOC\": status.evStatus.batteryStatus,\n                 \"connected\": (status.evStatus.batteryPlugin !== 0),\n                 \"charging\": status.evStatus.batteryCharge,\n                 \"targetSOC\": status.evStatus.reservChargeInfos.targetSOClist[1].targetSOClevel,\n                 \"time2targetSOC\": (Math.floor(time) + \":\" + (\"0\" + Math.floor((time % 1)*60)).slice(-2)), // h:mm\n                 \"range\": status.evStatus.drvDistance[0].rangeByFuel.totalAvailableRange.value,\n                 \"bat12v\": status.battery.batSoc\n                };\n    \n    //msg.payload = result;\n    msg.payload = {\n        \"status\": status,\n        \"error\": false\n        \n    };\n    return msg;\n}",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "x": 1460,
        "y": 280,
        "wires": [
            [
                "3efceea0.c81b12",
                "262df5dc.57916a",
                "f487d6d6.a4d568"
            ]
        ]
    },
    {
        "id": "85a07155.a0f9f",
        "type": "mqtt out",
        "z": "866c75dd.edd9a8",
        "name": "",
        "topic": "bluelinky/location",
        "qos": "",
        "retain": "",
        "broker": "bb13a99d.68b8f8",
        "x": 1870,
        "y": 120,
        "wires": []
    },
    {
        "id": "3efceea0.c81b12",
        "type": "mqtt out",
        "z": "866c75dd.edd9a8",
        "name": "",
        "topic": "bluelinky/status",
        "qos": "",
        "retain": "",
        "broker": "bb13a99d.68b8f8",
        "x": 1860,
        "y": 280,
        "wires": []
    },
    {
        "id": "327104fc.71e1bc",
        "type": "mqtt out",
        "z": "866c75dd.edd9a8",
        "name": "",
        "topic": "bluelinky/odometer",
        "qos": "",
        "retain": "",
        "broker": "bb13a99d.68b8f8",
        "x": 1870,
        "y": 200,
        "wires": []
    },
    {
        "id": "844a32f4.2e029",
        "type": "mqtt in",
        "z": "866c75dd.edd9a8",
        "name": "",
        "topic": "req/bluelinky/stop_climate",
        "qos": "0",
        "datatype": "auto",
        "broker": "bb13a99d.68b8f8",
        "x": 470,
        "y": 760,
        "wires": [
            [
                "7d3ae860.d8c9a8",
                "33b1bc85.662694",
                "ce62ba4f.d86548",
                "24d5e0b.3aafc2"
            ]
        ]
    },
    {
        "id": "57d91e50.7e96",
        "type": "mqtt in",
        "z": "866c75dd.edd9a8",
        "name": "",
        "topic": "req/bluelinky/start_charging",
        "qos": "0",
        "datatype": "auto",
        "broker": "bb13a99d.68b8f8",
        "x": 480,
        "y": 820,
        "wires": [
            [
                "6eebc52c.ee23dc",
                "33b1bc85.662694",
                "ce62ba4f.d86548",
                "24d5e0b.3aafc2"
            ]
        ]
    },
    {
        "id": "6029f0a0.b73e",
        "type": "mqtt in",
        "z": "866c75dd.edd9a8",
        "name": "",
        "topic": "req/bluelinky/stop_charging",
        "qos": "0",
        "datatype": "auto",
        "broker": "bb13a99d.68b8f8",
        "x": 470,
        "y": 880,
        "wires": [
            [
                "84a1ae.74912e5",
                "33b1bc85.662694",
                "ce62ba4f.d86548",
                "24d5e0b.3aafc2"
            ]
        ]
    },
    {
        "id": "c5ecf76c.e753c8",
        "type": "start-car",
        "z": "866c75dd.edd9a8",
        "name": "Start car",
        "bluelinky": "452a3304.58c8fc",
        "x": 1100,
        "y": 680,
        "wires": [
            [
                "811aa567.e89f98",
                "f487d6d6.a4d568"
            ]
        ]
    },
    {
        "id": "6eebc52c.ee23dc",
        "type": "start-charge",
        "z": "866c75dd.edd9a8",
        "name": "Start Charging",
        "bluelinky": "452a3304.58c8fc",
        "x": 1120,
        "y": 820,
        "wires": [
            [
                "811aa567.e89f98",
                "f487d6d6.a4d568"
            ]
        ]
    },
    {
        "id": "84a1ae.74912e5",
        "type": "stop-charge",
        "z": "866c75dd.edd9a8",
        "name": "Stop Charging",
        "bluelinky": "452a3304.58c8fc",
        "x": 1120,
        "y": 880,
        "wires": [
            [
                "811aa567.e89f98",
                "f487d6d6.a4d568"
            ]
        ]
    },
    {
        "id": "7d3ae860.d8c9a8",
        "type": "stop-car",
        "z": "866c75dd.edd9a8",
        "name": "Stop car",
        "bluelinky": "452a3304.58c8fc",
        "x": 1100,
        "y": 760,
        "wires": [
            [
                "811aa567.e89f98",
                "f487d6d6.a4d568"
            ]
        ]
    },
    {
        "id": "b27d74de.38c808",
        "type": "json",
        "z": "866c75dd.edd9a8",
        "name": "",
        "property": "payload",
        "action": "obj",
        "pretty": false,
        "x": 710,
        "y": 680,
        "wires": [
            [
                "c5ecf76c.e753c8",
                "33b1bc85.662694"
            ]
        ]
    },
    {
        "id": "45a6a8e6.2abfd8",
        "type": "mqtt in",
        "z": "866c75dd.edd9a8",
        "name": "",
        "topic": "req/bluelinky/get_odometer",
        "qos": "0",
        "datatype": "auto",
        "broker": "bb13a99d.68b8f8",
        "x": 470,
        "y": 200,
        "wires": [
            [
                "87abdd88.8ff4d",
                "ce62ba4f.d86548",
                "3f82a275.5a0b6e",
                "24d5e0b.3aafc2"
            ]
        ]
    },
    {
        "id": "33b1bc85.662694",
        "type": "debug",
        "z": "866c75dd.edd9a8",
        "name": "",
        "active": false,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 950,
        "y": 940,
        "wires": []
    },
    {
        "id": "ce62ba4f.d86548",
        "type": "mqtt out",
        "z": "866c75dd.edd9a8",
        "name": "",
        "topic": "bluelinky/req_received",
        "qos": "",
        "retain": "",
        "broker": "bb13a99d.68b8f8",
        "x": 880,
        "y": 600,
        "wires": []
    },
    {
        "id": "1babee6c.1c2982",
        "type": "mqtt in",
        "z": "866c75dd.edd9a8",
        "name": "",
        "topic": "req/bluelinky/get_all",
        "qos": "0",
        "datatype": "auto",
        "broker": "bb13a99d.68b8f8",
        "x": 450,
        "y": 400,
        "wires": [
            [
                "ce62ba4f.d86548",
                "3f82a275.5a0b6e",
                "24d5e0b.3aafc2",
                "4375fbb9.00fb44"
            ]
        ]
    },
    {
        "id": "262df5dc.57916a",
        "type": "debug",
        "z": "866c75dd.edd9a8",
        "name": "",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 1810,
        "y": 60,
        "wires": []
    },
    {
        "id": "811aa567.e89f98",
        "type": "debug",
        "z": "866c75dd.edd9a8",
        "name": "",
        "active": false,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 1450,
        "y": 1040,
        "wires": []
    },
    {
        "id": "3f82a275.5a0b6e",
        "type": "debug",
        "z": "866c75dd.edd9a8",
        "name": "",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 830,
        "y": 80,
        "wires": []
    },
    {
        "id": "24d5e0b.3aafc2",
        "type": "change",
        "z": "866c75dd.edd9a8",
        "name": "",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "pending",
                "tot": "str"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 790,
        "y": 1200,
        "wires": [
            [
                "4dd1ea4a.52f144",
                "fecad185.324f8"
            ]
        ]
    },
    {
        "id": "f487d6d6.a4d568",
        "type": "change",
        "z": "866c75dd.edd9a8",
        "name": "",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "idle",
                "tot": "str"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 1770,
        "y": 500,
        "wires": [
            [
                "4dd1ea4a.52f144",
                "fecad185.324f8"
            ]
        ]
    },
    {
        "id": "4dd1ea4a.52f144",
        "type": "mqtt out",
        "z": "866c75dd.edd9a8",
        "name": "",
        "topic": "bluelinky/req_active",
        "qos": "",
        "retain": "",
        "broker": "bb13a99d.68b8f8",
        "x": 2290,
        "y": 1200,
        "wires": []
    },
    {
        "id": "fecad185.324f8",
        "type": "debug",
        "z": "866c75dd.edd9a8",
        "name": "",
        "active": false,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 2270,
        "y": 1260,
        "wires": []
    },
    {
        "id": "40d2361c.579588",
        "type": "function",
        "z": "866c75dd.edd9a8",
        "name": "odometerWrapper",
        "func": "if(msg.payload.hasOwnProperty(\"body\")) {\n    msg.payload = {\"error\":true};\n    return msg;\n}\nelse {\n    msg.payload = { \n        \"odometer\": msg.payload,\n        \"error\": false\n        };\n\n    return msg;\n}",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "x": 1470,
        "y": 200,
        "wires": [
            [
                "327104fc.71e1bc",
                "262df5dc.57916a",
                "f487d6d6.a4d568"
            ]
        ]
    },
    {
        "id": "226ed925.607bb6",
        "type": "debug",
        "z": "866c75dd.edd9a8",
        "name": "",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 1150,
        "y": 80,
        "wires": []
    },
    {
        "id": "4375fbb9.00fb44",
        "type": "car-fullstatus",
        "z": "866c75dd.edd9a8",
        "name": "Get full status",
        "dorefresh": true,
        "bluelinky": "452a3304.58c8fc",
        "x": 930,
        "y": 360,
        "wires": [
            [
                "226ed925.607bb6",
                "69b6c4df.ea6bcc",
                "89681a97.9e24d8",
                "92dc3ff4.1d6e3"
            ]
        ]
    },
    {
        "id": "69b6c4df.ea6bcc",
        "type": "function",
        "z": "866c75dd.edd9a8",
        "name": "locationFromFullstatus",
        "func": "if(msg.payload.hasOwnProperty(\"body\")) {\n    msg.payload = {\"error\":true};\n    return msg;\n}\nelse {\n\n    msg.payload = { \n        \"location\": msg.payload.vehicleLocation,\n        \"error\": false\n    };\n    \n    return msg;\n}\n",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "x": 1440,
        "y": 360,
        "wires": [
            [
                "85a07155.a0f9f",
                "331e5860.907808"
            ]
        ]
    },
    {
        "id": "92dc3ff4.1d6e3",
        "type": "function",
        "z": "866c75dd.edd9a8",
        "name": "statusFromFullstatus",
        "func": "if(msg.payload.hasOwnProperty(\"body\")) {\n    msg.payload = {\"error\":true};\n    return msg;\n}\nelse {\n    let status = msg.payload.vehicleStatus;\n    try{\n        status.airTemp.value = 14+(parseInt(status.airTemp.value,16)/2);\n        status.evStatus.reservChargeInfos.reservChargeInfo.reservChargeInfoDetail.reservFatcSet.airTemp.value = 14+(parseInt(status.evStatus.reservChargeInfos.reservChargeInfo.reservChargeInfoDetail.reservFatcSet.airTemp.value,16)/2);\n        status.evStatus.reservChargeInfos.reserveChargeInfo2.reservChargeInfoDetail.reservFatcSet.airTemp.value = 14+(parseInt(status.evStatus.reservChargeInfos.reserveChargeInfo2.reservChargeInfoDetail.reservFatcSet.airTemp.value,16)/2);\n    } catch(e) {}\n\n    msg.payload = { \n        \"status\": status,\n        \"error\": false\n    };\n    \n    return msg;\n}\n",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "x": 1440,
        "y": 480,
        "wires": [
            [
                "3efceea0.c81b12",
                "f487d6d6.a4d568",
                "331e5860.907808"
            ]
        ]
    },
    {
        "id": "89681a97.9e24d8",
        "type": "function",
        "z": "866c75dd.edd9a8",
        "name": "odometerFromFullstatus",
        "func": "if(msg.payload.hasOwnProperty(\"body\")) {\n    msg.payload = {\"error\":true};\n    return msg;\n}\nelse {\n\n    msg.payload = { \n        \"odometer\": msg.payload.odometer,\n        \"error\": false\n    };\n    \n    return msg;\n}\n",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "x": 1430,
        "y": 420,
        "wires": [
            [
                "327104fc.71e1bc",
                "331e5860.907808"
            ]
        ]
    },
    {
        "id": "331e5860.907808",
        "type": "debug",
        "z": "866c75dd.edd9a8",
        "name": "",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 1770,
        "y": 420,
        "wires": []
    },
    {
        "id": "aa4d220b.f7e19",
        "type": "set-chargetargets",
        "z": "866c75dd.edd9a8",
        "name": "Set charge targets",
        "bluelinky": "452a3304.58c8fc",
        "x": 1140,
        "y": 1060,
        "wires": [
            [
                "811aa567.e89f98",
                "f487d6d6.a4d568"
            ]
        ]
    },
    {
        "id": "4c03338d.2f15ec",
        "type": "login",
        "z": "866c75dd.edd9a8",
        "name": "Login",
        "bluelinky": "452a3304.58c8fc",
        "x": 1090,
        "y": 1120,
        "wires": [
            [
                "811aa567.e89f98"
            ]
        ]
    },
    {
        "id": "28b868f5.16cb48",
        "type": "inject",
        "z": "866c75dd.edd9a8",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "43200",
        "crontab": "",
        "once": true,
        "onceDelay": "12",
        "topic": "",
        "payload": "",
        "payloadType": "date",
        "x": 890,
        "y": 1120,
        "wires": [
            [
                "4c03338d.2f15ec"
            ]
        ]
    },
    {
        "id": "db9ecdb5.a9683",
        "type": "mqtt in",
        "z": "866c75dd.edd9a8",
        "name": "",
        "topic": "req/bluelinky/set_chargetargets",
        "qos": "0",
        "datatype": "auto",
        "broker": "bb13a99d.68b8f8",
        "x": 490,
        "y": 1060,
        "wires": [
            [
                "aa4d220b.f7e19"
            ]
        ]
    },
    {
        "id": "bb13a99d.68b8f8",
        "type": "mqtt-broker",
        "name": "mqtt_Server",
        "broker": "127.0.0.1",
        "port": "1883",
        "clientid": "",
        "usetls": false,
        "compatmode": false,
        "keepalive": "60",
        "cleansession": true,
        "birthTopic": "",
        "birthQos": "0",
        "birthPayload": "",
        "closeTopic": "",
        "closeQos": "0",
        "closePayload": "",
        "willTopic": "",
        "willQos": "0",
        "willPayload": ""
    },
    {
        "id": "452a3304.58c8fc",
        "type": "bluelinky",
        "username": "deinBluelinkUser",
        "password": "deinBluelinkPass",
        "region": "EU",
        "pin": "DeinePIN",
        "vin": "DeineVIN",
        "brand": "[hyundai|kia]"
    }
]


Vielleicht wäre es noch gut der Vollständigkeitshalber auch noch das Aktuelle defmod des MQTT Device von FHEM zu posten, dann könnten Neulinge das direkt für den ersten Einsatz einrichten
Ich würde mich  freuen, wenn du meinen Einladungscode für Tibber, der Stromanbieter, der dir hilft, deinen Stromverbrauch zu verstehen und zu reduzieren, nutzt: https://invite.tibber.com/5fc08jbs. So bekommen wir beide 50 Euro und 100 % Ökostrom / https://geld-fuer-eauto.de/ref/334561880