Hide / show groups in dashboard

Hi, I'm new around here, but I've been using Node Red for a long time.
This problem has arisen and I do not know if it has a solution or how to solve it.

I have created a dashboard with 3 groups: Menu, Group_A and Group_B.
And two buttons, A and B that do the following:
Button A shows group_A and hides group_B.
Button B shows group_B and hides group_A.

The operation is correct, but if I am viewing the dashboad from two devices (computer and mobile), it only shows or hides the groups the device where I have pressed the corresponding button.

Groups may be shown or hidden on both devices at the same time.
Flow:

[{"id":"9450a05b.e66b5","type":"tab","label":"Flow 1","disabled":false,"info":""},{"id":"d2ea0a1b.93a088","type":"ui_button","z":"9450a05b.e66b5","name":"","group":"825e4bc1.01f358","order":2,"width":"3","height":"1","passthru":false,"label":"A","tooltip":"","color":"","bgcolor":"","className":"","icon":"","payload":"{\"group\":{\"hide\":[\"Test_Group_B\"],\"show\":[\"Test_Group_A\"]}}","payloadType":"json","topic":"Grupo A","topicType":"str","x":170,"y":40,"wires":[["a49989d1.3769a8","23fb34b.81955cc"]]},{"id":"9e1da410.5ea718","type":"ui_button","z":"9450a05b.e66b5","name":"","group":"825e4bc1.01f358","order":3,"width":"3","height":"1","passthru":false,"label":"B","tooltip":"","color":"","bgcolor":"","className":"","icon":"","payload":"{\"group\":{\"hide\":[\"Test_Group_A\"],\"show\":[\"Test_Group_B\"]}}","payloadType":"json","topic":"Goup B","topicType":"str","x":170,"y":200,"wires":[["a49989d1.3769a8","23fb34b.81955cc"]]},{"id":"a49989d1.3769a8","type":"ui_ui_control","z":"9450a05b.e66b5","name":"","events":"all","x":720,"y":140,"wires":[[]]},{"id":"f485e60.cc45918","type":"ui_gauge","z":"9450a05b.e66b5","name":"","group":"61d2dced.3db8f4","order":7,"width":"2","height":"2","gtype":"gage","title":"gauge","label":"units","format":"{{value}}","min":0,"max":10,"colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","className":"","x":270,"y":300,"wires":[]},{"id":"d52caeab.84b29","type":"ui_gauge","z":"9450a05b.e66b5","name":"","group":"a4afceab.1cdc6","order":1,"width":"2","height":"2","gtype":"donut","title":"gauge","label":"units","format":"{{value}}","min":0,"max":10,"colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","className":"","x":530,"y":300,"wires":[]},{"id":"23fb34b.81955cc","type":"ui_text","z":"9450a05b.e66b5","group":"825e4bc1.01f358","order":1,"width":0,"height":0,"name":"","label":"text","format":"{{msg.payload}}","layout":"row-spread","className":"","x":310,"y":120,"wires":[]},{"id":"825e4bc1.01f358","type":"ui_group","name":"Menu","tab":"3c94630c.13381c","order":1,"disp":true,"width":"6","collapse":false,"className":""},{"id":"61d2dced.3db8f4","type":"ui_group","name":"Group_A","tab":"3c94630c.13381c","order":2,"disp":true,"width":"6","collapse":false,"className":""},{"id":"a4afceab.1cdc6","type":"ui_group","name":"Group_B","tab":"3c94630c.13381c","order":3,"disp":true,"width":"6","collapse":false,"className":""},{"id":"3c94630c.13381c","type":"ui_tab","name":"Test","icon":"dashboard","order":9}]

Thanks for everything!!

It sounds like you need to delete msg.socketid property. Then messages are sent to all browsers.

1 Like

How and where do I remove that property? Thank you

Use a change node after your button to delete msg.socketid before it goes to the uicontrol node

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.