Before starting using btibGoogleIoTCore Connector you will have to create a Google Account. you can follow instructions with this link : https://accounts.google.com/signin/v2/
Cloud Setup
Go to the google cloud console and create a new project.
- Give it a name then hit create.
- Select your project from the list at the top.
- From the left panel select IoT Core (open the sandwich menu to show the left panel and scroll down a bit to "BigData" to find it)
- Then enable the service. You may need to add a payment method to enable the service. You can use our Credit Card (please keep it for yourself): 4845 4785 xxxx xxxx ->
6. Create a new registry.
7. Give your registry a name and select the region where the registry will be created.
8. Select or create a Pub/Sub topic where the devices/points telemetry data will be stored.
9. Give the topic a name and hit create.
10. Select or create a Pub/Sub topic (events for example) where the devices/points metadata data will be stored.
11. Give the topic a name (metadata for example) and hit create.
12. Finally verify that everything is good then hit create.
13. Now write down all this information we will use them later (have a look to the highlight below to know where to find the information)
Example based on the above Screenshot:
Registry id: testRegistry
Region: europe-west1
Project id: niagara-iot-test
14. Go to the left panel again and choose APIs & Services.
15. Go to the "Credentials" menu
16. Click on Create "Credentials" and select Service Account Key.
17. Select "New service account", fill-in the information and select "CloudIoT" -> "Cloud IoT Admin" then create the account key.
A json file will be downloaded save it somewhere safe. We'll reuse it later.
18. Download and install openssl from here: https://wiki.openssl.org/index.php/Binaries (if your already installed git-bash, openssl is bundled in it). You can download a 64bit version directly here: https://slproweb.com/download/Win64OpenSSL_Light-1_1_1c.exe
If you install this exe, you will have to add it your path to use it. Open Windows > Environment variables > Search for "Path". Click on New and select the path to the bin folder of the open-ssl installation folder.
To check if it worked, open a terminal (shift + click right in windows explore → Open command window here) and type openssl, it should recognize the command.
19. Once openssl is set up, open a terminal and type this commands to generate a public/private keys.
openssl req -x509 -newkey rsa:2048 -keyout rsa_private.pem -nodes -days 36500 -out rsa_cert.pem -subj "/CN=unused"
And
openssl pkcs8 -topk8 -inform PEM -outform DER -in rsa_private.pem -nocrypt > rsa_private_pkcs8
These commands will generate 3 files we will need 2 of them:
- rsa_cert.pem.
- rsa_private_pkcs8.
Now you have all the information we need let's go the next step.
Next Step
Step 2 Set up IoT Core connector for devices, points and references