Wi-Fi Lock

Last Updated on : 2024-06-21 03:46:33download

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 Developer Platform through the Wi-Fi module.

MCU integration solution

How it works

Wi-Fi Lock

Description

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 Developer 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 Developer Platform.

Features

With the standard solution, you can interface the lock’s MCU with a low power Wi-Fi module to implement the following features.

Feature Description
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.

Lock category

The Wi-Fi lock solution supports the following categories.

Category Description
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.

Create Wi-Fi lock product

This section describes the process of creating a Wi-Fi lock product on the Tuya Developer Platform.

  • Wi-Fi residential lock pro

    Wi-Fi Lock
  • Wi-Fi residential lock

    Wi-Fi Lock
  • Wi-Fi safe box

    Wi-Fi Lock

Data point (DP) definition

DPs determine the features you apply to the lock product. Check out the DP reference documentation.

Product Development

Module selection

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

MCU development description

For more information about the MCU development regarding the process, key steps, and important DPs, see Wi-Fi Lock Implementation Process.

MCU integration protocol

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 Developer Platform. For more information, see MCU Integration for Wi-Fi Lock.

Third-party voice platform integration

  • Currently, the low power Wi-Fi lock solution only supports Alexa Routines. The lock can only act as a condition to trigger a routine. For example, unlocking the door turns on an Alexa-compatible light.
  • Three steps to integrate with Alexa Routines:
  1. When you create a lock product, choose the Locking Status DP (identifier is lock_motor_state). Alexa determines the locking/unlocking status using this DP.
  2. The MCU must correctly report the status of the Locking Status DP. It reports true for unlocking when the door is unlocked from the outside, and reports false for locking when the door is locked.
  3. Open the Tuya Developer Platform and click VAS from the left navigation pane. Choose Smart Voice > Amazon Alexa Advanced Access (paid version) and subscribe to it for your product.

Debug and test

  • For more information about debugging and troubleshooting, see Wi-Fi Lock FAQ.
  • For more information about test cases regarding software, hardware, and radio frequency testing, see Smart Lock Testing.

Other solutions

Cloud APIs

For more information about cloud development integration for Wi-Fi residential lock, see Cloud Development for Wi-Fi Lock.

IoT WeChat mini program solution

Wi-Fi residential lock solution supports integration with WeChat mini program. For more information, see the following documentation.