This folder contains Python samples that demonstrate an overview of the commands beta feature.
-
Install the Cloud SDK as described in the device manager guide.
-
Create a PubSub topic:
gcloud beta pubsub topics create projects/my-iot-project/topics/device-events
-
Create a registry:
gcloud iot registries create my-registry
--project=my-iot-project
--region=us-central1
--event-notification-config=topic=projects/intense-wavelet-343/topics/device-events -
Use the
generate_keys.shscript to generate your signing keys:/python-docs-samples/iot/api-client/generate_keys.sh
-
Register a device:
gcloud iot devices create my-python-device
--project=my-iot-project
--region=us-central1
--registry=my-registry
--public-key path=rsa_cert.pem,type=rs256 -
Connect a virtual device using the sample app in the
receivefolder. -
While the virtual device is connected, send a commmand using the sample app in the
sendfolder.