This project is designed to use the Qualcomm® Home Hub 100 development kit to control a smart bulb and smart lock using Alexa voice services to demonstrate Home Automation. Designed to control the bulb, turn it on/off, lock and unlock, sense smoke and send data to AWS IoT at regular intervals.
Objective
The main objective is to develop a home automation solution using the Home Hub 100 development kit with Alexa as the voice UI to control smart devices like a smart bulb (turn on & off), smart lock (lock & unlock) and smoke detector.
Additional Resources
Tech Talk :
Demo in action:
Materials Required / Parts List / Tools
- Qualcomm Home Hub 100 development board.
- Kasa Smart WiFi Plug 2-Outlets
- August lock Pro 3rd Generation + Connect WiFi Bridge
Build / Assembly Instructions
Build and Flash the Sample app
The development kit will come pre-installed with the sample application. You can skip to the “Assembly and smart devices setup” portion.
Steps to build and flash the sample application will help in case the development kit needs to be re-flashed or updated to a newer version of the app.
Download the Qualcomm® QCA4020 SDK and AIS sample app from here. Make sure all the files and folders are in place.
-
Move AIS_demo from
C:\\qca4020-or-3-2_qca_oem_ais.git\target\quartz\demoto
C:\\qca4020-or-3-2_qca_oem_sdk-cdb.git\target\quartz\demoMove synaptics library from
C:\\qca4020-or-3-2_qca_oem_ais.git\target\thirdparty\aws\synapticsto
C:\\qca4020-or-3-2_qca_oem_sdk-cdb.git\target\thirdparty\aws\synapticsMove AIS ecosystem libraries from
C:\\qca4020-or-3-2_qca_oem_ais\target\quartz\ecosystem\awsto
C:\\qca4020-or-3-3_qca_oem_sdk-cdb.git\target\quartz\ecosystem\aws- Download AWS SDK from https://github.com/aws/aws-iot-device-sdk-embedded-C and extract.
- Create thirdparty\aws\awsiot\ folder under target directory.
C:\\qca4020-or-3-2_qca_oem_sdk-cdb.git\target\thirdparty\awsNow \aws folder will have two subfolders awsiot and synaptics
- Copy all files from aws-iot-device-sdk-embedded-C-3.0.1 folder to the third party \aws\awsiot\ folder.
- Download OPUS decoder source from http://opus-codec.org/release/dev/2018/06/01/libopus1_3_rc.html and extract.
- Move extracted opus source from opus-1.3-rc.tar.gz to
C:\\qca4020-or-3-2_qca_oem_sdk-cdb.git\target\thirdpartyset TOOLLIBPATH=C:\Program Files (x86)\GNU Tools ARM Embedded\6 2017-q2-update\lib\gcc\arm-none-eabi\6.3.1\thumb\v7e-mset NEWLIBPATH=C:\Program Files (x86)\GNU Tools ARM Embedded\6 2017-q2-update\arm-none-eabi\lib\thumb\v7e-mcd C:\\qca4020-or-3-2_qca_oem_sdk-cdb.git\target\quartz\demo\AIS_demo\build\gccbuild.bat t 4020 cdb- Turn off the board
- Remove Jumper from J31 pins 1 and 2
- Set Jumper on J34 pins 1 and 2
- Turn on the board
- Open cmd
- Navigate to the path
qca4020-or-3-2_qca_oem_sdk-cdb.git\target\quartz\demo\AIS_demo\build\gccpython ..\..\..\..\..\build\tools\flash\qflash.py --comm 8 --debugAssembly and smart devices setup
- Download the Kasa Smart Wi-Fi Plug and follow instructions to set up and install the smart power outlet.
Usage Instructions
Launching the application
- Power ON the Home Hub 100 Board
Connect the micro-USB port J85 to your host PC. It will detect the USB connection as a serial port.
- Open a hyper-terminal program like Putty and open the Com port as seen below.
3 53 7 WiFiHotspot Password WPA2 CCMP CCMPWLAN: 4 way handshake success for device=14 4Net: DHCPv4c: IP=10.73.201.200Subnet Mask=255.255.254.0 Gateway=10.73.200.1Net: Resolving SNTP client...Net: Interface wlan1 initialized, DNS and SNTP started SuccessfullyNet cert get QCA4020_AIS_Thing1.pem.crt 192.168.0.34 -s client.bin -k QCA4020_AIS_Thing1.pri.key -t pem_certNet cert get root_ca.bin 10.45.160.97 -s aws_ca_list.bin -t ca_listNet cert get qdn_config.json 10.45.160.97 -s /spinor/ais_configuration.json -t raw_file5 45 5Alexa Commands
Once the app is launched, you can use the following Alexa commands to control the demo.
- Alexa, turn on the light
- Alexa, turn off the light
- Alexa, lock the door
- Alexa, unlock the door
- Alexa, is the door locked?
- Alexa, play some music
- Alexa, stop
Qualcomm Home Hub 100 and Qualcomm QCA4020 are products of Qualcomm Technologies, Inc. and/or its subsidiaries.
Sign up for the Developer Newsletter.
Get software and hardware tool resources to help optimize your development delivered to your inbox weekly.
