Back to All
Project

Integrated Alexa and LIFX Bulb

 

Skill Level Area of Focus Operating System Cloud Service/Platform
Advanced Alexa Voice Service,Embedded, IoT, Smart Home Linux Amazon AWS IoT

This project uses the DragonBoard™ 410C Development Board from Arrow Electronics integrated with Alexa Voice Services and LIFX light bulbs using Amazon skills kit. The integration is designed to allow the users to turn on or off the LIFX bulb as well as change the bulb’s color via voice commands (e.g., “Alexa, tell DragonBoard 410c to turn the color to green”).

Objective

Using the DragonBoard 410c, the objective of this project is to get familiar with Amazon’s Alexa voice services, Amazon skills kit, and AWS Lambda Functions.

Build / Assembly Instructions

Materials Required / Parts List / Tools

Additional Resources

Build / Assembly

  • Link to GitHub Repository
  • Setup for LIFX app (not required for the demo but can be useful)
    1. Download LIFX app from the market place
    2. If the bulb is already paired, reset the bulb and then pair it up with your phone
    3. Follow the instructions in the app and complete the setup
    4. Make sure that you have claimed the device
  • Get the private token
    1. Register with LIFX as a developer for Beta HTTP API's
    2. Go to https://cloud.lifx.com/settings to get your token. If it doesn't work then use the URL from https://api.developer.lifx.com/docs/authentication
  • Clone the code
    1. Go to https://github.com/TusharChugh/Alexa_Lifx_Dragonboard.git
  • Setup AWS Lambda Function
    1. Go to https://console.aws.amazon.com/lambda/
    2. Click on 'create a lambda function'
    3. Skip
    4. Configure triggers -> alexa skills kit, next
    5. Give some name and description
    6. Runtime python 2.7
    7. Compress requests-2.11.1.dist-info, requests and dragonboard.py to dragonboard.zip
    8. Code copy entry -> upload a .zip file
    9. Handler: dragonboard.lambda_handler
    10. Create rule (lambda_basic_execution)
    11. Next -> Complete Function
    12. In dragonboard.py paste the token obtained from LIFX
  • Setup Alexa skills kit
    1. Go to https://developer.amazon.com/en-US/alexa/alexa-skills-kit
    2. Click on 'create a skill now' (you will need to sign in with your amazon account)
    3. Click on 'add a new skill' button
    4. On skill information tab, give invocation name as 'dragonboard' and a name of your choice
    5. Go to interaction mode tab, first add custom slot type from 'custom_slot_types.txt'
      e.g: Type: LIST_OF_COLORS Value: red green blue orange pink white yellow violet cyan
    6. Copy the content of intent_schema.json and sample_utterance.txt as is
    7. Go to configuration tab, select Lambda ARN (you can get this ARN on the top of 'Lamda function' which was created in the previous section
    8. Go to test tab: Sample utterance->Enter Utterance->Alexa tell DragonBoard 410c, I am feeling blue
    9. You should see the bulb change the color and the result in Lambda response

Usage Instructions

Sample utterances:

  • Alexa, tell {App Name} that I am feeling {Color}, where we need to use app name to invoke Alexa.
  • Alexa, tell DragonBoard 410c I am feeling blue. (see supported list of colors here)
  • Alexa, tell DragonBoard 410c to turn on/off.
  • Alexa, tell DragonBoard 410c to turn the color to green.

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
Former Interim Engineering Intern, 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 Technologies, Inc. and/or its affiliated companies.

Snapdragon and Qualcomm branded products are products of Qualcomm Technologies, Inc. and/or its subsidiaries. Qualcomm patents 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.