🌐 **Seamless Connection at Scale!**

When we think of connecting similar equipment, it’s like fitting puzzle pieces together :jigsaw:. The fewer modifications we make to our tools in the acquisition chain, right from the equipment to the Tulip platform, the smoother the process becomes.

:mag: Here’s a close look with an example:
Imagine you’ve got equipment that communicates using the MQTT protocol :satellite:. The beauty of this? Most of these equipment types have the same payload format! And the machine’s name? It’s sneakily embedded in the MQTT topic’s structure :robot:.

For this deep dive, I’m hopping onto the FlowForge platform and using Node-RED :hammer_and_wrench:. It helps me latch onto those MQTT messages and morph them into the format that Tulip loves :heart: (specifically, the /attributes/report endpoint).

But wait, there’s a tiny hiccup :construction:! Tulip expects us to feed it the MachineId and AttributeId identifiers. Since attributes don’t change much, let’s zoom into MachinesId.

:rocket: Here’s how the magic happens in NodeRed:

  1. Right off the bat, or whenever we wish, we summon the API (/machines) to grab those machine names and unique IDs :card_index_dividers:.
  2. With a sprinkle of JSONata magic, we reshape this data :sparkles:. The result? A nifty mapping of MachineName to MachineId, safely stored as a context variable.
  3. Every time our machines chirp with an MQTT message :musical_note:, a JS script hunts down the MachineId using the machine’s name.
  4. A function then takes this MQTT message and crafts it into the JSON format Tulip eagerly waits for :love_letter:.
  5. Finally, I employ the HTTP request node to dispatch several attribute values simultaneously :mailbox_with_mail:.

The cherry on top :cherries:? When a new machine enters the scene, all I do is introduce it to Tulip, link it to the Tulip API, and voila! No more fiddling in the NodeRed flow or with the machine’s connection.

:bulb: An Insight:
This entire journey showcases the might of the MQTT protocol when scaling up. But it also shines a light on the tiny hurdles of transitioning from MQTT to REST. If only Tulip and MQTT could speak the same language, scaling would be a breeze :leaves:.

For the curious minds, in this scenario, I’m working with the ProGlove Mark Display equipment, which we’re gearing up to roll out big time :rocket:.

:pray: I’m all ears for your feedback and insights! Let’s make this even better together :star2:


yes, native MQTT please ! :slight_smile: