{"id":1014,"date":"2017-06-28T17:11:00","date_gmt":"2017-06-28T17:11:00","guid":{"rendered":"http:\/\/tola.me.uk\/blog\/?p=1014"},"modified":"2021-02-13T17:28:32","modified_gmt":"2021-02-13T17:28:32","slug":"building-the-web-of-things","status":"publish","type":"post","link":"https:\/\/tola.me.uk\/blog\/2017\/06\/28\/building-the-web-of-things\/","title":{"rendered":"Building the Web of Things"},"content":{"rendered":"\n<p><em>Originally posted on <a rel=\"noreferrer noopener\" href=\"https:\/\/hacks.mozilla.org\/2017\/06\/building-the-web-of-things\/\" target=\"_blank\">Mozilla Hacks<\/a>.<\/em><\/p>\n\n\n\n<p><em>Mozilla is working to create a Web of Things framework of software and services that can bridge the communication gap between connected devices. By providing these devices with web URLs and a standardized data model and API, we are moving towards a more decentralized Internet of Things that is safe, open and interoperable.<\/em><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/cdn-images-1.medium.com\/max\/2600\/1*BtrwZbVB6VRNUKTjsGZlGw.png\" alt=\"\"\/><\/figure>\n\n\n\n<p>The Internet and the World Wide Web are built on open standards which are decentralized by design, with anyone free to implement those standards and connect to the network without the need for a central point of control. This has resulted in the explosive growth of hundreds of millions of personal computers and billions of smartphones which can all talk to each other over a single global network.<\/p>\n\n\n\n<p>As technology advances from personal computers and smartphones to a world where everything around us is connected to the Internet, new types of devices in our homes, cities, cars, clothes and even our bodies are going online every day.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">The Internet of&nbsp;Things<\/h3>\n\n\n\n<p>The \u201cInternet of Things\u201d (IoT) is a term to describe how physical objects are being connected to the Internet so that they can be discovered, monitored, controlled or interacted with. Like any advancement in technology these innovations bring with them enormous new opportunities, but also new risks.<\/p>\n\n\n\n<p>At Mozilla our mission is <em>\u201cto ensure the Internet is a global public resource, open and accessible to all. An Internet that truly puts people first, where individuals can shape their own experience and are empowered, safe and independent.\u201d<\/em><\/p>\n\n\n\n<p>This mission has never been more important than in a time when everything around us is being connected to the Internet. As new types of devices come online, they bring with them significant new challenges around security, privacy and interoperability.<\/p>\n\n\n\n<p>Many of the new devices being connected to the Internet are insecure, do not receive software updates to fix vulnerabilities and raise new privacy questions around the collection, storage and use of large quantities of extremely personal data.<\/p>\n\n\n\n<p>Additionally, most IoT devices today use proprietary vertical technology stacks which are built around a central point of control and which don\u2019t always talk to each other. When they do talk to each other it requires per-vendor integrations to connect those systems together. There are efforts to create standards, but the landscape is extremely complex and there\u2019s still not yet a single dominant model or market leader.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/cdn-images-1.medium.com\/max\/1600\/1*fYwqhcY-ApuCCQ5NUKWs6Q.png\" alt=\"\"\/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">The Web of&nbsp;Things<\/h3>\n\n\n\n<p>Using the Internet of Things today is a lot like sharing information on the Internet before the World Wide Web existed. There were competing hypertext systems and proprietary GUIs, but the Internet lacked a unifying application layer protocol for sharing and linking information.<\/p>\n\n\n\n<p>The \u201cWeb of Things\u201d (WoT) is an effort to take the lessons learned from the World Wide Web and apply them to IoT. It\u2019s about creating a decentralized Internet of Things by giving Things URLs on the web to make them linkable and discoverable, and defining a standard data model and APIs to make them interoperable.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/cdn-images-1.medium.com\/max\/1600\/1*RZ-xNVIRctGLaqs7nMRxSg.png\" alt=\"\"\/><\/figure>\n\n\n\n<p>The Web of Things is not just another vertical IoT technology stack to compete with existing platforms. It is intended as a unifying horizontal application layer to bridge together multiple underlying IoT protocols.<\/p>\n\n\n\n<p>Rather than start from scratch, the Web of Things is built on existing, proven web standards like REST, HTTP, JSON, WebSockets and TLS. The Web of Things will also require new web standards. In particular, we think there is a need for a Web Thing Description format to describe things, a REST style Web Thing API to interact with them, and possibly a new generation of HTTP better optimised for IoT use cases and use by resource constrained devices.<\/p>\n\n\n\n<p>The Web of Things is not just a Mozilla Initiative, there is already a well established<a href=\"http:\/\/webofthings.org\/\" rel=\"noreferrer noopener\" target=\"_blank\"> Web of Things community<\/a> and related standardization efforts at the<a href=\"https:\/\/www.ietf.org\/id\/draft-keranen-t2trg-rest-iot-04.txt\" rel=\"noreferrer noopener\" target=\"_blank\"> IETF<\/a>,<a href=\"https:\/\/www.w3.org\/WoT\/\" rel=\"noreferrer noopener\" target=\"_blank\"> W3C<\/a>,<a href=\"https:\/\/openconnectivity.org\/developer\/specifications\" rel=\"noreferrer noopener\" target=\"_blank\"> OCF<\/a> and<a href=\"https:\/\/github.com\/opengeospatial\/sensorthings\" rel=\"noreferrer noopener\" target=\"_blank\"> OGC<\/a>. Mozilla plans to be a participant in this community to help define new web standards and promote best practices around privacy, security and interoperability.<\/p>\n\n\n\n<p>From this existing work three key integration patterns have emerged for connecting things to the web, defined by the point at which a Web of Things API is exposed to the Internet.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/cdn-images-1.medium.com\/max\/1600\/1*VvhNbQ4_ngkG5vR5EJQuJQ.png\" alt=\"\"\/><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">Direct Integration Pattern<\/h4>\n\n\n\n<p>The simplest pattern is the direct integration pattern where a device exposes a Web of Things API directly to the Internet. This is useful for relatively high powered devices which can support TCP\/IP and HTTP and can be directly connected to the Internet (e.g. a WiFi camera). This pattern can be tricky for devices on a home network which may need to use NAT or TCP tunneling in order to traverse a firewall. It also more directly exposes the device to security threats from the Internet.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Gateway Integration Pattern<\/h4>\n\n\n\n<p>The gateway integration pattern is useful for resource-constrained devices which can\u2019t run an HTTP server themselves and so use a gateway to bridge them to the web. This pattern is particularly useful for devices which have limited power or which use PAN network technologies like Bluetooth or ZigBee that don\u2019t directly connect to the Internet (e.g. a battery powered door sensor). A gateway can also be used to bridge all kinds of existing IoT devices to the web.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Cloud Integration Pattern<\/h4>\n\n\n\n<p>In the cloud integration pattern the Web of Things API is exposed by a cloud server which acts as a gateway remotely and the device uses some other protocol to communicate with the server on the back end. This pattern is particularly useful for a large number of devices over a wide geographic area which need to be centrally co-ordinated (e.g. air pollution sensors).<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Project Things by&nbsp;Mozilla<\/h3>\n\n\n\n<p>In the Emerging Technologies team at Mozilla we\u2019re working on an experimental framework of software and services to help developers connect \u201cthings\u201d to the web in a safe, secure and interoperable way.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/cdn-images-1.medium.com\/max\/1600\/0*BXeSfzVIIdvutnLE.png\" alt=\"\"\/><\/figure>\n\n\n\n<p><strong>Project Things<\/strong> will initially focus on developing three components:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>Things Gateway<\/strong>\u200a\u2014\u200aAn open source implementation of a Web of Things gateway which helps bridge existing IoT devices to the web<\/li><li><strong>Things Cloud<\/strong>\u200a\u2014\u200aA collection of Mozilla-hosted cloud services to help manage a large number of IoT devices over a wide geographic area<\/li><li><strong>Things Framework<\/strong>\u200a\u2014\u200aReusable software components to help create IoT devices which directly connect to the Web of Things<\/li><\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Things Gateway<\/h3>\n\n\n\n<p>Today we\u2019re announcing the availability of a prototype of the first component of this system, the Things Gateway. We\u2019ve made available a software image you can use to <a href=\"http:\/\/iot.mozilla.org\/gateway\" rel=\"noreferrer noopener\" target=\"_blank\">build your own Web of Things gateway<\/a> using a Raspberry Pi.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/cdn-images-1.medium.com\/max\/1600\/1*y8XrpLn2P5Om-NT8nlxpgg.png\" alt=\"\"\/><\/figure>\n\n\n\n<p>So far this early prototype has the following features:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Easily discover the gateway on your local network<\/li><li>Choose a web address which connects your home to the Internet via a secure TLS tunnel requiring zero configuration on your home network<\/li><li>Create a username and password to authorize access to your gateway<\/li><li>Discover and connect commercially available ZigBee and Z-Wave smart plugs to the gateway<\/li><li>Turn those smart plugs on and off from a web app hosted on the gateway itself<\/li><\/ul>\n\n\n\n<p>\/media\/59542bdd7abe70aba71d213ff814ba64<\/p>\n\n\n\n<p>We\u2019re releasing this prototype very early on in its development so that hackers and makers can get their hands on the source code to build their own Web of Things gateway and contribute to the project from an early stage.<\/p>\n\n\n\n<p>This initial prototype is implemented in JavaScript with a NodeJS web server, but we are exploring an adapter add-on system to allow developers to build their own Web of Things adapters using other programming languages like Rust in the future.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Web Thing&nbsp;API<\/h3>\n\n\n\n<p>Our goal in building this IoT framework is to lead by example in creating a Web of Things implementation which embodies Mozilla\u2019s values and helps drive IoT standards around security, privacy and interoperability. The intention is not just to create a Mozilla IoT platform but an open source implementation of a Web of Things API which anyone is free to implement themselves using the programming language and operating system of their choice.<\/p>\n\n\n\n<p>To this end, we have started working on a draft <a href=\"https:\/\/mozilla-iot.github.io\/wot\/\" rel=\"noreferrer noopener\" target=\"_blank\">Web Thing API specification<\/a> to eventually propose for standardization. This includes a simple but extensible <strong>Web Thing Description<\/strong> format with a default JSON encoding, and a REST + WebSockets <strong>Web Thing API<\/strong>. We hope this pragmatic approach will appeal to web developers and help turn them into WoT developers who can help realize our vision of a decentralized Internet of Things.<\/p>\n\n\n\n<p>We encourage developers to experiment with using this draft API in real life use cases and provide <a href=\"https:\/\/github.com\/mozilla-iot\/wot\/issues\" rel=\"noreferrer noopener\" target=\"_blank\">feedback<\/a> on how well it works so that we can improve it.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/cdn-images-1.medium.com\/max\/1600\/1*ETAWb4HAioHYss78nsgYKQ.png\" alt=\"\"\/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Get Involved<\/h3>\n\n\n\n<p>There are many ways you can contribute to this effort, some of which are:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>Build a Web Thing<\/strong>\u200a\u2014\u200abuild your own IoT device which uses the <a href=\"https:\/\/mozilla-iot.github.io\/wot\/\" rel=\"noreferrer noopener\" target=\"_blank\">Web Thing API<\/a><\/li><li><strong>Create an adapter<\/strong>\u200a\u2014\u200aCreate an <a href=\"https:\/\/github.com\/mozilla-iot\/gateway\/tree\/master\/adapters\" rel=\"noreferrer noopener\" target=\"_blank\">adapter<\/a> to bridge an existing IoT protocol or device to the web<\/li><li><strong>Hack on Project Things<\/strong>\u200a\u2014\u200aHelp us develop Mozilla\u2019s Web of Things <a href=\"https:\/\/github.com\/mozilla-iot\" rel=\"noreferrer noopener\" target=\"_blank\">implementation<\/a><\/li><\/ul>\n\n\n\n<p>You can find out more at <a href=\"http:\/\/iot.mozilla.org\" rel=\"noreferrer noopener\" target=\"_blank\"><strong>iot.mozilla.org<\/strong><\/a> and all of our source code is on <a href=\"https:\/\/github.com\/mozilla-iot\" rel=\"noreferrer noopener\" target=\"_blank\">GitHub<\/a>. You can find us in #iot on <a href=\"https:\/\/wiki.mozilla.org\/IRC\" rel=\"noreferrer noopener\" target=\"_blank\">irc.mozilla.org<\/a> or on our <a href=\"https:\/\/mail.mozilla.org\/listinfo\/mozilla.dev.iot\" rel=\"noreferrer noopener\" target=\"_blank\">public mailing list<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Mozilla is working to create a Web of Things framework of software and services that can bridge the communication gap between connected devices. By providing these devices with web URLs and a\u2026<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[16,10,17],"class_list":["post-1014","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-internet-of-things","tag-mozilla","tag-web-of-things"],"_links":{"self":[{"href":"https:\/\/tola.me.uk\/blog\/wp-json\/wp\/v2\/posts\/1014","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tola.me.uk\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tola.me.uk\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tola.me.uk\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tola.me.uk\/blog\/wp-json\/wp\/v2\/comments?post=1014"}],"version-history":[{"count":2,"href":"https:\/\/tola.me.uk\/blog\/wp-json\/wp\/v2\/posts\/1014\/revisions"}],"predecessor-version":[{"id":1023,"href":"https:\/\/tola.me.uk\/blog\/wp-json\/wp\/v2\/posts\/1014\/revisions\/1023"}],"wp:attachment":[{"href":"https:\/\/tola.me.uk\/blog\/wp-json\/wp\/v2\/media?parent=1014"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tola.me.uk\/blog\/wp-json\/wp\/v2\/categories?post=1014"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tola.me.uk\/blog\/wp-json\/wp\/v2\/tags?post=1014"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}