alexa-smart-home-skill

Thermostat is not discovered by Alexa


Alexa cannot discover thermostats I add to my custom smart home skill. I was able to add thermostats in the past (the last time was two years ago) and I can discover other device-types (like lamps). So I assume, there is nothing wrong with my general response.

This is the JSON response:

{
"event": {
    "endpoint": {
        "scope": {
            "type": "BearerToken",
            "token": ""
        }
    },
    "payload": {
        "endpoints": [
            {
                "displayCategories": [
                    "THERMOSTAT"
                ],
                "modelName": "tdog",
                "capabilities": [
                    {
                        "configuration": {
                            "supportedModes": [
                                "HEAT",
                                "COOL"
                            ]
                        },
                        "type": "AlexaInterface",
                        "interface": "Alexa.ThermostatController",
                        "version": "3.2",
                        "properties": {
                            "retrievable": true,
                            "proactivelyReported": true,
                            "supported": [
                                {
                                    "name": "targetSetpoint"
                                },
                                {
                                    "name": "thermostatMode"
                                }
                            ]
                        }
                    }
                ],
                "cookie": {},
                "endpointId": "tdog_24",
                "manufacturerName": "T-Dog Corporation",
                "description": "",
                "friendlyName": "kinderzimmerThermostat"
            }
        ]
    },
    "header": {
        "payloadVersion": "3",
        "name": "Discover.Response",
        "namespace": "Alexa.Discovery",
        "messageId": "6cf91703-7450-4daa-954f-812c0083dfa5"
    }
}
}

Solution

  • Thank you for providing your "Discover.Response" JSON. Reviewing that, I noticed that the "description" value was an empty string "". The "description" is a required value and if omitted, your device will not show up during device discovery.

    It looks like that's the only thing that's missing though so all you need to do is populate "description" with a value like "Single Setpoint Smart Thermostat by T-Dog Corporation" and your thermostat should then show up without issue.

    {
        "event": {
            "endpoint": {
                "scope": {
                    "token": "redacted",
                    "type": "BearerToken"
                }
            },
            "header": {
                "messageId": "6cf91703-7450-4daa-954f-812c0083dfa5",
                "name": "Discover.Response",
                "namespace": "Alexa.Discovery",
                "payloadVersion": "3"
            },
            "payload": {
                "endpoints": [
                    {
                        "capabilities": [
                            {
                                "configuration": {
                                    "supportedModes": [
                                        "HEAT",
                                        "COOL"
                                    ]
                                },
                                "interface": "Alexa.ThermostatController",
                                "properties": {
                                    "proactivelyReported": true,
                                    "retrievable": true,
                                    "supported": [
                                        {
                                            "name": "targetSetpoint"
                                        },
                                        {
                                            "name": "thermostatMode"
                                        }
                                    ]
                                },
                                "type": "AlexaInterface",
                                "version": "3.2"
                            }
                        ],
                        "cookie": {},
                        "description": "Single Setpoint Smart Thermostat by T-Dog Corporation",
                        "displayCategories": [
                            "THERMOSTAT"
                        ],
                        "endpointId": "tdog_24",
                        "friendlyName": "kinderzimmerThermostat",
                        "manufacturerName": "T-Dog Corporation",
                        "modelName": "tdog"
                    }
                ]
            }
        }
    }