Announcement: The Alexa Skills Community Is Moving To Stack Overflow

For improved usability and experience, Alexa skills related forum support will be transitioned to Stack Overflow. Effective January 10, 2024, the Amazon Developer Forums will no longer be available. For continued Alexa skills support you can reach out to us on Stack Overflow or via Contact Us.

question

Peter Varga avatar image
Peter Varga asked

How to create endpoint for Open/Close/Stop command?

Hi,
I would like to add a door to the devices that has a capability Open, Close, Stop.
I can't figure out the right syntax for Alexa endpoint that I need to use for discovery.
I can add a door/garage_door with open/close but when I adding the Stop than Alexa can't discover the device. Is it possible to do it with "interface": "Alexa.ModeController"?

Here is the discovery respond:

{

"event": {

"header": {

"namespace": "Alexa.Discovery",

"name": "Discover.Response",

"payloadVersion": "3",

"messageId": "45a8c36c-d177-4efe-a966-02aa35dc0128"

},

"payload": {

"endpoints": [

{

"endpointId": "Unique ID",

"friendlyName": "Test Garage Door",

"description": "parseTest Test Garage Door Garage Door Opener",

"manufacturerName": "BETA",

"displayCategories": [

"EXTERIOR_BLIND"

],

"capabilities": [

{

"type": "AlexaInterface",

"interface": "Alexa",

"version": "3"

},

{

"type": "AlexaInterface",

"interface": "Alexa.ModeController",

"instance": "GarageDoor.Position",

"version": "3",

"properties": {

"supported": [

{

"name": "mode"

}

],

"retrievable": true,

"proactivelyReported": true

},

"capabilityResources": {

"friendlyNames": [

{

"@type": "asset",

"value": {

"assetId": "Alexa.Setting.Mode"

}

}

]

},

"configuration": {

"ordered": false,

"supportedModes": [

{

"value": "Position.Up",

"modeResources": {

"friendlyNames": [

{

"@type": "asset",

"value": {

"assetId": "Alexa.Value.Open"

}

}

]

}

},

{

"value": "Position.Down",

"modeResources": {

"friendlyNames": [

{

"@type": "asset",

"value": {

"assetId": "Alexa.Value.Close"

}

}

]

}

}

]

},

"semantics": {

"actionMappings": [

{

"@type": "ActionsToDirective",

"actions": [

"Alexa.Actions.Close",

"Alexa.Actions.Lower"

],

"directive": {

"name": "SetMode",

"payload": {

"mode": "Position.Down"

}

}

},

{

"@type": "ActionsToDirective",

"actions": [

"Alexa.Actions.Open",

"Alexa.Actions.Raise"

],

"directive": {

"name": "SetMode",

"payload": {

"mode": "Position.Up"

}

}

}

],

"stateMappings": [

{

"@type": "StatesToValue",

"states": [

"Alexa.States.Closed"

],

"value": "Position.Down"

},

{

"@type": "StatesToValue",

"states": [

"Alexa.States.Open"

],

"value": "Position.Up"

}

]

}

}

]

}

]

}

}

}

device discovery
10 |5000

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

0 Answers