Dynamic group creation

I have five xiaomi environment devices each with three sensors (supplying temp, humidity, pressure, and a battery state). I had to implement a group (card?) for each one of them. this makes a 'lot' of work if I need to change anything.

I have just noticed that subflows create a separate instance of each referenced ui node when called, but they are all created on the same tab/group. Is there any way I could dynamically create a group for each sensor? Then I'd need to instruct the subflow to use a newly created group each time it is called. Could the ui_control node be used for this? I ask because I just used some example code using ui_control to show and hide groups.
thxthe
gary

(sorry if this doesnt make sense, I have a fever and I am really tired)

We don't yet have a solution for this, but if we can work out the how, it would be incredibly valuable.

@Steve-Mcl is also v interested in this

2 Likes

Are you using node-red-dashboard (the original node red dashboard) or @flowfuse/node-red-dashboard, also known as dashboard 2?

I'm using the original. Sounds like I should investigate Dashboard 2!

A quick experiment with dashboard-2 shows it creates a unique ui item for each time a subflow is called, but they are created on one group. A more detailed experiment will require some reading!

You can configure your subflow to have an option whereby you define which group it belongs to: Subflows | Node-RED Dashboard 2.0

This will mean you can instance your subflow as many times as you like, whilst placing them in different groups too.

Sounds just right! I'll look into it

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