Hey sure. There seem to besome issue with updating the values for some reason, but session seems to be correct.
Allthrough I’m short in time, would be happy to help on developing the integration.
I have some experience on different programming languages, but no experience programming HASS integration.
I use external mqtt server and convert payload to sensordata in nodered:
MQTT config:
connection ibm-aeg
address 4r8kqw.messaging.internetofthings.ibmcloud.com:8883
topic iot-2/cmd/+/fmt/+ both
try_private false
remote_clientid d:4r8kqw:mobile:***
remote_password ****
remote_username use-token-auth
bridge_tls_version tlsv1.2
bridge_protocol_version mqttv311
bridge_attempt_unsubscribe false
cleansession true
notifications false
bridge_cafile /mosquitto/config/ca_certs/ca-aeg.crt
- cert and ‘4r8kqw’ are extracted from mobile app.
- remote_password is provided by some requests (you can see it if mitm the traffic)
- remote_clientid - have special format. It is explained in IBM cloud site
nodered-flow
[
{
"id": "f6f2187d.f17ca8",
"type": "tab",
"label": "Aeg MQTT convert",
"disabled": false,
"info": "",
"env": []
},
{
"id": "b68f72ed8cf34377",
"type": "mqtt in",
"z": "f6f2187d.f17ca8",
"name": "",
"topic": "iot-2/#",
"qos": "0",
"datatype": "auto",
"broker": "1c8d6e9520da9934",
"nl": false,
"rap": true,
"rh": 0,
"inputs": 0,
"x": 90,
"y": 60,
"wires": [
[
"ee4c699d5b4375d6"
]
]
},
{
"id": "ee4c699d5b4375d6",
"type": "json",
"z": "f6f2187d.f17ca8",
"name": "",
"property": "payload",
"action": "obj",
"pretty": true,
"x": 91.53846153846153,
"y": 160,
"wires": [
[
"2390fce960eb3ddc"
]
]
},
{
"id": "dad3fda7142f80ef",
"type": "debug",
"z": "f6f2187d.f17ca8",
"name": "Error",
"active": true,
"tosidebar": true,
"console": true,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 300,
"y": 460,
"wires": []
},
{
"id": "2390fce960eb3ddc",
"type": "switch",
"z": "f6f2187d.f17ca8",
"name": "Devices",
"property": "payload.device.deviceType",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "911434689_01",
"vt": "str"
},
{
"t": "eq",
"v": "944188505_00",
"vt": "str"
},
{
"t": "else"
}
],
"checkall": "true",
"repair": false,
"outputs": 3,
"x": 123.07692307692308,
"y": 240,
"wires": [
[
"74930aea3d827fb2"
],
[
"74930aea3d827fb2"
],
[
"83fc196e304f2cb2"
]
]
},
{
"id": "1808dbf5a07fef60",
"type": "mqtt out",
"z": "f6f2187d.f17ca8",
"name": "",
"topic": "",
"qos": "",
"retain": "false",
"respTopic": "",
"contentType": "application/json",
"userProps": "",
"correl": "",
"expiry": "",
"broker": "1c8d6e9520da9934",
"x": 730,
"y": 360,
"wires": []
},
{
"id": "551ca972c22abd1a",
"type": "function",
"z": "f6f2187d.f17ca8",
"name": "single topic ",
"func": "var name = msg.payload.payload.components[0].name \nvar value = msg.payload.payload.components[0].value\n\nvar topic = \"homeassistant/sensor/\"\n + msg.payload.device.deviceType + \"/\"\n + name + \"/state\";\n\nvar message = {\n name: name,\n value: value,\n attrs: msg.payload.payload.components\n}\n\nreturn {payload: message, topic: topic};",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 510,
"y": 160,
"wires": [
[
"aa726e8975ce45b3",
"ad55233bc47a6888"
]
]
},
{
"id": "aa726e8975ce45b3",
"type": "debug",
"z": "f6f2187d.f17ca8",
"name": "item",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 730,
"y": 60,
"wires": []
},
{
"id": "c28b7b099b12179e",
"type": "mqtt out",
"z": "f6f2187d.f17ca8",
"name": "",
"topic": "nodered/error",
"qos": "",
"retain": "true",
"respTopic": "",
"contentType": "application/json",
"userProps": "",
"correl": "",
"expiry": "",
"broker": "1c8d6e9520da9934",
"x": 300,
"y": 520,
"wires": []
},
{
"id": "74930aea3d827fb2",
"type": "switch",
"z": "f6f2187d.f17ca8",
"name": "single or more?",
"property": "payload.payload.components.length",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "1",
"vt": "str"
},
{
"t": "else"
}
],
"checkall": "true",
"repair": false,
"outputs": 2,
"x": 327.69230769230774,
"y": 160,
"wires": [
[
"551ca972c22abd1a"
],
[
"157e77a1c0eb8564"
]
]
},
{
"id": "157e77a1c0eb8564",
"type": "switch",
"z": "f6f2187d.f17ca8",
"name": "guard",
"property": "payload.payload.components[0].value",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "Container",
"vt": "str"
},
{
"t": "else"
}
],
"checkall": "true",
"repair": false,
"outputs": 2,
"x": 310,
"y": 240,
"wires": [
[
"b908443daaf31ae7"
],
[
"2444a4778572d6b2"
]
]
},
{
"id": "83fc196e304f2cb2",
"type": "change",
"z": "f6f2187d.f17ca8",
"name": "Unknon device",
"rules": [
{
"t": "set",
"p": "payload.error",
"pt": "msg",
"to": "Unknon device",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 120,
"y": 320,
"wires": [
[
"1abb91513272a023"
]
]
},
{
"id": "1abb91513272a023",
"type": "function",
"z": "f6f2187d.f17ca8",
"name": "merge",
"func": "\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 110,
"y": 460,
"wires": [
[
"dad3fda7142f80ef",
"c28b7b099b12179e"
]
]
},
{
"id": "2444a4778572d6b2",
"type": "change",
"z": "f6f2187d.f17ca8",
"name": "Unknon component",
"rules": [
{
"t": "set",
"p": "payload.error",
"pt": "msg",
"to": "Unknon component",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 370,
"y": 380,
"wires": [
[
"1abb91513272a023"
]
]
},
{
"id": "b908443daaf31ae7",
"type": "function",
"z": "f6f2187d.f17ca8",
"name": "container topic ",
"func": "var name = msg.payload.payload.components[0].name \nvar value = msg.payload.payload.components[0].value\n\nvar arr = msg.payload.payload.components\nswitch(name) {\n case \"UserSelections\":\n value = arr[8].value;\n break;\n case \"DisplayTemperature\":\n case \"TargetTemperature\":\n case \"DisplayFoodProbeTemperature\":\n case \"TargetFoodProbeTemperature\":\n value = arr[2].value;\n break;\n \n}\n\nvar topic = \"homeassistant/sensor/\"\n + msg.payload.device.deviceType + \"/\"\n + name + \"/state\";\n\nvar message = {\n name: name,\n value: value,\n attrs: msg.payload.payload.components\n}\n\nreturn {payload: message, topic: topic};",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 520,
"y": 260,
"wires": [
[
"ad55233bc47a6888"
]
]
},
{
"id": "ad55233bc47a6888",
"type": "function",
"z": "f6f2187d.f17ca8",
"name": "fix attrs",
"func": "\nvar dict = {}\nvar arr = msg.payload.attrs\n\nfor (let i = 0; i < arr.length; i++) {\n dict[arr[i].name] = arr[i]\n}\n\nmsg.payload.attrs = dict\n\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 740,
"y": 200,
"wires": [
[
"1808dbf5a07fef60"
]
]
},
{
"id": "1c8d6e9520da9934",
"type": "mqtt-broker",
"name": "",
"broker": "mqtt",
"port": "1883",
"clientid": "",
"autoConnect": true,
"usetls": false,
"protocolVersion": "5",
"keepalive": "60",
"cleansession": true,
"birthTopic": "",
"birthQos": "0",
"birthPayload": "",
"birthMsg": {},
"closeTopic": "",
"closeQos": "0",
"closePayload": "",
"closeMsg": {},
"willTopic": "",
"willQos": "0",
"willPayload": "",
"willMsg": {},
"sessionExpiry": ""
}
]
The list of sensors in config yaml:
Dishwasher
- platform: mqtt
state_topic: "homeassistant/sensor/911434689_01/RemoteControl/state"
json_attributes_topic: "homeassistant/sensor/911434689_01/RemoteControl/state"
name: "Dishwasher RemoteControl"
icon: mdi:dishwasher
value_template: "{{ value_json.value }}"
json_attributes_template : "{{ value_json.attrs | tojson }}"
- platform: mqtt
state_topic: "homeassistant/sensor/911434689_01/ApplianceState/state"
json_attributes_topic: "homeassistant/sensor/911434689_01/ApplianceState/state"
name: "Dishwasher ApplianceState"
icon: mdi:dishwasher
value_template: "{{ value_json.value }}"
json_attributes_template : "{{ value_json.attrs | tojson }}"
## ---
- platform: mqtt
state_topic: "homeassistant/sensor/911434689_01/ConnectivityState/state"
json_attributes_topic: "homeassistant/sensor/911434689_01/ConnectivityState/state"
name: "Dishwasher ConnectivityState"
icon: mdi:dishwasher
value_template: "{{ value_json.value }}"
json_attributes_template : "{{ value_json.attrs | tojson }}"
- platform: mqtt
state_topic: "homeassistant/sensor/911434689_01/CyclePhase/state"
json_attributes_topic: "homeassistant/sensor/911434689_01/CyclePhase/state"
name: "Dishwasher CyclePhase"
icon: mdi:dishwasher
value_template: "{{ value_json.value }}"
json_attributes_template : "{{ value_json.attrs | tojson }}"
- platform: mqtt
state_topic: "homeassistant/sensor/911434689_01/DoorState/state"
json_attributes_topic: "homeassistant/sensor/911434689_01/DoorState/state"
name: "Dishwasher DoorState"
icon: mdi:dishwasher
value_template: "{{ value_json.value }}"
json_attributes_template : "{{ value_json.attrs | tojson }}"
- platform: mqtt
state_topic: "homeassistant/sensor/911434689_01/LinkQualityIndicator/state"
json_attributes_topic: "homeassistant/sensor/911434689_01/LinkQualityIndicator/state"
name: "Dishwasher LinkQualityIndicator"
icon: mdi:dishwasher
value_template: "{{ value_json.value }}"
json_attributes_template : "{{ value_json.attrs | tojson }}"
- platform: mqtt
state_topic: "homeassistant/sensor/911434689_01/PreSelectLast/state"
json_attributes_topic: "homeassistant/sensor/911434689_01/PreSelectLast/state"
name: "Dishwasher PreSelectLast"
icon: mdi:dishwasher
value_template: "{{ value_json.value }}"
json_attributes_template : "{{ value_json.attrs | tojson }}"
- platform: mqtt
state_topic: "homeassistant/sensor/911434689_01/RinseAidLevel/state"
json_attributes_topic: "homeassistant/sensor/911434689_01/RinseAidLevel/state"
name: "Dishwasher RinseAidLevel"
icon: mdi:dishwasher
value_template: "{{ value_json.value }}"
json_attributes_template : "{{ value_json.attrs | tojson }}"
- platform: mqtt
state_topic: "homeassistant/sensor/911434689_01/StartTime/state"
json_attributes_topic: "homeassistant/sensor/911434689_01/StartTime/state"
name: "Dishwasher StartTime"
icon: mdi:dishwasher
value_template: "{{ value_json.value }}"
json_attributes_template : "{{ value_json.attrs | tojson }}"
- platform: mqtt
state_topic: "homeassistant/sensor/911434689_01/State/state"
json_attributes_topic: "homeassistant/sensor/911434689_01/State/state"
name: "Dishwasher State"
icon: mdi:dishwasher
value_template: "{{ value_json.value }}"
json_attributes_template : "{{ value_json.attrs | tojson }}"
- platform: mqtt
state_topic: "homeassistant/sensor/911434689_01/TimeToEnd/state"
json_attributes_topic: "homeassistant/sensor/911434689_01/TimeToEnd/state"
name: "Dishwasher TimeToEnd"
icon: mdi:dishwasher
value_template: "{{ value_json.value }}"
json_attributes_template : "{{ value_json.attrs | tojson }}"
- platform: mqtt
state_topic: "homeassistant/sensor/911434689_01/TotalCycleCounter/state"
json_attributes_topic: "homeassistant/sensor/911434689_01/TotalCycleCounter/state"
name: "Dishwasher TotalCycleCounter"
icon: mdi:dishwasher
value_template: "{{ value_json.value }}"
json_attributes_template : "{{ value_json.attrs | tojson }}"
- platform: mqtt
state_topic: "homeassistant/sensor/911434689_01/UserSelections/state"
json_attributes_topic: "homeassistant/sensor/911434689_01/UserSelections/state"
name: "Dishwasher UserSelections"
icon: mdi:dishwasher
value_template: "{{ value_json.value }}"
json_attributes_template : "{{ value_json.attrs | tojson }}"
- platform: mqtt
state_topic: "homeassistant/sensor/911434689_01/WaterHardness/state"
json_attributes_topic: "homeassistant/sensor/911434689_01/WaterHardness/state"
name: "Dishwasher WaterHardness"
icon: mdi:dishwasher
value_template: "{{ value_json.value }}"
json_attributes_template : "{{ value_json.attrs | tojson }}"
Oven
- platform: mqtt
state_topic: "homeassistant/sensor/944188505_00/ApplianceState/state"
json_attributes_topic: "homeassistant/sensor/944188505_00/ApplianceState/state"
name: "Oven ApplianceState"
icon: mdi:stove
value_template: "{{ value_json.value }}"
json_attributes_template : "{{ value_json.attrs | tojson }}"
- platform: mqtt
state_topic: "homeassistant/sensor/944188505_00/RemoteControl/state"
json_attributes_topic: "homeassistant/sensor/944188505_00/RemoteControl/state"
name: "Oven RemoteControl"
icon: mdi:stove
value_template: "{{ value_json.value }}"
json_attributes_template : "{{ value_json.attrs | tojson }}"
# ---
- platform: mqtt
state_topic: "homeassistant/sensor/944188505_00/OvenProcessIdentifier/state"
json_attributes_topic: "homeassistant/sensor/944188505_00/OvenProcessIdentifier/state"
name: "Oven OvenProcessIdentifier"
icon: mdi:stove
value_template: "{{ value_json.value }}"
json_attributes_template : "{{ value_json.attrs | tojson }}"
- platform: mqtt
state_topic: "homeassistant/sensor/944188505_00/CavityLight/state"
json_attributes_topic: "homeassistant/sensor/944188505_00/CavityLight/state"
name: "Oven CavityLight"
icon: mdi:stove
value_template: "{{ value_json.value }}"
json_attributes_template : "{{ value_json.attrs | tojson }}"
- platform: mqtt
state_topic: "homeassistant/sensor/944188505_00/DisplayTemperature/state"
json_attributes_topic: "homeassistant/sensor/944188505_00/DisplayTemperature/state"
name: "Oven DisplayTemperature"
icon: mdi:stove
value_template: "{{ value_json.value }}"
json_attributes_template : "{{ value_json.attrs | tojson }}"
- platform: mqtt
state_topic: "homeassistant/sensor/944188505_00/DisplayFoodProbeTemperature/state"
json_attributes_topic: "homeassistant/sensor/944188505_00/DisplayFoodProbeTemperature/state"
name: "Oven DisplayFoodProbeTemperature"
icon: mdi:stove
value_template: "{{ value_json.value }}"
json_attributes_template : "{{ value_json.attrs | tojson }}"
- platform: mqtt
state_topic: "homeassistant/sensor/944188505_00/TargetFoodProbeTemperature/state"
json_attributes_topic: "homeassistant/sensor/944188505_00/TargetFoodProbeTemperature/state"
name: "Oven TargetFoodProbeTemperature"
icon: mdi:stove
value_template: "{{ value_json.value }}"
json_attributes_template : "{{ value_json.attrs | tojson }}"
- platform: mqtt
state_topic: "homeassistant/sensor/944188505_00/TargetTemperature/state"
json_attributes_topic: "homeassistant/sensor/944188505_00/TargetTemperature/state"
name: "Oven TargetTemperature"
icon: mdi:stove
value_template: "{{ value_json.value }}"
json_attributes_template : "{{ value_json.attrs | tojson }}"
- platform: mqtt
state_topic: "homeassistant/sensor/944188505_00/DoorState/state"
json_attributes_topic: "homeassistant/sensor/944188505_00/DoorState/state"
name: "Oven DoorState"
icon: mdi:stove
value_template: "{{ value_json.value }}"
json_attributes_template : "{{ value_json.attrs | tojson }}"