1

During Alexa discovery process, we need to send device details and their capabilities. I am sending light and fan details. Light gets showed up in Alexa App but not the fan. Can you please help me to find what I am doing wrong with the following response.

I used this Alexa documentation for creating response. https://developer.amazon.com/docs/smarthome/connect-a-tower-fan-to-alexa.html

{
    "event": {
        "header": {
            "namespace": "Alexa.Discovery",
            "name": "Discover.Response",
            "payloadVersion": "3",
            "messageId": "somd-id"
        },
        "payload": {
            "endpoints": [
                {
                    "endpointId": "fan-i",
                    "friendlyName": "Fan",
                    "description": "Fan",
                    "manufacturerName": "Fan",
                    "displayCategories": [
                        "OTHER"
                    ],
                    "cookie": {},
                    "capabilities": [
                        {
                            "type": "AlexaInterface",
                            "interface": "Alexa.PowerController",
                            "version": "3",
                            "properties": {
                                "supported": [
                                    {
                                        "name": "powerState"
                                    }
                                ],
                                "proactivelyReported": true,
                                "retrievable": true
                            }
                        },
                        {
                            "type": "AlexaInterface",
                            "interface": "Alexa.RangeController",
                            "version": "3",
                            "instance": "speed",
                            "capabilityResources": {
                                "friendlyNames": [
                                    {
                                        "@type": "asset",
                                        "value": {
                                            "assetId": "Alexa.Setting.FanSpeed"
                                        }
                                    }
                                ]
                            },
                            "properties": {
                                "supported": [
                                    {
                                        "name": "rangeValue"
                                    }
                                ],
                                "proactivelyReported": true,
                                "retrievable": true
                            },
                            "configuration": {
                                "supportedRange": {
                                    "minimumValue": 1,
                                    "maximumValue": 5,
                                    "precision": 1
                                },
                                "presets": [
                                    {
                                        "rangeValue": 1,
                                        "presetResources": {
                                            "friendlyNames": [
                                                {
                                                    "@type": "asset",
                                                    "value": {
                                                        "assetId": "Alexa.Value.Minimum"
                                                    }
                                                },
                                                {
                                                    "@type": "asset",
                                                    "value": {
                                                        "assetId": "Alexa.Value.Low"
                                                    }
                                                }
                                            ]
                                        }
                                    },
                                    {
                                        "rangeValue": 5,
                                        "presetResources": {
                                            "friendlyNames": [
                                                {
                                                    "@type": "asset",
                                                    "value": {
                                                        "assetId": "Alexa.Value.Maximum"
                                                    }
                                                },
                                                {
                                                    "@type": "asset",
                                                    "value": {
                                                        "assetId": "Alexa.Value.High"
                                                    }
                                                }
                                            ]
                                        }
                                    },
                                    {
                                        "rangeValue": 3,
                                        "presetResources": {
                                            "friendlyNames": [
                                                {
                                                    "@type": "asset",
                                                    "value": {
                                                        "assetId": "Alexa.Value.Medium"
                                                    }
                                                }
                                            ]
                                        }
                                    }
                                ]
                            }
                        },
                        {
                            "type": "AlexaInterface",
                            "interface": "Alexa",
                            "version": "3"
                        }
                    ]
                },
            ]
        }
    }
}

Note: I am just repeating above question below because StackOverflow doesn't allow so much code to be pasted with less description.

During Alexa discovery process, we need to send device details and their capabilities. I am sending light and fan details. Light gets showed up in Alexa App but not the fan. Can you please help me to find what I am doing wrong with the following response.

Pavan Kumar
  • 1,715
  • 1
  • 24
  • 48

1 Answers1

1

I think Alexa.RangeController is currently restricted to US region. So if you are trying to discover devices registered to account outside US, then it looks like that Alexa simply ignores the discovery response with RangeController interface. The way I got around this problem is by switching the user account to US and the device appeared immediately. Give it a try and if you a better solution then please do share.

Karan
  • 11
  • 2