Image of a factory

Why M2M: A Behind-the-Scenes Look at What We Were Thinking

Two weeks ago, we introduced a set of Temboo tools for programming machine-to-machine networks. Today, we wanted to take a bit of a deeper look at what exactly we did, and why we decided to do it.

So what does M2M do, and how does it do it?

M2M networks are great for situations in which distributed devices need to communicate with one another—for example, in a manufacturing facility where multiple machines are working together on different parts of a product. M2M protocols allow the devices in the network to gather and transmit data from sensors or to act on their environment without having to maintain an Internet connection, even if some Internet connectivity is necessary for processing data or issuing commands. A gateway-edge model, in which distributed edge devices communicate with a gateway device using an M2M protocol and the gateway device communicates with cloud services using the Internet, enables a low power local network to interact with the Internet.

There are quite a few different protocols out there for enabling M2M communication. We chose three: MQTT, CoAP, and HTTP. In general, we make an effort to remain hardware, software, and protocol agnostic so that people who use Temboo have as much choice as possible in what they build, and it was important to us that we support more than one M2M protocol. Of the protocols that we considered, these three seemed to be the most promising; the technology surrounding the Internet of Things is evolving rapidly, so there’s a good chance that it won’t be long before more protocols join that group.

Specifically, we liked MQTT and CoAP because they are excellent for lightweight devices that have constrained memory and that consume little power, which are exactly the sorts of devices that will connect distributed sensors and objects to the Internet and make them smarter as the Internet of Things matures. We included HTTP due to memory considerations as well; an HTTP gateway will allow for HTTPS connections to devices that normally would not have enough memory to implement them.


Pick a protocol

The different protocols are useful for different situations, and any decisions regarding which one to use should be informed by what it is that you are trying to do. MQTT uses a publisher-subscriber communication model, allowing clients to send commands to many other devices with one message (or, conversely, enabling one device to “listen” for commands from many different devices). This might come in handy on an assembly line, for instance, where it would be important for a machine that is experiencing a problem to inform machines upstream that they should pause until the issue is resolved.

CoAP, in contrast, uses a client-server model, which enables two-way communication: clients can send requests to servers, and also receive responses and commands from servers. A network of devices communicating using CoAP would be ideal in a scenario requiring both monitoring and control, such as an energy usage management system in a multi-unit commercial building. Data on energy consumption could be sent by edge devices to a gateway, which would then use the data to determine where lights, heating, or air conditioning should be on or off.

Finally, HTTP is useful for situations in which secure communication is required, but the devices involved do not have the memory needed to support encryption. A local HTTP gateway can forward messages securely using HTTPS.


M2M + Temboo = the best of both worlds

Temboo’s M2M support is designed to marry the low power and low memory benefits of M2M networks with the processing power and flexibility of the Internet. For systems involving many devices spread over a wide area, an M2M model is often the most practical option available; connecting each device to the Internet can become prohibitively difficult and expensive as the network grows. However, an Internet connection is often the best way for devices to communicate with the world outside of their local network, and for many applications, the ability to send information to or receive commands from a remote agent, whether human or digital, is crucial.

Temboo M2M allows people who are using a network of connected sensors or machines to achieve the benefits of low power devices without sacrificing the benefits of Internet connectivity. It also brings M2M into our IoT software stack, making it much easier to integrate features such as data streaming and remote reprogramming into multi-device applications using automatically generated Temboo code.


What’s next?

As M2M networks become more common, we expect a wide variety of industries to discover and correct new points of inefficiency in their business or production models—not only will the M2M networks themselves make communication between different parts of complex systems faster and cheaper, they will also make it easier to monitor different parts of those systems so that better decisions can be made. The proliferation of M2M networks will also create new opportunities for developing more sophisticated maintenance capabilities: network managers will need ways to efficiently modify and update the devices that they oversee so that they can effectively adapt to changing circumstances.

The maturation of M2M technology is an exciting development that is going to play a large role in driving the Internet of Things forward in the next several years. If you’re interested in learning even more about it, there are some links to further reading below, and you can try out Temboo’s M2M programming tools by signing up for a free account here.

Further Reading: