Practical Internet of Things with JavaScript
eBook - ePub

Practical Internet of Things with JavaScript

Arvind Ravulavaru, vijaya kumar suda

Compartir libro
  1. 296 páginas
  2. English
  3. ePUB (apto para móviles)
  4. Disponible en iOS y Android
eBook - ePub

Practical Internet of Things with JavaScript

Arvind Ravulavaru, vijaya kumar suda

Detalles del libro
Vista previa del libro
Índice
Citas

Información del libro

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.

Preguntas frecuentes

¿Cómo cancelo mi suscripción?
Simplemente, dirígete a la sección ajustes de la cuenta y haz clic en «Cancelar suscripción». Así de sencillo. Después de cancelar tu suscripción, esta permanecerá activa el tiempo restante que hayas pagado. Obtén más información aquí.
¿Cómo descargo los libros?
Por el momento, todos nuestros libros ePub adaptables a dispositivos móviles se pueden descargar a través de la aplicación. La mayor parte de nuestros PDF también se puede descargar y ya estamos trabajando para que el resto también sea descargable. Obtén más información aquí.
¿En qué se diferencian los planes de precios?
Ambos planes te permiten acceder por completo a la biblioteca y a todas las funciones de Perlego. Las únicas diferencias son el precio y el período de suscripción: con el plan anual ahorrarás en torno a un 30 % en comparación con 12 meses de un plan mensual.
¿Qué es Perlego?
Somos un servicio de suscripción de libros de texto en línea que te permite acceder a toda una biblioteca en línea por menos de lo que cuesta un libro al mes. Con más de un millón de libros sobre más de 1000 categorías, ¡tenemos todo lo que necesitas! Obtén más información aquí.
¿Perlego ofrece la función de texto a voz?
Busca el símbolo de lectura en voz alta en tu próximo libro para ver si puedes escucharlo. La herramienta de lectura en voz alta lee el texto en voz alta por ti, resaltando el texto a medida que se lee. Puedes pausarla, acelerarla y ralentizarla. Obtén más información aquí.
¿Es Practical Internet of Things with JavaScript un PDF/ePUB en línea?
Sí, puedes acceder a Practical Internet of Things with JavaScript de Arvind Ravulavaru, vijaya kumar suda en formato PDF o ePUB, así como a otros libros populares de Informatique y Matériel. Tenemos más de un millón de libros disponibles en nuestro catálogo para que explores.

Información

Año
2017
ISBN
9781788295598
Edición
1
Categoría
Informatique
Categoría
Matériel

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, ...

Índice