question

newuser-fb2bd705-16bc-4302-980f-9e420ae0c058 avatar image
newuser-fb2bd705-16bc-4302-980f-9e420ae0c058 asked ·

Can a Smart Home Device trigger a conversation?

We have written some prototype skill code, run through the Alexa Gadgets tutorial and the Alexa Built-in tutorial on Raspberry Pi and we are aware of but have not played with the Alexa Connect Kit, so starting to understand the options a little.

It seems that the Smart Home API may be able to do what we need without us having to write fully customized skills and the fact that a user doesn't have to remember a skill invocation name is a sweet benefit.

Before we dive in too deeply I want to ask if its possible for a Smart Home device to trigger a conversation - e.g.

  1. a motion sensor triggers and sends an async event to AVS
  2. this event is passed onto our associated skill and a voice output is sent to an associated alexa device
  3. if necessary a multiple conversation can take place, i.e. as if a skill was opened on that alexa device

Questions:

  • can this be done? If so are there any limitations to starting the conversation on an associated alexa device
  • if it can be done and there are multiple alexa devices in the home how can our skill decide which alexa device to use? e.g. can we have a default alexa device attached to that that smart home device? For example if the front door switch is triggered can we know to use the alexa in the hallway and not the alexa in the bedroom?




alexa skills kitsmart-home
10 |2000 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.

Amazon_Bernardo Bezerra avatar image
Amazon_Bernardo Bezerra answered ·

Hello and thank you for your message.

The feature that you described is not currently available. I would suggest you post it on our Uservoice space over here so that other developer might also upvote it.

Regards,
Barry

10 |2000 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.

newuser-fb2bd705-16bc-4302-980f-9e420ae0c058 avatar image
newuser-fb2bd705-16bc-4302-980f-9e420ae0c058 answered ·

After some more prototyping it turns out that it can be done by using the CONTACTSENSOR event to trigger a skill. It does require the user to configure a routine between the contact sensor and the alexa skill, but apart from that it works pretty well.

The facts that a skill can only be launched and given no context or a pre-done phrase (see alexa.uservoice.com for discussion) can be overcome if the skill retrieves the context from the smart devices cloud service. i.e. cloud service knows the context of the contactsensor signal

Still a prototype investigation - but seems possible. At the moment just trying to see if I can link the user_id of the skill invocation to the userid of the smarthome device -- they are the same user but its not clear that they are using the same user id - a security feature?



1 comment
10 |2000 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.

Hello and thank you for your message.

A Routine linked to a contact sensor can trigger Alexa to launch a skill and you will be able to have a conversation with Alexa in that context.

For smart home skills, your endpoint will not receive a user ID, but a token instead. With that token, you can retrieve information from your user that you can then use to sync with information retrieved with your skill's custom model.

Regards,
Barry

0 Likes 0 ·