Skip to content

kkesley/rpi-aws-iot-environment-report

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

62 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple Realtime Environment Reporting using AWS IOT & Raspberry Pi

Realtime Temperature / Humidity / Pressure reporting using raspberry pi and AWS IoT

Live Demo: http://rmit-iot.s3-website-ap-southeast-2.amazonaws.com/

Prerequisite

  1. NodeJS: https://nodejs.org/en/

  2. Python 3.5+: https://www.python.org/downloads/

Front End

Run npm install in the front-end folder

Create AppSync.js in front-end/src/Config. Use the template provided AppSync.tmpl.js. Don't forget to change the variables.

Try the app using npm run start / yarn start

Server

This application is designed to use AWS Services.

  • DynamoDB
  • AppSync
  • Lambda
  • Api Gateway
  • IoT

Note: the application is designed to stay within free tier limitation. If your free tier has expired / you have more services running in your AWS account, you may pay for running this application.

Prerequisite

  1. Serverless: npm i -g serverless

  2. AWS Account

  3. AWS CLI https://docs.aws.amazon.com/cli/latest/userguide/installing.html

  4. AWS Credentials attached in the computer https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html

Create serverless.yml in ./server. Use the template provided serverless.tmpl.yml. Don't forget to change the custom variables.

Deploy the application using sls deploy

  1. Go to AWS AppSync, create a project and start with the schema in schema.graphql placed in this repo.

  2. Connect the mutation and query with the dynamodb table which is created later by the serverless framework

Raspberry PI

Designed using Raspberry Pi 3 model B & Raspberry Pi sense hat. Make sure you install the prerequisites in your raspberry pi.

Prerequisite

  1. pip

  2. pip install influxdb

  3. start influxdb sudo service influxdb start or you can make it auto start on reboot using sudo update-rc.d influxdb defaults

  4. Create influxdb user and database. you can go to the admin page at {your raspberry ip address}:8083. Note that the port may not always be 8083. Please check if you cannot use port 8083

  5. pip install AWSIoTMQTTClient

  6. pip install SenseHat

  7. Create your device in AWS IoT Core. use this guide https://docs.aws.amazon.com/iot/latest/developerguide/iot-sdk-setup.html

  8. Make note of your certificate location. Will be used in config file (aws-iot.json)

Create aws-iot.json in ./raspberry-pi/config. Use the template provided aws-iot.tmpl.json. Don't forget to change the variables.

Create pushbullet.json in ./raspberry-pi/config. Use the template provided pushbullet.tmpl.json. Don't forget to change the variables.

Create influxdb.json in ./raspberry-pi/config. Use the template provided influxdb.tmpl.json. Don't forget to change the variables.

About

Temperature / Humidity reporting using raspberry pi and AWS IoT

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published