+49 241 52 30 30 (DE) Alle Standorte

Software, IoT and TSI Instruments: Part 2 - Moving Information in the TSI Fusion Ecosystem

Software Engineer Ryan David explains how TSI uses Message Queuing Telemetry Transport (MQTT) technology and how we use MQTT to provide TSI instruments with IoT capabilities. Part 2 of 2.


By Ryan David, TSI Software Engineer

MQTT and the Internet of ThingsIn Part 1 of this article, I introduced our TSI software platforms:

  • Fusion.SaaS, our cloud platform
  • Fusion.web, our application platform for desktop and mobile, and
  • Fusion.net, our on-instrument software platform

I also talked about our connectivity protocol of choice, MQTT, or Message Queuing Telemetry Transport. MQTT is a publish/subscribe machine-to-machine protocol. What is MQTT? [LINK TO PART 1]. In Part 2, I’ll explain how we use MQTT to provide TSI instruments with IoT capabilities.

How does MQTT work?

When using MQTT, there is always at least one “broker,” essentially a server. There is also at least one “client” on any connection. The client connects to the broker, and the broker handles messages from multiple clients if need be. 

In our case, Fusion.net runs on one of our newest instruments, the Q-Trak XP, and uses a broker called Mosquito to handle connections and messages. MQTT is able to run on any “lossless” communication link, such as TCP/IP. We have the Mosquito broker configured to run on a web socket due to the nature of the clients we are using to connect to it.

Building Fusion.web platforms for TSI applications

Our engineers use the Fusion.web platform to build our applications for desktop and mobile. We build a web app and then wrap it in frameworks that allow it to run on desktop and mobile platforms. We build Fusion.web applications using Vue.js, a JavaScript framework for building applications and user interfaces. It can run in any web browser and use any functions made available by the web browser.

TSI's new Q-Trak XP Indoor Air Quality MonitorMQTT and instruments like the new Q-Trak XP

One such function is WebSocket, a computer communications protocol. Fusion.web uses a JavaScript package called MQTT.js in our apps, allowing us to connect to a broker straight from the Vue.js application. It enables us to use exactly the same code on the desktop application and the mobile applications. Our application starts, locates instruments (like Q-Trak XP) that communicate using MQTT, and connects to them using a WebSocket. The Fusion.web app is then able to act as a client, publishing commands to the instrument, and receiving publishes that contain measurement data, settings, and device information.

Working in the Cloud with Fusion.SaaS

The fun doesn’t stop there, though. We can’t forget about Fusion.SaaS, our cloud platform. While we have not yet completed cloud integration with a Fusion.web app or a Fusion.net instrument, MQTT will make this much easier for us. Here’s how it will work:

  • Imagine that our cloud team sets up a service that runs an MQTT broker and allows instruments to connect to it and publish their measurement data and other information. The cloud team would be able to provide powerful analytics, and massive storage for information from customers’ instruments. 
  • Imagine then that they set up a service to connect to Fusion.web applications. Suddenly, the need for a direct connection to an instrument from a tablet or PC becomes less urgent. We can go to the cloud to get all the information we need, from anywhere in the world. We have a defined MQTT topic structure that all three platforms will use to communicate. Thus, the communication between Fusion.web and Fusion.SaaS becomes very similar to talking directly to Fusion.net on an instrument.

With familiarity and uniformity, developing for platforms gets much easier. Using MQTT is helping us reach our development goals.

TSI software engineers are working to make your job easier

In Part 1 of this article, we covered how information is currently moved around within the TSI Fusion ecosystem. In Part 2, we explained a little bit about what the future might hold. It’s worth mentioning that many other IoT devices and services also use MQTT. Our adoption of the technology will make such services and devices easier for TSI to integrate with them should the need arise.  When trying something new, there is always some uncertainty involved, but MQTT has proven to be an excellent choice for transferring data between our software platforms.

Interested in learning more about TSI software engineering and the Internet of Things (IoT)? Visit TSI’s IoT Garage

Geposted auf Feb 25 2021 13:00
Gespeichert unter IoT, MQTT, Q-Trak XP, software engineering
Bewertung: 0 (0 Bewertung)

Comments

Blog post currently doesn't have any comments.
 Security code