Ever wanted to know if there was someone at the front door without constantly checking?
The Walabot, with its ability to sense people through walls and doors, allows you to solve that problem! This project incorporates the Walabot's 3D sensing capabilities with the Raspberry Pi's internet connectivity to allow Alexa to know if someone's at your front door.
To create this project for yourself, you will need a Raspberry Pi 3 with Raspbian, the AWS Python SDK, and the Walabot SDK installed, a Walabot, and either a mouse and keyboard or the ability to SSH into your Raspberry Pi.
Note that you will also need an AWS account.
First set up your Raspberry Pi 3 with all the SDKs installed, and test the Walabot using one of the sample programs on the Walabot Github page. Next, set up your AWS IoT account to interact with the Raspberry Pi and download the public and private keys. Follow this guide to learn more. On step 5, be sure to download the certificate and keys and place them in a folder. I called my folder 'certs'.
Then, follow this guide to set up a DynamoDB table that will take the Walabot data sent to AWS IoT and make it accessible to Alexa.
Afterwards create an Alexa Skill as well as a function in AWS Lambda. Make sure you enable the Alexa Skills Kit and DynamoDB triggers (as shown below). Use the "index.js" code below in your Alexa skill, being sure to also create a "keys.txt" file in the skill's folder containing your AWS Access Key and Secret Access Key in the format shown below.
Now all of the tedious set up is done!
Now just download the Python code below into a file in the certs folder you created earlier. Run it with a command in this format (be sure you're in the certs folder):
python3 PYTHON-SCRIPT-NAME.PY -e AWS-IOT-URL -r rootCA.crt -c CERTIFICATE -k PRIVATE-KEY
Make sure you replace the placeholder commands with personalized commands as follows:
PYTHON-SCRIPT-NAME.PY should be the name of your python script
AWS-IOT-URL is the url found under the HTTPS section of the Interact tab under your "Thing" in AWS in the format "somecode.iot.us-east-1.amazonaws.com"
CERTIFICATE is the full name of your .crt file in the certs folder
PRIVATE-KEY is the full name of your private key in the certs folder (ending in .pem.key)
That's it!
Further improvements will be more real time updating of the IoT information, as currently it only sends once per minute to save on AWS charges. Additionally, other features such as turning on a light if someone is close can be implemented with Alexa and its smart home capabilities. Finally, a major improvement would be to release a skill on the Alexa Skills Store that can be configured with many devices, because as of now the skill is extremely personalized and can only be run in test mode.
Comments