When we think of connecting similar equipment, itās like fitting puzzle pieces together
. 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.
Hereās a close look with an example:
Imagine youāve got equipment that communicates using the MQTT protocol
. 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
.
For this deep dive, Iām hopping onto the FlowForge platform and using Node-RED
. It helps me latch onto those MQTT messages and morph them into the format that Tulip loves
(specifically, the /attributes/report endpoint).
But wait, thereās a tiny hiccup
! Tulip expects us to feed it the MachineId and AttributeId identifiers. Since attributes donāt change much, letās zoom into MachinesId.
Hereās how the magic happens in NodeRed:
- Right off the bat, or whenever we wish, we summon the API (
/machines) to grab those machine names and unique IDs
. - With a sprinkle of JSONata magic, we reshape this data
. The result? A nifty mapping of MachineNametoMachineId, safely stored as a context variable. - Every time our machines chirp with an MQTT message
, a JS script hunts down the MachineIdusing the machineās name. - A function then takes this MQTT message and crafts it into the JSON format Tulip eagerly waits for
. - Finally, I employ the HTTP request node to dispatch several attribute values simultaneously
.
The cherry on top
? 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.
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
.
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
.
Iām all ears for your feedback and insights! Letās make this even better together ![]()
