I had the same issue some time back, this is my solution.

[
{
"id": "b85beb3020cb85e9",
"type": "inject",
"z": "b2928c32a81fdfda",
"name": "",
"props": [
{
"p": "payload"
}
],
"repeat": "30",
"crontab": "",
"once": true,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 130,
"y": 40,
"wires": [
[
"572bf84e0c86f5d8"
]
]
},
{
"id": "572bf84e0c86f5d8",
"type": "exec",
"z": "b2928c32a81fdfda",
"command": "hostname -I",
"addpay": "",
"append": "",
"useSpawn": "false",
"timer": "",
"winHide": false,
"oldrc": false,
"name": "",
"x": 290,
"y": 40,
"wires": [
[
"05976c142dadc573"
],
[],
[]
]
},
{
"id": "f3d991dbcf24a13b",
"type": "change",
"z": "b2928c32a81fdfda",
"name": "",
"rules": [
{
"t": "set",
"p": "hostIP",
"pt": "flow",
"to": "payload[0]",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 600,
"y": 40,
"wires": [
[
"adf363cf5d976d3b"
]
]
},
{
"id": "adf363cf5d976d3b",
"type": "function",
"z": "b2928c32a81fdfda",
"name": "iframe",
"func": "let ip = flow.get(\"hostIP\")\n\n\nmsg.template = \"<iframe src='http://\" + ip + \":3000/d/b30f91e3-65eb-4455-a6f9-ef6978252c56/time?orgId=1&viewPanel=1' th='1250'height='1200' frameborder='0'></iframe>'\"\n\n\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 770,
"y": 40,
"wires": [
[
"350283267f5d33d9"
]
]
},
{
"id": "350283267f5d33d9",
"type": "ui_template",
"z": "b2928c32a81fdfda",
"group": "402776970d60e884",
"name": "",
"order": 2,
"width": "28",
"height": "14",
"format": "",
"storeOutMessages": true,
"fwdInMessages": true,
"resendOnRefresh": true,
"templateScope": "local",
"className": "",
"x": 940,
"y": 40,
"wires": [
[]
]
},
{
"id": "05976c142dadc573",
"type": "function",
"z": "b2928c32a81fdfda",
"name": "split",
"func": "let a = msg.payload.split(' ')\n\nmsg.payload = a\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 430,
"y": 40,
"wires": [
[
"f3d991dbcf24a13b"
]
]
},
{
"id": "402776970d60e884",
"type": "ui_group",
"name": "Aquponics",
"tab": "2a017e33ebbf9d66",
"order": 1,
"disp": true,
"width": "28",
"collapse": false,
"className": ""
},
{
"id": "2a017e33ebbf9d66",
"type": "ui_tab",
"name": "Aquaponics Control",
"icon": "dashboard",
"order": 2,
"disabled": false,
"hidden": false
}
]```