question

ironman_bby avatar image
ironman_bby asked

Alexa Smart Home Skill - Skill Disable

Hi team,

We are supporting both Alexa as well as Google Smart Home skills for our wifi enabled plugs. In Google, we used to receive an intent (a REST call from Google) whenever user unlinks our skill, so we cleanup our records for the user & stop sending Report State for Google.

Refer: https://developers.google.com/actions/smarthome/create#actiondevicesdisconnect

As of our understanding, Alexa is not notifying us whenever the skill is disabled/unliked.

Though the user disables the skill, we are still sending ChangeReport events to Alexa gateway since we are not aware whether the skill is disabled.

Is there a way Alexa can notify us about user disabling our skill. If not, could you please consider implementing something like Google did ?

skillalexa smart homelambdasmart homegoogle cloud platform
10 |5000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

chris185 avatar image
chris185 answered
10 |5000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

ironman_bby avatar image
ironman_bby answered

Thanks for the immediate response !

I have few more questions.

1. Is this applicable for Smart Home Skills also ? Or is it only for Custom skills. We are using the Smart home skills

2. What is the "userId" mentioned in "Skill Disabled Event" documentation u shared. We are not sharing anything like userId to Amazon in Discovery or any other request. Will that be shared by Alexa to us for every user ?

10 |5000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

chris185 avatar image
chris185 answered

Hi,

1. I think so, you must implement Events in your Skill manifest with the ASK CLI. Try it and log the event for disabled-event to cloudwatch to see if it is working.

2. The userid is an unique id for every user who enables your skill and is sented in every request. You can use it to identify the user for example in your database.

Regards

Christoph

10 |5000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Josef avatar image
Josef answered

Hi @ironman_bby,

I am facing the exact same problem. I am still sending ChangeReports to Alexa's event gateway, although the user has already disabled the skill. Could you make it work?

Thanks and best regards,
Josef

1 comment
10 |5000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Hi @Josef and thank you for your message.

If the user has already disabled the skill and you have not set up the skill events in your manifest, then you will need to manually remove the user from the database where you stored their information.

Regards,
Barry

0 Likes 0 ·
himanish@swidget avatar image
himanish@swidget answered

@barry@amazon I have tried adding the events property with { eventName: "SKILL_DISABLED" } to my manifest and using ask smapi update-skill-manifest command. It executes successfully but when I check the manifest after the update using ask smapi get-skill-manifest, I see that the events property was not added to the manifest.

Is this because my skill is a smart home skill? If so, how else can my skill be notified about the skill disabling?

3 comments
10 |5000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Hi @himanish@swidget and thanks for posting.

Can you please give me your skill ID so I can look further into this?

Regards,
Barry

0 Likes 0 ·
himanish@swidget avatar image himanish@swidget Amazon_Bernardo Bezerra ♦♦ ·

Hi @barry@amazon, this is my skill ID for the development stage: amzn1.ask.skill.d5b23c3b-143f-4fb2-871b-c6d55e8225a2

0 Likes 0 ·

Hello @himanish@swidget and thanks for the additional information.

I can see that you are hosting your backend in Lambda. In order for your code to receive notifications about enablements and disablements, you will need to add another trigger to your function. In addition to the Alexa Smart Home trigger, you need to include an Alexa Skills Kit trigger and use the same skill ID for both (amzn1.ask.skill.d5b23c3b-143f-4fb2-871b-c6d55e8225a2 in your case). Also, ensure that your code has a handler for requests of the type skill events. If your manifest is formatted properly, you will start receiving such requests.

Regards,
Barry

0 Likes 0 ·