My lambda receives the following alexa discovery directive
{'directive': {'header': {'namespace': 'Alexa.Discovery', 'name': 'Discover', 'payloadVersion': '3', 'messageId': 'messageid123'}, 'payload': {'scope': {'type': 'BearerToken', 'token': 'blablablablablablablablablabla'}}}}
and my lambda sends the following response
{ "event": { "header": { "namespace": "Alexa.Discovery", "name": "Discover.Response", "payloadVersion": "3", "messageId": "messageid123" }, "payload": { "endpoints": [ { "endpointId": "mylock123", "manufacturerName": "Big locks", "description": "big lock One", "friendlyName": "big lock one", "displayCategories": [ "SMARTLOCK" ], "additionalAttributes": { "manufacturer": "Custom lock", "model": "Model m234" }, "cookie": { "model": "abcd01", "manufacturer": "magiclocks" }, "capabilities": [ { "type": "AlexaInterface", "interface": "Alexa.LockController", "version": "3", "properties": { "supported": [ { "name": "lockState" } ], "proactivelyReported": true, "retrievable": true } } ], "connections": [], "relationships": {} } ] } } }
and alexa.amazon.com webpage is NOT recognizing the new device at all even after clicking the discovery button?
My questions
- Should the discovery response messageid 'messageid123' be same as the discovery directive message from alexa? I have tried using both a unique message id as well the same id. but the device is not getting added
- I'm testing using alexa.amazon.com website and clicking on discovery button. Is this ok?
- Does there need to be an actual device present in the same network as alexa? or alexa will just add whatever response we send and will consider it as a newly found device?
- Please note my alexa skills's lambda gets the discovery directive when I press DISCOVER button on alexa.amazon.com