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


2.3 Enable Google Cloud IoT API


2.4 Enable Pub/Sub dashboard API


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


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

References