alexa-samples / alexa-smarthome

Resources for Alexa Smart Home developers.
https://alexa.design/smarthome
Other
680 stars 336 forks source link

SceneController: ActivationStarted response "Sorry ... is not responding" #146

Closed matespi closed 9 months ago

matespi commented 4 years ago

The scene is correctly added and activated, but the response to the activation directive (ActivationStarted) returns "400 malformed". Currently the reply json is sent asynchronously and is as follows:

{
    "context": {
        "properties": [
            {
                "uncertaintyInMilliseconds": 200,
                "name": "connectivity",
                "timeOfSample": "<time>",
                "value": {
                    "value": "OK"
                },
                "namespace": "Alexa.EndpointHealth"
            }
        ]
    },
    "event": {
        "endpoint": {
            "scope": {
                "token": "<AccessToken>",
                "type": "BearerToken"
            },
            "endpointId": "Scene-Id"
        },
        "header": {
            "messageId": "abc-123-def-456",
            "correlationToken": "<correlation-toke n>",
            "payloadVersion": "3",
            "namespace": "Alexa.SceneController",
            "name": "ActivationStarted"
        },
        "payload": {
            "timestamp": "<time>",
            "cause": {
                "type": "VOICE_INTERACTION"
            }
        }
    }
}

I read that the SceneController interface does not support deferred response here, so currently the skill does not return anything synchronously. I am pretty sure the asynchronous response is sent within 5 seconds. The status code suggests that there is an error in the response json that I can't find comparing it with the documentation here. Can anyone help me find what im missing?

aszk commented 10 months ago

Can I get the actual response you sent? I assume time stamp format might be wrong. You need to follow ISO 8601 timestamp format. I also need to mention that context should be empty.

aszk commented 9 months ago

Closing due to inactivity.