šŸŒ **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:

4 Likes

yes, native MQTT please ! :slight_smile: