Skip to content

Instantly share code, notes, and snippets.

@Donni1966
Last active March 14, 2021 12:19
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Donni1966/20ed2bcdfba6e178ac735f25fcb55b07 to your computer and use it in GitHub Desktop.
Save Donni1966/20ed2bcdfba6e178ac735f25fcb55b07 to your computer and use it in GitHub Desktop.
BMW/Mini Cooper SE Build up a Apple Homkit Objekt and Dashboard for status Information
[
{
"id": "505d9063.03da4",
"type": "tab",
"label": "Mini Cooper ",
"disabled": false,
"info": ""
},
{
"id": "f7130581.65d508",
"type": "ui_level",
"z": "505d9063.03da4",
"group": "f5767f33.d8c078",
"order": 9,
"width": 0,
"height": 0,
"name": "Reichweite in KM bezogen auf Ladung",
"label": "Rest Reichweite",
"colorHi": "#00f900",
"colorWarn": "#ff9900",
"colorNormal": "#ff2600",
"colorOff": "#595959",
"min": 0,
"max": "270",
"segWarn": "30",
"segHigh": "100",
"unit": "km",
"layout": "sh",
"channelA": "",
"channelB": "",
"decimals": 0,
"animations": "soft",
"shape": "2",
"colorschema": "rainbow",
"textoptions": "custom",
"colorText": "#eeeeee",
"fontLabel": "1",
"fontValue": "1",
"fontSmall": "0.5",
"colorFromTheme": true,
"textAnimations": true,
"hideValue": false,
"tickmode": "auto",
"peakmode": false,
"property": "payload.attributesMap.beRemainingRangeElectricKm",
"peaktime": 3000,
"x": 770,
"y": 140,
"wires": []
},
{
"id": "e3a47128.d2e9c",
"type": "car-bmw-get",
"z": "505d9063.03da4",
"account": "f31f1fa0.bc2328",
"name": "Mini Services",
"datatype": "service",
"x": 190,
"y": 440,
"wires": [
[
"98127f47.f2f3c"
]
]
},
{
"id": "8f22f3c4.796f4",
"type": "car-bmw-get",
"z": "505d9063.03da4",
"account": "f31f1fa0.bc2328",
"name": "Mini Dynamic",
"datatype": "dynamic",
"x": 180,
"y": 280,
"wires": [
[
"f1a8d36c.b2e428",
"8106ffdd.c0544",
"f7130581.65d508",
"9a344b5c.646768",
"547f5d72.c69424",
"e131801e.ecb39",
"39c2a841.702f",
"6a34779d.b85718",
"b281bb86.b85458",
"695301e1.9fea9",
"e1641b12.06ccf",
"25db5436.0b1f04",
"efb70a2.0e32df8",
"819dfe34.4ec9d8",
"9d63bd82.84dc08",
"9af37fb6.3697b",
"4d4607a1.54efd",
"9bc4e0b9.0f5e9",
"1547f7b2.dc359",
"be3f4ad0.a71f7",
"3202109a.d2cea8",
"67b174ef.e194bc",
"cfc60ba4.cc5f78",
"3b924d46.072782",
"5374d0c8.29d7c8",
"9fe2a17.615336",
"8801edb7.e18e48",
"65fd6510.6e4424"
]
]
},
{
"id": "9a344b5c.646768",
"type": "ui_level",
"z": "505d9063.03da4",
"group": "f5767f33.d8c078",
"order": 8,
"width": 0,
"height": 0,
"name": "Akku aktuell",
"label": "Kapazität aktuell",
"colorHi": "#00f900",
"colorWarn": "#ff9900",
"colorNormal": "#ff2600",
"colorOff": "#595959",
"min": 0,
"max": "100",
"segWarn": "20",
"segHigh": "50",
"unit": "%",
"layout": "sh",
"channelA": "",
"channelB": "",
"decimals": 0,
"animations": "soft",
"shape": 2,
"colorschema": "rainbow",
"textoptions": "custom",
"colorText": "#eeeeee",
"fontLabel": "1",
"fontValue": "1",
"fontSmall": "0.5",
"colorFromTheme": true,
"textAnimations": false,
"hideValue": false,
"tickmode": "auto",
"peakmode": false,
"property": "payload.attributesMap.chargingLevelHv",
"peaktime": 3000,
"x": 690,
"y": 180,
"wires": []
},
{
"id": "7a0c5fcb.265c6",
"type": "ui_led",
"z": "505d9063.03da4",
"group": "f5767f33.d8c078",
"order": 5,
"width": 0,
"height": 0,
"label": "Läd gerade?",
"labelPlacement": "left",
"labelAlignment": "left",
"colorForValue": [
{
"color": "gray",
"value": "NOT_CHARGING",
"valueType": "str"
},
{
"color": "yellow",
"value": "CHARGING",
"valueType": "str"
},
{
"color": "green",
"value": "FINISHED_FULLY_CHARGED",
"valueType": "str"
},
{
"color": "lightgreen",
"value": "DIRECT_CHARGING",
"valueType": "str"
}
],
"allowColorForValueInMessage": false,
"name": "Läd ja nein",
"x": 690,
"y": 300,
"wires": []
},
{
"id": "97fca009.96977",
"type": "ui_text",
"z": "505d9063.03da4",
"group": "8b98191.6de21e8",
"order": 3,
"width": 4,
"height": 1,
"name": "",
"label": "Letzte Fahrt: ",
"format": "{{msg.payload}} Uhr",
"layout": "row-spread",
"x": 690,
"y": 380,
"wires": []
},
{
"id": "547f5d72.c69424",
"type": "ui_level",
"z": "505d9063.03da4",
"group": "f5767f33.d8c078",
"order": 10,
"width": 6,
"height": 2,
"name": "Maximal Reichweite je nach Witterung",
"label": "Reichweite max bei Vollladung:",
"colorHi": "#00f900",
"colorWarn": "#ff9900",
"colorNormal": "#ff2600",
"colorOff": "#595959",
"min": 0,
"max": "270",
"segWarn": "100",
"segHigh": "150",
"unit": "km",
"layout": "sh",
"channelA": "",
"channelB": "",
"decimals": 0,
"animations": "soft",
"shape": 2,
"colorschema": "rainbow",
"textoptions": "custom",
"colorText": "#eeeeee",
"fontLabel": "1",
"fontValue": "1",
"fontSmall": "0.5",
"colorFromTheme": true,
"textAnimations": false,
"hideValue": false,
"tickmode": "auto",
"peakmode": false,
"property": "payload.attributesMap.beMaxRangeElectric",
"peaktime": 3000,
"x": 770,
"y": 220,
"wires": []
},
{
"id": "6a34779d.b85718",
"type": "change",
"z": "505d9063.03da4",
"name": "parse charge status",
"rules": [
{
"t": "move",
"p": "payload.attributesMap.chargingLogicCurrentlyActive",
"pt": "msg",
"to": "payload",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 500,
"y": 300,
"wires": [
[
"7a0c5fcb.265c6"
]
]
},
{
"id": "39c2a841.702f",
"type": "change",
"z": "505d9063.03da4",
"name": "parse connect status",
"rules": [
{
"t": "move",
"p": "payload.attributesMap.connectorStatus",
"pt": "msg",
"to": "payload",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 500,
"y": 340,
"wires": [
[
"aa36e447.21c6d8"
]
]
},
{
"id": "aa36e447.21c6d8",
"type": "ui_led",
"z": "505d9063.03da4",
"group": "f5767f33.d8c078",
"order": 4,
"width": 0,
"height": 0,
"label": "Am Strom angestöpselt?",
"labelPlacement": "left",
"labelAlignment": "left",
"colorForValue": [
{
"color": "gray",
"value": "DISCONNECTED",
"valueType": "str"
},
{
"color": "green",
"value": "CONNECTED",
"valueType": "str"
}
],
"allowColorForValueInMessage": false,
"name": "Eingesteckt?",
"x": 690,
"y": 340,
"wires": []
},
{
"id": "49cc1b27.757cd4",
"type": "car-bmw-get",
"z": "505d9063.03da4",
"account": "f31f1fa0.bc2328",
"name": "Mini Effcientcy",
"datatype": "efficiency",
"x": 180,
"y": 360,
"wires": [
[
"3721eb3b.de67f4",
"1d611236.c0546e",
"a1bec292.cb045",
"382a3a46.d7dc16",
"8bdc67cd.3527"
]
]
},
{
"id": "3721eb3b.de67f4",
"type": "debug",
"z": "505d9063.03da4",
"name": "Electrifzity",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 190,
"y": 400,
"wires": []
},
{
"id": "1d611236.c0546e",
"type": "change",
"z": "505d9063.03da4",
"name": "parse drive KM level",
"rules": [
{
"t": "move",
"p": "payload.lifeTimeList[0].lifeTime",
"pt": "msg",
"to": "payload",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 500,
"y": 820,
"wires": [
[
"8726ebcd.353ea"
]
]
},
{
"id": "8726ebcd.353ea",
"type": "ui_text",
"z": "505d9063.03da4",
"group": "8b98191.6de21e8",
"order": 4,
"width": 4,
"height": 1,
"name": "",
"label": "Aktueller Kilometerstand: ",
"format": "{{msg.payload}} km",
"layout": "row-spread",
"x": 730,
"y": 820,
"wires": []
},
{
"id": "98127f47.f2f3c",
"type": "debug",
"z": "505d9063.03da4",
"name": "BMW Service Infos",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 190,
"y": 480,
"wires": []
},
{
"id": "c722162d.b5ed3",
"type": "ui_button",
"z": "505d9063.03da4",
"name": "Refresh Botton",
"group": "8b98191.6de21e8",
"order": 8,
"width": 0,
"height": 0,
"passthru": true,
"label": "Aktualisieren",
"tooltip": "Abfrage starten",
"color": "green",
"bgcolor": "",
"icon": "fa-cloud-download",
"payload": "",
"payloadType": "date",
"topic": "",
"x": 160,
"y": 180,
"wires": [
[
"8f22f3c4.796f4",
"49cc1b27.757cd4"
]
]
},
{
"id": "83ed2a75.e98b58",
"type": "car-bmw-get",
"z": "505d9063.03da4",
"account": "f31f1fa0.bc2328",
"name": "Mini Navigation",
"datatype": "navigation",
"x": 180,
"y": 520,
"wires": [
[
"a03bb830.7b9ff8"
]
]
},
{
"id": "a03bb830.7b9ff8",
"type": "debug",
"z": "505d9063.03da4",
"name": "BMW Navi Infos",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 220,
"y": 560,
"wires": []
},
{
"id": "8106ffdd.c0544",
"type": "ui_text",
"z": "505d9063.03da4",
"group": "8b98191.6de21e8",
"order": 7,
"width": 0,
"height": 0,
"name": "",
"label": "letzte Status Änderung",
"format": "{{msg.payload.attributesMap.updateTime}}",
"layout": "col-center",
"x": 720,
"y": 100,
"wires": [],
"icon": "node-red/comment.svg"
},
{
"id": "f1a8d36c.b2e428",
"type": "debug",
"z": "505d9063.03da4",
"name": "Mini Dynamic",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 160,
"y": 320,
"wires": []
},
{
"id": "968ce1f8.fba4b8",
"type": "change",
"z": "505d9063.03da4",
"name": "Akku Level",
"rules": [
{
"t": "set",
"p": "topic",
"pt": "msg",
"to": "1/BatteryLevel",
"tot": "str"
},
{
"t": "move",
"p": "payload.attributesMap.chargingLevelHv",
"pt": "msg",
"to": "payload",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1370,
"y": 60,
"wires": [
[
"fe74fe90.d679d8"
]
]
},
{
"id": "6a5f00fe.c8bc68",
"type": "inject",
"z": "505d9063.03da4",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": true,
"onceDelay": 0.1,
"topic": "1/StatusLowBattery",
"payload": "0",
"payloadType": "num",
"x": 1140,
"y": 860,
"wires": [
[
"e7e99059.167c98"
]
]
},
{
"id": "d78b3740.eed43",
"type": "inject",
"z": "505d9063.03da4",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": true,
"onceDelay": 0.1,
"topic": "1/ChargingState",
"payload": "0",
"payloadType": "num",
"x": 1130,
"y": 820,
"wires": [
[
"e7e99059.167c98"
]
]
},
{
"id": "ee3332a9.8d1638",
"type": "inject",
"z": "505d9063.03da4",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": true,
"onceDelay": 0.1,
"topic": "1/BatteryLevel",
"payload": "0",
"payloadType": "num",
"x": 1130,
"y": 780,
"wires": [
[
"e7e99059.167c98"
]
]
},
{
"id": "e7e99059.167c98",
"type": "redmatic-homekit-universal",
"z": "505d9063.03da4",
"bridgeConfig": "75272f7c.68af08",
"name": "Mini Cooper Status",
"services": [
{
"subtype": "0",
"service": "OccupancySensor",
"name": "Mini Angesteckt"
},
{
"subtype": "1",
"service": "BatteryService",
"name": "Akku"
},
{
"subtype": "2",
"service": "Door",
"name": "Fahrertür"
},
{
"subtype": "3",
"service": "Door",
"name": "Beifahrertür"
},
{
"subtype": "4",
"service": "Door",
"name": "Heckklappe"
},
{
"subtype": "5",
"service": "LockMechanism",
"name": "Zentralverrieglung"
},
{
"subtype": "6",
"service": "Window",
"name": "Fahrerfenster"
},
{
"subtype": "7",
"service": "Window",
"name": "Beifahrerfenster"
},
{
"subtype": "8",
"service": "Lightbulb",
"name": "Parklicht"
},
{
"subtype": "9",
"service": "LightSensor",
"name": "Reichweite"
}
],
"x": 1130,
"y": 720,
"wires": [
[]
],
"icon": "node-red-contrib-car-bmw/car.png"
},
{
"id": "66dd5564.a0e8bc",
"type": "time-inject",
"z": "505d9063.03da4",
"name": "15 Minuten Timer",
"nameInt": "Zeitpunkt ↻15min",
"positionConfig": "af500d3.a408c7",
"props": [
{
"p": "",
"pt": "msgPayload",
"v": "",
"vt": "date",
"o": "",
"oT": "none",
"oM": "60000",
"f": 0,
"fS": 0,
"fT": "Millisekunden UNIX-Zeit",
"fI": "0",
"next": true,
"days": ""
},
{
"p": "",
"pt": "msgTopic",
"v": "",
"vt": "str",
"o": "",
"oT": "none",
"oM": "60000",
"f": 0,
"fS": 0,
"fT": "Millisekunden UNIX-Zeit",
"fI": "0",
"next": false,
"days": ""
}
],
"injectTypeSelect": "interval",
"intervalCount": "15",
"intervalCountType": "num",
"intervalCountMultiplier": 60000,
"time": "",
"timeType": "entered",
"offset": 0,
"offsetType": "none",
"offsetMultiplier": 60000,
"timeEnd": "",
"timeEndType": "entered",
"timeEndOffset": 0,
"timeEndOffsetType": "none",
"timeEndOffsetMultiplier": 60000,
"timeDays": "*",
"timeOnlyOddDays": false,
"timeOnlyEvenDays": false,
"timeMonths": "*",
"timedatestart": "",
"timedateend": "",
"property": "",
"propertyType": "none",
"propertyCompare": "true",
"propertyThreshold": "",
"propertyThresholdType": "num",
"timeAlt": "",
"timeAltType": "entered",
"timeAltDays": "*",
"timeAltOnlyOddDays": false,
"timeAltOnlyEvenDays": false,
"timeAltMonths": "*",
"timeAltOffset": 0,
"timeAltOffsetType": "none",
"timeAltOffsetMultiplier": 60000,
"once": false,
"onceDelay": 0.1,
"recalcTime": 2,
"x": 160,
"y": 60,
"wires": [
[
"c722162d.b5ed3"
]
]
},
{
"id": "c8784792.6e1068",
"type": "inject",
"z": "505d9063.03da4",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": true,
"onceDelay": 0.1,
"topic": "2/PositionState",
"payload": "2",
"payloadType": "num",
"x": 1430,
"y": 820,
"wires": [
[
"e7e99059.167c98"
]
]
},
{
"id": "d7cea6d5.772388",
"type": "inject",
"z": "505d9063.03da4",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": true,
"onceDelay": 0.1,
"topic": "2/CurrentPosition",
"payload": "100",
"payloadType": "num",
"x": 1420,
"y": 780,
"wires": [
[
"e7e99059.167c98"
]
]
},
{
"id": "8f103af9.c7e678",
"type": "inject",
"z": "505d9063.03da4",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": true,
"onceDelay": 0.1,
"topic": "2/TargetPosition",
"payload": "100",
"payloadType": "num",
"x": 1420,
"y": 860,
"wires": [
[
"e7e99059.167c98"
]
]
},
{
"id": "ec115e82.bc499",
"type": "ui_led",
"z": "505d9063.03da4",
"group": "8b98191.6de21e8",
"order": 9,
"width": 4,
"height": 1,
"label": "Fahrertür",
"labelPlacement": "left",
"labelAlignment": "left",
"colorForValue": [
{
"color": "red",
"value": "OPEN",
"valueType": "str"
},
{
"color": "green",
"value": "CLOSED",
"valueType": "str"
}
],
"allowColorForValueInMessage": false,
"name": "Fahrertür",
"x": 680,
"y": 860,
"wires": []
},
{
"id": "b281bb86.b85458",
"type": "change",
"z": "505d9063.03da4",
"name": "parse status driverdoor",
"rules": [
{
"t": "move",
"p": "payload.attributesMap.door_driver_front",
"pt": "msg",
"to": "payload",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 490,
"y": 860,
"wires": [
[
"ec115e82.bc499"
]
]
},
{
"id": "e19726d7.15c45",
"type": "ui_led",
"z": "505d9063.03da4",
"group": "8b98191.6de21e8",
"order": 11,
"width": 4,
"height": 1,
"label": "Beifahrertür",
"labelPlacement": "left",
"labelAlignment": "left",
"colorForValue": [
{
"color": "red",
"value": "OPEN",
"valueType": "str"
},
{
"color": "green",
"value": "CLOSED",
"valueType": "str"
}
],
"allowColorForValueInMessage": false,
"name": "Beifahrertür",
"x": 690,
"y": 900,
"wires": []
},
{
"id": "695301e1.9fea9",
"type": "change",
"z": "505d9063.03da4",
"name": "pare passenger Door status",
"rules": [
{
"t": "move",
"p": "payload.attributesMap.door_passenger_front",
"pt": "msg",
"to": "payload",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 480,
"y": 900,
"wires": [
[
"e19726d7.15c45"
]
]
},
{
"id": "2cb5e7b2.63659",
"type": "ui_led",
"z": "505d9063.03da4",
"group": "8b98191.6de21e8",
"order": 14,
"width": 4,
"height": 1,
"label": "Heckklappe",
"labelPlacement": "left",
"labelAlignment": "left",
"colorForValue": [
{
"color": "red",
"value": "OPEN",
"valueType": "str"
},
{
"color": "green",
"value": "CLOSED",
"valueType": "str"
}
],
"allowColorForValueInMessage": false,
"name": "heckklappe",
"x": 690,
"y": 940,
"wires": []
},
{
"id": "e1641b12.06ccf",
"type": "change",
"z": "505d9063.03da4",
"name": "parce trunk status (Kofferraum)",
"rules": [
{
"t": "move",
"p": "payload.attributesMap.trunk_state",
"pt": "msg",
"to": "payload",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 470,
"y": 940,
"wires": [
[
"2cb5e7b2.63659"
]
]
},
{
"id": "e131801e.ecb39",
"type": "change",
"z": "505d9063.03da4",
"name": "parse last trip",
"rules": [
{
"t": "move",
"p": "payload.attributesMap.Segment_LastTrip_time_segment_end_formatted",
"pt": "msg",
"to": "payload",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 520,
"y": 380,
"wires": [
[
"97fca009.96977"
]
]
},
{
"id": "a504202b.4fc168",
"type": "comment",
"z": "505d9063.03da4",
"name": "Request per booton or every 15 minutes",
"info": "",
"x": 220,
"y": 20,
"wires": []
},
{
"id": "25db5436.0b1f04",
"type": "link out",
"z": "505d9063.03da4",
"name": "Ausgang für weitere Auswertungen",
"links": [
"a2c70333.70639",
"e1162166.d80fe8",
"b13ce2e2.7999c",
"f4cc4443.863dd",
"fc158279.bd0f9",
"25ca5ec8.ea7aea"
],
"x": 635,
"y": 60,
"wires": []
},
{
"id": "a2c70333.70639",
"type": "link in",
"z": "505d9063.03da4",
"name": "",
"links": [
"25db5436.0b1f04"
],
"x": 975,
"y": 60,
"wires": [
[
"3a90189e.abb74",
"968ce1f8.fba4b8",
"6536a0fa.1bac08",
"268c319.944b8ce",
"722e2df4.0e0ccc",
"24e79dbd.61ac6a",
"97779727.1d0408",
"49aca3fd.a0d40c",
"7d67163a.b20b9",
"d645722a.e8f3a8",
"a2a81e9e.55067"
]
]
},
{
"id": "fe74fe90.d679d8",
"type": "link out",
"z": "505d9063.03da4",
"name": "Status übertragen MINI Homekit Opject",
"links": [
"7746ed5a.5d3f8c"
],
"x": 1555,
"y": 340,
"wires": []
},
{
"id": "7746ed5a.5d3f8c",
"type": "link in",
"z": "505d9063.03da4",
"name": "",
"links": [
"fe74fe90.d679d8"
],
"x": 955,
"y": 720,
"wires": [
[
"e7e99059.167c98",
"a9216d00.4a0cf"
]
]
},
{
"id": "e338a8e4.8c1ba",
"type": "comment",
"z": "505d9063.03da4",
"name": "Node Red Dashboard building",
"info": "",
"x": 740,
"y": 20,
"wires": []
},
{
"id": "e38efd57.2125a",
"type": "comment",
"z": "505d9063.03da4",
"name": "HK Objekt Status build from BMW Connect Payload ",
"info": "",
"x": 1190,
"y": 20,
"wires": []
},
{
"id": "241e5ca4.58e694",
"type": "comment",
"z": "505d9063.03da4",
"name": "Battery Init to detect Errors",
"info": "",
"x": 1110,
"y": 940,
"wires": []
},
{
"id": "748d5c52.ff84dc",
"type": "comment",
"z": "505d9063.03da4",
"name": "Init one door open to detect changing",
"info": "",
"x": 1450,
"y": 900,
"wires": []
},
{
"id": "57733049.2d47b8",
"type": "ui_text",
"z": "505d9063.03da4",
"group": "c1f93750.9cb2a8",
"order": 1,
"width": 0,
"height": 0,
"name": "",
"label": "Sichtprüfung ",
"format": "{{msg.payload}}",
"layout": "col-center",
"x": 690,
"y": 460,
"wires": []
},
{
"id": "efb70a2.0e32df8",
"type": "change",
"z": "505d9063.03da4",
"name": "parse service Infos",
"rules": [
{
"t": "move",
"p": "payload.vehicleMessages.cbsMessages[0].description",
"pt": "msg",
"to": "payload",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 510,
"y": 460,
"wires": [
[
"57733049.2d47b8"
]
]
},
{
"id": "39cd11db.b50a1e",
"type": "ui_level",
"z": "505d9063.03da4",
"group": "f5767f33.d8c078",
"order": 7,
"width": 0,
"height": 0,
"name": "Kapazität akku",
"label": "Kapazität Akku",
"colorHi": "#00f900",
"colorWarn": "#ff9900",
"colorNormal": "#ff2600",
"colorOff": "#595959",
"min": 0,
"max": "35000",
"segWarn": "10000",
"segHigh": "26000",
"unit": "kw/h",
"layout": "sh",
"channelA": "",
"channelB": "",
"decimals": "2",
"animations": "soft",
"shape": 2,
"colorschema": "rainbow",
"textoptions": "custom",
"colorText": "#eeeeee",
"fontLabel": "1",
"fontValue": "1",
"fontSmall": "0.5",
"colorFromTheme": true,
"textAnimations": false,
"hideValue": false,
"tickmode": "auto",
"peakmode": false,
"property": "payload",
"peaktime": 3000,
"x": 700,
"y": 260,
"wires": []
},
{
"id": "819dfe34.4ec9d8",
"type": "change",
"z": "505d9063.03da4",
"name": "parse battery cap",
"rules": [
{
"t": "move",
"p": "payload.attributesMap.battery_size_max",
"pt": "msg",
"to": "payload",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 510,
"y": 260,
"wires": [
[
"39cd11db.b50a1e"
]
]
},
{
"id": "9d63bd82.84dc08",
"type": "change",
"z": "505d9063.03da4",
"name": "parse remote Infos",
"rules": [
{
"t": "move",
"p": "payload.attributesMap.lastUpdateReason",
"pt": "msg",
"to": "payload",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 510,
"y": 500,
"wires": [
[
"626a7e0a.356aa8"
]
]
},
{
"id": "626a7e0a.356aa8",
"type": "ui_text",
"z": "505d9063.03da4",
"group": "c1f93750.9cb2a8",
"order": 8,
"width": 0,
"height": 0,
"name": "",
"label": "Remote Zugriff:",
"format": "{{msg.payload}}",
"layout": "col-center",
"x": 700,
"y": 500,
"wires": []
},
{
"id": "9e551001.33ceb8",
"type": "ui_text",
"z": "505d9063.03da4",
"group": "f5767f33.d8c078",
"order": 1,
"width": 0,
"height": 0,
"name": "",
"label": "Steckertyp:",
"format": "{{msg.payload}}",
"layout": "row-spread",
"x": 690,
"y": 540,
"wires": []
},
{
"id": "9af37fb6.3697b",
"type": "change",
"z": "505d9063.03da4",
"name": "parse contecter Infos",
"rules": [
{
"t": "move",
"p": "payload.attributesMap.charging_connection_type",
"pt": "msg",
"to": "payload",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 500,
"y": 540,
"wires": [
[
"9e551001.33ceb8"
]
]
},
{
"id": "4d4607a1.54efd",
"type": "change",
"z": "505d9063.03da4",
"name": "parse maintenace next",
"rules": [
{
"t": "move",
"p": "payload.vehicleMessages.cbsMessages[0].date",
"pt": "msg",
"to": "payload",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 500,
"y": 580,
"wires": [
[
"fb344eeb.ff8ea8"
]
]
},
{
"id": "fb344eeb.ff8ea8",
"type": "ui_text",
"z": "505d9063.03da4",
"group": "c1f93750.9cb2a8",
"order": 5,
"width": 0,
"height": 0,
"name": "",
"label": "Nächste Wartung",
"format": "{{msg.payload}}",
"layout": "col-center",
"x": 710,
"y": 580,
"wires": []
},
{
"id": "9bc4e0b9.0f5e9",
"type": "change",
"z": "505d9063.03da4",
"name": "parse return last charge",
"rules": [
{
"t": "move",
"p": "payload.attributesMap.lastChargingEndReason",
"pt": "msg",
"to": "payload",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 490,
"y": 620,
"wires": [
[
"33c7253d.8134d2"
]
]
},
{
"id": "33c7253d.8134d2",
"type": "ui_text",
"z": "505d9063.03da4",
"group": "f5767f33.d8c078",
"order": 2,
"width": 0,
"height": 0,
"name": "",
"label": "Rückmeldung letzer Ladevorgang",
"format": "{{msg.payload}}",
"layout": "col-center",
"x": 760,
"y": 620,
"wires": []
},
{
"id": "1547f7b2.dc359",
"type": "change",
"z": "505d9063.03da4",
"name": "parse status last charge",
"rules": [
{
"t": "move",
"p": "payload.attributesMap.lastChargingEndResult",
"pt": "msg",
"to": "payload",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 490,
"y": 660,
"wires": [
[
"394cc924.e98a66",
"ed7b698a.3ebed8"
]
]
},
{
"id": "394cc924.e98a66",
"type": "ui_text",
"z": "505d9063.03da4",
"group": "f5767f33.d8c078",
"order": 3,
"width": 0,
"height": 0,
"name": "",
"label": "Status letze Ladung",
"format": "{{msg.payload}}",
"layout": "col-center",
"x": 720,
"y": 660,
"wires": []
},
{
"id": "be3f4ad0.a71f7",
"type": "change",
"z": "505d9063.03da4",
"name": "parce hoot status (Motorhaube)",
"rules": [
{
"t": "move",
"p": "payload.attributesMap.hood_state",
"pt": "msg",
"to": "payload",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 470,
"y": 980,
"wires": [
[
"26d18d9c.2a9dc2"
]
]
},
{
"id": "26d18d9c.2a9dc2",
"type": "ui_led",
"z": "505d9063.03da4",
"group": "8b98191.6de21e8",
"order": 13,
"width": 4,
"height": 1,
"label": "Motorhaube",
"labelPlacement": "left",
"labelAlignment": "left",
"colorForValue": [
{
"color": "red",
"value": "OPEN",
"valueType": "str"
},
{
"color": "green",
"value": "CLOSED",
"valueType": "str"
}
],
"allowColorForValueInMessage": false,
"name": "Motorhaube",
"x": 690,
"y": 980,
"wires": []
},
{
"id": "67b174ef.e194bc",
"type": "change",
"z": "505d9063.03da4",
"name": "parce windows passenger",
"rules": [
{
"t": "move",
"p": "payload.attributesMap.window_passenger_front",
"pt": "msg",
"to": "payload",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 480,
"y": 1060,
"wires": [
[
"aa511638.c306a8"
]
]
},
{
"id": "aa511638.c306a8",
"type": "ui_led",
"z": "505d9063.03da4",
"group": "8b98191.6de21e8",
"order": 12,
"width": 4,
"height": 1,
"label": "BeiFahrerfenster",
"labelPlacement": "left",
"labelAlignment": "left",
"colorForValue": [
{
"color": "red",
"value": "OPEN",
"valueType": "str"
},
{
"color": "green",
"value": "CLOSED",
"valueType": "str"
}
],
"allowColorForValueInMessage": false,
"name": "BeiFahrerfenster",
"x": 700,
"y": 1060,
"wires": []
},
{
"id": "3202109a.d2cea8",
"type": "change",
"z": "505d9063.03da4",
"name": "parce window driver",
"rules": [
{
"t": "move",
"p": "payload.attributesMap.window_driver_front",
"pt": "msg",
"to": "payload",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 500,
"y": 1020,
"wires": [
[
"93d16360.9de0b8"
]
]
},
{
"id": "93d16360.9de0b8",
"type": "ui_led",
"z": "505d9063.03da4",
"group": "8b98191.6de21e8",
"order": 10,
"width": 4,
"height": 1,
"label": "Fahrerfenster",
"labelPlacement": "left",
"labelAlignment": "left",
"colorForValue": [
{
"color": "red",
"value": "OPEN",
"valueType": "str"
},
{
"color": "green",
"value": "CLOSED",
"valueType": "str"
}
],
"allowColorForValueInMessage": false,
"name": "Fahrerfenster",
"x": 690,
"y": 1020,
"wires": []
},
{
"id": "a1bec292.cb045",
"type": "change",
"z": "505d9063.03da4",
"name": "parse last trip lengh",
"rules": [
{
"t": "move",
"p": "payload.lastTripList[0].lastTrip",
"pt": "msg",
"to": "payload",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 510,
"y": 780,
"wires": [
[
"25091b52.7c815c"
]
]
},
{
"id": "25091b52.7c815c",
"type": "ui_text",
"z": "505d9063.03da4",
"group": "8b98191.6de21e8",
"order": 5,
"width": 4,
"height": 1,
"name": "Länge",
"label": "Länge: ",
"format": "{{msg.payload}} km",
"layout": "row-spread",
"x": 670,
"y": 780,
"wires": []
},
{
"id": "382a3a46.d7dc16",
"type": "change",
"z": "505d9063.03da4",
"name": "parse last trip duration",
"rules": [
{
"t": "move",
"p": "payload.lastTripList[1].lastTrip",
"pt": "msg",
"to": "payload",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 500,
"y": 740,
"wires": [
[
"9b30a57.0f7e658"
]
]
},
{
"id": "9b30a57.0f7e658",
"type": "ui_text",
"z": "505d9063.03da4",
"group": "8b98191.6de21e8",
"order": 6,
"width": 4,
"height": 1,
"name": "Dauer",
"label": "Dauer",
"format": "{{msg.payload}} Minuten",
"layout": "row-spread",
"x": 670,
"y": 740,
"wires": []
},
{
"id": "3d3ffb20.6e20bc",
"type": "ui_clock",
"z": "505d9063.03da4",
"name": "Uhr",
"group": "8b98191.6de21e8",
"order": 1,
"width": 4,
"height": 3,
"x": 670,
"y": 1260,
"wires": []
},
{
"id": "268c319.944b8ce",
"type": "function",
"z": "505d9063.03da4",
"name": "build MSG HK.Objekt (Lockstatus)",
"func": "var msg1 = {payload: \"1\", topic: \"5/LockTargetState\"};\nvar msg2 = {payload: \"1\", topic: \"5/LockCurrentState\"};\n\nif (msg.payload.attributesMap.door_lock_state === \"SECURED\") {\n msg1.payload = \"1\";\n msg2.payload = \"1\";\n return [msg1, msg2];\n}\nif (msg.payload.attributesMap.door_lock_state === \"LOCKED\") {\n msg1.payload = \"1\";\n msg2.payload = \"1\";\n return [msg1, msg2];\n}\nif (msg.payload.attributesMap.door_lock_state === \"UNLOCKED\") {\n msg1.payload = \"0\";\n msg2.payload = \"0\";\n return [msg1, msg2];\n}\n",
"outputs": 2,
"noerr": 0,
"initialize": "",
"finalize": "",
"x": 1300,
"y": 100,
"wires": [
[
"fe74fe90.d679d8"
],
[
"fe74fe90.d679d8"
]
],
"icon": "node-red/swap.svg"
},
{
"id": "6536a0fa.1bac08",
"type": "function",
"z": "505d9063.03da4",
"name": "build MSG HK.Objekt (Doorstate Driver)",
"func": "var msg1 = {payload: \"1\", topic: \"2/CurrentPosition\"};\nvar msg2 = {payload: \"1\", topic: \"2/TargetPosition\"};\nvar msg3 = {payload: \"1\", topic: \"2/PositionState\"};\n\nif (msg.payload.attributesMap.door_driver_front === \"CLOSED\") {\n msg1.payload = \"0\";\n msg2.payload = \"0\";\n msg3.payload = \"0\";\n return [msg1, msg2, msg3];\n}\nif (msg.payload.attributesMap.door_driver_front === \"OPEN\") {\n msg1.payload = \"100\";\n msg2.payload = \"100\";\n msg3.payload = \"2\";\n return [msg1, msg2, msg3];\n}\n",
"outputs": 3,
"noerr": 0,
"initialize": "",
"finalize": "",
"x": 1280,
"y": 220,
"wires": [
[
"fe74fe90.d679d8"
],
[
"fe74fe90.d679d8"
],
[
"fe74fe90.d679d8"
]
],
"icon": "font-awesome/fa-calculator"
},
{
"id": "3a90189e.abb74",
"type": "function",
"z": "505d9063.03da4",
"name": "build MSG HK.Objekt (Doorstate Passenger)",
"func": "var msg1 = {payload: \"1\", topic: \"3/CurrentPosition\"};\nvar msg2 = {payload: \"1\", topic: \"3/TargetPosition\"};\nvar msg3 = {payload: \"1\", topic: \"3/PositionState\"};\n\nif (msg.payload.attributesMap.door_passenger_front === \"CLOSED\") {\n msg1.payload = \"0\";\n msg2.payload = \"0\";\n msg3.payload = \"0\";\n return [msg1, msg2, msg3];\n}\nif (msg.payload.attributesMap.door_passenger_front === \"OPEN\") {\n msg1.payload = \"100\";\n msg2.payload = \"100\";\n msg3.payload = \"2\";\n return [msg1, msg2, msg3];\n}\n",
"outputs": 3,
"noerr": 0,
"initialize": "",
"finalize": "",
"x": 1270,
"y": 160,
"wires": [
[
"fe74fe90.d679d8"
],
[
"fe74fe90.d679d8"
],
[
"fe74fe90.d679d8"
]
],
"icon": "node-red/switch.svg"
},
{
"id": "722e2df4.0e0ccc",
"type": "function",
"z": "505d9063.03da4",
"name": "build MSG HK.Objekt (Doorstate Trunk)",
"func": "var msg1 = {payload: \"1\", topic: \"4/CurrentPosition\"};\nvar msg2 = {payload: \"1\", topic: \"4/TargetPosition\"};\nvar msg3 = {payload: \"1\", topic: \"4/PositionState\"};\n\nif (msg.payload.attributesMap.trunk_state === \"CLOSED\") {\n msg1.payload = \"0\";\n msg2.payload = \"0\";\n msg3.payload = \"0\";\n return [msg1, msg2, msg3];\n}\nif (msg.payload.attributesMap.trunk_state === \"OPEN\") {\n msg1.payload = \"100\";\n msg2.payload = \"100\";\n msg3.payload = \"2\";\n return [msg1, msg2, msg3];\n}\n",
"outputs": 3,
"noerr": 0,
"initialize": "",
"finalize": "",
"x": 1280,
"y": 280,
"wires": [
[
"fe74fe90.d679d8"
],
[
"fe74fe90.d679d8"
],
[
"fe74fe90.d679d8"
]
]
},
{
"id": "24e79dbd.61ac6a",
"type": "function",
"z": "505d9063.03da4",
"name": "build MSG HK.Objekt (Loding )",
"func": "var msg1 = {payload: \"1\", topic: \"1/ChargingState\"};\n\n\n//Charging Status check// \nif (msg.payload.attributesMap.chargingHVStatus === \"CHARGING\") {\n msg1.payload = \"1\";\n return [msg1];\n} else {\n msg1.payload = \"0\";\n return [msg1];\n}\n\n",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"x": 1310,
"y": 340,
"wires": [
[
"fe74fe90.d679d8"
]
],
"outputLabels": [
"Charging?"
]
},
{
"id": "b364791d.289268",
"type": "inject",
"z": "505d9063.03da4",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "1",
"crontab": "",
"once": true,
"onceDelay": "5",
"topic": "",
"payload": "",
"payloadType": "date",
"x": 530,
"y": 1260,
"wires": [
[
"3d3ffb20.6e20bc"
]
]
},
{
"id": "a9216d00.4a0cf",
"type": "debug",
"z": "505d9063.03da4",
"name": "Input Debug HK Object",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 1150,
"y": 680,
"wires": []
},
{
"id": "97779727.1d0408",
"type": "function",
"z": "505d9063.03da4",
"name": "build MSG HK.Objekt (Windwsstate Driver)",
"func": "var msg1 = {payload: \"1\", topic: \"6/CurrentPosition\"};\nvar msg2 = {payload: \"1\", topic: \"6/TargetPosition\"};\nvar msg3 = {payload: \"1\", topic: \"6/PositionState\"};\n\nif (msg.payload.attributesMap.window_driver_front === \"CLOSED\") {\n msg1.payload = \"0\";\n msg2.payload = \"0\";\n msg3.payload = \"0\";\n return [msg1, msg2, msg3];\n}\nif (payload.attributesMap.window_driver_front === \"OPEN\") {\n msg1.payload = \"100\";\n msg2.payload = \"100\";\n msg3.payload = \"2\";\n return [msg1, msg2, msg3];\n}\n",
"outputs": 3,
"noerr": 0,
"initialize": "",
"finalize": "",
"x": 1270,
"y": 440,
"wires": [
[
"fe74fe90.d679d8"
],
[
"fe74fe90.d679d8"
],
[
"fe74fe90.d679d8"
]
]
},
{
"id": "49aca3fd.a0d40c",
"type": "function",
"z": "505d9063.03da4",
"name": "build MSG HK.Objekt (Windowsstate Passenger)",
"func": "var msg1 = {payload: \"1\", topic: \"7/CurrentPosition\"};\nvar msg2 = {payload: \"1\", topic: \"7/TargetPosition\"};\nvar msg3 = {payload: \"1\", topic: \"7/PositionState\"};\n\nif (msg.payload.attributesMap.window_passenger_front === \"CLOSED\") {\n msg1.payload = \"0\";\n msg2.payload = \"0\";\n msg3.payload = \"0\";\n return [msg1, msg2, msg3];\n}\nif (msg.payload.attributesMap.window_passenger_front === \"OPEN\") {\n msg1.payload = \"100\";\n msg2.payload = \"100\";\n msg3.payload = \"2\";\n return [msg1, msg2, msg3];\n}\n",
"outputs": 3,
"noerr": 0,
"initialize": "",
"finalize": "",
"x": 1250,
"y": 500,
"wires": [
[
"fe74fe90.d679d8"
],
[
"fe74fe90.d679d8"
],
[
"fe74fe90.d679d8"
]
]
},
{
"id": "7d67163a.b20b9",
"type": "function",
"z": "505d9063.03da4",
"name": "build MSG HK.Objekt (ParkingLights)",
"func": "var msg1 = {payload: true, topic: \"8/On\"};\n\nif (msg.payload.attributesMap.lights_parking === \"ON\") {\n msg1.payload = true;\n return [msg1];\n} else {\n msg1.payload = false;\n return [msg1]\n}",
"outputs": 2,
"noerr": 0,
"initialize": "",
"finalize": "",
"x": 1290,
"y": 560,
"wires": [
[
"fe74fe90.d679d8"
],
[
"fe74fe90.d679d8"
]
],
"outputLabels": [
"Charging?",
"Connected?"
]
},
{
"id": "cfc60ba4.cc5f78",
"type": "change",
"z": "505d9063.03da4",
"name": "parce parkinglights",
"rules": [
{
"t": "move",
"p": "payload.attributesMap.lights_parking",
"pt": "msg",
"to": "payload",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 510,
"y": 1100,
"wires": [
[
"320eac8.5aaf9d4"
]
]
},
{
"id": "320eac8.5aaf9d4",
"type": "ui_led",
"z": "505d9063.03da4",
"group": "8b98191.6de21e8",
"order": 15,
"width": 4,
"height": 1,
"label": "Parklichter",
"labelPlacement": "left",
"labelAlignment": "left",
"colorForValue": [
{
"color": "Blue",
"value": "ON",
"valueType": "str"
},
{
"color": "gray",
"value": "OFF",
"valueType": "str"
}
],
"allowColorForValueInMessage": false,
"name": "Parklichter",
"x": 690,
"y": 1100,
"wires": []
},
{
"id": "3b924d46.072782",
"type": "change",
"z": "505d9063.03da4",
"name": "parce locksystemstatus",
"rules": [
{
"t": "move",
"p": "payload.attributesMap.door_lock_state",
"pt": "msg",
"to": "payload",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 490,
"y": 1140,
"wires": [
[
"75f2a9b8.4c7ee8"
]
]
},
{
"id": "75f2a9b8.4c7ee8",
"type": "ui_led",
"z": "505d9063.03da4",
"group": "8b98191.6de21e8",
"order": 16,
"width": 4,
"height": 1,
"label": "Zentralverrieglung",
"labelPlacement": "left",
"labelAlignment": "left",
"colorForValue": [
{
"color": "Green",
"value": "LOCKED",
"valueType": "str"
},
{
"color": "Red",
"value": "UNLOCKED",
"valueType": "str"
},
{
"color": "lightgreen",
"value": "SECURED",
"valueType": "str"
}
],
"allowColorForValueInMessage": false,
"name": "Lock System",
"x": 690,
"y": 1140,
"wires": []
},
{
"id": "d645722a.e8f3a8",
"type": "function",
"z": "505d9063.03da4",
"name": "build MSG HK.Objekt Mini Reichweite as a Lux Sensor",
"func": "var msg1 = {payload: \"Name\", topic: \"9/CurrentAmbientLightLevel\"};\nvar msg2 = {payload: 1, topic: \"9/StatusLowBattery\"};\nvar kmRemain = Number(msg.payload.attributesMap.beRemainingRangeElectric);\n\nmsg1 = {payload: kmRemain, topic: \"9/CurrentAmbientLightLevel\"};\n\nif (msg.payload.attributesMap.charging_status === \"NOCHARGING\") {\n {if(kmRemain < 20) {\n msg2.payload = \"1\";\n } else {\n msg2.payload = \"0\"; \n }\n }\n return [msg1, msg2];\n}\nif (msg.payload.attributesMap.charging_status === \"CHARGINGENDED\") {\n {if(kmRemain < 20) {\n msg2.payload = \"1\";\n } else {\n msg2.payload = \"0\"; \n }\n }\n return [msg1, msg2];\n}\nif (msg.payload.attributesMap.charging_status === \"CHARGINGACTIVE\") {\n {if(kmRemain < 20) {\n msg2.payload = \"1\";\n } else {\n msg2.payload = \"0\"; \n }\n }\n return [msg1, msg2];\n}\n\n",
"outputs": 2,
"noerr": 0,
"initialize": "",
"finalize": "",
"x": 1240,
"y": 640,
"wires": [
[
"fe74fe90.d679d8",
"ec3bc617.9a0c18",
"a0c88039.092b"
],
[
"fe74fe90.d679d8",
"a0c88039.092b"
]
],
"icon": "node-red/swap.svg"
},
{
"id": "5e377f3e.f04d5",
"type": "inject",
"z": "505d9063.03da4",
"name": "manual Trigger",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 160,
"y": 620,
"wires": [
[
"83ed2a75.e98b58",
"e3a47128.d2e9c"
]
]
},
{
"id": "a795a130.52ce2",
"type": "inject",
"z": "505d9063.03da4",
"name": "Levelsettiing for Reichweite a LUX",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": true,
"onceDelay": 0.1,
"topic": "9/CurrentAmbientLightLevel",
"payload": "{\"maxValue\":270, \"minValue\":0.0001}",
"payloadType": "json",
"x": 1080,
"y": 980,
"wires": [
[
"e7e99059.167c98"
]
]
},
{
"id": "a5b9fed1.eef9a8",
"type": "inject",
"z": "505d9063.03da4",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": true,
"onceDelay": 0.1,
"topic": "1/Name",
"payload": "Mini Akku",
"payloadType": "str",
"x": 1130,
"y": 900,
"wires": [
[
"e7e99059.167c98"
]
]
},
{
"id": "89d6552f.061358",
"type": "comment",
"z": "505d9063.03da4",
"name": "build Reichweite as a Sensor an set Lowbatt if less than 20km",
"info": "",
"x": 1220,
"y": 600,
"wires": []
},
{
"id": "4ba5ba64.220db4",
"type": "link out",
"z": "505d9063.03da4",
"name": "Connected",
"links": [
"601a6f47.08e2f8",
"f748dfeb.5b55f8"
],
"x": 1555,
"y": 380,
"wires": []
},
{
"id": "ec3bc617.9a0c18",
"type": "link out",
"z": "505d9063.03da4",
"name": "Reichweite",
"links": [
"f3281960.df45c8",
"b8c72727.e0fd7"
],
"x": 1535,
"y": 620,
"wires": []
},
{
"id": "8bdc67cd.3527",
"type": "change",
"z": "505d9063.03da4",
"name": "parse effizenz",
"rules": [
{
"t": "move",
"p": "payload.efficiencyQuotient",
"pt": "msg",
"to": "payload",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 520,
"y": 420,
"wires": [
[
"435bee11.8cd1c"
]
]
},
{
"id": "435bee11.8cd1c",
"type": "ui_artlessgauge",
"z": "505d9063.03da4",
"group": "8b98191.6de21e8",
"order": 2,
"width": 4,
"height": 3,
"name": "ENERGIEEFFIZENZ",
"icon": "",
"label": "Energieeffizenz",
"unit": "%",
"layout": "radial",
"decimals": 0,
"differential": false,
"minmax": true,
"colorTrack": "#aaaaaa",
"style": "",
"colorFromTheme": true,
"property": "payload",
"secondary": "secondary",
"inline": false,
"sectors": [
{
"val": 0,
"col": "#ff2600",
"t": "min",
"dot": 0
},
{
"val": 25,
"col": "#ff9300",
"t": "sec",
"dot": 0
},
{
"val": 75,
"col": "#00f900",
"t": "sec",
"dot": 0
},
{
"val": 100,
"col": "#00f900",
"t": "max",
"dot": 0
}
],
"lineWidth": 3,
"bgcolorFromTheme": false,
"diffCenter": "",
"x": 720,
"y": 420,
"wires": []
},
{
"id": "5374d0c8.29d7c8",
"type": "change",
"z": "505d9063.03da4",
"name": "parse status minutes to end",
"rules": [
{
"t": "move",
"p": "payload.attributesMap.chargingTimeRemaining",
"pt": "msg",
"to": "payload",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 480,
"y": 700,
"wires": [
[
"ed7b698a.3ebed8",
"b0e4a54d.3900b8"
]
]
},
{
"id": "967e7a12.c02f38",
"type": "ui_text",
"z": "505d9063.03da4",
"group": "f5767f33.d8c078",
"order": 6,
"width": 0,
"height": 0,
"name": "",
"label": "Rest - Ladedauer:",
"format": "{{msg.payload}} Minuten",
"layout": "row-spread",
"x": 890,
"y": 700,
"wires": []
},
{
"id": "d1809ef2.319c68",
"type": "exec",
"z": "505d9063.03da4",
"command": "rm /usr/local/addons/redmatic/www/currenttoken.json",
"addpay": false,
"append": "",
"useSpawn": "false",
"timer": "",
"oldrc": false,
"name": "delete Token, when exist in case of error",
"x": 1700,
"y": 1040,
"wires": [
[
"becaeebc.8d396"
],
[
"becaeebc.8d396"
],
[
"becaeebc.8d396"
]
]
},
{
"id": "becaeebc.8d396",
"type": "ui_led",
"z": "505d9063.03da4",
"group": "c1f93750.9cb2a8",
"order": 9,
"width": 8,
"height": 1,
"label": "Fehler bei der Status-Abfrage/Token Löschen",
"labelPlacement": "left",
"labelAlignment": "left",
"colorForValue": [
{
"color": "gray",
"value": "0",
"valueType": "num"
},
{
"color": "green",
"value": "false",
"valueType": "bool"
},
{
"color": "red",
"value": "true",
"valueType": "bool"
}
],
"allowColorForValueInMessage": false,
"name": "Non Error",
"x": 1300,
"y": 1100,
"wires": []
},
{
"id": "c273797.d454d08",
"type": "ui_button",
"z": "505d9063.03da4",
"name": "",
"group": "c1f93750.9cb2a8",
"order": 10,
"width": 0,
"height": 0,
"passthru": false,
"label": "Token manuell Löschen",
"tooltip": "Tocken löschen weil Abfrage nicht geht",
"color": "",
"bgcolor": "lightgreen",
"icon": "fa-arrow-alt-circle-right",
"payload": "true",
"payloadType": "str",
"topic": "",
"x": 1650,
"y": 980,
"wires": [
[
"d1809ef2.319c68"
]
]
},
{
"id": "9fe2a17.615336",
"type": "trigger",
"z": "505d9063.03da4",
"name": "Totmann",
"op1": "false",
"op2": "true",
"op1type": "bool",
"op2type": "bool",
"duration": "20",
"extend": true,
"overrideDelay": false,
"units": "min",
"reset": "",
"bytopic": "all",
"topic": "topic",
"outputs": 1,
"x": 1140,
"y": 1040,
"wires": [
[
"becaeebc.8d396",
"14cecbe3.b15cec"
]
]
},
{
"id": "f5bfd29a.2b1e38",
"type": "inject",
"z": "505d9063.03da4",
"name": "1. Init Deaman",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": true,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 960,
"y": 1040,
"wires": [
[
"9fe2a17.615336"
]
]
},
{
"id": "14cecbe3.b15cec",
"type": "switch",
"z": "505d9063.03da4",
"name": "Only when true starting deleting",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "true"
}
],
"checkall": "true",
"repair": false,
"outputs": 1,
"x": 1370,
"y": 1040,
"wires": [
[
"d1809ef2.319c68"
]
]
},
{
"id": "a2a81e9e.55067",
"type": "function",
"z": "505d9063.03da4",
"name": "build MSG HK.Objekt (Connected)",
"func": "\nvar msg2 = {payload: 1, topic: \"0/OccupancyDetected\"};\n\n//Connected Check//\nif (msg.payload.attributesMap.connectorStatus === \"DISCONNECTED\") {\n msg2.payload = 0;\n return [msg2];\n}\n\nif (msg.payload.attributesMap.connectorStatus === \"CONNECTED\") {\n msg2.payload = 1;\n return [msg2];\n}\n\n",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"x": 1300,
"y": 380,
"wires": [
[
"fe74fe90.d679d8",
"4ba5ba64.220db4"
]
],
"outputLabels": [
"Charging?"
]
},
{
"id": "a0c88039.092b",
"type": "debug",
"z": "505d9063.03da4",
"name": "",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 1570,
"y": 700,
"wires": []
},
{
"id": "8801edb7.e18e48",
"type": "change",
"z": "505d9063.03da4",
"name": "parse service Infos",
"rules": [
{
"t": "move",
"p": "payload.vehicleMessages.cbsMessages[1].description",
"pt": "msg",
"to": "payload",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 510,
"y": 1180,
"wires": [
[
"3f27920b.00d456"
]
]
},
{
"id": "3f27920b.00d456",
"type": "ui_text",
"z": "505d9063.03da4",
"group": "c1f93750.9cb2a8",
"order": 3,
"width": 0,
"height": 0,
"name": "",
"label": "Nächste Wartungsarbeit",
"format": "{{payload}}",
"layout": "col-center",
"x": 730,
"y": 1180,
"wires": []
},
{
"id": "65fd6510.6e4424",
"type": "change",
"z": "505d9063.03da4",
"name": "parse service Infos",
"rules": [
{
"t": "move",
"p": "payload.attributesMap.check_control_messages",
"pt": "msg",
"to": "payload",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 510,
"y": 1220,
"wires": [
[
"77b77847.0f8458"
]
]
},
{
"id": "77b77847.0f8458",
"type": "ui_text",
"z": "505d9063.03da4",
"group": "c1f93750.9cb2a8",
"order": 7,
"width": 8,
"height": 2,
"name": "",
"label": "Aktuelle Meldungen aus Bordcomputer",
"format": "{{payload.vehicleMessages.cbsMessages[1].description}}",
"layout": "col-center",
"x": 780,
"y": 1220,
"wires": []
},
{
"id": "ed7b698a.3ebed8",
"type": "function",
"z": "505d9063.03da4",
"name": "look for empty",
"func": "if (msg.payload == \"SUCCESS\"){\n msg.payload = \"0 \";\n return msg;\n}\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"x": 700,
"y": 700,
"wires": [
[
"967e7a12.c02f38",
"b0e4a54d.3900b8"
]
]
},
{
"id": "b0e4a54d.3900b8",
"type": "debug",
"z": "505d9063.03da4",
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 880,
"y": 780,
"wires": []
},
{
"id": "9e16eaa7.8d256",
"type": "link in",
"z": "505d9063.03da4",
"name": "",
"links": [
"dc38833b.87dd88"
],
"x": 575,
"y": 1300,
"wires": [
[
"305b5087.8d39a8"
]
]
},
{
"id": "305b5087.8d39a8",
"type": "ui_artlessgauge",
"z": "505d9063.03da4",
"group": "f5767f33.d8c078",
"order": 11,
"width": 2,
"height": 2,
"name": "Außentemperatur",
"icon": "fa-thermometer-empty",
"label": "",
"unit": "C",
"layout": "radial",
"decimals": "2",
"differential": false,
"minmax": true,
"colorTrack": "#aaaaaa",
"style": "",
"colorFromTheme": true,
"property": "payload",
"secondary": "secondary",
"inline": false,
"sectors": [
{
"val": -25,
"col": "#3a88fe",
"t": "min",
"dot": 0
},
{
"val": 0,
"col": "#00f900",
"t": "sec",
"dot": 0
},
{
"val": 25,
"col": "#fffb00",
"t": "sec",
"dot": 0
},
{
"val": 30,
"col": "#ff2600",
"t": "sec",
"dot": 0
},
{
"val": 100,
"col": "#ff2600",
"t": "max",
"dot": 0
}
],
"lineWidth": 3,
"bgcolorFromTheme": false,
"diffCenter": "",
"x": 710,
"y": 1300,
"wires": []
},
{
"id": "f5767f33.d8c078",
"type": "ui_group",
"name": "Reichweite und Akku",
"tab": "ca94de6a.c8c928",
"order": 2,
"disp": true,
"width": 8,
"collapse": false
},
{
"id": "f31f1fa0.bc2328",
"type": "car-bmw",
"name": "BMW Connect",
"server": "www.bmw-connecteddrive.com",
"debug": false
},
{
"id": "8b98191.6de21e8",
"type": "ui_group",
"name": "Zustand",
"tab": "ca94de6a.c8c928",
"order": 1,
"disp": true,
"width": 8,
"collapse": false
},
{
"id": "75272f7c.68af08",
"type": "redmatic-homekit-bridge",
"name": "RedMatic Bridge",
"username": "CC:22:3D:42:A5:70",
"pincode": "621-37-435",
"port": "51826"
},
{
"id": "af500d3.a408c7",
"type": "position-config",
"name": "Meine Position ",
"isValide": "true",
"longitude": "0",
"latitude": "0",
"angleType": "deg",
"timeZoneOffset": 99,
"timeZoneDST": 0,
"stateTimeFormat": "3",
"stateDateFormat": "12"
},
{
"id": "c1f93750.9cb2a8",
"type": "ui_group",
"name": "Wartungs Information",
"tab": "ca94de6a.c8c928",
"order": 3,
"disp": true,
"width": 8,
"collapse": false
},
{
"id": "ca94de6a.c8c928",
"type": "ui_tab",
"name": "Mini Cooper SE Status",
"icon": "fa-car",
"order": 1,
"disabled": false,
"hidden": false
}
]
@Donni1966
Copy link
Author

Bildschirmfoto 2021-01-10 um 01 19 05
Bildschirmfoto 2021-01-10 um 01 17 56
Bildschirmfoto 2021-01-10 um 01 17 35
Bildschirmfoto 2021-01-10 um 01 17 14
Bildschirmfoto 2021-01-10 um 01 08 34
Bildschirmfoto 2021-01-10 um 01 07 59
Bildschirmfoto 2021-01-10 um 01 07 44
Bildschirmfoto 2021-01-10 um 01 07 35
Bildschirmfoto 2021-01-10 um 01 07 27
Bildschirmfoto 2021-01-10 um 01 07 12
Bildschirmfoto 2021-01-10 um 01 06 56

@Donni1966
Copy link
Author

Bildschirmfoto 2021-01-12 um 00 15 26

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment