IoT vs. WoT: war or peace?

Have you ever heard about the WoT before? Quintagroup is here to pull you out of the abyss of ignorance and provide a short overview of the WoT notion.

Closest friend or chief opponent?

If you hear the notion of Web of Things for the first time, do you think that it is the rival or the ally of the Internet of Things? First time I heard the notion of WoT I thought that it is probably an opponent of well-known IoT technology. I thought that WoT offers the same service under the new name. But it’s not so. Web of Things is the ally, partner, and the closest friend of IoT.

None of us is perfect. The same is with IoT. Despite all IoT benefits, it may be challenging to create a single platform for communication that seamlessly connects all the Things with one another. Many developers try to build brand-new platforms from scratch. But this is a tiresome and time-consuming activity, isn’t it? Therefore, we believe that it is more convenient to use a platform that already exists - the World Wide Web. And that is when a loyal and true friend WoT enters the battlefield to help its soulmate IoT.

The notion of the Web of Things (WoT) is based on the purpose of connecting a real-world object to the World Wide Web. WoT creates a decentralized IoT by giving those objects (Things, in terms of IoT) URLs, standardized data models (Thing Description) and API to make them linkable, discoverable, and interoperable. Using existing web technologies, the Web of Things is designed to be a merging element for the multiple IoT protocols.

Sounds great but you still have no idea what it is about? In plain words, the Web of Things refers to the Web as it is and extends its application to the devices that are plugged into the Web itself. It’s like we give the Web a sensory system to see, hear, touch and taste to connect the physical world with the virtual without any disruption.

Long live the WoT

IoT consumers may be blissfully unaware that purchasing the internet-connected device you make a contract with the manufacturer, not with the product itself. To connect your mobile devices with the hub, companies’ hub relies on cloud-based services. Once their cloud service shuts down, you are not able to use the software to access your smart Things. This means that your smart devices rely on the servers of the producer, therefore producers are on duty of not only software updates and fixing bugs, but also guaranty of the long and prosperous life of the Thing outliving its competitors and not turning into the utter garbage.

Unfortunately, the list of IoT products that are no longer supported by the manufacturers has been vastly expanded over the past several years. Best Buy and its line of Insignia Connect products. Google’s Nest company Revolv. Sweetheart social robot Jibo. We may bid farewell to all of them.

Luckily for us, the WoT may serve as an optimal solution for this issue. Connecting the Things with the Web seamlessly and complementing existing IoT standards, the development of WoT ecosystem will allow us to avoid “death” and “stupidity” of smart Things in the future.

WoT Areas of application.jpgWoT use cases

There are no limitations on the diversity of use cases for the Web of Things. Some common patterns are considered to be applicable to different application domains.

You can easily create your own application and choose Quintagroup as your partner to make that idea not only real but also user-friendly, secure and reliable for its future users. The WoT is especially useful in logistics with shipped goods that can be tracked to ensure their constant quality and condition. You can control resource consumption and potential obstacles with an automated reading of utility meters. Remote access and voice control, as well as home automation, are the cases of application of WoT in smart homes. In agriculture, the WoT may be used to control the soil condition and ensure optimum watering, fertilization, and monitoring of the conditions of production in order to improve the quality and efficiency of agricultural products. The healthcare scientists may take the most advantage of the WoT by collecting data and analytics of clinical trials to obtain a more detailed insight into new research areas. In addition, it may help to decrease the risk of undetected critical situations for elderly people and post-hospitalization patients. Smart control of street lights, smart parking, monitoring of highways, bridges, canals, and even garbage containers are the uses cases in the smart cities.



Abstract WoT Architecture Overview

In 2015, the W3C WoT group, in the need for standard solutions of WoT, started to work on the set of standards allowing interoperability of IoT systems. In this section, we will try to deliver you the most important information presented in their W3C Candidate Recommendation. The recommendation states the WoT Architecture consists of 4 main building blocks: Thing Description, Binding Templates, Scripting API, and Security and Privacy Guidelines.

Common Principles

The W3C differentiate 4 main principles the Web of Things architecture should possess:

  1. WoT architecture should enable mutual interworking of different eco-systems using web technology.
  2. WoT architecture should be based on the web architecture using RESTful APIs.
  3. WoT architecture should allow to use multiple payload formats which are commonly used in the web.
  4. WoT architecture must enable different device architectures and must not force a client or server implementation of system components.

In addition, the architecture must be flexible, compatible, scalable, and interoperable. To be more accurate, the WoT architecture should be able to cover all of the variations of WoT configurations; it should build a bridge between the existing IoT solutions and Web technology, be able to scale for IoT that integrate myriad of devices and provide the ability to exchange and make use of information across devices and cloud manufacturers.

WoT Thing Description

A Thing, or Web Thing, is an abstract notion of a physical or virtual item that can be described semantically with the WoT Thing Description.

The WoT architecture should be built in such a way that thing functionalities:

  • reading and updating thing’s status information
  • subscribing to, receiving, and unsubscribing to change notifications of the status information
  • invoking functions with input and output data to cause specific actuation or calculation

Consequently, Thing Description (TD) is a standardized model of metadata and network-oriented interfaces of Things in a machine-readable format with a default JSON encoding.

A TD composes of 4 main components:

  1. textual metadata about the Thing,
  2. Interaction Affordances kit that indicates where the Thing can be applied,
  3. schemas for the machine-readable data exchanged with the Thing,
  4. Web links to express any relation to other Things or documents on the Web.

Being a member of Web of Things Interest Group, Mozilla is now working on an open platform for WoT implementation that is called Mozilla WebThings. The comprehensibility of the code is clearly seen in the following examples that are provided in the Mozilla Web Thing API documentation.

Example #1. A simple TD model

{
  "id": "https://mywebthingserver.com/things/switch",
  "title": "On/Off Switch",
  "description": "A web connected switch",
  "properties": {
    "on": {
      "title": "On/Off",
      "type": "boolean",
      "description": "Whether the lamp is turned on",
      "links": [{"href": "/things/switch/properties/on"}]
    }
  }
}

Example #2. More complex TD with semantic annotations.

{
  "@context": "https://iot.mozilla.org/schemas/",
  "@type": ["Light", "OnOffSwitch"],
  "id": "https://mywebthingserver.com/things/lamp",
  "title": "My Lamp",
  "description": "A web connected lamp",
  "properties": {
    "on": {
      "@type": "OnOffProperty",
      "type": "boolean",
      "title": "On/Off",
      "description": "Whether the lamp is turned on",
      "links": [{"href": "/things/lamp/properties/on"}]
    },
    "brightness" : {
      "@type": "BrightnessProperty",
      "type": "integer",
      "title": "Brightness",
      "description": "The level of light from 0-100",
      "minimum" : 0,
      "maximum" : 100,
      "links": [{"href": "/things/lamp/properties/brightness"}]
    }
  },
  "actions": {
    "fade": {
      "@type": "FadeAction",
      "title": "Fade",
      "description": "Fade the lamp to a given level",
      "input": {
        "type": "object",
        "properties": {
          "level": {
            "type": "integer",
            "minimum": 0,
            "maximum": 100
          },
          "duration": {
            "type": "integer",
            "minimum": 0,
            "unit": "milliseconds"
          }
        }
      },
      "links": [{"href": "/things/lamp/actions/fade"}]
    }
  },
  "events": {
    "overheated": {
      "title": "Overheated",
      "@type": "OverheatedEvent",
      "type": "number",
      "unit": "degree celsius",
      "description": "The lamp has exceeded its safe operating temperature",
      "links": [{"href": "/things/lamp/events/overheated"}]
    }
  },
  "links": [
    {
      "rel": "properties",
      "href": "/things/lamp/properties"
    },
    {
      "rel": "actions",
      "href": "/things/lamp/actions"
    },
    {
      "rel": "events",
      "href": "/things/lamp/events"
    },
    {
      "rel": "alternate",
      "href": "wss://mywebthingserver.com/things/lamp"
    },
    {
      "rel": "alternate",
      "mediaType": "text/html",
      "href": "/things/lamp"
    }
  ]
}

WoT Binding templates

The metadata that describes communication strategies the Ting is able to implement are called Protocol Binding Templates. They enable clients to adapt to the underlying protocol and network-facing API structures. Since the core protocol like HTTP, CoAP, or MQTT has been classified

WoT Scripting API

The optional building block Scripting API allows Thing's application logic to be implemented using a standard JavaScript API equivalent to the Web browser APIs. This simplifies the development of IoT applications and enables vendor and device-wide portability.

WoT Security Configuration

Guidance for security and privacy presents a cross-cutting building block. The information report includes guidance for the secure deployment and configuration of Things and addresses problems that should be discussed in any WoT implementation process.

All things considered

To conclude, the figure below outlines the Abstract WoT architecture that includes internal blocks and multiple interaction patterns among the Things. The W3C Group identified a shortlist of interaction patterns that are fairly general to include most current IoT deployments, irrespective of the technology scope.

WoT Abstract Architecture.jpg

W3C WoT principles extend to all IoT applications-relevant levels: local network level, edge device level, and cloud level. The principles promote specific interfaces and APIs across different levels, as well as allow for different integration patterns such as Thing-to-Thing, Thing-to-Edge, Thing-to-Cloud, and Edge-to-Cloud.

Additional materials

Here are the articles that may also interest you considering the IoT sphere:

We hope this article has shed the light of knowledge on you, and you now feel inspired for the IoT or WoT project. And actually, whatever the feelings this article evokes in you, feel free to contact us and tell all your ideas, suggestions, and remarks.

Connect with our experts Let's talk