How to make a Panic Button with AWS IoT Button



Oh No I've fallen and I can't get out I'm gonna press my IO teeth button and stick now my twin sister for help hey twin sis I got your text message that you'd fallen and you can't get up let me wave my magic wand and you'll be all better again thanks sis I'm sure glad I have my IOT button to signal for help hey this is Caroline and I hope you enjoyed the little parody skit that I just performed I do not have a twin sister surprise surprise it was a dramatization and it was just me in that video so in this video I'm going to show you how to configure and set up an AWS IOT button this is a Wi-Fi enabled button that you can purchase straight off Amazon I'm going to show you how to text specific messages to family members or friends through their mobile device before you get started let me go over the disclaimers number one this video is provided as is and without warranty that's just my way of saying please don't sue me over this this is a technical video and nothing else if you are having medical emergency please call 9-1-1 this is not a medical device i'm not giving out any medical advice and i'm not a medical professional this is not a paid endorsement of amazon or this product i purchased this either with my own money the hardware used in this tutorial is what they call an IOT or Internet of Things device it is Wi-Fi enabled and it will work on one Wi-Fi network the one you configure it for in this case the one I'm going to configure for in this video and which leads me to my next point which is if the power goes out or your internet connection that you're using for this device goes out the button stops working completely so I would hate for anything to happen to your family which is why I'm putting all these disclaimers out there so you know watch this video for entertainment is born or configured SMS messages for for anything else but this was just just a fun way of introducing the video so now let's go over the items you need for this project so number one you'll need the AWS IOT button this is a second-generation button you can order straight off Amazon I'll put the links below and I also have no time here don't throw away the box so this is the box that it came in there's a barcode right on the front that will make setting this up a lot easier so please don't throw away the box if you do it's not the end of the world but but the way that I do this tutorial you'll need the box alright next you'll need a lanyard so this is a free land I got from the last conference I went to it's got a nice little clasp here and I'm just gonna hook it on and there we go so hopefully you got one of these if not you can you can buy one or ask a friend for the one you'll also need a computer Windows or Mac is fine the screenshots I'll show you are all done on a Mac just because it's I I'm just a lot more familiar with how to do it that way you'll need an AWS accounts but link below to create one you do need a credit card with your computer you also need the source code on github I'll put a link below to that you'll need a mobile device because there is a specific mobile app that I use to configure the bucket so it's all the links are provided in the description field now I'm ready to get started so here is the button and just to show you that the this comes off pretty easily it's a little it just pops right on off it's a little it's the little clasp that you can use to put your lanyard on and off and you can put this on your keychain or anything so and the way that you know that the button worked is I'm going to short press it here so there's you can do a short press like this and the way you know it works is it starts blinking so it's sending out a signal when it turns green you know that the signal has been sent properly and I should be receiving a text message momentarily here and here's the little text message that came across alright so you can program it for three different presses one I just showed you a short press there's also a double press and the same thing will happen the light will blink and then if it's successful the green light will light up and then my phone will will text me and last but not least is the long press which is a second and a half press so i usually kept the three that's at 1,002 1,003 let go it starts blinking again and then when the green light comes on that means it was a successful send and sure enough my phone likes just so-so this tutorial we're going to program one phone number this phone number and we're gonna press we're gonna have three different messages one for one short press double click two presses or a long press which is the you know help press which will see you later in the program so first thing we're going to do is we're going to go to the Play Store and I'm going to search for the AWS iot button right here AWS iot button and the first one that comes up says AWS iot button dev development so let's step let's select that one and we're gonna hit install and I'm going to accept terms and conditions and click accept touch accept and we'll download and I will now I've got download it's a it's installed on my mobile device and I'll click open welcome to the AWS IOT button app this app lets you connect your button to AWS IOT it configures Wi-Fi provisions a button with security unit can credentials and tells AWS IOT what to do when the button is pressed swipe all right so ready to use lambda function blueprints this is really key to making this super easy to do so I'm going to sign in with my abs account and it says I haven't connected a button yet I'm in my correct region I haven't connected a button yet I'm going to set up for AWS IOT button so you register configure and you set the button action and I'm going to agree and get started alright so this is why it's important to hold on to the box because there's just nice little bar code on the box that I'm going to scan so I'm going to click scan barcode and I'm gonna scan the second barcode on this box and if you don't have this you can type in the DSN number all right and I'm I and it's giving it a name of IOT button 5g c-5a with a registered button now it says press the button for six seconds until the blue light flashes so 1,001 1,002 1,003 doesn't world s5 1006 there goes there's the blue button and now I get to pick the Wi-Fi network and type in the password so this is really key here because it's only configured for one Wi-Fi at a time it's not like your mobile device that's always looking for Wi-Fi hotspots and then goes into the LTE network when it can't find Wi-Fi so please be aware if your power goes out your button stops working if your internet goes out your button stops working and now the buttons being configured we see the lights changing advice and we are on the internet now we can create a lambda function so I'm going to choose send SMS nodejs it's the third one down on this of my choices and so you want to type in your phone number it's very important of assuming you're in the u.s. I'm in the u.s. that you always put the number one first and then your phone number so I clicked okay and then I'm going to touch set action at the bottom and at this point we should be able to single press the button and I should be able to see a text message on my phone at this point and it's going to be a generic text message so let's let's see if that works one press Lights a point and then green and I should be viewing a text message on my phone and sure enough here it is this is the text message my phone hello from your IOT button so this is the generic text message that comes up when you set it up all right so that's great so now we've got our AWS iot button set up on our Wi-Fi on my Wi-Fi network and I do have it working to press the button and I do see the generic text message that comes across so next we will customize the messages and the short press double press and long press for this device hey guys this section is a screen record of my computer first thing I'm going to do is go to aws.amazon.com the link is in the description field below of course and I'm going to sign in and I'm signed in to my console here I'm gonna get a lambda here if this doesn't pop up the way that it does on my computer cuz the last thing I did with lambda to set up this tutorial type in lambda and you'll see run code without thinking about servers like that and then you'll go into your member functions then you want to click on last modified twice and I'll give you the last lambda function that you touched which is the one that was automatically created by that mole that we did in the last step so here it is IOT button and the number of my button and the SMS no js' right there I'm gonna click on that and this is really cool because it set up the Wi-Fi for you it set up the trigger for you to set up everything for you it's great the only thing we're going to do is just modify the code slightly with nodejs so this is so gay it gives you this default code which is awesome and what we're going to do is we're going to go over to my github right here and I provide this link in the description field below and you want to click on lambda code for AWS panic button and you can click on raw and that way you can get pick up all of the code so select all copy then go back over to your lambda function here select all delete and then paste now before we move on let's let's let's look at this code for a second on my screen now first this is the generic stuff that we have then we have I put constant adult-child I just couldn't think of anything better at the moment that I wrote this and what you want to do is you are a place with your phone number right here so type in you know whatever your phone number is leave the one right there swimming in the US and then and that's that's your phone number all right so second what you want to do is you want to change the messages so the first event type I put on there is the long press which is the help I can't get up press the emergency press so I put a help I've fallen and I can't and I forgot the word get so I'm going to get up alright so so personalize this the way you want the message to read all right next is the single click one touch of a button short click and it says please call me get chance thanks mom so I'm going to change this to thanks sis alright just personalize this the way you want and then of course last but not least is double double press of a button and and you can and it says can you come over tonight so anyway so those are the three things I've programmed on here I've changed the phone number I've changed the messages now I'm going to scroll back up here and I'm going to click Save and that takes care of it so now let's go back to my button and my phone and let's see if these messages come across let's get back to our button here we have configured it for short press double press and long press here so let's try it out and see if it works let's do short press first and we see it blinking hopefully you can see this in the video and then it goes into green so hopefully there should be a text message popping up on my phone here shortly and sure enough here is the short press which is the message please call me when you can thanks sis all right so we'll swipe that away let's try the double press now and what's up goes green and then and sure enough can you come over tonight it's a message that comes up and swipe that away let's go for the long press now green light and you've gotten the help of ball and I can't get up message that comes across before I go I want to show you one last thing which is how to change the Wi-Fi network on your button so we're going to go back to our phone here and we're going to launch the app that we used to setup the button to begin with and that is the AWS button and you see button right here I'm going to touch it and it's going to give me three choices one is the change the Wi-Fi to is to select a different lambda function and last but not least is deleting so let's change the Wi-Fi by touching the Wi-Fi button and it says press the button for six seconds until the blue light flashes so this is the the same setup we did at the very beginning so if we set this up on your home network and then you take it to your sister's house your mother's house or something to set it up or your dad's house you're gonna go you just gotta follow the steps right here and it's gonna lead you through setting up on a new Wi-Fi network and everything else will be the same and it should work great so I just want to show you that before I go hey thanks for watching I hope you enjoyed this video tutorial I hope you got an entertaining and and please use it your own risk thank you take care bye

8 Comments

  1. mikejarrett1 said:

    This is a great introduction to how to program this. Easy to follow.

    May 23, 2019
    Reply
  2. Trey Donovan said:

    I've set everything up as indicated, and my lambda function executes with no errors but I never get a text message, on my phone or my google voice account. starting to consider giving up on this button. No verbose logging of anything that helps.

    May 23, 2019
    Reply
  3. Jacky Woo said:

    Hi thanks for a great video, do you know if it will work with Australia Mobile Carriers?

    May 23, 2019
    Reply
  4. jmiller29 said:

    I added the function using the mobile app but and it works but the function doesn't show up in my Lambda list on AWS. What am I missing?

    May 23, 2019
    Reply
  5. Yash Kansara said:

    I’m from india, Is this product available in India? and if I manage to purchase somehow, will it work to send panic sms in India region mobile phones?

    May 23, 2019
    Reply
  6. Benjamin Hays said:

    Thank you.

    May 23, 2019
    Reply
  7. blake055 said:

    Do you have an easy way to send the SMS to multiple phone numbers?

    May 23, 2019
    Reply
  8. blake055 said:

    Great tutorial, got my moms panic button working in 10 minutes.

    May 23, 2019
    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *