Practical Internet of Things with JavaScript
eBook - ePub

Practical Internet of Things with JavaScript

Arvind Ravulavaru, vijaya kumar suda

Buch teilen
  1. 296 Seiten
  2. English
  3. ePUB (handyfreundlich)
  4. Über iOS und Android verfügbar
eBook - ePub

Practical Internet of Things with JavaScript

Arvind Ravulavaru, vijaya kumar suda

Angaben zum Buch
Buchvorschau
Inhaltsverzeichnis
Quellenangaben

Über dieses Buch

End to end solutions for IoT enthusiasts and web developersAbout This Book• Leverage the capability of IoT with the combination of Raspberry Pi 3 and JavaScript (ES5/ES6)• Develop a health monitoring device along with some cool projects like Smart Agriculture & Raspberry Pi 3 based surveillance.• A practical book which will help you build Mobile/Web/Desktop apps that will show how to manage and monitor data from sensors and actuators in real time.Who This Book Is ForThis book targets IoT enthusiasts and web developers who would like to build IoT-based applications with Raspberry Pi, Arduino and JavaScript. Some knowledge about electronics and familiarity with programming concepts (JavaScript - ES5/ES6) is expected.What You Will Learn• Integrate sensors and actuators with the cloud and control them for your Smart Weather Station.• Develop your very own Amazon Alexa integrating with your IoT solution• Define custom rules and execute jobs on certain data events using IFTTT• Build a simple surveillance solutions using Amazon Recognition & Raspberry Pi 3• Design a fall detection system and build a notification system for it.• Use Amazon Rekognition for face detection and face recognition in your Surveillance project In DetailIn this world of technology upgrades, IoT is currently leading with its promise to make the world a more smarter and efficient place.This book will show you how to build simple IoT solutions that will help you to understand how this technology works. We would not only explore the IoT solution stack, but we will also see how to do it with the world's most misunderstood programming language - JavaScript. Using Raspberry Pi 3 and JavaScript (ES5/ES6) as the base to build all the projects, you will begin with learning about the fundamentals of IoT and then build a standard framework for developing all the applications covered in this book. You will then move on to build a weather station with temperature, humidity and moisture sensors and further integrate Alexa with it. Further, you will build a smart wearable for understanding the concept of fall detection. You will then extend it with the 'If This Then That' (IFTTT) rules engine to send an email on fall detection. Finally, you will be working with the Raspberry Pi 3 camera module and surveillance with a bit of facial detection using Amazon Rekognition platform.At the end of the book, you will not only be able to build standalone exciting IoT applications but also learn how you can extend your projects to another level.Style and ApproachThis book will follow a project based approach where each chapter will teach the readers to build a standalone project. It will not only guide you to build exciting projects but will also teach you to extend your project to another level.

Häufig gestellte Fragen

Wie kann ich mein Abo kündigen?
Gehe einfach zum Kontobereich in den Einstellungen und klicke auf „Abo kündigen“ – ganz einfach. Nachdem du gekündigt hast, bleibt deine Mitgliedschaft für den verbleibenden Abozeitraum, den du bereits bezahlt hast, aktiv. Mehr Informationen hier.
(Wie) Kann ich Bücher herunterladen?
Derzeit stehen all unsere auf Mobilgeräte reagierenden ePub-Bücher zum Download über die App zur Verfügung. Die meisten unserer PDFs stehen ebenfalls zum Download bereit; wir arbeiten daran, auch die übrigen PDFs zum Download anzubieten, bei denen dies aktuell noch nicht möglich ist. Weitere Informationen hier.
Welcher Unterschied besteht bei den Preisen zwischen den Aboplänen?
Mit beiden Aboplänen erhältst du vollen Zugang zur Bibliothek und allen Funktionen von Perlego. Die einzigen Unterschiede bestehen im Preis und dem Abozeitraum: Mit dem Jahresabo sparst du auf 12 Monate gerechnet im Vergleich zum Monatsabo rund 30 %.
Was ist Perlego?
Wir sind ein Online-Abodienst für Lehrbücher, bei dem du für weniger als den Preis eines einzelnen Buches pro Monat Zugang zu einer ganzen Online-Bibliothek erhältst. Mit über 1 Million Büchern zu über 1.000 verschiedenen Themen haben wir bestimmt alles, was du brauchst! Weitere Informationen hier.
Unterstützt Perlego Text-zu-Sprache?
Achte auf das Symbol zum Vorlesen in deinem nächsten Buch, um zu sehen, ob du es dir auch anhören kannst. Bei diesem Tool wird dir Text laut vorgelesen, wobei der Text beim Vorlesen auch grafisch hervorgehoben wird. Du kannst das Vorlesen jederzeit anhalten, beschleunigen und verlangsamen. Weitere Informationen hier.
Ist Practical Internet of Things with JavaScript als Online-PDF/ePub verfügbar?
Ja, du hast Zugang zu Practical Internet of Things with JavaScript von Arvind Ravulavaru, vijaya kumar suda im PDF- und/oder ePub-Format sowie zu anderen beliebten Büchern aus Informatique & Matériel. Aus unserem Katalog stehen dir über 1 Million Bücher zur Verfügung.

Information

Jahr
2017
ISBN
9781788295598
Auflage
1

IoTFW.js - I

In this chapter and Chapter 3, IoTFW.js - II, we are going to develop a reference architecture for building various IoT solutions. The reference architecture or the IoT framework will be serving as a base for our future IoT solutions that we are going to be working on in this book. We will be calling this reference architecture or framework as IoTFW.js. We will be working on the following topics to bring IoTFW.js to life:
  • Designing an IoTFW.js architecture
  • Developing a Node.js based server-side layer
  • Developing an Angular 4 based web app
  • Developing an Ionic 3 based mobile app
  • Developing an Angular 4 and Electron.js desktop app
  • Setting up and installing the required dependencies on a Raspberry Pi 3
  • Integrating all the pieces
We are going to cover some of the previous topics in this chapter and some in Chapter 3, IoTFW.js - II.

Designing a reference architecture

As we have seen in Chapter 1, The World of IoT, all the examples we are going to work on have a common setup. That would be the hardware, firmware (software running on the hardware), broker, API engine and the user apps.
We will be expanding on the relevant pieces of framework as we come across it.
As and when we need to, we will be expanding on the hardware, or mobile app, or the API engine.
With this reference architecture, we are going to establish a pipeline between the devices present in the real world to the cloud in the virtual world. In other words, IoT is a last mile solution between devices and the internet.

Architecture

A simple reference architecture with Raspberry Pi, Wi-Fi gateway, the cloud engine, and the user interface apps stitched together would look as shown in the following diagram:
At a very high level, we have smart devices on the left-hand side and the user devices on the right-hand side. All of the communication between them happens through the cloud.
Following is a description of each key entity in the previous architecture. We are going to start from the left-hand side and move towards the right.

Smart device

Smart devices are hardware entities that consist of a sensor, or actuator, or both, any micro controller or micro processor, in our case, a Raspberry pi 3.
A sensor is an electronic component that can sense or measure a physical property and relay it back to a microcontroller or a microprocessor. The data relayed back can be periodic or event-driven; event-driven as in when there is change in data only. A temperature sensor such as an LM35 or DHT11 is an example of a sensor.
An actuator is also an electro-mechanical component that can trigger actions in the real world. Generally, the actuators do not act by themselves. A microcontroller, a microprocessor, or an electronic logic sends signals to the actuator. An example of an actuator is a mechanical relay.
The micro-processor we were referring would be a Raspberry Pi 3 for this book.
The Raspberry Pi 3 is a single-board computer, designed and developed by the Raspberry Pi foundation. The Raspberry Pi 3 is the third-generation Raspberry Pi.
In this book, we are going to use a Raspberry Pi 3 model B for all the examples. Some of the specifications of the Raspberry Pi 3 model B are as follows:
Feature
Specification
Generation
3
Release date
February 2016
Architecture
ARMv8-A (64/32-bit)
System on a Chip (SoC)
Broadcom BCM2837
CPU
1.2 GHz 64-bit quad-core ARM Cortex-A53
Memory (SDRAM)
1 GB (shared with GPU)
USB 2.0 ports
4 (via the on-board 5-port USB hub)
On-board network
10/100 Mbit/s Ethernet, 802.11n wireless, Bluetooth 4.1
Low-level peripherals
17× GPIO plus the same specific functions, and HAT ID bus
Power ratings
300 mA (1.5 W) average when idle, 1.34 A (6.7 W) maximum under stress (monitor, keyboard, mouse, and Wi-Fi connected)
Power source
5 V via MicroUSB or GPIO header
For more information on the specifications, please refer to the specifications of Raspberry Pi: https://en.wikipedia.org/wiki/Raspberry_Pi#Specifications.

Gateway

The next piece in our architecture is the Wi-Fi router. A common household Wi-Fi router will act as a gateway for us. As we have seen in Chapter 1, The World of IoT, in the Clustered devices versus standalone devices section, we are following the approach of standalone devices, where each device is self-sufficient and has a radio of its own to communicate with the outside world. All the projects we are going to build consist of a Raspberry Pi 3, which has a microprocessor as well as the radio to interface with the sensors, and actuators with the internet.

MQTTS broker

The next important piece in our reference framework is the secure communication channel between the device and the cloud. We are going to use MQTT as our communication channel. MQTT is described in the following quote from http://mqtt.org/faq:
MQTT stands for MQ Telemetry Transport. It is a publish/subscribe, extremely simple and lightweight messaging protocol, designed for constrained devices and low-bandwidth, high-latency or unreliable networks. The design principles are to minimise network bandwidth and device resource requirements whilst also attempting to ensure reliability and some degree of assurance of delivery.
We are going to use the MQTT over SSL or MQTTS. In our architecture, we are going to use Mosca (http://www.mosca.io/) as our MQTTS broker. Mosca is a Node.js MQTT broker. We will talk more about Mosca when we start working with it.

API engine

An API engine is a web server application, written on Node.js, ...

Inhaltsverzeichnis