Last Updated on : 2023-03-07 06:09:56download
A Wi-Fi lock connects to the internet through a low-power Wi-Fi module. Most of the time, the module is powered off in sleep mode. The MCU needs to wake the module up to initiate data exchange.
You can interface the lock’s MCU with a low-power Wi-Fi module through Tuya’s serial communication protocol so that the MCU can report device status to the Tuya IoT Development Platform through the Wi-Fi module.
Tuya provides Wi-Fi modules flashed with the standard firmware for smart locks and the accompanying MCU Integration Protocol for Wi-Fi Lock. The Wi-Fi module can connect to the Tuya IoT Development Platform, Tuya-based mobile app, and the lock’s MCU. You need to develop the program running on the MCU side according to the serial protocol. Tuya also provides an MCU SDK to help you implement the serial protocol quickly. You can get the MCU SDK after you create a smart lock product on the Tuya IoT Development Platform.
With the standard solution, you can interface the lock’s MCU with a low power Wi-Fi module to implement the following features.
|End-to-end encryption||Data is encrypted and secured when it travels across the mobile app, server, and Wi-Fi 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 12 months from the mobile app. A combination of unlocking methods is supported, such as fingerprint plus password.|
|Synchronize offline unlocking events||When getting back online, the module sends the cloud the unlocking events cached when the internet is disconnected.|
|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 a member and set an unlocking method for a member using the mobile app.|
|Unlocking-based linkage||The user can set unlocking events based automations using the mobile app.|
|Battery level||Display battery percentage or status.|
|Customize linkage||The user can set custom linkage by unlocking IDs or methods.|
|Unlock remotely via mobile app||On the mobile app, the user can accept or reject an unlocking request sent for the lock.|
|Dynamic password||The Wi-Fi module is integrated with dynamic password algorithms, allowing you to implement the dynamic password feature quickly. The user can copy the generated dynamic password on the mobile app.|
|Manage temporary passwords||Up to 10 temporary passwords can be created. Creation and deletion are supported. The generated password is automatically copied to the clipboard, allowing the user to share it via a messaging app or SMS. Users can choose the country code for the phone number of the recipient.|
|OTA update||Update the firmware on the module and the MCU via OTA.|
|Duress alarm||On the mobile app, the user can specify an unlocking method as a trigger to a duress alarm.|
|Doorbell call||When the visitor presses the doorbell, a message is sent to the mobile app instantly.|
|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.|
The Wi-Fi lock solution supports the following categories.
|Wi-Fi residential lock||Use the low power Wi-Fi module that is suitable for residential locks.|
|Wi-Fi residential lock pro||Recommended solution. Use the low power Wi-Fi module that is suitable for residential locks. This version is an upgrade on top of the Wi-Fi residential lock with updated UI and added features such as offline passwords and access enrollment via mobile app.|
|Wi-Fi safe box||Apply to the smart safe box solution.|
This section describes the process of creating a Wi-Fi lock product on the Tuya IoT Development Platform.
Wi-Fi residential lock pro
Wi-Fi residential lock
Wi-Fi safe box
DPs determine the features you apply to the lock product. Check out the DP reference documentation.
When you select a module, consider power consumption, networking speed, PCB layout, pin configurations, and adoption of an external antenna.
XR series is recommended for Wi-Fi lock solutions. XR series modules enhance both hardware and firmware performance with optimized networking speed and power consumption. E1S series and XR series are pin-to-pin compatible, enabling you to easily migrate to the XR series. For more information, see XR1 Module Datasheet.
The following table lists the recommended modules for Wi-Fi residential lock pro, Wi-Fi residential lock, and Wi-Fi safe box.
|Module||Firmware key||Firmware version||State|
|XR1 module||keyqd85c8xyafrue||Latest version: 1.0.5||Generic firmware is available|
|XR1-IPEX module||keyqd85c8xyafrue||Latest version: 1.0.5||Generic firmware is available|
|XR3 module||keyqd85c8xyafrue||Latest version: 1.0.5||Generic firmware is available|
For more information about the MCU development regarding the process, key steps, and important DPs, see Wi-Fi Lock Implementation Process.
The MCU integration protocol describes the serial communication protocol between the MCU and the module. You can download the latest protocol after you select the module for your product on the Tuya IoT Development Platform. For more information, see MCU Integration for Wi-Fi Lock.
lock_motor_state). Alexa determines the locking/unlocking status using this DP.
truefor unlocking when the door is unlocked from the outside, and reports
falsefor locking when the door is locked.
For more information about cloud development integration for Wi-Fi residential lock, see Cloud Development for Wi-Fi Lock.
Wi-Fi residential lock solution supports integration with WeChat mini program. For more information, see the following documentation.
Is this page helpful?YesFeedback
Is this page helpful?YesFeedback