Doorbell
Doorbell is Unloc's intercom solution
With Unloc Doorbell, visitors scan a QR code next to the door to call who they want to visit. With the click of a button, the resident can open the door for the visitor.
The current version of Doorbell gives the resident a phone call, so no app is required to be on the Doorbell list. In the future we will implement Video Call between visitor and resident. This will however not change how the Doorbell is managed through the API, so you can safely start using the APIs today.
Data model
- A Doorbell is linked to one or more stickers.
- A Doorbell is linked to a Lock in your Project. When a call is accepted, the Lock is opened using the Key of the resident.
- A Doorbell will support multiple user lists in the future. At the current time we only support one Doorbell User List per Doorbell.
Learn how to get Unloc Doorbell on our web page.
Managing Doorbell through the API
With Version 2 of the Unloc API you can manage Doorbells and Doorbell lists directly through the API. Using the API requires that the Doorbell
Project Module is activated for this Project.
Gotchas:
- At the time of writing (june 2023) each Doorbell only supports a single user list, but having multiple lists per Doorbell is a planned feature, so using the API you have to reference a Doorbell list within a Doorbell even though only one list is supported at the moment. This is done to be compatible with future versions of Doorbell.
- Adding a user to a Doorbell always gives that user a Key to the Lock. This Key is used to open the Lock when the call is accepted.
- The name you give to a user in a Doorbell list can be different from the name given as Managed User in the same Project.
- A Doorbell entity is connected to a Lock. This Lock has to be an IP Lock (internet lock). This is because the user opening the door is most likely far away from he door inside their apartment, so bluetooth won't work.
Creating a Doorbell
Use the Create Doorbell endpoint to add a Doorbell.
// POST /v2/projects/{projectId}/doorbells/
{
"name": "Tertitten BRL",
"lockId": "",
"doorbellUserLists": [
{
"name": "Tertitten BRL",
"doorbellUsers": [
{
"appUserId": userId, // Phone number of the user to add
"name": "Shaka Hislop"
},
{
"appUserId": userId2,
"name": "David de Gea"
},
{
"appUserId": userId2,
"name": "Frode Grodås"
}
]
}
],
}
Note:
- The
name
of the Doorbell will be shown to visitors scanning the QR code. - The
lockId
is required to be for a IP Lock. - Add users as part of a DoorbellUserList. The
name
off the list will currently not be shown anywhere, but might be in the future. - Only one DoorbellUserList is currently supported per Doorbell, so adding more will make the call fail with a 400 Bad Request.
Adding and removing users
Use the Update Doorbell User List endpoint to add or remove users from the Doorbell by phone number.
// POST /v2/projects/{projectId}/doorbells/{doorbellId}/user-list/{doorbellUserListId}
{
"doorbellUsersToAdd": [
{
"appUserId": userId1, // Phone number of the user to add
"name": "Bruce Wayne" // Name to appear in the list on the Doorbell
},
],
"doorbellAppUserIdsToRemove": [
userId2 // Phone number of user to remove
],
}
Note: Adding a user to the Doorbell will create a corresponding Managed User in your Project, if that user does not exist already.
Updating the name of a user in a list
Use the Update Doorbell User List endpoint to update the name of a user on a Doorbell list.
// POST /v2/projects/{projectId}/doorbells/{doorbellId}/user-list/{doorbellUserListId}
{
"doorbellUsersToUpdate": [
{
"doorbellUserId": userId1, // The ID referencing this user on this Doorbell
"name": "Batman" // New name to appear in the list for this user on the Doorbell
},
],
}
You find the doorbellUserId
for a user through the Get Doorbell or Get All Doorbells endpoint.
Deleting a Doorbell
Use the Delete Doorbell endpoint to delete a Doorbell.
Doing this revokes all Doorbell keys and offboards the QR sticker
Updated 9 months ago