Giter Club home page Giter Club logo

rpi-iot-rgb's Introduction

AWS IoT - Raspberry Pi RGB

A Node.js project which enables a Raspberry Pi to connect to the AWS IoT service and manage a set of LEDs. Using a device shadow, the Raspberry Pi will react to state changes as communicated by the AWS IoT over MQTT (using the AWS IoT SDK) and change the active LED.

Setup 'thing' (aka device) in AWS IoT

Before a device can connect to the AWS IoT Hub, a 'thing' must be configured and assigned a private key and certificate. This tutorial will use the AWS web console, but power users might prefer using the AWS CLI or AWS SDK.

Create a Thing

From the AWS Console, choose the region you wish to create the device in. The default region for AWS IoT is 'us-east-1' (aka N. Virginia).

Select AWS Region

Select the AWS IoT service from the AWS Console. If this is your first time using AWS IoT, select 'Get Started' to bypass the introduction screen.

Select of AWS IoT service

Select 'Create a Resource' (or 'Create A Thing' if this is your first time) and give the device a unique name. Skip thing type and attributes and select 'Create'.

Create AWS IoT thing

The thing will now appear in the list of resources.

Connect a Device

From the AWS IoT home page, select the newly created thing from the list of resources (or select 'View Thing' if this is your first time). A panel will appear with the thing's details.

AWS IoT thing details

Select 'Connect a device' to begin the process of creating a certificate. Select NodeJS as the SDK and click generate certificate and policy.

AWS IoT thing certificate

Download the public and private keys and the certificate. The private key and certificate must be kept secure to avoid compromising your AWS IoT service. The public key is paired to the private key and will be used by AWS to authenticate the thing.

In addition, a root CA certificate must be downloaded and used for authentication. The root-CA.crt certificate is available from Symantec (here)

Skip the last screen, which defines some configuration which can be used with the official AWS IoT tutorial for Node.js.

There should now be three resources on the AWS IoT homepage:

  • a thing
    • Defines the device (e.g. raspberry pi) within AWS IoT
  • a certificate
    • Defines an identity for AWS to authenticate with a certificate
    • Must be attached to a thing, for that thing to assume this identity
  • a policy
    • Defines what AWS IoT operations can be performed
    • Must be attached to a certificate, for that identity to be authorized for these operations

rpi-iot-rgb's People

Contributors

mpalumbo7 avatar

Stargazers

 avatar

Forkers

jackylee1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.