hi @Colin
i can receive data now from the MQTT broker. see the below.
[
{
"id": "07a299801b1eb818",
"type": "tab",
"label": "Flow 4",
"disabled": false,
"info": "",
"env": []
},
{
"id": "7b0fc5cf2105c5e4",
"type": "template",
"z": "07a299801b1eb818",
"name": "simulate payload",
"field": "payload",
"fieldType": "msg",
"format": "handlebars",
"syntax": "plain",
"template": "gprs tx 255: 2$koolboks#{\"sensorDatas\":[{\"flag\":\"DI0\",\"switcher\":0},\n{\"flag\":\"DI1\",\"switcher\":0},\n{\"flag\":\"DO0\",\"switcher\":0},\n{\"flag\":\"DO1\",\"switcher\":0},\n{\"flag\":\"TEMP\",\"value\":30.30},\n{\"flag\":\"HUMI\",\"value\":94.10},\n{\"flag\":\"EXTPWR\",\"value\":12.22}],\n\"time\":\"946952295\"}\n",
"output": "str",
"x": 310,
"y": 100,
"wires": [
[
"becd8a7546e97aa9"
]
]
},
{
"id": "becd8a7546e97aa9",
"type": "change",
"z": "07a299801b1eb818",
"name": "",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "$substringAfter($$.payload, \"#\")",
"tot": "jsonata"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 360,
"y": 160,
"wires": [
[
"f9886b40b0f6934f"
]
]
},
{
"id": "f9886b40b0f6934f",
"type": "json",
"z": "07a299801b1eb818",
"name": "",
"property": "payload",
"action": "",
"pretty": false,
"x": 370,
"y": 220,
"wires": [
[
"db5a9775a1f3f72a"
]
]
},
{
"id": "db5a9775a1f3f72a",
"type": "change",
"z": "07a299801b1eb818",
"name": "",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "$$.payload.sensorDatas.${$.flag:$.value }",
"tot": "jsonata"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 360,
"y": 300,
"wires": [
[
"02b75c075070443a",
"acbb20d805f4c80f",
"e61f6dbb1542372c",
"04f2a781f97bb5ef"
]
]
},
{
"id": "b372356b8a29fc40",
"type": "ui_gauge",
"z": "07a299801b1eb818",
"name": "",
"group": "d5da3e9b.46abf",
"order": 5,
"width": 0,
"height": 0,
"gtype": "gage",
"title": "TEMP",
"label": " C",
"format": "{{value}}",
"min": 0,
"max": 10,
"colors": [
"#00b500",
"#e6e600",
"#ca3838"
],
"seg1": "",
"seg2": "",
"className": "",
"x": 790,
"y": 80,
"wires": []
},
{
"id": "48248f4c374787b8",
"type": "ui_gauge",
"z": "07a299801b1eb818",
"name": "",
"group": "d5da3e9b.46abf",
"order": 4,
"width": 0,
"height": 0,
"gtype": "gage",
"title": "EXTERNAL PWR",
"label": "V",
"format": "{{value}}",
"min": 0,
"max": "14",
"colors": [
"#00b500",
"#e6e600",
"#ca3838"
],
"seg1": "",
"seg2": "",
"className": "",
"x": 850,
"y": 320,
"wires": []
},
{
"id": "4b9bec53a4b8694c",
"type": "ui_gauge",
"z": "07a299801b1eb818",
"name": "",
"group": "d5da3e9b.46abf",
"order": 6,
"width": 0,
"height": 0,
"gtype": "gage",
"title": "HUMI",
"label": "RH %",
"format": "{{value}}",
"min": 0,
"max": "100",
"colors": [
"#00b500",
"#e6e600",
"#ca3838"
],
"seg1": "",
"seg2": "",
"className": "",
"x": 790,
"y": 200,
"wires": []
},
{
"id": "02b75c075070443a",
"type": "function",
"z": "07a299801b1eb818",
"name": "Incomplete [TEMP]",
"func": "\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 610,
"y": 80,
"wires": [
[
"b372356b8a29fc40"
]
]
},
{
"id": "acbb20d805f4c80f",
"type": "function",
"z": "07a299801b1eb818",
"name": "incomplete [HUMI]",
"func": "\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 630,
"y": 180,
"wires": [
[
"4b9bec53a4b8694c"
]
]
},
{
"id": "e61f6dbb1542372c",
"type": "function",
"z": "07a299801b1eb818",
"name": "Incomplete [EXTPWR]",
"func": "\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 620,
"y": 280,
"wires": [
[
"48248f4c374787b8"
]
]
},
{
"id": "55e81b83941a07da",
"type": "mqtt in",
"z": "07a299801b1eb818",
"name": "",
"topic": "2BK4F717WM3UF1AB",
"qos": "0",
"datatype": "auto",
"broker": "22c8989a884d7202",
"nl": false,
"rap": true,
"rh": 0,
"inputs": 0,
"x": 120,
"y": 200,
"wires": [
[
"7b0fc5cf2105c5e4"
]
]
},
{
"id": "04f2a781f97bb5ef",
"type": "debug",
"z": "07a299801b1eb818",
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 580,
"y": 400,
"wires": []
},
{
"id": "d5da3e9b.46abf",
"type": "ui_group",
"name": "DHT11",
"tab": "784aac14.5c2404",
"order": 2,
"disp": true,
"width": "6",
"collapse": false,
"className": ""
},
{
"id": "22c8989a884d7202",
"type": "mqtt-broker",
"name": "S-270",
"broker": "mqtt.dtuip.com",
"port": "1883",
"tls": "",
"clientid": "2BK4F717WM3UF1AB",
"autoConnect": true,
"usetls": false,
"protocolVersion": "4",
"keepalive": "60",
"cleansession": true,
"birthTopic": "",
"birthQos": "0",
"birthPayload": "",
"birthMsg": {},
"closeTopic": "",
"closeQos": "0",
"closePayload": "",
"closeMsg": {},
"willTopic": "",
"willQos": "0",
"willPayload": "",
"willMsg": {},
"sessionExpiry": ""
},
{
"id": "784aac14.5c2404",
"type": "ui_tab",
"name": "S270",
"icon": "dashboard",
"order": 1,
"disabled": false,
"hidden": false
}
]
but i will need to push it to the dashboard, please help add the complete function code to display in each of the container, TEMP HUMI and EXTPWR, i ave tried all my best but not work
Thank you very much !