i already did this.
please find all the flows that i used:
[
{
"id": "731cf73c8837e83f",
"type": "tab",
"label": "Flow 2",
"disabled": false,
"info": ""
},
{
"id": "b2f7724575bccdb8",
"type": "inject",
"z": "731cf73c8837e83f",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payloadType": "str",
"x": 350,
"y": 340,
"wires": [
[
"3904341271fd2062",
"e329b01d0f34ace7"
]
]
},
{
"id": "8a799d2cd04946d3",
"type": "debug",
"z": "731cf73c8837e83f",
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 930,
"y": 180,
"wires": []
},
{
"id": "8d06bd4ebc25bc6c",
"type": "ui_table",
"z": "731cf73c8837e83f",
"group": "b070d416.db371",
"name": "Thermostats",
"order": 1,
"width": "25",
"height": "7",
"columns": [],
"outputs": 1,
"cts": true,
"x": 810,
"y": 320,
"wires": [
[]
]
},
{
"id": "3904341271fd2062",
"type": "function",
"z": "731cf73c8837e83f",
"name": "",
"func": "msg.payload = [\n {\n \"name\":\"MEQ0451495\",\n \"room\":\"Bathroom\",\n \"TEMPERATURE\":22,\n \"ACTUAL TEMPERATURE\":21.8,\n \"VALVE STATE\":90,\n \"BATTERY STATE\":2.7\n },\n \n {\n \"name\":\"MEQ1875547\",\n \"room\":\"Living Room\",\n \"TEMPERATURE\":12,\n \"ACTUAL TEMPERATURE\":16.2,\n \"VALVE STATE\":10,\n \"BATTERY STATE\":2.7\n },\n \n {\n \"name\":\"MEQ1875515\",\n \"room\":\"Living Room2\",\n \"TEMPERATURE\":123,\n \"ACTUAL TEMPERATURE\":16.2,\n \"VALVE STATE\":35,\n \"BATTERY STATE\":2.7\n },\n \n {\n \"name\":\"MEQ1875515\",\n \"room\":\"Living Room2\",\n \"TEMPERATURE\":123,\n \"ACTUAL TEMPERATURE\":16.2,\n \"VALVE STATE\":100,\n \"BATTERY STATE\":2.7\n },\n {\n \"name\":\"MEQ1875515\",\n \"room\":\"Living Room2\",\n \"TEMPERATURE\":123,\n \"ACTUAL TEMPERATURE\":16.2,\n \"VALVE STATE\":70,\n \"BATTERY STATE\":2.7\n }\n]\n\n \nmsg.ui_control = {\n \"tabulator\":{\n columns:[\n {title:\"Name\", field:\"name\", width:200},\n {title:\"Room\", field:\"room\", widthGrow:3},\n {title:\"TEMPERATURE\", field:\"TEMPERATURE\", align:\"center\"},\n {title:\"ACTUAL TEMPERATURE\", field:\"ACTUAL TEMPERATURE\", sorter:\"number\", align:\"center\"},\n {\"formatterParams\":{\"target\":\"_blank\",\"min\":0,\"max\":99,\"color\":[\"green\",\"orange\",\"red\"],\n \"legend\":\"function (value) {return (value>0)? ' '+value+' %' : '-';}\",\n \"legendColor\":\"#101010\",\"legendAlign\":\"center\"},\n \"title\":\"VALVE STATE\",\"field\":\"VALVE STATE\",\"formatter\":\"progress\",\"width\":100},\n {title:\"BATTERY STATE\", field:\"BATTERY STATE\", sorter:\"number\", align:\"center\"},\n {title:\"Action\", field:\"Action\", \"visible\": true, width:50,hight:20,\n \"formatter\": \"function(cell, formatterParams, onRendered){return '<button class=\\\"md-warn md-button \\\">Activate</button>'; }\"\n },\n {title:\"test\", field:\"test\", width:50,\n \"formatter\": \"function(cell, formatterParams, onRendered){return '<img width='30' height='30' alt='Image not found' src='data:image/png;base64,{{msg.imageSrc}}' />'; }\"\n }\n ]\n }\n}\n\n\n\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 590,
"y": 320,
"wires": [
[
"8d06bd4ebc25bc6c",
"8a799d2cd04946d3"
]
]
},
{
"id": "7466eb2b70a8cd74",
"type": "inject",
"z": "731cf73c8837e83f",
"name": "reset table",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "[]",
"payloadType": "json",
"x": 580,
"y": 200,
"wires": [
[
"8d06bd4ebc25bc6c"
]
]
},
{
"id": "77c863e6910aee6c",
"type": "function",
"z": "731cf73c8837e83f",
"name": "msg.filename",
"func": "msg.filename = \"C:\\\\Users\\\\Oualid\\\\Desktop\\\\warning.jpg\";\nreturn msg;\n \n\n",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 510,
"y": 480,
"wires": [
[
"a561775911f57a0e"
]
]
},
{
"id": "ab7097a4786dee23",
"type": "inject",
"z": "731cf73c8837e83f",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payloadType": "str",
"x": 340,
"y": 480,
"wires": [
[
"77c863e6910aee6c"
]
]
},
{
"id": "a561775911f57a0e",
"type": "file in",
"z": "731cf73c8837e83f",
"name": "",
"filename": "",
"format": "",
"chunk": false,
"sendError": false,
"encoding": "none",
"allProps": false,
"x": 690,
"y": 480,
"wires": [
[
"b44d73b1e1020dae"
]
]
},
{
"id": "b44d73b1e1020dae",
"type": "base64",
"z": "731cf73c8837e83f",
"name": "",
"action": "str",
"property": "payload",
"x": 840,
"y": 480,
"wires": [
[
"7ecd396dc1ce9916"
]
]
},
{
"id": "7ecd396dc1ce9916",
"type": "function",
"z": "731cf73c8837e83f",
"name": "",
"func": "msgPayload= msg.payload;\nmsg={imageSrc:msg.payload};\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 1000,
"y": 480,
"wires": [
[
"3904341271fd2062"
]
]
},
{
"id": "e329b01d0f34ace7",
"type": "change",
"z": "731cf73c8837e83f",
"name": "",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 450,
"y": 420,
"wires": [
[
"77c863e6910aee6c"
]
]
},
{
"id": "b070d416.db371",
"type": "ui_group",
"name": "Table",
"tab": "cd895ba5.a7168",
"order": 1,
"disp": true,
"width": "25",
"collapse": false
},
{
"id": "cd895ba5.a7168",
"type": "ui_tab",
"name": "newTable",
"icon": "dashboard",
"disabled": false,
"hidden": false
}
]
thank you