Git Product home page Git Product logo

aws-iot-button-checkin's Introduction

AWS IoT Button Project - Simple Check-In/Check-Out for Hotels and AirBnB

The Project

A simple way for guests staying at hotels or AirBnb to check-in, check-out or ask for help with the click of a button.

In this project, you will set an AWS IoT Button, using AWS cloud services, that can be used to send customized notifications using SMS text messages by a guest to the owner of a hotel or AirBnB host for easy check-in, check-out or request for help.

The button supports three actions- A single click will notify the guest has checked in with the time of check-in. A double click will notify the guest has checked out with time of check-out. A long press of the button will send a distress notification that the guest needs help, with the time at which help was requested.

The AWS architecture for this project is as follows-

Architecture

The AWS IoT Button connects over wi-fi to the AWS IoT service. An AWS IoT rule triggers a Lambda function that hosts the logic for intercepting button clicks and invoking an SNS topic to send a text message to the registered phone number.

Before We Start

You will need the following before we begin-

Set Up Your Button

Download the AWS IoT Button app. IoS - App Store or Android - Google Play

Sign in to the app using your AWS account credentials.

Follow the instructions on the app to register, configure and set up your button.

Screenshot 1

On the "Set button action" page, select "Send SMS (nodejs)" and enter the phone number where you would like to receive text messages (SMS).

Screenshot 2

Modify your Lambda function

The button set up process creates a Lambda function on your AWS account that is triggered by click of your IoT button and invokes Amazon SNS to send the notification text messages.

Log in to your AWS Console and from the Services menu, select Lambda. You should find a newly created Lambda function named "iotbutton_XXX" where XXX is your device code (DNS). If you do not see the function, make sure you are in the same AWS region where the button was registered.

Under the Code tab, delete all existing code and replace it with the code provided here: iot-button-lambda.js

Make sure you replace "const PHONE_NUMBER = '1-999-999-9999';" with the phone number that you want to use to receive SMS notifications.

Save your changes.

Start clicking!

Click your IoT button and test it works as expected.

Clicking once will send a check-in message that looks like this-

CHECK-IN ALERT! Guest in Room 1 has checked in at 22:37:04 PST

Clicking twice will send a check-out message that reads like this-

CHECK-OUT ALERT! Guest in Room 1 has checked out at 09:22:35 PST

Long pressing the button (longer than 2 seconds) will send a distress message that reads like this-

HELP ALERT! Guest in Room 1 needs help! Help requested at 23:18:24 PST

aws-iot-button-checkin's People

Contributors

deskaran avatar

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.