toc Pybytes > Integrations > Google Cloud IoT

Google Cloud IoT

Whenever one of your integrated devices sends a signal to Pybytes, we republish the binary payload to the Google endpoint specified for the integration by the MQTT protocol.

Integrate your devices

  1. Firstly, you have to create a Google project or select an existing one Google console (read also here for further information). Take note of the Project ID, which it will be used for integrating your devices.
  2. Make sure to enable billing and the Cloud IoT Core API for the project.
  3. On the Google IoT dashboard, you should be able to see that your project is correctly bound to Google IoT services

Google dashboard

  1. Now let’s access Pybytes and click Integrations > New integration > Google Cloud

Google Cloud’s selection

  1. You’ll see that Pybytes requires you to authenticate with your Google account. The account you’ll be using must have the privileges to access that project.

Google’s authentication

  1. Once you’ve logged in, the first thing to do is to specify the project’s ID and the region. This is required to correctly identify a resource and list all the related registries.

Step 1: project ID and region

  1. The following step allows you to create a new registry or select an existing one. Whenever you choose a registry, the corresponding topics will be loaded in the dropdown menu. This is required by Google, but it’s different from the topics used by the integration to publish payloads to Google Cloud. For further information, please read this section.

Step 2: registry and topic

  1. The last step allows you to choose the devices you want to integrate and summarises the identifying elements of this integration.

Step 3: Choose devices

  1. Once you click Create,if the operation is successful, you’ll be able to see a screen stating the correct integration.

Successfully integrated

If you access the registry on Google Cloud, you’ll be able to see the newly created device there as well.

Google registry’s devices view

Final considerations

We create an ES256 key with a self-signed X.509 certificate for every device. The private key will be used for authenticating the device with Google’s broker.

You can access the StackDriver application to see the events, according to the log level you chose for the device. In case you haven’t chosen one, it will inherit the level of the registry that it belongs to.

Warning: do not delete Google devices directly from Google cloud user interface, otherwise the integration with Pybytes will stop working. Always use Pybytes’ interface to delete Google devices.


Previous Next