alexa-samples / alexa-smarthome

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

RangeController / ModeController don't work in FR #154

Closed Fotz closed 1 year ago

Fotz commented 4 years ago

Hi,

I got some issues since 1 month, I cannot control my blinds with the voice. Alexa clearly detect my devices, and I can easily control it with the Alexa App.

But when I ask to Alexa to open / close / raise or anything, she only say me that the device don't have this abilities.

I can't figure why :(

Did someone got / solve this problem ?

Here my discover response

 {
    "event": {
        "header": {
            "name": "Discover.Response",
            "namespace": "Alexa.Discovery",
            "payloadVersion": "3",
            "messageId": "fd7df7c9-ca22-47a2-b954-b3dabade20bb"
        },
        "payload": {
            "endpoints": [
                {
                    "endpointId": "wago-ihm-iot-4",
                    "manufacturerName": "WAGO IHM",
                    "friendlyName": "Volet salon",
                    "description": "Volet simple (Up/Down)",
                    "displayCategories": [
                        "EXTERIOR_BLIND"
                    ],
                    "capabilities": [
                        {
                            "type": "AlexaInterface",
                            "interface": "Alexa.ModeController",
                            "version": "3",
                            "instance": "Blinds.Position",
                            "properties": {
                                "supported": [
                                    {
                                        "name": "mode"
                                    }
                                ],
                                "retrievable": true,
                                "proactivelyReported": true
                            },
                            "capabilityResources": {
                                "friendlyNames": [
                                    {
                                        "@type": "asset",
                                        "value": {
                                            "assetId": "Alexa.Setting.Opening",
                                            "locale": "fr-FR"
                                        }
                                    }
                                ]
                            },
                            "configuration": {
                                "ordered": false,
                                "supportedModes": [
                                    {
                                        "value": "Position.Up",
                                        "modeResources": {
                                            "friendlyNames": [
                                                {
                                                    "@type": "asset",
                                                    "value": {
                                                        "assetId": "Alexa.Value.Open",
                                                        "locale": "fr-FR"
                                                    }
                                                }
                                            ]
                                        }
                                    },
                                    {
                                        "value": "Position.Down",
                                        "modeResources": {
                                            "friendlyNames": [
                                                {
                                                    "@type": "asset",
                                                    "value": {
                                                        "assetId": "Alexa.Value.Close",
                                                        "locale": "fr-FR"
                                                    }
                                                }
                                            ]
                                        }
                                    }
                                ]
                            },
                            "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"
                                    }
                                ]
                            }
                        },
                        {
                            "type": "AlexaInterface",
                            "interface": "Alexa",
                            "version": "3"
                        },
                        {
                            "type": "AlexaInterface",
                            "interface": "Alexa.EndpointHealth",
                            "version": "3",
                            "properties": {
                                "supported": [
                                    {
                                        "name": "connectivity"
                                    }
                                ],
                                "proactivelyReported": true,
                                "retrievable": true
                            }
                        }
                    ],
                    "cookie": {}
                },
                {
                    "endpointId": "wago-ihm-iot-3",
                    "manufacturerName": "WAGO IHM",
                    "friendlyName": "Volet bureau",
                    "description": "Volet complet (Position)",
                    "displayCategories": [
                        "EXTERIOR_BLIND"
                    ],
                    "capabilities": [
                        {
                            "type": "AlexaInterface",
                            "interface": "Alexa.RangeController",
                            "version": "3",
                            "instance": "Blind.Lift",
                            "properties": {
                                "supported": [
                                    {
                                        "name": "rangeValue"
                                    }
                                ],
                                "proactivelyReported": true,
                                "retrievable": true
                            },
                            "capabilityResources": {
                                "friendlyNames": [
                                    {
                                        "@type": "asset",
                                        "value": {
                                            "assetId": "Alexa.Setting.Opening",
                                            "locale": "fr-FR"
                                        }
                                    }
                                ]
                            },
                            "configuration": {
                                "supportedRange": {
                                    "minimumValue": 0,
                                    "maximumValue": 100,
                                    "precision": 1
                                },
                                "unitOfMeasure": "Alexa.Unit.Percent"
                            },
                            "semantics": {
                                "actionMappings": [
                                    {
                                        "@type": "ActionsToDirective",
                                        "actions": [
                                            "Alexa.Actions.Close"
                                        ],
                                        "directive": {
                                            "name": "SetRangeValue",
                                            "payload": {
                                                "rangeValue": 0
                                            }
                                        }
                                    },
                                    {
                                        "@type": "ActionsToDirective",
                                        "actions": [
                                            "Alexa.Actions.Open"
                                        ],
                                        "directive": {
                                            "name": "SetRangeValue",
                                            "payload": {
                                                "rangeValue": 100
                                            }
                                        }
                                    },
                                    {
                                        "@type": "ActionsToDirective",
                                        "actions": [
                                            "Alexa.Actions.Lower"
                                        ],
                                        "directive": {
                                            "name": "AdjustRangeValue",
                                            "payload": {
                                                "rangeValueDelta": -25,
                                                "rangeValueDeltaDefault": false
                                            }
                                        }
                                    },
                                    {
                                        "@type": "ActionsToDirective",
                                        "actions": [
                                            "Alexa.Actions.Raise"
                                        ],
                                        "directive": {
                                            "name": "AdjustRangeValue",
                                            "payload": {
                                                "rangeValueDelta": 25,
                                                "rangeValueDeltaDefault": false
                                            }
                                        }
                                    }
                                ],
                                "stateMappings": [
                                    {
                                        "@type": "StatesToValue",
                                        "states": [
                                            "Alexa.States.Closed"
                                        ],
                                        "value": 0
                                    },
                                    {
                                        "@type": "StatesToRange",
                                        "states": [
                                            "Alexa.States.Open"
                                        ],
                                        "range": {
                                            "minimumValue": 1,
                                            "maximumValue": 100
                                        }
                                    }
                                ]
                            }
                        },
                        {
                            "type": "AlexaInterface",
                            "interface": "Alexa",
                            "version": "3"
                        },
                        {
                            "type": "AlexaInterface",
                            "interface": "Alexa.EndpointHealth",
                            "version": "3",
                            "properties": {
                                "supported": [
                                    {
                                        "name": "connectivity"
                                    }
                                ],
                                "proactivelyReported": true,
                                "retrievable": true
                            }
                        }
                    ],
                    "cookie": {}
                }
            ]
        }
    }
}
aszk commented 1 year ago

I'd recommend contacting us via https://alexa.design/contactus with activity keys.

To get activity keys:

  1. Activate Alexa with your skill's invocation name. Please do this couple of times so that we can get couple of activity keys.
  2. Please log in to your developer account.
  3. go to https://alexa.amazon.fr/spa/index.html#settings/dialogs (The link you need to use may be different depending on where your account is registered.)
  4. Copy the url for each utterance. This link may be helpful. https://github.com/alexa/alexa-smarthome/wiki/How-to-get-utterance-activity-keys