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
- 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.
- Make sure to enable billing and the Cloud IoT Core API for the project.
- On the Google IoT dashboard, you should be able to see that your project is correctly bound to Google IoT services
- Now let’s access Pybytes and click Integrations > New integration > Google Cloud
- 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.
- 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.
- 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.
- The last step allows you to choose the devices you want to integrate and summarises the identifying elements of this integration.
- Once you click Create,if the operation is successful, you’ll be able to see a screen stating the correct integration.
If you access the registry on Google Cloud, you’ll be able to see the newly created device there as well.
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.