Back to All
Project

Alexa on Home Hub 100 development kit

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.

HomeHub

Additional Resources

Tech Talk :

Demo in action:

Materials Required / Parts List / Tools

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.

  1. Move AIS_demo from

C:\\qca4020-or-3-2_qca_oem_ais.git\target\quartz\demo

to

C:\\qca4020-or-3-2_qca_oem_sdk-cdb.git\target\quartz\demo
  • Move synaptics library from

  • C:\\qca4020-or-3-2_qca_oem_ais.git\target\thirdparty\aws\synaptics

    to

    C:\\qca4020-or-3-2_qca_oem_sdk-cdb.git\target\thirdparty\aws\synaptics
  • Move AIS ecosystem libraries from

  • C:\\qca4020-or-3-2_qca_oem_ais\target\quartz\ecosystem\aws

    to

    C:\\qca4020-or-3-3_qca_oem_sdk-cdb.git\target\quartz\ecosystem\aws
    C:\\qca4020-or-3-2_qca_oem_sdk-cdb.git\target\thirdparty\aws

    Now \aws folder will have two subfolders awsiot and synaptics

    C:\\qca4020-or-3-2_qca_oem_sdk-cdb.git\target\thirdparty
    folder.
  • Set environment variables for compiling AWS sample app.
  • set TOOLLIBPATH=C:\Program Files (x86)\GNU Tools ARM Embedded\6 2017-q2-update\lib\gcc\arm-none-eabi\6.3.1\thumb\v7e-m
    set NEWLIBPATH=C:\Program Files (x86)\GNU Tools ARM Embedded\6 2017-q2-update\arm-none-eabi\lib\thumb\v7e-m
  • Navigate to the working directory
  • cd C:\\qca4020-or-3-2_qca_oem_sdk-cdb.git\target\quartz\demo\AIS_demo\build\gcc
  • Build the Sample app:
  • build.bat t 4020 cdb
  • You can flash the sample app over USB with the following instructions:
    1. Turn off the board
    2. Remove Jumper from J31 pins 1 and 2
    3. Set Jumper on J34 pins 1 and 2
    4. Turn on the board
    5. Open cmd
    6. Navigate to the path
  • qca4020-or-3-2_qca_oem_sdk-cdb.git\target\quartz\demo\AIS_demo\build\gcc
  • Run the python command
  • python ..\..\..\..\..\build\tools\flash\qflash.py --comm 8 --debug
  • Once the flash is complete, turn the board off
  • Remove the Jumper on J34.
  • Turn the board ON again.
  • Connect terminal to the serial comm port, either enter "1" or reset the board to see the command line menu.
  • Assembly and smart devices setup

    1. Download the Kasa Smart Wi-Fi Plug and follow instructions to set up and install the smart power outlet.
    Setting
  • Download the August smart lock app and follow instructions to install and set up the smart lock.
  • Setting
  • Download the Alexa app and select device set up to add the August Lock and TP-LINK Kasa device to Alexa. Follow the instructions to set up the smart devices with Alexa.
  • Setting
  • Plug in the light bulb to the Kasa Smart Wi-Fi Plug. Plug in the August Connect Wi-Fi Bridge into the second socket.
  • Plug

    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.

    Connect
    • Open a hyper-terminal program like Putty and open the Com port as seen below.
    hyper-terminal
  • Once the Com port is open, enter the following commands
  • 3 5
    3 7 WiFiHotspot Password WPA2 CCMP CCMP
    wait for handshake
    WLAN: 4 way handshake success for device=1
    4 4
    wait for
    Net: DHCPv4c: IP=10.73.201.200
    Subnet Mask=255.255.254.0 Gateway=10.73.200.1
    Net: Resolving SNTP client...
    Net: Interface wlan1 initialized, DNS and SNTP started Successfully
  • Once the device is connected to WiFi, you will need to set up the AVS account, add the Home Hub 100 development kit to your AVS account and download the AWS certs and create the “config.json” file. Please refer to the Home Hub 100 User Guide for more details on each step.
  • Once you have downloaded the certs, you can use the Certcs tool included in the SDK and download the certs to the Home Hub 100 device using the following commands:
  • Net cert get QCA4020_AIS_Thing1.pem.crt 192.168.0.34 -s client.bin -k QCA4020_AIS_Thing1.pri.key -t pem_cert
    Net cert get root_ca.bin 10.45.160.97 -s aws_ca_list.bin -t ca_list
    Net cert get qdn_config.json 10.45.160.97 -s /spinor/ais_configuration.json -t raw_file
  • Once the certs are stored on the development kit, you can run the demo with the following two commands.
  • 5 4
    5 5
    wait for alexa client is ready

    Alexa 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.

    Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries ("Qualcomm"). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.

    Project Authors
    Staff Engineer, Qualcomm Technologies, Inc.

    Sign up for the Developer Newsletter.

    Get software and hardware tool resources to help optimize your development delivered to your inbox weekly.

    Qualcomm relentlessly innovates to deliver intelligent computing everywhere, helping the world tackle some of its most important challenges. Our leading-edge AI, high performance, low-power computing, and unrivaled connectivity deliver proven solutions that transform major industries. At Qualcomm, we are engineering human progress.

    Stay connected

    Get the latest Qualcomm and industry information delivered to your inbox.

    Subscribe
    Manage your subscription

    © Qualcomm Technologies, Inc. and/or its affiliated companies.

    Snapdragon and Qualcomm branded products are products of Qualcomm Technologies, Inc. and/or its subsidiaries. Qualcomm patented technologies are licensed by Qualcomm Incorporated.

    Note: Certain services and materials may require you to accept additional terms and conditions before accessing or using those items.

    References to "Qualcomm" may mean Qualcomm Incorporated, or subsidiaries or business units within the Qualcomm corporate structure, as applicable.

    Qualcomm Incorporated includes our licensing business, QTL, and the vast majority of our patent portfolio. Qualcomm Technologies, Inc., a subsidiary of Qualcomm Incorporated, operates, along with its subsidiaries, substantially all of our engineering, research and development functions, and substantially all of our products and services businesses, including our QCT semiconductor business.

    Materials that are as of a specific date, including but not limited to press releases, presentations, blog posts and webcasts, may have been superseded by subsequent events or disclosures.

    Nothing in these materials is an offer to sell or license any of the services or materials referenced herein.