Giter Site home page Giter Site logo

aws-alexa-smart-home-demo's People

Contributors

matwerber1 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

aws-alexa-smart-home-demo's Issues

Device Not Responding

I reached the device testing stage after successfully overcoming all the issues faced so far(node.js version issue, etc) and now Alexa discovered the smart thing but is not responding. The lambda skill function log shows the below:
_/aws/lambda/alexa-smart-home-demo-AlexaSkillFunction-98vrkYoGBTOz
2024-01-18T07:06:27.853Z e56c9868-5ceb-4410-8bbf-aca68026ceb9 INFO Stack:
Error: unable to get local issuer certificate
at TLSSocket.onConnectSecure (node:_tls_wrap:1539:34)
at TLSSocket.emit (node:events:513:28)
at TLSSocket.emit (node:domain:489:12)
at TLSSocket._finishInit (node:_tls_wrap:953:8)
at TLSWrap.ssl.onhandshakedone (node:tls_wrap:734:12)
Actually there are more errors pointing to "unable to get local issuer certificate". Please help.

Wont discover Devices at the end of Step 2

Hello,
Thank you for the detailed guide!. I was not able to see the device on the Alexa app even after Mapping our Skill's User ID (from Cognito) to AWS IoT Thing. Any hints on where I am doing wrong?.

deploy error

i don't understand i saw on previous issue that this error was resolved but i still get it .

Error: Unable to upload artifact ../../lambda/layers/cfn-response referenced by ContentUri parameter of CloudFormationResponseLayer resource.
Unable to locate credentials

    Deploying with following values
    ===============================
    Stack name                 : alexa-smart-home-demo
    Region                     : None
    Confirm changeset          : False
    Deployment s3 bucket       : None
    Capabilities               : ["CAPABILITY_IAM"]
    Parameter overrides        : {'AlexaSkillId': 'amzn1.ask.skill.27f4eb97-                                                                     xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', 'AlexaVendorId': 'xxxxxxxxxxxx'}

Initiating deployment

Error: Failed to package template: /home/pi/alexa/aws-alexa-smart-home-demo-mast er/.aws-sam/build/packaged.yaml.
[Errno 2] No such file or directory: '/home/pi/alexa/aws-alexa-smart-home-demo- master/.aws-sam/build/packaged.yaml'


i checked the /.aws-sam/build/VerifyCognitoTokenFunction/packege.json file
{
"name": "cfprovider-uuid",
"version": "1.0.0",
"dependencies": {
"https": "^1.0.0",
"node-jose": "^1.1.3"
}
}

Errors in CloudFormation - Stacks

Hi,

Sam Build seems to have a problem at UuidProvider (though tbh may not be the problem ! - just don't know - tried building in AWS CloudFormation by pressing Create Stack and putting in values manually - after pointing it in direction of template.yml file - didn't go down too well either)

Here's the message after putting in --verbose on sam build.

NODEJS installing in: G:\Dropbox\Projects\Alexa\aws-alexa-smart-home-demo-master.aws-sam\build\UuidProvider
executing NPM: ['npm.cmd', 'install', '-q', '--no-audit', '--no-save', '--production']
NodejsNpmBuilder:NpmInstall failed
Traceback (most recent call last):
File "C:\Program Files\Amazon\AWSSAMCLI\runtime\lib\site-packages\aws_lambda_builders\workflows\nodejs_npm\actions.py", line 108, in execute
["install", "-q", "--no-audit", "--no-save", "--production"], cwd=self.artifacts_dir
File "C:\Program Files\Amazon\AWSSAMCLI\runtime\lib\site-packages\aws_lambda_builders\workflows\nodejs_npm\npm.py", line 85, in run
raise NpmExecutionError(message=err.decode("utf8").strip())
aws_lambda_builders.workflows.nodejs_npm.npm.NpmExecutionError: NPM Failed: npm WARN [email protected] No description
npm WARN [email protected] No repository field.
npm WARN [email protected] No license fie

Not too familiar with node.js - can't seem to load any of the previous files manually using npm either. Hope this is an easy fix !

Thanks

Ativate Skill problem

Hi matwerber1
I solved all problems! Changed in the "Template.yaml" from "Nodejs10.x" to "Nodejs14.x"; I configured "AWS configure" to us-east-1 and the bucket s3 to "us-east-1" too, and I generated the "packaged.yaml" in the folder ".aws-sam\build", anyway, everything worked, the stack was generated. Now I have a new problem: when a try to activate the skill in alexa app, I never receive the sms with the activation code. I use several cellphones, including an american number, and don´t work.
Thank you!!

AWS-SDK Not found Error

While deploying, Many logs come up with the following error. Please help.
"errorType": "Runtime.ImportModuleError",
"errorMessage": "Error: Cannot find module 'aws-sdk'\nRequire stack:\n- /var/task/index.js\n- /var/runtime/index.mjs",

how do i validate EndpointHealth interface in alexa

so far, i have implemented the system which uses the aws iot core connected to esp32 and lambda for skill triggers.
It is working fine when a skill triggers a cmd and alexa(lambda) changes the desired state of the shadow in the aws iot core and the esp32 recieves delta process it and updates the reported of the shadow.

The problem is when the esp32 is down or not connected , how do i report that to the user? so far now alexa responds okay for the cmd issued since aws iot core is updated. How do i use the EndpointHealth interface and report an error to the user ?
I tried in many places to figure out but couldnt find it.

I get this when,I am creating stack using the provided template.yaml file

Transform AWS::Serverless-2016-10-31 failed with: Invalid Serverless Application Specification document. Number of errors found: 12. Resource with id [AlexaSkillFunction] is invalid. 'CodeUri' is not a valid S3 Uri of the form 's3://bucket/key' with optional versionId query parameter. Resource with id [AssociateThingToUserFunction] is invalid. 'CodeUri' is not a valid S3 Uri of the form 's3://bucket/key' with optional versionId query parameter. Resource with id [CloudFormationResponseLayer86b5683fdf] is invalid. 'ContentUri' is not a valid S3 Uri of the form 's3://bucket/key' with optional versionId query parameter. Resource with id [CognitoClientConfigurationProvider] is invalid. 'CodeUri' is not a valid S3 Uri of the form 's3://bucket/key' with optional versionId query parameter. Resource with id [CognitoClientSecretProvider] is invalid. 'CodeUri' is not a valid S3 Uri of the form 's3://bucket/key' with optional versionId query parameter. Resource with id [CognitoDomainProvider] is invalid. 'CodeUri' is not

Modifying Shadow's Desired State from the Physical Device

I have a problem related to this.

The project is a test, for study.

On Lambda (cloud) I publish the state of desired as per the request, and on the physical device (esp32) I publish the statdi of reported.

But, in the tests in the ADC, it always gives FAILED. From the tests I've done, if the Device Shadow metadata is DIFFERENT, the test fails. If it is the same, the test passes.

{
  "metadata": {
    "desired": {
      "state": {
        "timestamp": 1651346494
      },
      "speed": {
        "timestamp": 1651346494
      },
      "potency": {
        "timestamp": 1651346494
      }
    },
    "reported": {
      "state": {
        "timestamp": 1651346495
      },
      "speed": {
        "timestamp": 1651346495
      },
      "potency": {
        "timestamp": 1651346495
      },
      "value": {
        "timestamp": 1650712182
      }
    }
  }
}

This test above failed because the desired timestamp differs from the reported one.

Do you know how I can fix this?

could we hire you to do a similar job for us?

Mathew, not sure how to contact you so I'm doing it through here.

We have a small start up company that needs to do this for a large number of ESP32s, looking to hire someone for a quick job.

How can we best contact you?

ROLLBACK_COMPLETE ERROR

Good morning @matwerber1 , one more time, thank you very much.
As I said, I managed to run about 85% of the initial part of the project, but I'm not managing to generate the stack. Here are some screenshots that clarify what's going on:
screenshot 001
screenshot 002
screenshot 003

you could work with us... would be amazing

Unable to receive SMS to mobile

Hi matwerber1,

As Cognito was not sending any SMS to mobile for verification,

So i would like to change phone number to email verification , Can you please suggest where can we change ?

Thanks in advance

./deploy.sh Error

(base) Area51:aws-alexa-smart-home-demo warmachine$ ./deploy.sh
Error: Unable to upload artifact lambda/layers/cfn-response/ referenced by ContentUri parameter of CloudFormationResponseLayer resource.
Parameter ContentUri of resource CloudFormationResponseLayer refers to a file or folder that does not exist /home/warmachine/Desktop/aws-alexa-smart-home-demo/lambda/layers/cfn-response

Deploying with following values
===============================
Stack name                 : alexa-smart-home-demo
Region                     : None
Confirm changeset          : False
Deployment s3 bucket       : None
Capabilities               : ["CAPABILITY_IAM"]
Parameter overrides        : {'AlexaSkillId': 'amzn1.ask.skill.d98267db-a796-4696-869a-060c3ab3c6e7', 'AlexaVendorId': 'M25E7FDW2I3AZR'}

Initiating deployment

Error: Failed to package template: /home/warmachine/Desktop/aws-alexa-smart-home-demo/packaged.yaml.
[Errno 2] No such file or directory: '/home/warmachine/Desktop/aws-alexa-smart-home-demo/packaged.yaml'
(base) Area51:aws-alexa-smart-home-demo warmachine$
@matwerber1

SAM CLI stalls

The command line stalls once it reaches "CREATE_COMPLETE AWS::IAM::Role AlexaSkillFunctionRole "in UBUNTU. AWS Cloudformation console shows "create in progress". Please help.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.