Free email course on building IoT with Cloud IoT CoreCloud IoT Core
Free email course on building  
IoT with Cloud IoT Core
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
< Back to Blog

Getting Started with Cloud IoT Core

Earlier this year, Google announced the offering of its fully-managed IoT device management service, Cloud IoT Core, to add to its suite of cloud platform services. Here's what we've learned while testing it out.

By
Yitaek Hwang

Earlier this year, Google announced the offering of its fully-managed IoT device management service, Cloud IoT Core, to add to its suite of cloud platform services. We supported the public beta so we've had a few months to use it and learn.

What is Cloud IoT Core?

Before jumping into a sample architecture and a demo we built here at Leverege, let’s examine what Cloud IoT Core actually offers and when you might use it. Cloud IoT Core gives enterprises a fully-managed solution for securely connecting and monitoring/managing those devices globally. This means that devices can connect to the cloud via IoT Core, instead of being processed by a gateway/another platform and having it forward the data.

Aside from eliminating another layer of the deployment process, IoT Core adds security by default and helps funnel massive amounts of sensor data into its suite of data processing and analytics products. Google's Cloud IoT Core also automatically takes care of load balancing and horizontal scaling as part of being on their serverless infrastructure. Lastly, if you're already on the Android Things platform, the integration with IoT Core will help push out firmware and device updates seamlessly. 

Google’s blog describes a sample architecture to capture data from the devices, do some analytics in the cloud, and update the config on the device. A simple example would be to turn on a smart fan when the device detects that the room is getting too hot.

While this example is nice, it doesn’t provide an end-to-end IoT deployment architecture, including the UI component. So here at Leverege, we made a quick waste management example to build off one of the more popular IoT use cases. 

Sample Architecture Using IoT Core Using Javascript

To begin, we provisioned a small VM and modified the sample MQTT client code to build a simulator that generates positional and sensor data on a garbage truck and trash bin. After provisioning a registry on Cloud IoT Core, we created simulated devices and started to pass telemetry data onto Cloud Pub/Sub. Next, we routed those messages onto Cloud FireStore and BigQuery for real-time updates to the UI and to show analytics via Google Data Studio. 

Having used Azure's IoT Hub before, here are some things we noticed about Cloud IoT Core:

  1. Generating RS256/ES256 keys were very simple. This was a stark contrast to the trouble I had with using the SAS token generator for Azure's IoT Hub.
  2. Some key features are still under development. Currently, device batch creation and deletion are not supported. You can loop through to accomplish this task, but as registries cannot be deleted until all associated devices are deleted, an option for batch actions will be useful for rapid prototyping.
  3. Integration with Pub/Sub is nice and seamless but could be better. Currently, you need to give the Cloud IoT Core account publish access to Pub/Sub before setting up the registries. Automatically creating this access when enabling Cloud IoT Core or giving a programmatic way to let Compute Engine service account this access would remove another point of friction.
  4. There are a couple of other things to watch out for if you opt to use the default settings. There is a quota for 1 configuration/state updates per device per sec. This may come in the way of your demos depending on how you plan to use Cloud IoT Core. There is also a 10,000 devices per list request, so you would need pagination if your demo/use case calls for a bigger device set.

Other than the UI and the simulator to drive the demo, the only other non-Google component we had to build was a router/logic component (message processor). Currently, Cloud Dataflow only supports Java and Python, so we wrote a quick Node.js app to direct device messages to Cloud FireStore and BigQuery.

Next Steps

In this demo, we did not integrate real devices to test how onboarding works for actual hardware. But given the ease of security token generation and support for both HTTP and MQTT, we don't foresee any challenges in enriching the simulation demo with real trucks and smart trash bins.

Have Questions? Talk to an Expert

Yitaek Hwang

From traveling the world solving vision issues in underserved regions through ViFlex to building software to diagnose autism using machine learning, I realized that I like building things. So currently I’m on a path to build an Internet of Things (IoT) platform at Leverege as a Venture for America Fellow.

Share

Trending

The Ultimate IoT Resource
Check It Out

Most Shared

FREE EMAIL COURSE
Building IoT with Cloud IoT Core
Sign Up For Free
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Liked this post? You're gonna love these!

What is Google Cloud ML Engine?
December 3, 2017
Sopris: Microsoft’s Solution to IoT Security Problems
April 11, 2017
Major Takeaways From Google I/O 2017
May 24, 2017

Before You Go

Talk with Leverege

What type of use care are you building for? Whichever it is we are looking forward to learning more about your needs.

Have Questions?

Our team of experts is here to help!

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.