[{
"id": "e042b1095671b729",
"type": "tab",
"label": "Flow 3",
"disabled": false,
"info": "",
"env": []
},
{
"id": "18674fce1d363044",
"type": "function",
"z": "e042b1095671b729",
"name": "Query",
"func": "msg.query=`from(bucket:\"sensorcommunity\")\n |> range(start: -15m)\n \n |>filter(fn: (r) => r[\"_field\"] == \"SDS_P1\")\n`;\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 270,
"y": 120,
"wires": [
[
"6d4e20f9b85c6041"
]
]
},
{
"id": "6d4e20f9b85c6041",
"type": "influxdb in",
"z": "e042b1095671b729",
"influxdb": "bd87715beebbeb83",
"name": "Influx_Read",
"query": "",
"rawOutput": false,
"precision": "",
"retentionPolicy": "",
"org": "b9409948a4fed525",
"x": 430,
"y": 120,
"wires": [
[
"b2d18bc3aa3d1161"
]
]
},
{
"id": "e70e6bc695947231",
"type": "function",
"z": "e042b1095671b729",
"name": "",
"func": "\nmsg.payload=[{\n \"series\": msg.payload._field,\n \"data\":[ \n [{\n x:msg.payload._time,\n y:msg.payload._value\n }]\n ] ,\n \"labels\": msg.payload.node \n}];\n\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 800,
"y": 120,
"wires": [
[
"fb8c0f23c612a0fd"
]
]
},
{
"id": "b2d18bc3aa3d1161",
"type": "split",
"z": "e042b1095671b729",
"name": "",
"splt": "",
"spltType": "str",
"arraySplt": 1,
"arraySpltType": "len",
"stream": false,
"addname": "",
"x": 630,
"y": 120,
"wires": [
[
"e70e6bc695947231"
]
]
},
{
"id": "91bcbf07a30d4c8d",
"type": "http in",
"z": "e042b1095671b729",
"name": "",
"url": "/localdata",
"method": "get",
"upload": false,
"swaggerDoc": "",
"x": 100,
"y": 180,
"wires": [
[
"18674fce1d363044"
]
]
},
{
"id": "53f3dea90cb5e8c4",
"type": "inject",
"z": "e042b1095671b729",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 100,
"y": 60,
"wires": [
[
"18674fce1d363044"
]
]
},
{
"id": "fb8c0f23c612a0fd",
"type": "join",
"z": "e042b1095671b729",
"name": "",
"mode": "auto",
"build": "object",
"property": "payload",
"propertyType": "msg",
"key": "topic",
"joiner": "\\n",
"joinerType": "str",
"accumulate": false,
"timeout": "",
"count": "",
"reduceRight": false,
"reduceExp": "",
"reduceInit": "",
"reduceInitType": "num",
"reduceFixup": "",
"x": 950,
"y": 120,
"wires": [
[
"b2e9a8a361268c66",
"db3b9b9fb0b1b2c9"
]
]
},
{
"id": "b2e9a8a361268c66",
"type": "ui_chart",
"z": "e042b1095671b729",
"name": "Sensor data",
"group": "b1d9d1fa.350a38",
"order": 0,
"width": 0,
"height": 0,
"label": "chart",
"chartType": "line",
"legend": "false",
"xformat": "auto",
"interpolate": "linear",
"nodata": "",
"dot": false,
"ymin": "",
"ymax": "",
"removeOlder": "15",
"removeOlderPoints": "",
"removeOlderUnit": "60",
"cutout": 0,
"useOneColor": false,
"useUTC": true,
"colors": [
"#1f77b4",
"#aec7e8",
"#ff7f0e",
"#2ca02c",
"#98df8a",
"#d62728",
"#ff9896",
"#9467bd",
"#c5b0d5"
],
"outputs": 1,
"useDifferentColor": false,
"className": "Hello",
"x": 1110,
"y": 120,
"wires": [
[]
]
},
{
"id": "db3b9b9fb0b1b2c9",
"type": "debug",
"z": "e042b1095671b729",
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 1050,
"y": 200,
"wires": []
},
{
"id": "bd87715beebbeb83",
"type": "influxdb",
"hostname": "127.0.0.1",
"port": "8086",
"protocol": "http",
"database": "database",
"name": "Influx_Read",
"usetls": false,
"tls": "",
"influxdbVersion": "2.0",
"url": "http://localhost:8086/",
"rejectUnauthorized": true
},
{
"id": "b1d9d1fa.350a38",
"type": "ui_group",
"name": "Sensor data for SDS_P1",
"tab": "74a6b63b93228b16",
"order": 1,
"disp": true,
"width": "12",
"collapse": false,
"className": ""
},
{
"id": "74a6b63b93228b16",
"type": "ui_tab",
"name": "SDS_P1",
"icon": "dashboard",
"disabled": false,
"hidden": false
}
]
This is flow and it seems to be not working. I want to display the data from influx db into chart dashboard.
This is the output from chart and msg.payload after join node and nothing seems to appear on ui
Kindly assist me to resolve this issue