UI Group showing as "unused" despite the fact it's not (subflow)

(Sorry for the confusing title of this post, I don't really expect anyone to understand it... just couldn't think of anything else to write.)

Issue:
When a UI group is populated with Dashboard items like switches etc., the config sidebar shows the corresponding config node (for the dashboard group), with a little number next to it, saying how many nodes use this config:

As you can see, the ui-group called [Bedroom] Light appears to have no nodes using it.

This generates a warning when you deploy:

Problem is - the dashboard UI group does have items. It's just that these dashboard items are within subflows, where I've used environment variables to determine which dashboard the item goes on:

Is there some programmatic reason that the config node cannot know how many dashboard items there really are?

What's the reasonable workaround for this?

That looks like this issue: SubFlow is not counted for config node `ui-group` usage · Issue #754 · FlowFuse/node-red-dashboard · GitHub which, according to the comments there has been fixed in the node red code, but I suspect that it has not yet been released. It seems it is a node-red issue, not a dashboard issue. I imagine it will be in the next node-red release.

1 Like

This was fixed in NR4.0.6 - do you have this issue with 4.0.8?
If yes can you give a basic flow to reproduce your behavior.

I am still seeing it with 4.0.8. In fact, with 4.0.5 the group did not appear at all in Configuration Nodes. With 4.0.8 it appears with a usage count of zero. I have posted a comment on the issue, along with a sample flow

[{"id":"2f0e52fdece0de69","type":"subflow","name":"D2 Subflow test","info":"","category":"","in":[{"x":50,"y":30,"wires":[{"id":"8fb70b21253672bc"}]}],"out":[],"env":[{"name":"Group","type":"ui-group","value":"","ui":{"type":"conf-types"}}],"meta":{},"color":"#DDAA99"},{"id":"8fb70b21253672bc","type":"ui-text","z":"2f0e52fdece0de69","group":"${Group}","order":0,"width":0,"height":0,"name":"Text node in subflow","label":"Text node in subflow","format":"{{msg.payload}}","layout":"row-spread","style":false,"font":"","fontSize":16,"color":"#717171","className":"","x":350,"y":180,"wires":[]},{"id":"cf1699214f3c72cb","type":"subflow:2f0e52fdece0de69","z":"997da33a0beedade","name":"Text node in subflow","env":[{"name":"Group","value":"a97448ecc2eeef18","type":""},{"key":"DB2_SF_ORDER","value":1,"type":"str"}],"x":880,"y":3140,"wires":[]}]

:heavy_check_mark: It's working now okay for me.

(Backstory: I had upgraded from 4.0.2 to 4.0.8, and node-red --version showed v4.0.8 so I didn't bother checking what was in the browser - until just now. Turns out I was actually somehow still running 4.0.2 as systemctl service file was pointing to the wrong installation of node red. Anyway - resolved now, and yes the errors go away and the config node no longer shows as empty.)

Thanks!

1 Like