Dynamic overwriting of dashboard nodes

I have a set of ui controls for user setting of an alarm level for seven different instances.
these take up a significant quantity of screen area, and i am attempting to keep the whole ui within a short mouse scroll (just over a lappy pages worth.. )

thing is i have at least 4 more metrics that i would like to provide a gui setting feature for.

Each control consists of 2 x gui nodes and a function node to set/save the value last set.

can i dynamically change an active nodes properties and force a redeployment and therfore refresh the gui with the same dashboard nodes reassigned to collecting a different metric alarm level.
I could embed the metric id in the topic property so the function sat between the dashboard nods could be written to work with any metric.

is this a flier or a sinker? if a sinker is there any way of achieving the same result,
i could have x number of pages all displaying the same graphs, perhaps in a different order depending on which metric is currently available for editing ?? yes im clutching at straws..

because my description is probably lacking a snapshot of the dashboard
Dashboard

the controls subflow
[{"id":"26091172.178f5e","type":"ui_slider","z":"392e5f5b.89b93","name":"Plant3 Minimum moisture Level","label":"Plant3 Minimum moisture Level","group":"1c127556.33317b","order":9,"width":"6","height":"1","passthru":false,"topic":"Dashboard/Settings/Plant3M","min":"20","max":"40","step":1,"x":1010,"y":20,"wires":[["70b5be97.cb7fb"]]},{"id":"46500131.c4f9c","type":"ui_numeric","z":"392e5f5b.89b93","name":"","label":"P3MML","group":"1c127556.33317b","order":10,"width":"6","height":"1","passthru":false,"topic":"Dashboard/Settings/Plant3M","format":"{{value}}%","min":"20","max":"40","step":1,"x":1000,"y":180,"wires":[["70b5be97.cb7fb"]]},{"id":"910b8ade.039318","type":"ui_slider","z":"392e5f5b.89b93","name":"Plant4 Minimum moisture Level","label":"Plant4 Minimum moisture Level","group":"1c127556.33317b","order":11,"width":"6","height":"1","passthru":false,"topic":"Dashboard/Settings/Plant4M","min":"20","max":"40","step":1,"x":190,"y":220,"wires":[["f1a18e69.217e4"]]},{"id":"d30baf73.5abd4","type":"ui_numeric","z":"392e5f5b.89b93","name":"","label":"P4MML","group":"1c127556.33317b","order":13,"width":"6","height":"1","passthru":false,"topic":"Dashboard/Settings/Plant4M","format":"{{value}}%","min":"20","max":"40","step":1,"x":180,"y":380,"wires":[["f1a18e69.217e4"]]},{"id":"b9e74a71.a995f8","type":"ui_slider","z":"392e5f5b.89b93","name":"Plant7 Minimum moisture Level","label":"Plant7 Minimum moisture Level","group":"1c127556.33317b","order":18,"width":"6","height":"1","passthru":false,"topic":"Dashboard/Settings/Plant7M","min":"20","max":"40","step":1,"x":610,"y":440,"wires":[["b3c9c5ec.6c4a18"]],"inputLabels":["global.get('P7MML')"]},{"id":"63597afe.3ed714","type":"ui_numeric","z":"392e5f5b.89b93","name":"","label":"P7MML","group":"1c127556.33317b","order":19,"width":"6","height":"1","passthru":false,"topic":"Dashboard/Settings/Plant7M","format":"{{value}}%","min":"20","max":"40","step":1,"x":580,"y":560,"wires":[["b3c9c5ec.6c4a18"]]},{"id":"f371b872.9806d8","type":"ui_slider","z":"392e5f5b.89b93","name":"Plant2 Minimum moisture Level","label":"Plant2 Minimum moisture Level","group":"1c127556.33317b","order":7,"width":"6","height":"1","passthru":false,"topic":"Dashboard/Settings/Plant2M","min":"20","max":"40","step":1,"x":610,"y":20,"wires":[["22acbc7a.4bc224"]]},{"id":"e5460d9a.0f381","type":"ui_numeric","z":"392e5f5b.89b93","name":"","label":"P2MML","group":"1c127556.33317b","order":8,"width":"6","height":"1","passthru":false,"topic":"Dashboard/Settings/Plant2M","format":"{{value}}%","min":"20","max":"40","step":1,"x":600,"y":180,"wires":[["22acbc7a.4bc224"]]},{"id":"ae64b87a.d20a18","type":"ui_slider","z":"392e5f5b.89b93","name":"Plant1 Minimum moisture Level","label":"Plant1 Minimum moisture Level","group":"1c127556.33317b","order":5,"width":"6","height":"1","passthru":false,"topic":"Dashboard/Settings/Plant1M","min":"20","max":"40","step":1,"x":190,"y":20,"wires":[["7fcb1e11.1610c"]]},{"id":"d18edff1.488c6","type":"ui_numeric","z":"392e5f5b.89b93","name":"","label":"P1MML","group":"1c127556.33317b","order":6,"width":"6","height":"1","passthru":false,"topic":"Dashboard/Settings/Plant1M","format":"{{value}}%","min":"20","max":"40","step":1,"x":200,"y":180,"wires":[["7fcb1e11.1610c"]]},{"id":"4b391909.01cad8","type":"ui_slider","z":"392e5f5b.89b93","name":"Plant6 Minimum moisture Level","label":"Plant6 Minimum moisture Level","group":"1c127556.33317b","order":16,"width":"6","height":"1","passthru":false,"topic":"Dashboard/Settings/Plant6M","min":"20","max":"40","step":1,"x":990,"y":220,"wires":[["9b054b89.15cae8"]]},{"id":"472af8f5.767a08","type":"ui_numeric","z":"392e5f5b.89b93","name":"","label":"P6MML","group":"1c127556.33317b","order":17,"width":"6","height":"1","passthru":false,"topic":"Dashboard/Settings/Plant6M","format":"{{value}}%","min":"20","max":"40","step":1,"x":1000,"y":380,"wires":[["9b054b89.15cae8"]]},{"id":"366692b0.0f1ebe","type":"ui_slider","z":"392e5f5b.89b93","name":"Plant5 Minimum moisture Level","label":"Plant5 Minimum moisture Level","group":"1c127556.33317b","order":14,"width":"6","height":"1","passthru":false,"topic":"Dashboard/Settings/Plant5M","min":"20","max":"40","step":1,"x":610,"y":220,"wires":[["3abe2867.e66318"]]},{"id":"8b1e2b28.1b09e8","type":"ui_numeric","z":"392e5f5b.89b93","name":"","label":"P5MML","group":"1c127556.33317b","order":15,"width":"6","height":"1","passthru":false,"topic":"Dashboard/Settings/Plant5M","format":"{{value}}%","min":"20","max":"40","step":1,"x":600,"y":380,"wires":[["3abe2867.e66318"]]},{"id":"7fcb1e11.1610c","type":"function","z":"392e5f5b.89b93","name":"Update Plant1 Minimum Moisture Level","func":"//Requires:\n// a numeric payload from a gui tool eiter a Numeric\n// display or a slider which is the new Minimum\n// Moisture Level requiered for Plant area 1\n//Returns:\n// the same payload delivered to both gui tools\n// to ensure both are displaying the same value.\n//Results:\n// no expected side effets beyond\n// global variable P1MML representing the Minimum Moisture \n// Level (MML) to be used for conditional tests on \n// other flows\nvar P1MML = global.get('P1MML')||30;\nglobal.set('P1MML',msg.payload);\nreturn msg;","outputs":1,"noerr":0,"x":190,"y":100,"wires":[["d18edff1.488c6","ae64b87a.d20a18"]]},{"id":"22acbc7a.4bc224","type":"function","z":"392e5f5b.89b93","name":"Update Plant2 Minimum Moisture Level","func":"//Requires:\n// a numeric payload from a gui tool eiter a Numeric\n// display or a slider which is the new Minimum\n// Moisture Level requiered for Plant area 2\n//Returns:\n// the same payload delivered to both gui tools\n// to ensure both are displaying the same value.\n//Results:\n// no expected side effets beyond\n// global variable P2MML representing the Minimum Moisture \n// Level (MML) to be used for conditional tests on \n// other flows\nvar P2MML = global.get('P2MML')||30;\nglobal.set('P2MML',msg.payload);\nreturn msg;","outputs":1,"noerr":0,"x":610,"y":100,"wires":[["f371b872.9806d8","e5460d9a.0f381"]]},{"id":"70b5be97.cb7fb","type":"function","z":"392e5f5b.89b93","name":"Update Plant3 Minimum Moisture Level","func":"//Requires:\n// a numeric payload from a gui tool eiter a Numeric\n// display or a slider which is the new Minimum\n// Moisture Level requiered for Plant area 3\n//Returns:\n// the same payload delivered to both gui tools\n// to ensure both are displaying the same value.\n//Results:\n// no expected side effets beyond\n// global variable P3MML representing the Minimum Moisture \n// Level (MML) to be used for conditional tests on \n// other flows\nvar P3MML = global.get('P3MML')||30;\nglobal.set('P3MML',msg.payload);\nreturn msg;","outputs":1,"noerr":0,"x":1020,"y":100,"wires":[["26091172.178f5e","46500131.c4f9c"]]},{"id":"3abe2867.e66318","type":"function","z":"392e5f5b.89b93","name":"Update Plant5 Minimum Moisture Level","func":"//Requires:\n// a numeric payload from a gui tool eiter a Numeric\n// display or a slider which is the new Minimum\n// Moisture Level requiered for Plant area 5\n//Returns:\n// the same payload delivered to both gui tools\n// to ensure both are displaying the same value.\n//Results:\n// no expected side effets beyond\n// global variable P5MML representing the Minimum Moisture \n// Level (MML) to be used for conditional tests on \n// other flows\nvar P5MML = global.get('P5MML')||30;\nglobal.set('P5MML',msg.payload);\nreturn msg;","outputs":1,"noerr":0,"x":620,"y":300,"wires":[["8b1e2b28.1b09e8","366692b0.0f1ebe"]]},{"id":"f1a18e69.217e4","type":"function","z":"392e5f5b.89b93","name":"Update Plant4 Minimum Moisture Level","func":"//Requires:\n// a numeric payload from a gui tool eiter a Numeric\n// display or a slider which is the new Minimum\n// Moisture Level requiered for Plant area 4\n//Returns:\n// the same payload delivered to both gui tools\n// to ensure both are displaying the same value.\n//Results:\n// no expected side effets beyond\n// global variable P4MML representing the Minimum Moisture \n// Level (MML) to be used for conditional tests on \n// other flows\nvar P4MML = global.get('P4MML')||30;\nglobal.set('P4MML',msg.payload);\nreturn msg;","outputs":1,"noerr":0,"x":200,"y":300,"wires":[["910b8ade.039318","d30baf73.5abd4"]]},{"id":"9b054b89.15cae8","type":"function","z":"392e5f5b.89b93","name":"Update Plant6 Minimum Moisture Level","func":"//Requires:\n// a numeric payload from a gui tool eiter a Numeric\n// display or a slider which is the new Minimum\n// Moisture Level requiered for Plant area 6\n//Returns:\n// the same payload delivered to both gui tools\n// to ensure both are displaying the same value.\n//Results:\n// no expected side effets beyond\n// global variable P6MML representing the Minimum Moisture \n// Level (MML) to be used for conditional tests on \n// other flows\nvar P6MML = global.get('P6MML')||30;\nglobal.set('P6MML',msg.payload);\nreturn msg;","outputs":1,"noerr":0,"x":1020,"y":300,"wires":[["4b391909.01cad8","472af8f5.767a08"]]},{"id":"b3c9c5ec.6c4a18","type":"function","z":"392e5f5b.89b93","name":"Update Plant7 Minimum Moisture Level","func":"//Requires:\n// a numeric payload from a gui tool eiter a Numeric\n// display or a slider which is the new Minimum\n// Moisture Level requiered for Plant area 7\n//Returns:\n// the same payload delivered to both gui tools\n// to ensure both are displaying the same value.\n//Results:\n// no expected side effets beyond\n// global variable P7MML representing the Minimum Moisture \n// Level (MML) to be used for conditional tests on \n// other flows\nvar P7MML = global.get('P7MML')||30;\nglobal.set('P7MML',msg.payload);\nreturn msg;","outputs":1,"noerr":0,"x":600,"y":500,"wires":[["63597afe.3ed714","b9e74a71.a995f8"]],"inputLabels":["P7MML"]},{"id":"1c127556.33317b","type":"ui_group","z":"","name":"Overview","tab":"6152efc3.75cfe","order":2,"disp":false,"width":"12","collapse":false},{"id":"6152efc3.75cfe","type":"ui_tab","z":"","name":"Patio Plant Monitor","icon":"dashboard","order":1}]

Not quite sure what you want - but there are various messages you can send via the ui_control node to show and hide groups of widgets. So rather than re-assign them you could just make them appear when needed etc ? See the readme.

1 Like

Cheers, thats something i had overlooked.. but thanks to your pointer i checked again..

UI-Control - allows some dynamic control of the dashboard. Sending a msg.payload of the tab number (from 0) or tab_name will switch to that tab. Groups can be hidden and made visible via a msg like {group:{hide:["tab_name_group_name_with_underscores"],show:["tab_name_another_group"],focus:true}} . Outputs a msg.payload for every browser connection and loss , that can be used to trigger other actions.

so i can create 7x sets of controls sit them all in the same place and dynamically unhide the set desired.. something to experiment with indeed :wink: