question

Nathan avatar image
Nathan asked

Alexa Voice Pin: Door lock

We are currently developing a "Smart Home Skill v3" in which we would like to control a door lock. Unfortunately using the online example we have been unable to control door locks. We can discover the lock but once paired it displays the following:

We can pair and control other devices with no issues for example the "power controller" capability.

The following is the capability endpoint response for discovery of the door lock capable device:

	{
            "endpointId": "1365d5a4-3e2d-40eb-8408-e094bf9073f4",
            "friendlyName": "Door Lock",
            "description": "Door Lock",
            "manufacturerName": "Doorlock",
            "displayCategories": [
                "SMARTLOCK"
            ],
            "cookie": {
            },
            "capabilities": [
                {
                    "type": "AlexaInterface",
                    "interface": "Alexa.LockController",
                    "version": "3",
                    "properties": {
                        "supported": [
                            {
                                "name": "lockState"
                            }
                        ],
                        "proactivelyReported": true,
                        "retrievable": false
                    }
                }
            ]
}

Not sure but I have read that doorlocks need a pin associated as part of the oauth2 authentication process but I have found very little documentation on how to achieve this. We currently use cognito/identitypool to authenticate resource control for the skill. Any advice or suggestion is appreciated.

SKILL ID: amzn1.ask.skill.067986d9-e1c5-4654-b992-c1658d0d53e8

thanks in advance

Nathan

alexa smart homesmart homelocks
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

roy-1 avatar image
roy-1 answered

Hi Nathan,

I would first recommend setting "retrievable" to true and returning State Reports. Please see here for more info:

https://developer.amazon.com/docs/smarthome/state-reporting-for-a-smart-home-skill.html#in-response-to-a-reportstate-directive

1 comment
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Thanks Roy, I will give this a go but Is retrievable mandatory for door locks? I have implemented this for my other devices but I can disable it without issue for those devices and they still function correctly.

0 Likes 0 ·
AndreK avatar image
AndreK answered

Hi Roy

I already have Implementierung the retrievable Report in my Skill.

The AlexaApp Shows the correct state. It is not possible to control the smartlock

The question ist how to Setup the PIN-Code for the Skill

Is there any documentation ?

Thanks in advance

Best regards

Andre

10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Bjoern avatar image
Bjoern answered

You can set a PIN through the Alexa App by selecting your SmartLock Device and clicking on the three dots in the upper right corner. There you can select "open through app" and "open by voice". Once you try to activate the second one you'll get asked for the PIN. After you enter the PIN you'll get an error :-) So there seems to be an issue at the moment.

10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Chris Bannan avatar image
Chris Bannan answered

@AndreK. To unlock with Alexa, the customer must configure that in the Alexa app. That PIN is part of the Alexa app and never sent to your Smart Home Skill. When unlocking is configured, that only allows Alexa sending the Unlock directive.

10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.