IoT Data Modeling and Remote Access with Clarke Stevens of UPnP Forum

Can you give us a little background about yourself and your involvement with the UPnP Forum?

UPnP Forum is basically a volunteer organization and an open standards organization. I got involved about 10 years ago. I worked for CableLabs, which is a research and development organization for the cable television industry. We were using UPnP stuff to transmit video and a few other things. I’ve been involved in the organization for some time, and evolving that over time to address new use cases and new problems. I’m the technical chair of UPnP at this point. I approve all the technical standards and drive the technical agenda.

How do you describe UPnP’s mission?

UPnP is all about the interoperability of things. So long before the “Internet of Things” term was coined, we were doing Internet of Things. Mostly, previously, on local area networks, and that included things like video- and audio-streaming services. That’s the basis behind DLNA — all the technology in DLNA is from UPnP, as far as the audio/video stuff, so every DLNA product is also UPnP-certified. Then we’ve got protocols like controlling thermostats, controlling blinds, controlling printers, controlling gateways, lighting. All of those sorts of things have been in the protocol for 10-plus years, and are in many deployed products — PCs, printers, smartphones, smart TVs, Roku, Wemo switches. Probably more than 2 billion products have UPnP in them to do basically command and control, and audio/video stuff. It’s an open standard, so anybody can use it for free.

Can you tell me about the membership and how the alliance is structured?

Anybody can participate in the organization. There’s over 1,000 members, and I think a hundred-something certifying members — which means they can certify and get the logo. Then there are the companies that are on the Steering Committee (Cisco, Intel, CableLabs, LG, TP Vision, AwoX, Broadcom) that make decisions and set the general direction.

You’re the Chair of the Technical Committee, and you’re also the Chair of the Internet of Things Task Force. What are you doing to adapt to the changing connectivity needs of the Internet of Things?

We’ve essentially been doing the Internet of Things since our inception, but what has changed recently is that we’ve migrated with the evolution of the Internet of Things. The “Internet of Things” actually used to be the “LAN of Things”, right? So we added something called ‘remote access’ that allows you to control your devices from outside of your phone, control things outside your home from within your home, and provides essentially a seamless VPN with some other features in it. What we’re using is XMPP — that’s the protocol behind chat rooms. Instead of just inviting people to participate in your chat room, you invite devices to participate in your chat room too. Essentially, you’re joining people and devices from different locations through the Internet into a common location.

So you can set up a room that’s “My Extended Family Living Room,” for example. So I invite all my extended family, I invite their televisions, and their media streamers, and maybe their lights and stuff to that chat room. Then anybody who comes into that chat room can see those devices and gets to control them. So we can all, for example, watch the Superbowl together, while streaming a video chat service, and maybe controlling lights, and pausing the video, or whatever.

You can set up as many of these rooms as you want. You could have a room for a virtual family room. You could also have a room that’s your security system, and maybe only you and your spouse are invited to that. Or you can have a room that is your own house, or your own house and your neighbors house. You can set up these things however you like.

All of this is basically white-listed, so nobody can come in unless they’re invited. So you don’t have the problem of random people on the Internet scanning and finding rooms and secretly joining them and having access to your devices.

Similarly, your devices have to be invited. You may have 100 devices in your home, but if you only invite one to that room, that’s the only one that anybody can see in there, even if they were to break into that room. It’s secure, and it just basically leverages the XMPP protocol to extend this stuff beyond the local network into the Internet.

From a user perspective, it’s not like I’m going to control all of my devices through an AOL-style chat room interface, right? I mean, the XMPP chat protocol is built into the back-end layers of apps or services, so is the idea of me and my family “joining a chat room” with our TV just a metaphor for how UPnP products connect?

It goes a little beyond a metaphor, because it is actually using the premier chat protocol. It’s been scaled to millions and millions of users, so we don’t have scaling issues. And you can get the XMPP server source code for free on the Internet. We’re not inventing something new, we’re leveraging something old for a new purpose.

How do you see that kind of older standard, as well as emerging standards, playing into the need to make IoT infrastructure future-proof?

The legacy of UPnP is pretty long. It’s based on SOAP protocols, it uses SSDP discovery which has been around for a long time and is still widely used, and it uses GENA for notification. So these technologies are not new, but we are evolving them. We’re also in the process of developing a RESTful protocol to do this as well. What that means is that instead of having SOAP requests, we’re doing HTTP requests and responses. And then for notification we can do “long polling” or other ways to essentially have the device notify the client that something has happened.

We think this is important, because if you have something like a glass-break sensor, you don’t want to keep asking if its broken. You want to hear from that device only if the battery is low, or the glass breaks. If you have three messages over 10 years, you feel like you’ve done well. So we’ve implemented that kind of interface where we get notifications initiated by the devices themselves, which allows you to have long battery life with a coin-cell battery, reduce traffic, and not waste a lot of time making requests that are pointless. All that is built into this implementation, as well as the traditional SOAP implementation.

The other thing we’ve done to make this future-proof is that using this restful model, we carry most of the information in a data model. We created a tool that automates this device definition process via JSON and RAML, which stands for Restful API Modelling Language.

So we can start out by defining temperature. Temperature is in degrees, and it has a unit of Fahrenheit. Then we define a thermometer on top of that, and the thermometer says, “I measure temperature, and my limit is minus-40 degrees to plus-whatever.” Then you say, I want to create a thermostat. So I need a target temperature, which is the temperature resource, and I need a switch so that when I get within a certain range of that target temperature I can switch off the fan or the heater.

Using that kind of approach, you build up this model by creating collections of existing models. You can use that same thermostat definition, because it’s an abstract kind of definition, whether you’re developing a heating and air conditioning system or whether you’re creating a refrigerator, whether you’re creating a water heater, or anything else that uses a thermostat.

Besides being efficient and having code reuse, this is one way to help encourage interoperability. When I create my Samsung refrigerator, I have a basic refrigerator model I can build off of. I take the basic refrigerator, I add my Samsung special features, and now I’ve got a Samsung refrigerator. LG takes that same basic refrigerator, adds the LG features, and they have an LG refrigerator. There’s compatibility at the basic refrigerator level, so when I want to make something that controls the refrigerator model, I don’t have to make it brand-specific unless I want to take advantage of the additional features that LG has added or Samsung has added.

IoT DataModel Whitepaper PDF

So I can really have an open market for creating and controlling devices, because we post these things publicly with this tool. It’s available as a crowd-sourcing tool so anybody can use it, or if they’re a UPnP member they can also add their own models to that. There’s a whole process behind that allows UPnP to administer it and prevent abuse.

So app developers can use this model structure to make software that works for similar devices across brands? That’s really cool.

There’s another piece of that that’s even cooler. Because these things are defined in RAML and JSON, which are machine-readable code, we actually generate our new specifications from that code. Instead of taking a specification document and trying to create code out of that, we go in the opposite direction. The code is the definitive specification. It’s machine readable, and we generate the Word document that specifies how to use it, because RAML and JSON definitions are definitive, and clearly defined, and not ambiguous.

Then you can use that same process to create code stubs for a Raspberry Pi. So if you want to mock up your device, you create a little client on the Raspberry Pi, and you define the interface that you want for that using the JSON and RAML code. You can inherit stuff from whatever devices have already been developed. Then you run this script and say “create my code stubs”, and now you’ve got all the procedures that you need to fill out for your Raspberry Pi in whatever language your script generated. Then you can go in there and say, “Okay, I need to read this sensor and then I need to turn on this light,” or whatever your device is going to do.

You can also generate a generic user interface from that. So you can say, “I know what my parameter are: I’ve got a numeric value that ranges between 0 and 100, that measures the percent dimming on my light, and I’ve got an on-off value that I can implement with a little radio button, and whatever else. You can actually generate a generic user interface. So without doing more than the RAML and the JSON definitions, you’ve suddenly got a user interface to a new device that’s running on your Raspberry Pi.

We’ve talked about some of the ways UPnP works for hardware makers, for software developers, maybe even for hobbyists and more technically-minded users. For the non-technical user, what does UPnP certification mean to them? Are they going to be aware that a device has the certification?

I think if there’s one area where we could definitely do a better job, it’s in publicizing that UPnP is there, and it works, and it’s in billions of devices. Every Windows device since I think Windows 98, maybe sooner than that, supports UPnP. It’s in the Windows operating system, and if you have a UPnP media server on your network, and you go into the AV applications in Windows, suddenly they show up, and you say, “Oh! I didn’t realize that.” And there’s tons of open source and commercial implementations on every conceivable OS and language combination out there. You can find stuff, but it’s not always easy to find.

It almost sounds like if it’s working well, it’s invisible. I plug my stuff in and it just works, and I don’t have to think about whether it’s part of a certain alliance or whether it’s working on a specific protocol.

Right. In fact, that’s our motto: “It just works.”

Speaking of alliances, there are so many groups now that are trying to be one of the unifying standards for the IoT. How does UPnP Forum differentiate itself?

We have alliances with several other organizations, and we’re working to try and unify them as much as we can, or at least provide interfaces to make them interoperable. We have liaisons with probably about a dozen organizations. We’re all about interoperability. We’re trying to build interfaces where their devices can leverage UPnP and vice versa, at varying levels of completion.

Our data model-based approach is hyper-expandable, and really matches IoT well. Our remote access using XMPP is being adopted by other organizations that we’re collaborating with, like Allseen and OIC, as is our data model approach — because we’ve been promoting it to them and helping them develop it.

Where you are most excited to see the IoT creating the greatest impact in society?

I think that the prospect of connecting devices is one of the most exciting opportunities to come along for a long time. To us, connecting those devices means a new paradigm, a new way of thinking.

A lot of times, people think, “Here’s what the IoT can do in this vertical market, and here’s what it can do in that vertical market.” I think that’s similar to when television first started, and they basically had radio on TV. Just reading the news with a video image of the studio, which was kind of boring. I think people need to think about new opportunities, especially across these vertical segments in IoT.

It’s not about how I can make my devices that are already talking, talk to the same people in the same ways or the same devices in the same ways. It’s how can I leverage that capability now, so that these verticals get flattened out. It’s no longer “Here’s my connected home, and here’s my connected office.” It’s “Here’s my connected life.” I may be at home or I may be in the office or I may be on my mobile phone, but I have access to all those things regardless of my context.

Can you give an example of what that might look like?

Yeah, so let’s say I’m charge of a factory floor, but I’m home sick. I can still see what’s going on, and I can make changes if I need to. Or maybe I’m travelling and I’m in my hotel room, and I want to watch a movie with my kids. I can see it on my hotel TV while my kids are watching at home, and we can be sharing a video chat.

Or I can say, “Well, I just got a notification on my cellphone that there’s a flood in my home” — which just happened to me recently. My ‘remote connection’ at that point was my kid. But it could be a flood sensor, and you say, “I need help, I need to call my neighbor.” My neighbor, traditionally, can’t get into my house. But if I have this IoT system, now I can unlock the door and let him in.

I can monitor what’s happening in my home. I can change things. I can set up rules and modes so that my home behaves in certain ways when I’m not home, and certain ways when I’m home. It’s the idea that of a lot of the mundane stuff that we traditionally do can be avoided, and new opportunities can be exploited that allow machines to do new and exciting kinds of collaboration that weren’t available before.

Thanks so much for talking with us.

If you would like to learn more about all of the activities mentioned you can follow UPnP Forum at their Website, Twitter @UPnP_Forum, or view their latest presentations on the IoT Data Models (PDF) or Discovery & Service Layer For The Internet of Things (PDF).

Clarke Stevens
Clarke Stevens

Clarke Stevens is Principal Architect of Advanced Platforms and Services at CableLabs. Clarke is on the board of directors of UPnP Forum and chairs the Technical Committee as well as the Internet of Things Task Force.

IoT Voices Interview
Nov 12,2015
Cover image