Alexa.EndpointHealth Interface 3.1


Implement the Alexa.EndpointHealth interface in your Alexa skill so that you can report the detected health of devices to Alexa. When a device encounters an issue, you report the reason so that Alexa can inform the customer of device degradation, such as connectivity failure due to Wi-Fi password change.

You implement the Alexa.EndpointHealth interface with other interfaces that provide functionality for your device. For example, if your device is a thermostat, you implement Alexa.ThermostatController so the user can control the thermostat, Alexa.TemperatureSensor so the thermostat can sense and report temperature, and Alexa.EndpointHealth so that you can report the connectivity status of the thermostat.

For the list of languages that the Alexa.EndpointHealth interface supports, see List of Alexa Interfaces and Supported Languages. For the definitions of the message properties, see Alexa Interface Message and Property Reference.

Utterances

The Alexa.EndpointHealth interface doesn't have any user utterances. Instead, when the user tries to control their device, Alexa responds with information about the health of the device. For example, when a skill reports that a plug is unreachable and the user tries to turn on the plug, Alexa responds with "Plug isn't responding. Please check your network connection and power supply."

Reportable properties

The Alexa.EndpointHealth interface includes the following reportable property.

Connectivity property

The Connectivity property represents the connectivity status of a device. Connectivity is a required property.

When you report UNREACHABLE, Alexa responds to a request to control the device with a response similar to the following examples. The connectivity failure reason isn't given in the response.

device name isn't responding. Please check its network connection and power supply.
device name isn't responding.

device name مَا يَسْتَجِيب. يَالِيت تتأكد من اتصاله بالشبكة ومصدر طاقته
device name مَا يَسْتَجِيب

device name ne répond pas. Veuillez vérifier sa connexion réseau et son alimentation.
device name ne répond pas.

device name antwortet nicht. Bitte überprüfe die Netzwerkverbindung und Stromversorgung des Geräts.
device name reagiert gerade nicht.

device name से कनेक्शन नहीं हो पा रहा है. कृपया उसका नेटवर्क कनेक्शन और पावर सप्लाई ठीक से देख लें
device name से कनेक्शन नहीं हो पा रहा

device name non risponde. Verifica connessione di rete e alimentazione.
Il dispositivo device name non risponde.

device name から応答がありません。ネットワークの接続と、電源を確認してください。
device name から応答がありません。

apparaat naam reageert niet. Controleer de netwerkverbinding en stroomvoorziening.
apparaat naam reageert niet.

device name não está respondendo. Verifique a sua conexão de rede e fonte de alimentação.
device name não está respondendo.

device name no responde. Revisa la conexión de red y el suministro de alimentación del dispositivo.
device name no responde.

The following example shows an unreachable device.

Copied to clipboard.

{
    "name": "connectivity",
    "value": {
        "value": "UNREACHABLE",
        "reason": "WIFI_BAD_PASSWORD"
    }
}

The connectivity property is an object that contains the following fields.

Field Description Type
value The connectivity status of the device.
Valid values: OK, UNREACHABLE.
String
reason (Optional) When the device is unreachable, this property gives the failure reason.
For valid values, see connectivity reasons.
String

Connectivity reason values

The following table shows the valid values, descriptions, and possible resolutions for each connectivity failure reason.

Value Description
WIFI_BAD_PASSWORD The device failed to connect to Wi-Fi due to a bad password.
WIFI_AP_NOT_FOUND The device can't find the Wi-Fi access point. The device might be too far from the router or near another device that causes interference, such as a baby monitor, microwave, or other electronic device.
WIFI_ROUTER_UNREACHABLE The device can't send data to the router, or receive data from the router. The internet might be down or the router might need a reboot.
WIFI_AP_CHANNEL_QUALITY_LOW The device can connect to the access point, but the channel quality is low.
INTERNET_UNREACHABLE The device can connect to the access point, but doesn't have internet access. The router or device might need a reboot, or the internet might be down.
CAPTIVE_PORTAL_CHECK_FAILED The device is trying to connect to a captive portal. The interface doesn't support captive portals. Airports and hotels commonly use captive portal networks. These networks ask the user to agree to specific terms before connecting to the network. The customer must select a different network.
UNKNOWN The reason for connectivity failure isn't known.

Discovery

You describe endpoints that support the Alexa.EndpointHealth interface by using the standard discovery mechanism described in Alexa.Discovery.

Set retrievable to true for all the properties that you report when Alexa sends your skill a state report request. Set proactivelyReported to true for properties that you proactively report to Alexa in a change report. When you implement Alexa.EndpointHealth, set retrievable to true and proactivelyReported to true for the properties that you support.

Discover response example

The following example shows a Discover.Response message for an endpoint that supports the Alexa.EndpointHealth and Alexa.LockController interfaces.

Copied to clipboard.

{
    "event": {
        "header": {
            "namespace": "Alexa.Discovery",
            "name": "Discover.Response",
            "payloadVersion": "3",
            "messageId": "Unique identifier, preferably a version 4 UUID"
        },
        "payload": {
            "endpoints": [{
                "endpointId": "Unique ID of the endpoint",
                "manufacturerName": "Sample Manufacturer",
                "description": "Description to be shown in the Alexa app",
                "friendlyName": "Your device name, displayed in the Alexa app, for example Front Door>",
                "displayCategories": ["SMARTLOCK"],
                "additionalAttributes": {
                    "manufacturer": "Sample Manufacturer",
                    "model": "Sample Model",
                    "serialNumber": "Serial number of the device",
                    "firmwareVersion": "Firmware version of the device",
                    "softwareVersion": "Software version of the device",
                    "customIdentifier": "Optional custom identifier for the device"
                },
                "cookie": {},
                "capabilities": [{
                        "type": "AlexaInterface",
                        "interface": "Alexa.LockController",
                        "version": "3",
                        "properties": {
                            "supported": [{
                                "name": "lockState"
                            }],
                            "proactivelyReported": true,
                            "retrievable": true
                        }
                    },
                    {
                        "type": "AlexaInterface",
                        "interface": "Alexa.EndpointHealth",
                        "version": "3.1",
                        "properties": {
                            "supported": [{
                                    "name": "connectivity"
                                }
                            ],
                            "proactivelyReported": true,
                            "retrievable": true
                        }
                    },
                    {
                        "type": "AlexaInterface",
                        "interface": "Alexa",
                        "version": "3"
                    }
                ]
            }]
        }
    }
}

Directives

The Alexa.EndpointHealth interface doesn't define any directives itself. When you implement Alexa.EndpointHealth, you must include the connectivity property when you respond to directives defined by other interfaces.

Directive response event example

In the following examples, a device supports the Alexa.PowerController and Alexa.EndpointHealth interfaces, and is sending an Alexa.Response to the Alexa.PowerController.TurnOn directive.

State reporting

Alexa sends a Alexa.ReportState directive to request information about the state of an endpoint. When Alexa sends a Alexa.ReportState directive, you send a Alexa.StateReport event in response. The response contains the current state of all retrievable properties in the context object. You identify your retrievable properties in your discovery response. For details about state reports, see Understand State and Change Reporting.

When you implement Alexa.EndpointHealth, include the connectivity property in your Alexa.StateReport.

StateReport response example

The following example shows a Alexa.StateReport for an endpoint that supports the Alexa.EndpointHealth, Alexa.ThermostatController, and Alexa.TemperatureSensor interfaces.

Change reporting

To report changes proactively in the state of an endpoint, you send a Alexa.ChangeReport event. You identify the properties that you report proactively in your discovery response. For details about change reports, see Understand State and Change Reporting.

When you implement Alexa.EndpointHealth, include the connectivity property in your Alexa.ChangeReport. If the value of the connectivity property has changed, put it in the payload field. If the value of the connectivity property hasn't changed, put it in the context field.

Report unchanged device health

The following example shows a Alexa.ChangeReport for an endpoint that supports the Alexa.EndpointHealth and Alexa.LockController interfaces. In this change report, only the lockState property value changed.

Report changed device health

The following example shows a Alexa.ChangeReport for an endpoint that supports the Alexa.EndpointHealth and Alexa.LockController interfaces. In this change report, the value of the connectivity property changed.


Was this page helpful?

Last updated: Aug 29, 2024