Friday, July 14, 2017

Fun with IOT

Publish -> Analyze -> Utilize


First project that I wanted to try when I looked at GrovePi and the connectors .



Architecture has 3 main components

  • Edge - Get data temperature , light and humid readings and publish to the server
  • Data Platform - Consume the data provided by Edge and store . Provide api to get analysis on the data
  • Client - this can be anything that consumes rest api , mobile app or Alexa ( its fun this way !)


Edge


Raspberry Pi and GrovePi module with the connectors act as the Edge .
Python module continuously  reads the readings every minute and pushes
to the server using Rest api .

You need :  Raspberry and Grove pi with the Grove Sensors for Temp/Humidity ,light and Sound
Github Link : https://github.com/arun2dot0/APIPython


Data Platform


API interfaces to consume the data from edge and store . Developed using Spring Boot
Data can be stored in any db of your choice based on the analytical needs .
This project I have used Redis to store maximum of
100 values to provide simple analytics ( Average and Latest readings) on that data .
Readings are also exposed as rest api .

You need : Cloud setup ( google cloud or aws ) . I setup my server in google cloud . If you need same setup
details are in the github link
Github Link :https://github.com/arun2dot0/metrics-rest-service-redis.git


Client

Rest API exposed can be consumed by mobile app . Its fun to integrate with Alexa to
get the readings . You will find the details in github link

Alexa : you will need to create aws account and code using aws lambda
Github Link :https://github.com/arun2dot0/AlexaSensorDataNodeJS


It's a fun project and just to get hands on IOT . Edge , Platform and Client
are totally decoupled and can be easily changed for a different use case .
Although it's a simple project it get exposure to variety of technologies
Python , Java , Spring Boot , Redis , Node js and AWS Lambda's

Demo



Did you find it useful , did you try it ,  hack it , improve it ?
do share in the comments below

1 comment:

Mobibiz said...

Nice blog. Great explanation.
Visit IoT app Development company