Intergrated Alexa and Lifx bulb
- Amazon Echo
- Lifx Color 1000 bulb: http://www.lifx.com/products/color-1000?variant=8930428227
- Lifx HTTP API: https://api.developer.lifx.com/
- Creating a deployment package for AWS lambda function: http://docs.aws.amazon.com/lambda/latest/dg/lambda-python-how-to-create-deployment-package.html
- Download Lifx app from the market place
- Reset the bulb (if it is already paired) and then pair it up with your phone
- Follow the instructions in the app and complete the setup
- Make sure that you have claimed the device
- Register as a develop for Beta HTTP API's with Lifx
- 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
- Go to https://console.aws.amazon.com/lambda/
- Click on 'create a lambda function'
- Skip
- Configure triggers -> alexa skills kit, next
- Give some name and description
- Runtime python 2.7
- Compress requests-2.11.1.dist-info, requests and dragonboard.py to dragonboard.zip
- Code copy entry -> upload a .zip file
- Handler: dragonboard.lambda_handler
- Create rule (lambda_basic_execution)
- Next -> Complete Function
- In dragonboard.py paste the token obtained from Lifx
- Go to https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit
- Click on 'create a skill now' (you will need to sign in with your amazon account)
- Click on 'add a new skill' button
- On skill information tab, give invocation name as 'dragonboard' and a name of your choice
- 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
- Copy the content of intent_schema.json and sample_utterance.txt as is
- 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
- Go to test tab: Sample utterance->Enter Utterance->Alexa tell dragonboard, I am feeling blue
- You should see the bulb change the color and the result in Lambda response