FlowFuse / node-red-dashboard

https://dashboard.flowfuse.com
Apache License 2.0
204 stars 48 forks source link

Semi-Dynamically create pages aka "HMI feature" #611

Open JeremyTheocharis opened 8 months ago

JeremyTheocharis commented 8 months ago

Description

In manufacturing every machine should have an HMI. There are no good "HMI as a Docker container" tools out there. What you basically want to do is create a small interactive dashboard with a couple of buttons and a couple of gauges in a somewhat user-friendly way. Node-RED is perfect for that.

However, it does not scale. What you probably want to do is to create once a page with a certain logic (e.g., a button that sends into an MQTT topic called umh.v1.testEnterprise.testSite.testArea.<line>._analytics.state) and then want to have the same dashboard for all lines. Currently, this is only possible with a lot of copy-paste right? image

If there were some form of templating options which allows to re-use the UI and the corresponding node-red flow logic behind it, it would be really helpful. Some parts would be the same for all machines, but then on some machines you could "overwrite" the default template and add e.g., another button that sends a HTTP request somewhere to set a phyiscal traffic light from green to red (which only exists on that single machine)

We've heard about this in our community now very often, and nobody has found a good solution yet. Maybe this is also possible with the current node-red-dashboard. Then any help would be appreciated.

Have you provided an initial effort estimate for this issue?

I am no FlowFuse team member

JeremyTheocharis commented 8 months ago
joepavitt commented 8 months ago

@Steve-Mcl can link to his in-progress update on this. It's not something we can do at the moment as it requires core changes to how subflows work, but Steve is making great progress here.

joepavitt commented 8 months ago

what is missing is there the multi-user view (that multiple users can interact with the dashboard)

Could you expand on what you mean by this please?

JeremyTheocharis commented 8 months ago

what is missing is there the multi-user view (that multiple users can interact with the dashboard)

Could you expand on what you mean by this please?

I think you got it already with "requires core changes to how subflows work". a typical workaround is to have a single page, and then the user selects the machine in a dropdown. but if multiple users work with it, they overwrite each others "dropdown".

Do you have anything that comes near to what we are trying to achieve? Maybe with a little more copy and paste?

joepavitt commented 8 months ago

Do you have anything that comes near to what we are trying to achieve? Maybe with a little more copy and paste?

If you're using FlowFuse, we have the Shared Team Library which allows you to store flow .json and recall them across any of your instances, would give you the raw flow each time, rather than a nested SubFlow, but is definitely better than a lot of copy/paste?

but if multiple users work with it, they overwrite each others "dropdown".

With this though, you're also after Multi User Dashboards, which is another FlowFuse feature, and actually I'm doing a Webinar about it on Thursday this week.

Also did a short write-up about it here. You no longer have the "Centralized Store" of data that you have with Node-RED Dashboard, instead, everything is client-side only, and it's up to you to architect which pieces are persisted, in a database for example.

joepavitt commented 8 months ago

Also, just to link to the discussion thread where Steve has shown some early demos of the subflow workflow: https://github.com/node-red/designs/discussions/77

JeremyTheocharis commented 8 months ago

Thank you! The content of the webinar would be really interesting for us as a team, but I cant participate. Could you provide me with a recording or notes or something?

joepavitt commented 8 months ago

The content of the webinar would be really interesting for us as a team, but I cant participate. Could you provide me with a recording or notes or something?

It'll be uploaded to our YouTube, and website after the session has finished.

joepavitt commented 8 months ago

Thank you! The content of the webinar would be really interesting for us as a team, but I cant participate. Could you provide me with a recording or notes or something?

Recording available: https://www.youtube.com/watch?v=rl6uwV2PhOc