Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles / IoT

Connecting to Google Cloud Platform with Node-RED

5.00/5 (1 vote)
27 Mar 2017CPOL2 min read 7.9K  
This guide will walk you through adding the IoT Cloud repository to your Intel® IoT Gateway and adding support for the Google Cloud Platform.

This article is for our sponsors at CodeProject. These articles are intended to provide you with information on products and services that we consider useful and of value to developers

Get access to the new Intel® IoT Developer Kit, a complete hardware and software solution that allows developers to create exciting new solutions with the Intel® Galileo and Intel® Edison boards. Visit the Intel® Developer Zone for IoT.

This guide will walk you through adding the IoT Cloud repository to your Intel® IoT Gateway and adding support for the Google Cloud Platform*.

Pre-requisites

  • Intel® IoT Gateway Technology running IDP 3.1 or above with internet access
  • A development device (e.g. laptop) on the same network as the Intel® IoT Gateway
  • Terminal access to the Intel® IoT Gateway from your development device

Please see the following documentation for setting up your Intel® IoT Gateway.

Adding the IoT Cloud repository to your Intel® IoT Gateway

1. Load the IoT Gateway Developer Hub interface in your browser using the IP address of your gateway and login with username root and password root.

2. Check which image version you have installed (e.g. WR7.0.0.13)

Image 1

3. Add the IoT cloud repository.

Image 2

4. Go to the Administration section and launch the Cloud Commander web console. Login with username root and password root if requested.

Image 3

5. Scroll to the bottom of the page and click the Console button in the bottom right of the window.

Image 4

6. In the console type the following and press Enter:

rpm --import http://iotdk.intel.com/misc/iot_pub2.key

Image 5

7. Scroll to the top of the page and go to the Packages section and click the Add Repo + button.

Image 6 8.
Populate the fields with the following information and click Add Repository

Name: IoT_Cloud

 

URL: http://iotdk.intel.com/repos/iot-cloud/wrlinux7/rcplXX (where XX is the last 2 digits of the image version you checked in step 2) [e.g. http://iotdk.intel.com/repos/iot-cloud/wrlinux7/rcpl13/]

Finally, click the Update Repositories button to update the package list.

Install Google Cloud Platform* IoT Gateway SDK packages

Developer Hub

Image 7

1. Click the Add Packages + button to bring up the list of packages you can install.

Image 8

Search for cloud-google using the search box at the top of the package window. Click the Install button next to the packagegroup-cloud-google package.

Once the packages have successfully installed reboot your gateway for changes to take effect.

Command Line

Run the following commands to install support for the Google Cloud Platform:

smart update

smart install packagegroup-cloud-google

reboot

Google Cloud Platform* with Node-RED*

Once the Google package group is installed you will have a new input and output node in your Node-RED palette called pubsub.

Image 9

For details on how to use these nodes to publish and receive data from a Google Cloud Platform project see here: https://github.com/GoogleCloudPlatform/node-red-contrib-google-cloud#google-cloud-pubsub

For more complete information about compiler optimizations, see our Optimization Notice.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)