Book Image

Hands-On Industrial Internet of Things

By : Giacomo Veneri, Antonio Capasso
Book Image

Hands-On Industrial Internet of Things

By: Giacomo Veneri, Antonio Capasso

Overview of this book

We live in an era where advanced automation is used to achieve accurate results. To set up an automation environment, you need to first configure a network that can be accessed anywhere and by any device. This book is a practical guide that helps you discover the technologies and use cases for Industrial Internet of Things (IIOT). Hands-On Industrial Internet of Things takes you through the implementation of industrial processes and specialized control devices and protocols. You’ll study the process of identifying and connecting to different industrial data sources gathered from different sensors. Furthermore, you’ll be able to connect these sensors to cloud network, such as AWS IoT, Azure IoT, Google IoT, and OEM IoT platforms, and extract data from the cloud to your devices. As you progress through the chapters, you’ll gain hands-on experience in using open source Node-Red, Kafka, Cassandra, and Python. You will also learn how to develop streaming and batch-based Machine Learning algorithms. By the end of this book, you will have mastered the features of Industry 4.0 and be able to build stronger, faster, and more reliable IoT infrastructure in your Industry.
Table of Contents (18 chapters)

Cloud Functions

Google Cloud Functions are serverless services that respond to events, such as data coming from our device. We are now going to set up a Cloud Function to extract the data sent by the device, process it immediately, and store it in the central data storage:

  1. From the Google Cloud Console's left-hand menu, click on Cloud Functions and then Enable API:
Enabling the Google Cloud Functions API
  1. Once it is enabled, we can click on the Create function section.
  1. We can then define the name of our function as iiot-book-function-1 and the memory allocated as 128 MB. The trigger is Cloud Pub/Sub and the topic is signals, which we created a few paragraphs prior on the Building the devices registry section:
The definition of iiot-book-function to process the incoming message
  1. Under the source code section of the inline editor on the index.js tab, we can copy and...