Node-RED dashboard interfaces - mobile vs tablet

Hi Alex,

You can check the following flow:

[{"id":"8c300398.52e118","type":"ui_ui_control","z":"974b9800.8d90e","name":"","events":"connect","x":400,"y":140,"wires":[["ac6287de.071a08"]]},{"id":"fdf95903.209a7","type":"inject","z":"974b9800.8d90e","name":"Init UI","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":true,"onceDelay":"0.5","topic":"","payload":"","payloadType":"str","x":210,"y":140,"wires":[["8c300398.52e118"]]},{"id":"9eadabac.c50da8","type":"file","z":"974b9800.8d90e","name":"protocol website","filename":".node-red/dashboard-call.txt","appendNewline":true,"createDir":false,"overwriteFile":"false","encoding":"none","x":1020,"y":240,"wires":[[]]},{"id":"22f3e873.ee4838","type":"function","z":"974b9800.8d90e","name":"protocol","func":"timenow = new Date().toLocaleString();\n\nmsg.payload = timenow+\": call from \"+msg.socketip+\" ID:\"+msg.socketid;\n\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":760,"y":240,"wires":[["9eadabac.c50da8"]]},{"id":"ac6287de.071a08","type":"switch","z":"974b9800.8d90e","name":"","property":"socketip","propertyType":"msg","rules":[{"t":"eq","v":"192.168.xx.yy","vt":"str"},{"t":"cont","v":"192.168.xx.","vt":"str"},{"t":"else"}],"checkall":"false","repair":false,"outputs":3,"x":570,"y":140,"wires":[["469c463a.ed14c8"],["5ab185ed.4a744c"],["22f3e873.ee4838","a90f51ae.319bb8"]],"outputLabels":["","Intern","Extern"]},{"id":"f737c0cf.50762","type":"ui_ui_control","z":"974b9800.8d90e","name":"","events":"all","x":1040,"y":160,"wires":[[]]},{"id":"5ab185ed.4a744c","type":"change","z":"974b9800.8d90e","name":"internal","rules":[{"t":"set","p":"payload","pt":"msg","to":"{\"group\":{\"open\":[\"xxx_1\"],\"hide\":[\"xxx_2\",\"xxx_3\"],\"show\":[\"xxx_1\",\"xxx_2\",\"xxx_3\"]}}","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":780,"y":160,"wires":[["f737c0cf.50762"]]},{"id":"a90f51ae.319bb8","type":"change","z":"974b9800.8d90e","name":"external","rules":[{"t":"set","p":"payload","pt":"msg","to":"{\"group\":{\"open\":[\"xxx_1\"],\"show\":[\"xxx_2\"],\"hide\":[\"xxx_3\"]}}","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":780,"y":200,"wires":[["f737c0cf.50762"]]},{"id":"469c463a.ed14c8","type":"change","z":"974b9800.8d90e","name":"Tablet x","rules":[{"t":"set","p":"payload","pt":"msg","to":"{\"group\":{\"show\":[\"xxx_1\",\"xxx_2\"],\"hide\":[\"xxx_3\",\"xxx_4\"]}}","tot":"json"}],"action":"","property":"","from":"","to":"","reg":false,"x":780,"y":120,"wires":[["f737c0cf.50762"]]}]

Change the IP addresses in the switch node and change the json code in the change nodes:

{"group":{"open":["xxx_1"],"show":["xxx_2"],"hide":["xxx_3"]}}

xxx is the name of the ui_group, the 1-4 are the names of the ui_tabs. Separate them with the underscore.

Now you can hide, show, open and/or collapse certain tabs matching the IP address of the PC, which connects to the dashboard via browser.