Bluetooth Lock
Version: 20240613
Solution description
Tuya's Bluetooth lock solutions support two types of connection:
- Point-to-point: A Bluetooth lock exchanges data with a mobile phone via a short-range connection.
- Bluetooth gateway: A Bluetooth lock can connect to a mobile phone within a short range and to the cloud through a gateway.
Both connection types require integration with the Tuya Bluetooth lock protocol. There are two options to achieve this purpose:
- MCU integration: Interface the lock's MCU with a Bluetooth module through the serial port so that the MCU can connect to the Tuya-based mobile app and the cloud, as well as report device status.
- SDK integration: Tuya provides SDKs based on Beken or Nordic chips. You can perform custom development on top of the SDK.
These two integration methods are performed on the device side with different protocols.
Architecture
MCU Integration
Diagram illustrating MCU integration for a Bluetooth lock. A Tuya-Based App connects via Wi-Fi/LAN to a Router, which then connects via HTTP to the Tuya IoT Cloud. The Tuya IoT Cloud facilitates Cloud Development Integration with Your Cloud Platform. The Smart Lock, containing Tuya's Bluetooth Module, connects directly to the Tuya-Based App via Bluetooth. The lock's Developer MCU communicates with the Bluetooth Module using UART and controls the Lock Hardware. An operator interacts with the Lock Hardware. A Bluetooth Gateway is also shown connecting to the cloud.
SDK integration
Diagram illustrating SDK integration for a Bluetooth lock. A Tuya-Based App connects via Wi-Fi/LAN to a Router, which then connects via HTTP to the Tuya IoT Cloud. The Tuya IoT Cloud facilitates Cloud Development Integration with Your Cloud Platform. The Smart Lock utilizes a Bluetooth Chip with an Application Layer, Application Interface, Tuya Bluetooth Lock SDK, and the Original SDK from the Chip Manufacturer. This chip communicates with the Lock Hardware. An operator interacts with the Lock Hardware. A Bluetooth Gateway is also shown connecting to the cloud.
Features
Tuya Bluetooth lock solution supports the following features:
Feature | Description |
---|---|
End-to-end encryption | Data is encrypted and secured when it travels across the mobile app, server, and Bluetooth module. |
Unlocking record | An unlocking record contains the unlocking method, unlocking ID, and unlocking time. The user can check the unlocking records for the last 6 months from the mobile app. A combination of unlocking methods is supported, such as fingerprint plus password. |
Cache unlocking records | Cache the unlocking records on the Bluetooth module or chip and synchronize them with the mobile app when the lock connects to it. |
Alert | An alert is sent to the user in any of these cases: low battery, wrong attempts by passwords, fingerprints, or cards, prying lock, and high temperature. |
Time synchronization | Synchronize the clock on the lock with a time server. Global time zones and daylight saving time (DST) are supported. |
Member management | The user can add lock members using the mobile app. |
Battery level | Display battery percentage or status. |
Unlock via mobile app | The user can unlock the door using the mobile app when the mobile phone is connected to the lock over Bluetooth. |
Dynamic password | The Bluetooth module is integrated with dynamic password algorithms. The user can get dynamic passwords that are valid for five minutes using the mobile app. |
Add unlocking methods | When connected to the lock via Bluetooth, the mobile app allows the user to add or delete unlocking methods, such as fingerprints, cards, and passwords. |
Temporary password | If the hardware supports local RTC, the lock administrator can set a validity period and temporary password for non-home member users. However, the validity period and temporary password do not apply to home member users. |
Validity period | The lock administrator can specify the validity period of a user on the mobile app. |
OTA update | Update the firmware on the module and the MCU via OTA. |
Offline temporary password | The offline temporary password does not rely on an internet connection. The algorithms are implemented by the module and the cloud. The MCU calls the specified API to verify the temporary password. |
Lock status | The user can check the lock status on the mobile app, such as double lock and child lock. |
Auto-locking | Enable or disable auto-locking. |
Auto-locking delay | The user can set the time before the lock gets locked. |
Synchronize unlocking methods | When directly connected to the mobile app, the lock synchronizes the unlocking methods with the cloud. |
Voice commands | The mobile app sends the collected voice commands to the lock. |
Product creation
The Bluetooth lock solution supports the following categories:
Category | Description |
---|---|
Bluetooth residential lock | It is the standard Bluetooth lock solution, with a full set of smart lock features that can be tailored to your needs. |
Bluetooth safe box | Support Bluetooth safe box solution. |
Bluetooth lock accessory | Apply to common lock accessories such as key fobs and password panels. |
Bluetooth small lock | Apply to cabinet locks, U-locks, and key boxes. |
Process
- Overall process: Register with Tuya Developer Platform > Create product > Define functions > Select panel > Select module > Configure hardware > Configure extended features.
- Create residential lock: Choose Smart Locks > Residential Lock and then Bluetooth for Protocol.
- Create safe box: Choose Smart Locks > Safe Box and then Bluetooth for Protocol.
Data point (DP) reference
- Bluetooth Lock DPs
- Bluetooth Lock Accessory DPs
Product development
Module selection
TYBN1 module is recommended for Bluetooth lock solutions.
Software integration | Hardware integration | Model | Firmware key | Version | State | Description |
---|---|---|---|---|---|---|
MCU integration | Module | TYBN1 | keyxwmm8 | 6.1 | Released | Base version |
MCU integration | Chip | BK3431Q | keyktpaa | 3.3 | Released | Base version |
SDK integration | Chip | nRF52832 | 1.4 | Unreleased | Support integration with Amazon Alexa and Google Assistant as well as offline passwords. | |
SDK integration | Chip | BK3431Q | 1.4 | Unreleased | Support integration with Amazon Alexa and Google Assistant as well as offline passwords. |
Product development
For more information about the development process, key steps, and important DPs, see the following documentation:
- SDK Integration
- MCU Integration
MCU integration protocol
For more information about the generic communication and data protocol, see the following documentation:
- Bluetooth Lock DP Reference
- Serial Communication Protocol
Info: You can download the latest protocol after you select the module for your product on the Tuya Developer Platform.
Voice assistant
Bluetooth locks support unlocking with third-party voice assistants, which is available in the Smart Life app v3.17 or later.
Third-party voice assistants | Supported feature |
---|---|
Unlock with Alexa commands | Unlock, lock, query unlocking/locking status, and return a voice response after unlocking/locking is executed. |
Related Documents
![]() |
Tuya BLE Lock Instructions: Smart Lock SDK Developer Guide A developer's guide to the Tuya BLE Lock Instructions SDK, detailing APIs for member management, device connection, dynamic passwords, unlock modes, and function points for smart lock integration into Android applications. |
![]() |
Set Up Tuya Integration (Stable) in Home Assistant A comprehensive guide for setting up the official Tuya integration within Home Assistant. This document covers prerequisites, step-by-step installation procedures for Home Assistant Core and the Tuya integration, and frequently asked questions regarding supported device categories and managing existing devices with the new integration version. |
![]() |
TUYA Smart Home Automation Solutions: Curtains, Blinds, Lighting & Security Explore TUYA powered smart home devices including motorized curtains, smart blinds, LED lighting, security sensors, and smart locks. Discover seamless integration with Google Assistant and Amazon Alexa for a connected living experience. |
![]() |
Fast Integration with IPC SDK for Android - Tuya Developer Guide A comprehensive guide for developers on integrating the Tuya IPC SDK for Android, covering setup, configuration, and demo app features for IP camera functionalities. Learn how to quickly integrate the Tuya IPC SDK for Android into your projects. This guide covers build.gradle configuration, AndroidManifest.xml permissions, code obfuscation, and details about the demo app features for IP camera functionalities. |
![]() |
Integrating Samsung SmartThings with Your OEM App A guide on how to configure your OEM app to support Samsung SmartThings, enabling voice assistant capabilities for smart home devices. |
![]() |
Tuya BE09 WiFi Smart Plug Instruction Manual Comprehensive guide to setting up and using the Tuya BE09 WiFi Smart Plug with voice assistants like Alexa and Google Assistant, including specifications, safety, and warranty information. |
![]() |
Tuya Intelligent Lock User Manual - Features, Operation, and Connectivity Comprehensive user manual for the Tuya Intelligent Lock. Learn about its unlocking methods, system settings, operating instructions, product specifications, and WiFi/Bluetooth connectivity options. |
![]() |
Tuya Smart Lock User Manual: Ball Lock Function Description Comprehensive guide to operating the Tuya Smart Lock, covering fingerprint management, app connectivity, security settings, and troubleshooting. Learn how to install, configure, and use your smart lock for enhanced home security. |