Getting Started with Google Cloud Platform and Cloud IoT Core
Before starting with the Google Cloud Platform console for Cloud IoT Core following are the requirements and the environment to setup -- Install and initialize cloud SDK, and cloud IoT core requires version 173.0.0 or higher.
- Setup Node.js development environment.
Creating a Device Registry
- Go to google cloud IoT core page in the GCP console.
- Click on Create a registry option.
- Enter the registry id and select the cloud region.
- In the protocol section MQTT protocol.
- Create a telemetry topic from the drop down list and then click on create a topic option.
- Some fields like Device state topic and Certificate value fields are optional so that we can leave them as blank.
- After that click on Create Cloud IoT Core page.
Add a Device to Registry
- On the registry device page, click on the add device option and enter the device id.
- Select allow for the Device Communication and the information for the public key.
- The device metadata field is an option, so we can leave it blank.
- After that click on add button to add a device.
Running a Node.js Sample to Connect to a Virtual Device
- Get the Cloud IoT Core Node.js samples and store in the directory.
- Copy the private key to the current directory.
- Install node.js dependencies by command npm install.
- Create the subscription to the registry’s pub/subtopic.
- Now connect a virtual device to cloud IoT core with the help of MQTT bridge.
What are the Google Cloud Platform IoT Services?
The best part of using Google Cloud Platform is that it provides unique offerings for Big Data and Artificial Intelligence and IoT services. Also while building a project, scalability is the major part of the concern, so due to its serverless architecture, GCP met the requirements of the project. Some of the components for IoT solution with Google Cloud Platform are as follows -
1. BigQuery
It is a cloud-based IaaS model designed by Google which is used for storing and processing enormous datasets with the help of several SQL queries. It can be said that BigQuery is a type of database which is different from the transactional databases like MySQL and MongoDB.
2. Cloud IoT Core
It is a completely managed service which allows us to securely and easily connect, manage and ingest the data from the devices connected to the internet. Apart from this, it also allows other Google Cloud Platform services to collect, process, manage and visualize the IoT data in real time. Pub/Sub - It is a type of asynchronous service to service communication which is used in the serverless and microservices kind of architecture. In this type of model, any service which is published to a topic is immediately be received by all the subscribers of that particular topic. It can be used to enable any event-driven architecture.
3. Hardware
Google offers a version of Android for IoT devices which is known as Android Things. Android Things helps the developers to configure and push the software updates to the operating system.
4. Cloud Functions
For routing the data after entering into the Pub/Sub, cloud functions are used. A cloud function is nothing but a java script code which been triggered when an event takes place. And the code will run without any need of infrastructure management because its all taken care by Google itself.
A Centralized Approach
Fully Managed services for connecting, processing and analyzing IoT data .For making strategic decisions based on edge/on-premises computing we advise taking the following steps -- Click to Explore IoT Analytics Platform for Real-Time Data Ingestion
- Read more about The Impact of Edge Computing on IoT
- Explore about IoT Applications for Analyzing Manufacturing Industries