alexa-smarthome icon indicating copy to clipboard operation
alexa-smarthome copied to clipboard

Smart home skill not invoking lambda

Open Kasuhikdas opened this issue 5 years ago • 13 comments

Having the problem with skill not calling lambda. My skill is English(US) and Lambda is (N. Virginia). After account linking the discovery is not happening. -Lambda Trigger is enabled -Gerographical Location is English(US) and N.virginia -Device discovery in test is happening -In app and test console it does not call the lambda there is no cloud watch logs.

Can anyone suggest what is the #problem? If i need to change the endpoint what should be the region?

Kasuhikdas avatar Oct 24 '18 06:10 Kasuhikdas

I had the same problme. Did you resolve this issue?

paolonz82 avatar Nov 12 '18 18:11 paolonz82

For me Ireland lambda is working.

Kasuhikdas avatar Nov 12 '18 18:11 Kasuhikdas

Ireland lambda and Language Skill English Uk? My developer account Country is Italy

paolonz82 avatar Nov 12 '18 18:11 paolonz82

My skill language is English us but I am accessing from India so Ireland is working.

On Tue, Nov 13, 2018, 1:02 AM paolonz82 <[email protected] wrote:

Ireland lambda and Language English Uk?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/alexa/alexa-smarthome/issues/89#issuecomment-437979591, or mute the thread https://github.com/notifications/unsubscribe-auth/AZoRDJQnqjx4byDAZnnNI_QuyqRZsjWFks5uubtAgaJpZM4X3Nfi .

Kasuhikdas avatar Nov 12 '18 20:11 Kasuhikdas

same here. All IDs double checked, tried Lamdas in US East and EU West, Lambdas tested working, but never called by the skill.

moonlitknight avatar Nov 12 '18 23:11 moonlitknight

@moonlitknight did you set arn in default region or geographical region? try to setting the lambda arn in both default and geographical region.

Kasuhikdas avatar Nov 13 '18 06:11 Kasuhikdas

@Kasuhikdas yes I tried that

moonlitknight avatar Nov 13 '18 07:11 moonlitknight

After leaving this overnight, it is now working with no changes from me. Additionally, a number of local devices which had suddenly stopped working 3 weeks ago have today started working again. This smells like an internal issue that Amazon have fixed.

pinoyyid avatar Nov 13 '18 09:11 pinoyyid

are there any news about this problem ? I have the same issue, Lambda function tests are OK, alse i can see the logs from lambda test but when I try to discover device in my app i get no new devices, even from test simulator, no logs in CloudWatch...just nothing. It looks like lambda function is not responding to skill call. I followed the instructions step by step and everything went smoothly until app device discover :/

lubols avatar Nov 23 '18 12:11 lubols

FYI - My fix for this problem:

My Echo and I are in the UK. I followed the instructions for skill-sample-python-smarthome-switch, creating the Lambda and DynamoDB in us-east-1. As others have found: Discovery does not discover, and the Lambda is not triggered.

My Fix: Skill - Add language, so it has English(US) and English(UK) - not sure if this is required. Lambda - Create the function in Ireland (eu-west-1). Skill - add the new Lambda's eu-west-1 ARN to the endpoint box for 'Europe, India'. DynamoDB - Create the table in in Ireland (eu-west-1). (Leaving the existing us-east-1 Lambda function and DynamoDB table seems not a problem).

Now discovery works. I say: Alexa, turn on/off sample switch. Looking at the DynamoDB "Items", I can see the value change between ON and OFF.

Why Ireland? It looks like London does not have support for Alexa.

andrew01144 avatar Feb 16 '19 11:02 andrew01144

I am having the exact same issue. Following the fix from andrew01144, I created lambda function in Ireland, and added language English UK but it didnt work

Then I added one more Lambdafunction in N. Virginia. So now I have three endpoints in (N.Virginia, Ireland and Oregon) Three languages (US, UK, AU)

After enabling the Skill, and starting discovery. None of the lambda functions in all three regions are invoked.

omernaeem avatar Oct 15 '19 09:10 omernaeem

For me Ireland lambda is working.

I live in India and my Alexa skill is in English (IN). As far as I understand, the skill's region is language-agnostic as it depends on where the Amazon developer account is based. I tried creating Lambda functions in us-east-1 and eu-west-1 matching it with Alexa skills created in English (IN) as well as English (US) (with the same Indian Amazon developer account though). While the eu-west-1 Lambda function is never triggered irrespective of the Alexa skill language, the us-east-1 function with either of the Alexa skills behaves weirdly, illustrated as follows:

  1. I ask Alexa to initiate a discovery request. My home server logs correctly show that the discover-devices endpoint was fired by the Lambda function linked with this skill.
  2. I ask Alexa to turn on the fan. There is no new log record on my home server stating that a request was made to turn the fan on. Hence the command seems to have done nothing.
  3. I ask Alexa to turn off the tubelight. My server logs show that the power-state-toggle endpoint was fired by the Lambda function, but to "turn on the fan" (evidently, this is the "previous" request in pt-2).
  4. I ask Alexa to turn off the fan. This time, just as in the pt-3 case, the logs show that the tubelight has been turned off (note: "turn off fan" request seems to be queued).
  5. Interestingly, if I now initiate another discovery request, my server logs show that it has received 2 requests one after the other:
    1. Turn off the fan (as requested in pt-4)
    2. Get the list of devices
  6. Any subsequent non-discovery request follows the same cycle as above.

I left a post here on Amazon Developer Forums fleeting hours ago which has been under moderation ever since.

Any idea guys?

theGeekyLad avatar Apr 03 '20 07:04 theGeekyLad

Same problem:

  • lamda hosted on eu-west-1
  • skill distributed in UK, IT, FR, DE, US
  • skill working in UK and IT
  • lambda not triggered when using a US account

Xyon75 avatar Jun 30 '21 16:06 Xyon75

The discovery process can potentially fail because of a mismatch between the account's PFM (Preferred market place), the skill locale, and the lambda endpoint region.

For example, if your skill locale includes en-US, if you want to make the discovery work for US customers, you should deploy the lambda function also in the us-east-1 region. If you want to test it, you also have to set the PFM of your dev account to US.

You can find additional information here: https://developer.amazon.com/en-US/blogs/alexa/device-makers/2023/07/smart-home-discovery-alexa-july-2023

dievaa avatar Oct 03 '23 10:10 dievaa