Hi all,
I followed the following example to get a working SmartHome skill for a Switch:
https://github.com/alexa-samples/skill-sample-python-smarthome-switch
I am now trying to create a SmartHome skill for a Doorbell, so I changed the lambda function's endpoint capability specification from the example to this:
if namespace == 'Alexa.Discovery': if name == 'Discover': adr = AlexaResponse(namespace='Alexa.Discovery', name='Discover.Response') capability_alexa = adr.create_payload_endpoint_capability() capability_alexa_doorbelleventsource = adr.create_payload_endpoint_capability( interface='Alexa.DoorbellEventSource', proactivelyReported=True) adr.add_payload_endpoint( friendly_name='Sample DoorbellEventSource', endpoint_id='sample-doorbell-01', displayCategories=["DOORBELL"], capabilities=[capability_alexa, capability_alexa_doorbelleventsource]) return send_response(adr.get())
This is the JSON response from the lambda function:
{ "event": { "header": { "namespace": "Alexa.Discovery", "name": "Discover.Response", "messageId": "d7afa78e-6d7a-4681-a836-3da796e0e3e0", "payloadVersion": "3" }, "payload": { "endpoints": [ { "capabilities": [ { "type": "AlexaInterface", "interface": "Alexa", "version": "3", "properties": { "proactivelyReported": true } }, { "type": "AlexaInterface", "interface": "Alexa.DoorbellEventSource", "version": "3", "properties": { "proactivelyReported": true } } ], "description": "Sample Endpoint Description", "displayCategories": [ "DOORBELL" ], "endpointId": "sample-doorbell-01", "friendlyName": "Sample DoorbellEventSource", "manufacturerName": "Sample Manufacturer" } ] } } }
But Alexa can't discover any devices from this skill. I don't think this is not a problem with the region because if I change the interface type back to Alexa.PowerController (with other related changes), device discovery works fine, but in any case, if it is relevant, I am using "Ireland" since I am located in Germany.