-1

i fallowed this tutorial

https://github.com/ARM-software/Cloud-IoT-Core-Kit-Examples/blob/master/readme.md to connect my Pi to google cloud iot core, but when i tried to add repository with this command

sudo gcloud components repositories add https://storage.googleapis.com/cloud-iot-gcloud/components-2.json

i got this massage : ERROR: (gcloud.components.repositories.add) Account [tiosahelal@gmail.com] does not have permission to install this component.

but when i skipped that part of the tutorial, i can make new devices in google cloud iot, but when i test it with this tutorial https://github.com/ARM-software/Cloud-IoT-Core-Kit-Examples/tree/master/CPUTemp

i got : ('on_connect', '5: The connection was refused.') ('on_disconnect', '5: The connection was refused.')

1 Answers1

0

You no longer should need to use alpha components with Google Cloud IoT Core because the components appear in Beta.

For example:

gcloud beta iot registries list --region=us-central1

For the connection refused issue, make sure to double check all of the MQTT settings:

  • username is ignored
  • mqtt.googleapis.com is the host, port 8883 or 443 (maybe try 443?)
  • Client ID is: projects/{project-id}/locations/{cloud-region}/registries/{registry-id}/devices/{device-id}

If any of the configurations is incorrect, you will be unable to connect. Also, make sure that your device certificate, used when you added your device to your device registry, has not expired.

class
  • 8,621
  • 29
  • 30