Realtime Temperature / Humidity / Pressure reporting using raspberry pi and AWS IoT
Live Demo: http://rmit-iot.s3-website-ap-southeast-2.amazonaws.com/
-
NodeJS: https://nodejs.org/en/
-
Python 3.5+: https://www.python.org/downloads/
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
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.
-
Serverless:
npm i -g serverless
-
AWS Account
-
AWS CLI https://docs.aws.amazon.com/cli/latest/userguide/installing.html
-
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
-
Go to AWS AppSync, create a project and start with the schema in
schema.graphql
placed in this repo. -
Connect the mutation and query with the dynamodb table which is created later by the serverless framework
Designed using Raspberry Pi 3 model B
& Raspberry Pi sense hat
. Make sure you install the prerequisites in your raspberry pi.
-
pip
-
pip install influxdb
-
start influxdb
sudo service influxdb start
or you can make it auto start on reboot usingsudo update-rc.d influxdb defaults
-
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 be8083
. Please check if you cannot use port8083
-
pip install AWSIoTMQTTClient
-
pip install SenseHat
-
Create your device in AWS IoT Core. use this guide https://docs.aws.amazon.com/iot/latest/developerguide/iot-sdk-setup.html
-
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.