how to know which echo dot is calling my alexa service

77 views Asked by At

We are trying to build a alexa skill for our office building so that an echo dot is deployed at the entrance of each floor and help people identify the directions of washrooms and conference rooms and many other. We were sucessful in implementing it.

I would like know how can we utilize same service for multiple floors how can i know in alexa skill set from which echo dot my skill set is being called.

lets say if user ask for washroom directions. Alexa needs to identify he is in first floor and tell him to take left. if he is in second floor it needs to tell him take right.

Regards Kalyan

3

There are 3 answers

0
Bill On

If devices aren't going to move (ever or often), I would look at the Device ID.

Amazon recently added the Device ID (unique across all devices) to the LaunchRequest JSON payload.

{
  "session": {
    "new": true,
    "sessionId": "string",
    "application": {
      "applicationId": "string"
    },
  },
  "context": {
      "device": {
        "deviceId": "string",     
      },
  "request": {}
}  

I would have one Skill that looks at the requesting device ID (context.device.deviceId) and delivers the correct answer based on the context.

Obviously, you'd need to manage a mapping between floor and device ID, and update that if the device ever moves.

0
Vijayanath Viswanathan On

So far Alexa cannot identify the exact location. The only location it can find is the address linked with the account. I can think of 2 solutions.

Solution 1:- If the user asks for direction then your Alexa skill can ask a question back to the user that which floor they are in.

Solution 2:- You can create multiple skill sets for each echo in each floor. Say the echo in the first floor can provide directions for first floor and so on.

I would prefer Solution 1 as creating separately skill for each floor may not be a good idea. But if you don't want the user to input which floor they are in they go for solution 2.

0
Ron Lisle On

I had asked this question about a year ago during an Office Hours session with Amazon. I was told that their intention was to prevent Alexa from knowing much if anything about the device it was running on.

Since then Amazon has added limited capability to allow Alexa skills to know about the particular user and their device. It may be possible to map specific devices within a skill, but that sounds a bit tricky and fragile.

A more robust approach would be Vijayanath's solution 2 above. I believe this would also require that each Echo be on a separate account, though. I'm not aware of any way to deploy a skill to a specific device and not all the others.

I used this approach for a halloween costume last year to allow 2 dots sitting on my shoulders to respond differently to the same utterances (think of the scene from Animal House). With just 2 devices, this worked ok. Depending on how many devices you intend to have, this might be prohibitively cumbersome.