question

aadityaPatil avatar image
aadityaPatil asked

Alexa app takes voice command for device but not showing response

When i gave command "Turn on light" to discover device by my smart home skill, alexa replied "Ok" but not responding on (device) alexa app.

Request ->
{
    "directive": {
        "header": {
            "namespace": "Alexa.PowerController",
            "name": "TurnOn",
            "payloadVersion": "3",
            "messageId": "27180727-dbeb-48c4-8380-532a0110b3b8",
            "correlationToken": "AAAAAAAAAQDEhclB.."
        },
        "endpoint": {
            "scope": {
                "type": "BearerToken",
                "token": "Atza|IwEBIPmADjlvzL.."
            },
            "endpointId": "186405338088",
            "cookie": {}
        },
        "payload": {}
    }
}



Event->

{
    "event": {
        "header": {
            "namespace": "Alexa",
            "name": "Response",
            "messageId": "982a2d16-9f62-4368-ae9b-cd331cde0e48",
            "payloadVersion": "3",
            "correlationToken": "AAAAAAAAAQDEhc.."
        },
        "endpoint": {
            "scope": {
                "type": "BearerToken",
                "token": "Atza|IwEBIPmADjlvzL.."
            },
            "endpointId": "186405338088"
        },
        "payload": {}
    },
    "context": {
        "properties": [
            {
                "namespace": "Alexa.PowerController",
                "name": "powerState",
                "value": "ON",
                "timeOfSample": "2021-09-28T13:05:37.00Z",
                "uncertaintyInMilliseconds": 500
            }
        ]
    }
}

Please give any suggestions

alexaalexa smart home
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.

1 Answer

KirkC@Amazon avatar image
KirkC@Amazon answered

When you say "Alexa, turn on the light", your skill's back-end will be sent an Alexa.PowerController directive, just as you've outlined in your example JSON. It sounds like your skill is handling those requests correctly if Alexa is responding "OK".

However, the issue described where when looking at the device in the Alexa app, you're seeing "device not responding", is separate.

When you open the Alexa app and look at a particular device, Alexa will send your skill's back-end a ReportState directive every 3 seconds.

Your skill's back-end must respond to each and every ReportState directive with a StateReport event. If the skill's back-end is not responding to these ReportState directives at all, then you'll see a notice of "device not responding" in the Alexa app.

For more information about responding to ReportState directives, please see the following documentation:
https://developer.amazon.com/en-US/docs/alexa/device-apis/alexa-powercontroller.html#state-report

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.