Home Climate Monitoring with AWS Lambda and Raspberry Pi

Software Components

Reading the sensors

  • in line 26, use the AWS API gateway URL you that is mapped to the function
  • in line 28, you need to use the API key you have defined for the usage plan that guards your API
  • connect your AM3202 sensor to your Raspberry Pi,
  • get this python file on the same,
  • schedule it with CRON,
  • you’re almost set.

The back-end

Spring Cloud Function

Code dive-in

Setting up the database

Setting up the the AWS environment

Create the database

Create a role for your lambda function

Create the lambda function

  • you need to specify the role you have created for your function and assign it— line 7
  • we need to set a timeout of 120 seconds to cope with rare situation where cold start gets really cold… — line 11

Create the API, API key and Usage Policy

Hardware Components

  • AM2302 sensor — this is very good option for the sensor because it come pre-wired with the required resistor and a set of small tables cabled that makes it very easy to connect it to your GPIO port of choice on the Raspberry Pi
  • The Raspberry Pi itself — is is an expentive model model, if you plan to equip multiple rooms you may want to look at the Raspberry Pi Zero W, or if like me, you are not very fond of doing much soldering, a Raspberry Pi Zero WH.

--

--

--

Lead Architect at LiquidShare, building a cloud native, blockchain enabled, financial services SaaS platform.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Angular Continuous Delivery / Deployment with gitlab-ci, stage on commit and prod on git-tag

The Future of Software industry: A look into the Current Trends

Using Google’s reCAPTCHA with Go

The Ten Commandments of an Engineering Manager

Silhouette of a child reading with text reading, “#4 thou shalt not deploy on a Friday”

How to write java program for finding parts of speech using spring boot application using Stanford…

☂️@UmbNetwork now live on Binance mainnet!

Open access and the versioning issue — do we need to solve this?

Sitecore Messaging Framework on Azure Service Bus (Queue) — step by step tutorial

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Emil Kirschner

Emil Kirschner

Lead Architect at LiquidShare, building a cloud native, blockchain enabled, financial services SaaS platform.

More from Medium

Build Docker container images with AWS CodeBuild

AWS S3 Same Region Replication (SRR)

AWS S3 — Same Region Replication diagram

CI/CD Pipeline for BitBucket with AWS SAM 🚀

Setup Custom AWS lambda (λ) function dependencies using Docker containers