Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use a variable from msg to dynamically set ui-group name in a (subflow's) dashboard node #1456

Open
refthoom opened this issue Nov 10, 2024 · 0 comments
Labels
feature-request New feature or request that needs to be turned into Epic/Story details needs-triage Needs looking at to decide what to do

Comments

@refthoom
Copy link

refthoom commented Nov 10, 2024

Description

Thx for all the great work on Dashboard!
Would it be possible to have a msg part be the ui-group name of a dashboard node (on deployment)? I have used room names as an example below, but the general idea here is that often you will find that the arrangement of the subscribed topic tree is reflected in a dashboard. So then it would be very handy if (parts of) the topic tree 'automagically' perform ui-group 'placement' in a page.

Imagine a subflow that shows temperutures in a chart and gauge. The subflow is in a flow and is (only) connected to an mqtt_in node. The ui-group name is the room name where the temperatures are measured and the same room name is part of the subscribed topic that the mqtt_in node is subscribed to. The FR is to derive the room name from msg.topic and use that value as the ui-group name in the dashbaord node. That way you only need to create an mqtt_in node with the right topic and connect that to the subflow, to set the ui-group.

For example;

  • the subscribed topic in the mqtt_in node is /home/room1/sensors
  • in the subflow, a function node derives 'room1' as the room name with something like msg.topic.split("/")[1];
  • a change node then sets that as a flow context variable something like $[ROOM_NAME]
  • with that, in the dashboard node (in the subflow), the FR is to make it possible to set the group name to [page]/$[ROOM_NAME]

Prerequisite is of course to have the intended ui-group names defined in the dashboard environment beforehand otherwise this will lead to an undefined error or the like.

Have you provided an initial effort estimate for this issue?

I can not provide an initial effort estimate

@refthoom refthoom added feature-request New feature or request that needs to be turned into Epic/Story details needs-triage Needs looking at to decide what to do labels Nov 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request New feature or request that needs to be turned into Epic/Story details needs-triage Needs looking at to decide what to do
Projects
Status: Backlog
Development

No branches or pull requests

1 participant