flowfuse icon indicating copy to clipboard operation
flowfuse copied to clipboard

Autocomplete MQTT topics in Node-RED

Open joepavitt opened this issue 10 months ago • 1 comments

Story

As a Node-RED Developer I want to have my MQTT topics autocompleted So that I can build solutions integrating with my MQTT broker faster and more efficiently.

Details

There is likely to be a couple of child components here:

  • Work in Node-RED
  • Work in FlowFuse to pass context/information to the Node-RED Editor

Fundamentally, we want to provide auto-complete functionality in the MQTT nodes when running on FlowFuse. The autocomplete should provide suggestions from the Team's known broker hierarchy.

joepavitt avatar Feb 10 '25 13:02 joepavitt

The technical challenge here comes in two places:

  1. The MQTT nodes providing a way to plugin auto-complete suggestions
  2. Only apply those suggestions if they have a config node selected related to a broker we know about.

Item 1 will require work in the core of Node-RED. Item 2 will require the plugin api provided by Node-RED to provide information on the broker selected, and for us to implement such a plugin that can retrieve valid completions from the platform.

knolleary avatar Feb 10 '25 14:02 knolleary

I'm going to get the Node-RED side of this done now so that it is in the 4.1 release. Plugging it into the FlowFuse side can then follow, but at least we have the NR side released.

knolleary avatar Jun 26 '25 10:06 knolleary

The Node-RED piece is provided by https://github.com/node-red/node-red/pull/5194

The remaining tasks are:

  1. Pick API from the platform to get the list of available topics for a given broker. Big open question on how we correlate the MQTT broker config with the brokers we know about on the platform.
  2. Create NR plugin to access that API and plugin to the mqtt node (via the work done in the PR linked above)

I estimate 2-3 story points remain on this task

knolleary avatar Jun 26 '25 13:06 knolleary

@knolleary we had discussed earlier this week about us using a FF-own "MQTT/Realitime" node, alongside a pending "Tables" node too for the future. Assuming given the status update here that was decided against, at least for now?

joepavitt avatar Jun 27 '25 07:06 joepavitt

@joepavitt no decision has been made either way - nothing has been discussed or issues raised for it. But I knew if the Node-RED side of this missed 4.1 it would then delay when it could be shipped. So for the sake of an hour's work, I got the NR side done.

knolleary avatar Jun 27 '25 08:06 knolleary

Taking the "epic" label off of this as we've agreed to pivot in the direction of https://github.com/FlowFuse/node-red/issues/40

gstout52 avatar Jul 07 '25 18:07 gstout52

@gstout52 I think we can close this out given the move in direction elsewhere? I think the sizing can also drop to a 1 or 2, given that scale of work that Nick needed to do in Node-RED core, and then we've now assigned into other issues.

joepavitt avatar Jul 22 '25 18:07 joepavitt

Closing this issue as we have pivoted in the direction of https://github.com/FlowFuse/nr-project-nodes/issues/114

gstout52 avatar Jul 22 '25 19:07 gstout52