Home Audience Developers Breaking the Silos: How Open Standards Enable IoT Interoperability

Breaking the Silos: How Open Standards Enable IoT Interoperability

0
5

To be truly interoperable on a large scale, IoT devices must communicate using open standards. Else, their utility will be restricted to small islands of connectivity.

The Internet of Things (IoT) introduced a great concept — devices connecting with and talking to each other. The smart meter communicating with your solar panel; the maintenance system communicating with a factory machine; and a sensor at the hospital communicating with the doctor’s dashboard.

The truth is: it’s not happening that way. Today, there are billions of connected devices. But many of them can’t even comprehend each other. Each vendor uses its own radio, its own data format, and its own cloud. This turns into a world of small islands of connected devices, where data works well within but cannot be transferred between islands.

This is known as an interoperability problem — one of the most significant challenges to the success of IoT, making it costly, slow and difficult to scale up projects.

Fortunately, open standards are solving this problem. There are protocols, such as MQTT, CoAP and OPC UA, that provide devices with a common language. These standards are free and simple to use, thanks to open source tools.

What interoperability means

Interoperability is defined as the ability of different systems to interact with each other, giving each other information and applying it appropriately. This is done at four levels.

Technical level

Are the devices able to connect to each other? This is not about the local radio, networks and transport! Examples are Wi-Fi, Bluetooth, Zigbee, LoRaWAN and Ethernet.

Syntactic level

Will the devices be able to exchange messages? This is concerned with the format of messages and protocols. Examples are JSON, CBOR, MQTT and CoAP.

Semantic level

Do the devices “know” what the data means? One sensor can return ‘temp: 25’. The other may send, ‘t: 77’. Both are temperatures. However, one is in Celsius and the other in Fahrenheit. This can be confusing since there is no meaning attached to the data.

Organisational level

Are there ways to share data safely on the basis of a mutual agreement between different companies and platforms? This includes security, access rules and business agreements.

Most IoT projects work fine at the first level. The true pain is experienced at the second and third levels. This is where open standards come in.

Open standard vs custom links
Figure 1: Open standard vs custom links

How are open standards useful?

There are five key reasons why IoT devices don’t communicate with one another beyond a point.

Excessive radios and networks

A smart home may need to simultaneously leverage Wi-Fi, Zigbee, Z-Wave and Bluetooth Low Energy (BLE). LoRaWAN or NB-IoT can be implemented in a farm. However, all have different methods for transporting data.

Many data formats

One of the devices may be a JSON sender. Another one may send raw bytes. The third one may have a vendor-specific binary format. Even when two devices send JSON, the names of the fields are frequently different.

Closed vendor clouds

There are numerous vendors that wish to trap customers in their app and cloud. A device can only be used with that vendor’s platform. It is difficult or impossible to move data out.

Old industrial systems

Machines used in factories may be more than 20 or 30 years old. They communicate using older protocols such as Modbus or vendor-specific fieldbus protocols. These machines will not be replaced soon.

Small, low-power devices

Numerous sensors operate on battery power for a number of years. They don’t have much RAM and/or CPU. They are not intended to run heavy protocols that are created for servers.

This incompatibility can cost a lot of money. Each new device will require specific code for each app. You can have up to three apps and four device types, which can require up to 12 custom links. All links need to be written, tested and maintained. The difference an open standard can make is illustrated in Figure 1.

You can see that each device and each app connects only once to a common standard in the middle. Four devices and three apps lead to seven connections instead of 12. The bigger the system is, the more it saves.

An open standard is a technical rule book that can be read and used by everyone. It’s not owned by any company. As it is written and maintained by a neutral body, e.g., OASIS, IETF or IEC, anyone can develop products on it without having to pay any licence fee.

There are four ways in which open standards benefit IoT:

A shared language

Different vendor devices have the same rules, so they can send messages to each other.

No lock-in

You can change sellers if they miss a beat or raise the price. Devices remain on the same standard.

Available open source tools

Popular standards are well-developed open source code. Developers don’t have to develop a new protocol.

A large community

There are lots of people testing and improving the standard. Security bugs and holes are discovered quickly.

Open source and open standards are in partnership with each other. The rules are defined in the standard. Open source code provides a ready method. For instance, MQTT is the standard and Eclipse Mosquitto is an open source broker that supports it.

To date, open standards most at the heart of IoT are MQTT, CoAP and OPC UA. Let’s take a closer look at each.

Feature MQTT CoAP OPC UA
Standard body OASIS (also ISO/IEC 20922) IETF (RFC 7252) OPC Foundation (IEC 62541)
Model Publish/subscribe via broker Request/response, like HTTP Client/server and publish/subscribe
Transport TCP UDP TCP, or MQTT/UDP for pub/sub
Device size Small to large Very small Medium to large
Data meaning Not defined Not defined Rich information model
Best for Telemetry, cloud messaging Battery sensors, mesh networks Factories, machines
Open source tools Mosquitto, Paho, EMQX libcoap, Californium, aiocoap open62541, Milo, asyncua

Table 1: A comparison of three key open standards

MQTT: The common messenger

Message Queuing Telemetry Transport (MQTT) is a lightweight messaging protocol. It was developed in 1999 to track pipelines over slow satellite communications. Nowadays, it’s an OASIS standard. Version 3.1.1 has been published as ISO/IEC 20922. The current major version is 5.0 (MQTT).

MQTT is a publish/subscribe protocol. The devices are not directly connected. Instead, these communicate with a central server known as a broker.

  • A sensor sends a message to a topic, e.g., farm/field1/soil-moisture.
  • All apps that want this data subscribe to the same topic.
  • Each message is sent by the broker to all the subscribers.

This is the simple model that is the key to interoperability. The sensor need not be aware of who accesses its data. In the application, it is not important to know which vendor made the sensor. Both only need to know the name of the topic and the format of the message.

MQTT is also very lightweight. The smallest message header is just 2 bytes. It is based on TCP and is good for slow or unreliable networks. It has three Quality of Service (QoS) levels:

  • QoS 0 (at most once): Quick, but a message might be lost.
  • QoS 1 (at least once): The message is delivered but can be delivered twice.
  • QoS 2 (exactly once): Safest, but slowest.

Open source support

Eclipse Mosquitto, EMQX and VerneMQ are widely-used open source brokers. There are client libraries for Eclipse Paho in C, Python, Java, JavaScript, and more.

Gateway and MQTT broker
Figure 2: Gateway and MQTT broker

CoAP: The web for tiny devices

CoAP is the acronym for ‘Constrained Application Protocol’. It is an IETF standard protocol for very light devices in very weak networks.

CoAP is very easy to understand. It is similar to HTTP, but smaller in size.

  • It employs the same concept of resources in URLs as coap://sensor1/temperature.
  • It works with the same methods as GET, POST, PUT and DELETE.
  • It is a non-blocking protocol (UDP) rather than a blocking protocol (TCP), reducing overhead.
  • It has a 4-byte fixed header.

There’s an Observe option too in CoAP. A client may request that it be informed when the value changes. This prevents the device from repeating the same reading over and over again.

CoAP is an interoperability enabler as it can be mapped to HTTP. With a simple gateway, it is possible to convert CoAP requests to HTTP requests. So the tinier battery sensor can become a part of a regular web system.

Open source support

libcoap (C), Eclipse Californium (Java) and aiocoap (Python) are popular implementations. CoAP is also added in the embedded operating systems included in Zephyr, RIOT and Contiki-NG.

OPC UA: The language of the factory

OPC UA is an acronym for Open Platform Communications Unified Architecture. It is managed by the OPC Foundation and has been published as international standard IEC 62541. It is extensively used in factories and industrial automation.

MQTT and CoAP mainly solve the syntactic level of the problem. They carry messages but they don’t convey the meaning of the data. OPC UA does more. It also resolves the semantic level of the challenge.

OPC UA is based on an information model. Each machine has a structured description stating what it is, what values it has, the units, and the relationship between the units. For instance, a pump has a speed, a pressure and a temperature, all of which have a name, type, and a unit.

This allows the access of a new client to a machine and the browsing. The client can find out the data without the need to read a vendor handbook. Companion specifications for OPC UA have been developed by industry groups as well. They are the common models for robots, machine tools, packaging machines, and so on.

OPC UA can be used for encryption, signing and certificate-based authentication. Recent versions include a publish/subscribe mode that can run on top of MQTT.

Open source support

There are several popular implementations of open source, such as open62541 (C), Eclipse Milo (Java) and the Python package asyncua.

These three standards are not competitive (see Table 1 for a comparison between them) and are best used in conjunction. Each is used in a system where it is most appropriate and connected by an edge gateway. This is illustrated in Figure 2.

The gateway is the translator. It can read CoAP, OPC UA or even old Modbus data, which it translates to a single format and broadcasts to an MQTT broker. Then apps subscribe to the topics of interest. It is much easier to build such gateways with open source tools such as Node-RED and EdgeX Foundry.

Other open standards

MQTT, CoAP and OPC UA are not alone. Some additional open standards fill crucial gaps.

LwM2M (Lightweight M2M)

This standard has been developed by OMA SpecWorks on top of CoAP. It provides a standardised approach in remote administration of devices — read settings, update firmware, check health.

Sensor Measurement Lists (SenML)

Defined in RFC 8428, it has a simple sensor reading format – either JSON or CBOR. It establishes names and units, with ‘25 Cel’ being the same temperature in every location.

Matter

This is an initiative by Connectivity Standards Alliance and was released in 2022. It enables intelligent devices from Apple, Google, Amazon, Samsung and others to communicate with each other. It is open source with a reference code.

AMQP

This offers reliable business messaging via an OASIS and ISO standard. It’s frequently employed in the IoT gateway to enterprise system interface.

Devices that can work together are key to the functioning of IoT. Closed systems produce islands. Open standards are the bridges that unite them.

MQTT provides a lightweight and easy way to transport data. CoAP enables access to the smallest devices via the web. OPC UA is an additional layer of meaning and security for industrial machines. Together, they create a solid open stack in conjunction with gateways and common data models.

This stack is free and easy to adopt thanks to open source. The team, small or large, can develop systems that connect using tools such as Mosquitto, Paho, libcoap and open62541. The message for students, startups, and industry is clear. Communicate using open standards and your IoT system will be able to speak with the world.

Loading form…
Previous articleOpenMV Combines Open-Source Vision Platform With AI LiDAR Camera
The author, who is a CEH and ECSA, has completed a Masters in Engineering (ME) in computer science from Thapar University, Patiala. He has worked in IBM, Teramatrix and Sapient. He is the author of books Python penetration testing essential, Python: Penetration testing for developers and Learn Python in 7 days.

LEAVE A REPLY

Please enter your comment!
Please enter your name here