{"id":34976,"date":"2016-07-22T12:30:21","date_gmt":"2016-07-22T07:00:21","guid":{"rendered":"http:\/\/www.tothenew.com\/blog\/?p=34976"},"modified":"2017-11-07T23:34:45","modified_gmt":"2017-11-07T18:04:45","slug":"iot-and-nodejs","status":"publish","type":"post","link":"https:\/\/www.tothenew.com\/blog\/iot-and-nodejs\/","title":{"rendered":"IOT and NodeJs"},"content":{"rendered":"<h2><strong>IoT (Internet of things)<\/strong><\/h2>\n<p>The I<strong>nternet of Things<\/strong> (IoT) is an ecosystem of Computer devices, automated\/digital machines, Object, people or animals which hold unique identifiers and has the ability to transfer data over the network without involving human-to-human or human-to-computer interaction.<\/p>\n<p><b>The Internet<\/b><span style=\"font-weight: 400\"> \u00a0in Internet of things can be any device capable of sending and receiving signal, can be a person with heart monitor implant, can be any automobile that has sensor built-in to signal driver when fuel\/tire pressure is low or can be any natural or human made object that has unique IP address assigned to it and has the \u00a0capability to send and receive signal when required.<\/span><\/p>\n<p><span style=\"font-weight: 400\">IoT has been brought in the picture with the union of <\/span><b>wireless technology, micro electromechanical system, microservices, and the internet<\/b><span style=\"font-weight: 400\">. This union has bridged the gap between <\/span><b>operational technology (OT)<\/b><span style=\"font-weight: 400\"> and <\/span><b>informational technology (IT)<\/b><span style=\"font-weight: 400\"> they are by allowing unstructured machine generated data to analyzed and plotted for useful statistics.<\/span><\/p>\n<p><strong><span style=\"font-weight: 400\">The concept of IoT was first officially announced in the year 1999 but has been in development for decades. The first internet machine was a Coke machine at <\/span><b>Carnegie Melon University<\/b><span style=\"font-weight: 400\"> in the early 1980s. The developer was able to connect to the machine to Internet, check the status of the machine and determine whether or not there would be a cold drink waiting, and deciding whether to re-fill machine or not.<\/span><\/strong><\/p>\n<p><strong><span style=\"font-weight: 400\">Internet of things (IoT) concept is generally executed on IoT boards. These boards come with pre-configured hardware capable of sending and receiving signal. These\u00a0boards are generally controlled by software running on top of their hardware like our personal computers. Latest IoT board comes with <\/span><b>Bluetooth<\/b><span style=\"font-weight: 400\"> and <\/span>Wifi pre-configured<span style=\"font-weight: 400\"> as part of hardware capable of sharing and receiving data. Popular IoT boards variants are \u2013<\/span><\/strong><\/p>\n<ul>\n<li>Arduino<\/li>\n<li>Raspberry PI<\/li>\n<li>Intel IoT Edition<\/li>\n<li>BeagleBone Black<\/li>\n<\/ul>\n<hr \/>\n<h2><strong>Areas For IoT<\/strong><\/h2>\n<p><strong><span style=\"font-weight: 400\">Practical application of IoT can be found in many industries like<\/span><b> agriculture, building, health care, energy, transport, education<\/b><span style=\"font-weight: 400\"> etc. Figure below demonstrate practical areas for IoT applications \u2013<\/span><\/strong><\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-37881\" src=\"\/blog\/wp-ttn-blog\/uploads\/2016\/07\/iot-1.jpg\" alt=\"iot (1)\" width=\"638\" height=\"359\" \/><\/p>\n<hr \/>\n<h2><strong>Why Node Js and IoT<\/strong><\/h2>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Devices like sensors, beacons, transmitters, motors have a tendency of generating a large volume of data thereby generating a large number of request, <a title=\"Node.js for web app development\" href=\"http:\/\/www.tothenew.com\/mean-node-js-development-consulting\">Node.js<\/a> is well equipped to handle this request through streams. Streams offer both readable and writable channels which help in piping the request to destination without temporary storing the data. Streams are basically Unix pipe and can directly connect to destination.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">The key feature of any IoT driven application is collecting data, communicating, analyzing and acting. Node js makes a perfect partner for all above features.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Sockets and MQTT protocol are well suited in Node js which are generally used for continuous data transmission in IoT application.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">IoT-application cable boards, such as Intel Edison, \u00a0BeagleBone Black, and Raspberry Pi, can easily install Node js as a programming environment. Node js comes with NPM packages manager which contains many useful IoT modules, \u00a0which can be used for rapid and robust application development.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Node js is known for its speed, scalability, and efficiency making it the key player for data- intensive real time application. This makes Node js well suited for IoT which relies on data intensive real-time traffic.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">IoT devices command are generally written in low-level languages like C and C++ which itself are difficult to learn, Node js comes with the power of JavaScript which is pretty easy to learn and understand.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Node js open source community NPM (Node package manager) contains more than 80 for Arduino controllers, raspberry pi, Intel IoT Edison. It contains more than 30 packages for different sensors and Bluetooth devices. These modules make application development fast and easy.<\/span><\/li>\n<\/ul>\n<hr \/>\n<h2><strong>Getting started with \u00a0Node Js and IoT\u00a0<\/strong><\/h2>\n<p>Node.js makes it possible to write applications in JavaScript on the IoT devices. It\u2019s built on the V8 JavaScript runtime and written in C++ \u2014 so it\u2019s fast. Node js make use of various open source module(Tools) to achieve faster development.<\/p>\n<p>To make use of these tools (or module) in Node.js we need to install and manage them in a useful way. This is where <strong>NPM<\/strong>, the<strong> node package manager<\/strong>, comes in. It installs the packages you want to use and provides a useful interface to work with them.<\/p>\n<p><span style=\"font-weight: 400\">NPM contains many popular IoT modules suited to the different type of application development. You can use <strong>npm<\/strong>\u00a0module for getting started with node js and IOT. Key npm modules for IoT are listed below-<\/span><\/p>\n<ul>\n<li>Johnny-Five<\/li>\n<li>CylonJs<\/li>\n<li>NodeRed<\/li>\n<li>Noduino<\/li>\n<li>Nodebots<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>IoT (Internet of things) The Internet of Things (IoT) is an ecosystem of Computer devices, automated\/digital machines, Object, people or animals which hold unique identifiers and has the ability to transfer data over the network without involving human-to-human or human-to-computer interaction. The Internet \u00a0in Internet of things can be any device capable of sending and [&hellip;]<\/p>\n","protected":false},"author":846,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":8},"categories":[1185,1],"tags":[4651,4678],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/34976"}],"collection":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/users\/846"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/comments?post=34976"}],"version-history":[{"count":4,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/34976\/revisions"}],"predecessor-version":[{"id":52316,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/34976\/revisions\/52316"}],"wp:attachment":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/media?parent=34976"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/categories?post=34976"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/tags?post=34976"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}