<commit_before>---
layout: post
title: Ask Dex Howto
date: '2017-02-03 22:06:34 -0500'
categories: ask dex update
published: true
---
__Alexa, Ask Dex my glucose__


### Disclaimer
This is a DIY Developer hack not ready for the masses as a  1-click setup. There are a lot of steps involved and this documentation will have its missing parts.
    
### Prerequisites
1. Dexcom G5
2. Amazon Alexa
3. AWS Developer Account

### Setup
[GIT Repo](https://github.com/jevans12/ask-dex "Code")

1. Start Sharing from your mobile app
2. Create a new Alexa Skill
	- Copy Intent Schema from git repo
    - Copy Utterances from git repo (Change these to whatever you want!)
     ![skill.PNG](/ask-dex/images/skill.PNG){:height="330px" width="400px"}
3. Create a Lambda Function
	- Select blueprint : Select Blank Function
	- Configure triggers : Select Alexa Skills Kit -> Lambda
	- Configure function : Set name to getglucose and Runtime to Python 2.7. Copy the getGlucose.py to your lamdba
    - Update the code and Add your username and password you use for Dexcom.com 
    
{% highlight python %}
payload ={"password": "<PASSWORD>", "applicationId" : "d89443d2-327c-4a6f-89e5-496bbb0317db", "accountName": "YOUR_ACCOUNT_NAME"}
{% endhighlight %}
    
    

    
    - Lambda function handler and role #TODO DOC
    - Finish with create and Note the ARN in the upper right hand corner of your function landing page. You will need this to tie Alexa to your lambda funtion.    

![aws-alexa.JPG](/ask-dex/images/aws-alexa.JPG)

![asw-alexa-interaction.JPG](/ask-dex/images/asw-alexa-interaction.JPG)

![aws-lambda-glucose.JPG](/ask-dex/images/aws-lambda-glucose.JPG)


## Links
- [Alexa Getting Started](https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/getting-started-guide)
- [AWS Lambda](https://aws.amazon.com/lambda/)
<commit_msg>Add skill<commit_after>---
layout: post
title: Ask Dex Howto
date: '2017-02-03 22:06:34 -0500'
categories: ask dex update
published: true
---
__Alexa, Ask Dex my glucose__


### Disclaimer
This is a DIY Developer hack not ready for the masses as a  1-click setup. There are a lot of steps involved and this documentation will have its missing parts.
    
### Prerequisites
1. Dexcom G5
2. Amazon Alexa
3. AWS Developer Account

### Setup
[GIT Repo](https://github.com/jevans12/ask-dex "Code")

1. Start Sharing from your mobile app
2. Create a Lambda Function
	- Select blueprint : Select Blank Function
	- Configure triggers : Select Alexa Skills Kit -> Lambda
	- Configure function : Set name to getglucose and Runtime to Python 2.7. Copy the getGlucose.py to your lamdba
    - Update the code and Add your username and password you use for Dexcom.com 
    
{% highlight python %}
payload ={"password": "<PASSWORD>", "applicationId" : "d89443d2-327c-4a6f-89e5-496bbb0317db", "accountName": "YOUR_ACCOUNT_NAME"}
{% endhighlight %}
     
   - Lambda function handler and role #TODO DOC
   - Finish with create and Note the ARN in the upper right hand corner of your function landing page. You will need this to tie Alexa to your lambda funtion.    

3. Create a new Alexa Skill
 	- Skill Information
	- Interaction Model
    	- Copy Intent Schema from git repo
    	- Copy Utterances from git repo (Change these to whatever you want!)
	- Configuration
    	- Set your Endpoint ARN to your lambda function
	- Test
	- Publishing Information
     ![skill.PNG](/ask-dex/images/skill.PNG){:height="330px" width="400px"}
     

![aws-alexa.JPG](/ask-dex/images/aws-alexa.JPG)

![asw-alexa-interaction.JPG](/ask-dex/images/asw-alexa-interaction.JPG)

![aws-lambda-glucose.JPG](/ask-dex/images/aws-lambda-glucose.JPG)


## Links
- [Alexa Getting Started](https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/getting-started-guide)
- [AWS Lambda](https://aws.amazon.com/lambda/)

{'fraction_non_alphanumeric': 0.10916688430399582, 'fraction_numerical': 0.029772786628362496, 'mean_word_length': 3.6650426309378807, 'pattern_counts': {'":': 4, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '658358', 'n_tokens_mistral': 1370, 'n_tokens_neox': 1220, 'n_words': 421}