Hi,
I get the ip address and I try to insert it in the iframe. I have read the forum and it should worked but didn't... not sure why.... pls take a look
this iframe with exact ip address works, src="http://172.20.10.2/html/min.php"
But when I try to use msg.payload as the ip address, it fails, src="{{msg.payload}}"
My payload is this "http://172.20.10.2/html/min.php", I have tried with/without "
Btw, I follow this link for my rpi cam and it works. RPi Node Red: Streaming rpi camera to dashboard • T³ Alliance
[{"id":"c35a594d.b471c8","type":"tab","label":"Flow 3","disabled":false,"info":""},{"id":"d55b9849.4b8668","type":"debug","z":"c35a594d.b471c8","name":"with \"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":670,"y":220,"wires":[]},{"id":"7377968.8e4d668","type":"ip","z":"c35a594d.b471c8","name":"ip","https":false,"timeout":"5000","internalIPv4":true,"internalIPv6":true,"publicIPv4":true,"publicIPv6":false,"x":370,"y":220,"wires":[["3c8ed453.f07aac","a687930c.50577"]]},{"id":"c1d58824.9cbf78","type":"inject","z":"c35a594d.b471c8","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":210,"y":220,"wires":[["7377968.8e4d668"]]},{"id":"3c8ed453.f07aac","type":"function","z":"c35a594d.b471c8","name":"with \"","func":"Newmsg = {};\nvar ipaddrCam = \"http://\" + msg.payload.internalIPv4 + \"/html/min.php\";\nipaddrCam = '\"' + ipaddrCam + '\"';\nglobal.set (\"ipaddrCam\",ipaddrCam);\nNewmsg.payload = ipaddrCam;\nreturn Newmsg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":510,"y":220,"wires":[["d55b9849.4b8668","6c5a5434.f095ec"]]},{"id":"6c5a5434.f095ec","type":"ui_template","z":"c35a594d.b471c8","group":"2045a81e.607958","name":"Working_with_relative_ip_address","order":1,"width":"0","height":"0","format":"<iframe scrolling=no marginwidth=0 marginheight=0 frameborder=0 height=439 width=553 src={{msg.payload}}></iframe>","storeOutMessages":true,"fwdInMessages":true,"resendOnRefresh":true,"templateScope":"local","x":760,"y":260,"wires":[[]]},{"id":"bebdcc1f.5a531","type":"ui_template","z":"c35a594d.b471c8","group":"2045a81e.607958","name":"Working_with_absolute_ip_address","order":1,"width":"0","height":"0","format":"<iframe scrolling=no marginwidth=0 marginheight=0 frameborder=0 height=439 width=553 src=\"http://172.20.10.2/html/min.php\"></iframe>","storeOutMessages":true,"fwdInMessages":true,"resendOnRefresh":true,"templateScope":"local","x":580,"y":400,"wires":[[]]},{"id":"e2948fec.0c8a2","type":"debug","z":"c35a594d.b471c8","name":"without \"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":680,"y":300,"wires":[]},{"id":"a687930c.50577","type":"function","z":"c35a594d.b471c8","name":"without \"","func":"Newmsg = {};\nvar ipaddrCam = \"http://\" + msg.payload.internalIPv4 + \"/html/min.php\";\n//ipaddrCam = '\"' + ipaddrCam + '\"';\nglobal.set (\"ipaddrCam\",ipaddrCam);\nNewmsg.payload = ipaddrCam;\nreturn Newmsg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":520,"y":300,"wires":[["e2948fec.0c8a2","7e495c75.367c04"]]},{"id":"7e495c75.367c04","type":"ui_template","z":"c35a594d.b471c8","group":"2045a81e.607958","name":"Working_with_relative_ip_address","order":1,"width":"0","height":"0","format":"<iframe scrolling=no marginwidth=0 marginheight=0 frameborder=0 height=439 width=553 src={{msg.payload}}></iframe>","storeOutMessages":true,"fwdInMessages":true,"resendOnRefresh":true,"templateScope":"local","x":760,"y":340,"wires":[[]]},{"id":"2045a81e.607958","type":"ui_group","name":"Group 1","tab":"3d8fbe92.30ee32","order":1,"disp":true,"width":"18","collapse":false},{"id":"3d8fbe92.30ee32","type":"ui_tab","name":"Test","icon":"dashboard","order":3,"disabled":false,"hidden":false}]