How to get address of the browser instance

You can get the browser url as below.
add one for each tab, when tab loads the url will be sent in the payload.

[{"id":"197cb9b.8e143c6","type":"ui_template","z":"b779de97.b1b46","group":"ada4e0c8.ca2d58","name":"","order":0,"width":0,"height":0,"format":"<script>\n(function(scope) {\n    scope.send({payload: window.location.href});  \n})(scope);\n</script>","storeOutMessages":false,"fwdInMessages":false,"resendOnRefresh":false,"templateScope":"local","x":450,"y":3520,"wires":[["1adc3f5c.41ec09"]]},{"id":"1adc3f5c.41ec09","type":"debug","z":"b779de97.b1b46","name":"","active":true,"console":"false","complete":"false","x":719,"y":3520,"wires":[]},{"id":"ada4e0c8.ca2d58","type":"ui_group","z":"b779de97.b1b46","name":"Default","tab":"e4c8df5a.bc9048","order":1,"disp":true,"width":"6"},{"id":"e4c8df5a.bc9048","type":"ui_tab","z":"b779de97.b1b46","name":"tab2","icon":"dashboard"}]
<script>
(function(scope) {
    scope.send({payload: window.location.href});  
})(scope);
</script>

[edit]
you can also get the port , hostname and more if required

1 Like