AWS IoT Setup | AWS IoT Greengrass Setup | AWS Machine Learning Interface
AWS SDK Setup | AWS SDK Rekognition
GCP IoT Setup
GCP SDK Setup
Device: Camera Setup
1. Set Up a conda Python environment in RPI
cd Iot_EdgeComputing/conda_env
conda env create -f pineapple.yml
# Activate environment
source activate pineapple
2. Setup GCloud IoT Core
2.1 GCloud setup
# Log in
gcloud auth login
# Update GCloud components
gcloud components update
# Create and set a new project
gcloud projects create pineapples
# Set to the new project
gcloud config set project pineapples
2.2 Enable Billing
- Go to Project List Page
- Select Project and click the ‘Three dots’ on the right => Billing => Link to your billing account
2.3 Enable Google Cloud IoT API
- Cloud IoT Core
- View Console
- Enable API
- Function: managing gateways and devices
2.4 Enable Pub/Sub dashboard API
- Pub/Sub
- Create a topic: iot
- Function: real-time messaging, ingesting device telemetry
2.5 Allow IoT Core to send messages to Pub/Sub
gcloud projects add-iam-policy-binding pineapples --member=serviceAccount:cloud-iot@system.gserviceaccount.com --role=roles/pubsub.publisher
3. Register a device
3.1 Create a device registry
- Registry
- Registry ID: pineapple1
- Region: europe-west1
- Protocol: MQTT, HTTP
- Cloud Pub/Sub Topic: projects/pineapples/topics/iot
3.2 Set up the RPI as a device
cd Iot_EdgeComputing/src
# Clone the GCP community repo
git clone https://github.com/GoogleCloudPlatform/community.git
# Install Python dependencies
sudo rm -r community/.git
cd community/tutorials/cloud-iot-gateways-rpi
pip install -r requirements-pi.txt
# Export environment dependencies to yml
conda env export > ~/Documents/Iot_EdgeComputing/conda_env/pineapples_iot_rpi_device.yml