question

Roland Heumesser avatar image
Roland Heumesser asked

Documentation on Alexa.ContactSensor wrong?

Hi,

Documentation of ChangeReport for Alexa.ContactSensor seems to be wrong.

Although my ChangeReport is almost identical the Log in AlexaDeveloperConsole shows an error. So what's wrong here?

{
"header": {
"namespace": "SkillDebugger",
"name": "CaptureDebuggingInfo",
"messageId": "cabd3b0d-defc-4ab2-b6fc-eee0b395debb"
},
"payload": {
"skillId": "amzn1.ask.skill.f6ed277a-9ad6-47c0-bb42-1bea1046b362",
"timestamp": "2020-04-24T05:10:18.662Z",
"dialogRequestId": null,
"skillRequestId": null,
"type": "SmartHomeChangeReportFailure",
"content": {
"errors": [
{
"code": "INVALID_PROPERTY",
"message": "Invalid property: Alexa.ContactSensor."
}
],
"changeReport": {
"event": {
"header": {
"namespace": "Alexa",
"name": "ChangeReport",
"messageId": "c5f38534-2a73-42da-855c-ea2a0f7a7c55",
"payloadVersion": "3"
},
"endpoint": {
"endpointId": "FensterKontakt20050F338D",
"scope": null
},
"payload": {
"change": {
"cause": {
"type": "PHYSICAL_INTERACTION"
},
"properties": [
{
"name": "detectionState",
"namespace": "Alexa.ContactSensor",
"timeOfSample": "2020-04-24T05:10:16.912Z",
"uncertaintyInMilliseconds": 0,
"value": {
"value": "DETECTED"
}
},
{
"name": "connectivity",
"namespace": "Alexa.EndpointHealth",
"timeOfSample": "2020-04-24T05:10:16.912Z",
"uncertaintyInMilliseconds": 0,
"value": {
"value": "OK"
}
}
]
}
}
},
"context": {
"properties": [
{
"name": "detectionState",
"namespace": "Alexa.ContactSensor",
"timeOfSample": "2020-04-24T05:10:16.912Z",
"uncertaintyInMilliseconds": 0,
"value": {
"value": "DETECTED"
}
},
{
"name": "connectivity",
"namespace": "Alexa.EndpointHealth",
"timeOfSample": "2020-04-24T05:10:16.912Z",
"uncertaintyInMilliseconds": 0,
"value": {
"value": "OK"
}
}
]
}
}
}
}
}

certificationdocumentationchangereport
10 |5000

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

Phil McGee avatar image
Phil McGee answered

What locale are you in? Alexa.ContactSensor only work in en-US and en-CA. See https://developer.amazon.com/en-US/docs/alexa/device-apis/list-of-interfaces.html

10 |5000

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

Roland Heumesser avatar image
Roland Heumesser answered

In fact the documentation is really wrong. Meanwhile I figured out the wrong part.
If I provide value : "OK" instead of value: { value :"OK" } it works.

10 |5000

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