Last Updated on : 2024-06-21 03:41:11download
This topic describes the features, formats, and usages of data points (DPs) that apply to Wi-Fi access control products.
The following table lists the important terminologies that you may find helpful in understanding this topic. For more information, see Glossary.
Term | Description |
---|---|
Data point (DP) | A DP is an abstract representation of a feature you want to apply to a physical device, which can be defined by various data types. |
Product ID (PID) | A PID is an abstract representation of a collection of physical devices that have the same configurations and properties. Each product created on the Tuya Developer Platform is assigned a unique PID that is associated with the product information, including DPs, app control panel, and purchase information. |
UUID | A 20-character universally unique identifier of a device, also known as a license. |
AuthKey | A 32-character authkey used to register a device with cloud services. One UUID corresponds to one AuthKey uniquely. |
Firmware key | The unique identity of firmware assigned by the Tuya Developer Platform. |
Member | Also known as user. |
Member ID | The ID of a member or a user, which is a 2-byte unsigned integer assigned and managed by the server. The valid values range from 0x0001 to 0xFFFE . The rest are reserved. |
Hardware ID | The unique ID of the hardware specific to an unlocking method, which is a 2-byte unsigned integer assigned and managed by the local processor. The valid values range from 0x0000 to 0xFFFE . 0xFFFF is reserved. For example, for fingerprint unlocking and password unlocking, the hardware ID is 0x0001 and 0x0002 respectively. |
Validity | A specific unlocking method (such as fingerprint and password) is valid during the specified time period. |
Send | Data is sent from a mobile phone to a device. |
Report | Data is sent from a device to a mobile phone. |
The size of dp_data_len
is two bytes for Tuya-enabled Wi-Fi access control devices. The following table details the DP format.
Field | Length (byte) | Description |
---|---|---|
dp_id | 1 | The ID of a DP. |
dp_type | 1 | The data type of a DP. |
dp_data_len | 2 | The data length of a DP. |
dp_data_value | dp_data_len | The payload of a DP. |
The unlocking methods are associated with user information, such as fingerprints, passwords, dynamic passwords, and face IDs.
Data transmission |
dp_id (1 byte) |
dp_type (1 byte) |
dp_data_len (2 bytes) |
dp_data_value | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Send | 1 | raw | len | Type (1 byte) |
Stage (1 byte) |
Admin flag (1 byte) |
Member ID (2 bytes) |
Hardware ID (2 bytes) |
Validity period (17 bytes) |
Number of times (1 byte) |
Password length (1 byte) |
Password content (n bytes) |
Message UUID (2 bytes) |
0x01: Password 0x02: Door card 0x03: Fingerprint 0x04: Face 0x07: Remote control |
0x00: Start enrollment. 0xFE: Cancel enrollment (initiated by app). |
0x00: Ordinary member 0x01: Admin |
0x0001 to 0xFFFE | 0xFFFF: Default value | See Appendix 1 |
Value range |
Description | Description | The unique ID of a message, generated in the cloud, is associated with message reporting. |
||||
Report | 1 | raw | len | Type (1 byte) |
Stage (1 byte) |
Admin flag (1 byte) |
Member ID (2 bytes) |
Hardware ID (2 bytes) |
Number of times (1 byte) |
Return value (1 byte) |
Message UUID (2 bytes) |
||
0x01: Password 0x02: Door card 0x03: Fingerprint 0x04: Face 0x07: Remote control |
0x00: Start enrollment. | 0x00: Ordinary member 0x01: Admin |
0x0001 to 0xFFFE | 0xFFFF: Default value | The number of times to finish enrollment. For example, six times for fingerprint enrollment. One time for door card or face enrollment. |
0x00: Default value | Same as above | ||||||
0xFC: Enrollment in progress | 0x00: Ordinary member 0x01: Admin |
0x0001 to 0xFFFE | 0xFFFF: Default value | The sequence number for enrollment times, starting from 1. For example, fingerprint enrollment is generally six times. This field is populated with the current times. |
Reasons for failed enrollment: 0x00: Success. 0x01: Incomplete fingerprint. |
||||||||
0xFD: Enrollment failed | 0x00: Ordinary member 0x01: Admin |
0x0001 to 0xFFFE | 0xFFFF: Default value | Current enrollment stage: 0x00: Start enrollment. 0xFC: Enrollment in progress. 0xFF: Finish enrollment. |
Reasons for failed enrollment | ||||||||
0xFE: Cancel enrollment (initiated by app). |
0x00: Ordinary member 0x01: Admin |
0x0001 to 0xFFFE | 0xFFFF: Default value | 0x00: Default value | 0x00: Default value | ||||||||
0xFF: Enrollment is finished. | 0x00: Ordinary member 0x01: Admin |
0x0001 to 0xFFFE | 0x0000 to 0xFFFE | 0x00: Default value | 0x00: Default value |
How it works
The following figure shows how the mobile app interacts with the lock during the enrollment of the password, door card, and face.
The following figure shows how the mobile app interacts with the lock during fingerprint enrollment.
Data transmission |
dp_id (1 byte) |
dp_type (1 byte) |
dp_data_len (2 bytes) |
dp_data_value | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Send | 2 | raw | len | Type (1 byte) |
Stage (1 byte) |
Admin flag (1 byte) |
Member ID (2 bytes) |
Hardware ID (2 bytes) |
Deletion method (1 byte) |
||||
0x00: Delete a member. | 0x00: Default | 0x00: Ordinary member 0x01: Admin |
0x0001 to 0xFFFE | 0xFFFF: Default value | 0x00: Delete all the unlock methods granted to a member. | ||||||||
0x01: Password 0x02: Door card 0x03: Fingerprint 0x04: Face 0x07: Remote control |
0x00: Default | 0x00: Ordinary member 0x01: Admin |
0x0001 to 0xFFFE | 0x0000 to 0xFFFE | 0x01: Delete a specified unlocking method granted to a member. | ||||||||
Report | 2 | raw | len | Type (1 byte) |
Stage (1 byte) |
Admin flag (1 byte) |
Member ID (2 bytes) |
Hardware ID (2 bytes) |
Deletion method (1 byte) |
Return value (1 byte) |
|||
0x00: Delete a member. | 0x00: Default | 0x00: Ordinary member 0x01: Admin |
0x0001 to 0xFFFE | 0xFFFF: Default value | 0x00: Delete all the unlock methods granted to a member. |
0x00: Deletion failed. 0x01: Hardware ID does not exist. 0x02: Hardware ID cannot be deleted, such as the hardware ID associated with the admin. 0xFF: Deletion succeeded. |
|||||||
0x01: Password 0x02: Door card 0x03: Fingerprint 0x04: Face 0x07: Remote control |
0x00: Default | 0x00: Ordinary member 0x01: Admin |
0x0001 to 0xFFFE | 0x0000 to 0xFFFE | 0x01: Delete a specified unlocking method granted to a member. |
0x00: Deletion failed. 0x01: Hardware ID does not exist. 0x02: Hardware ID cannot be deleted, such as the hardware ID associated with the admin. 0xFF: Deletion succeeded. |
Data transmission |
dp_id (1 byte) |
dp_type (1 byte) |
dp_data_len (2 bytes) |
dp_data_value | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Send | 3 | raw | len | Type (1 byte) |
Stage (1 byte) |
Admin flag (1 byte) |
Member ID (2 bytes) |
Hardware ID (2 bytes) |
Validity period (17 bytes) |
Number of times (1 byte) |
Password length (1 byte) |
Password content (n bytes) |
|
0x00: Modify the validity period for a specified member. |
0x00: Default | 0x00: Ordinary member 0x01: Admin |
0x0001 to 0xFFFE | 0xFFFF: Default value | See Appendix 1 |
0x00: Default value. (Modification is not allowed) |
Description | Description | |||||
0xF1: Modify the role of a member only. |
0x00: Default | 0x00: Ordinary member 0x01: Admin |
0x0001 to 0xFFFE | 0xFFFF: Default value | This and the following fields are not applicable. | ||||||||
0x01: Password 0x02: Door card 0x03: Fingerprint 0x04: Face 0x07: Remote control |
0x00: Default | 0x00: Ordinary member 0x01: Admin |
0x0001 to 0xFFFE | 0x0000 to 0xFFFE | See Appendix 1 |
Value range | Description | Description | |||||
Report | 3 | raw | len | Type (1 byte) |
Stage (1 byte) |
Admin flag (1 byte) |
Member ID (2 bytes) |
Hardware ID (2 bytes) |
Number of times (1 byte) |
Return value (1 byte) |
|||
0x00: Modify the validity period for a specified member. |
0x00: Default | 0x00: Ordinary member 0x01: Admin |
0x0001 to 0xFFFE | 0xFFFF: Default value | 0x00: Default | 0x00: Failure 0xFF: Success |
|||||||
0xF1: Modify the role of a member only. |
0x00: Default | 0x00: Ordinary member 0x01: Admin |
0x0001 to 0xFFFE | 0xFFFF: Default value | 0x00: Default | 0x00: Failure 0xFF: Success |
|||||||
0x01: Password 0x02: Door card 0x03: Fingerprint 0x04: Face 0x07: Remote control |
0x00: Default | 0x00: Ordinary member 0x01: Admin |
0x0001 to 0xFFFE | 0x0000 to 0xFFFE | Value range | 0x00: Failure 0xFF: Success |
0xFFFD
or 0xFFFF
to sync the locally-added unlocking method. The cloud handles the received data as is, without identifying the permission to delete the unlocking method using the app.Data transmission |
dp_id (1 byte) |
dp_type (1 byte) |
dp_data_len (2 bytes) |
dp_data_value | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Send | 4 | raw | len | Hardware types (len bytes) |
|||||||||
0x01: Password 0x02: Door card 0x03: Fingerprint 0x04: Face 0x07: Remote control 0xF0: Temporary password |
|||||||||||||
Report | 4 | raw | len | Stage (1 byte) |
Packet sequence number (1 byte) |
Data for sync (n bytes) |
|||||||
0x00: In-sync | 0x00 to 0xFF The packet sequence number starts from 0, incrementally in order. |
Data 1, Data 2 … Data n Data format definition |
|||||||||||
Report | 4 | raw | len | Stage (1 byte) |
Total packets (1 byte) |
||||||||
0x01: Sync finished | Total packets For example, if a packet for the in-sync stage is delivered twice, the packets are two in total. |
The types of temporary passwords include one-time and recurring. The temporary password is different from the ordinary password in the following ways:
A temporary password is not associated with any members.
The validity period of a temporary password can be modified when the lock is connected.
As an unlocking method, the type of the temporary password is defined as 0xF0
. 0x01
indicates password. 0x02
indicates door card. 0x03
indicates fingerprint.
Take care of the following possible issue with temporary passwords:
Data transmission |
dp_id (1 byte) |
dp_type (1 byte) |
dp_data_len (2 bytes) |
dp_data_value | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Send | 5 | raw | len | Type (1 byte) |
Validity period (17 bytes) |
Number of times (1 byte) |
Password length (1 byte) |
Password content (n bytes) |
Message UUID (2 bytes) |
||||
0x00: Type 0 0x01: Type 1 |
See Appendix 1 | Value range | The bytes of a password (used for unlocking with password only) |
Description | The unique ID of a message, generated in the cloud, is associated with message reporting. |
||||||||
Report | 5 | raw | len | Hardware ID (2 bytes) |
Return value (1 byte) |
Message UUID (2 bytes) |
|||||||
0x0000 to 0xFFFE | 0x00: Success. 0x01: Failure. 0x02: Hardware ID is assigned. 0x03: Repeated password. 0x0A: Weak password. |
Same as above |
Data transmission |
dp_id (1 byte) |
dp_type (1 byte) |
dp_data_len (2 bytes) |
dp_data_value | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Send | 6 | raw | len | Hardware ID (2 bytes) |
|||||||||
0x0000 to 0xFFFE | |||||||||||||
Report | 6 | raw | len | Hardware ID (2 bytes) |
Return value (1 byte) |
||||||||
0x0000 to 0xFFFE | 0x00: Success. 0x01: Failure. Note: It is recommended to return 0x00 if a password does not exist locally. |
Data transmission |
dp_id (1 byte) |
dp_type (1 byte) |
dp_data_len (2 bytes) |
dp_data_value | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Send | 7 | raw | len | Hardware ID (2 bytes) |
Type (1 byte) |
Validity period (17 bytes) |
Number of times (1 byte) |
Password length (1 byte) |
Password content (n bytes) |
||||
0x0000 to 0xFFFE | 0x00: Type 0 0x01: Type 1 |
See Appendix 1 | Value range | The bytes of a password (used for unlocking with password only) |
Description | ||||||||
Report | 7 | raw | len | Hardware ID (2 bytes) |
Return value (1 byte) |
||||||||
0x0000 to 0xFFFE | 0x00: Success. 0x01: Failure. |
Data transmission |
dp_id (1 byte) |
dp_type (1 byte) |
dp_data_len (2 bytes) |
dp_data_value | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Send | 8 | raw | len | Validity (1 byte) |
Key ID (2 bytes) |
Start time (4 bytes) |
End time (4 bytes) |
Access times (2 bytes) |
Key (8 bytes) |
|||
0x00: Invalid 0x01: Valid |
Not enabled. Only one key ID. |
Current date and time in Unix time |
Expiration date and time in Unix time |
0x0000 to 0xFFFF Defaults to 0, meaning the key is valid permanently. |
ASCII code | |||||||
Report | 8 | raw | len | Return value (1 byte) |
Key ID (2 bytes) |
|||||||
0x00: Success. 0x01: Failure. |
Not enabled. Only one key ID. |
Remote unlocking indicates the door is unlocked through a mobile app.
Data transmission |
dp_id (1 byte) |
dp_type (1 byte) |
dp_data_len (2 bytes) |
dp_data_value | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Send | 9 | raw | len | Feature (1 byte) |
Member ID (2 bytes) |
Key (8 bytes) |
Unlocking methods (2 bytes) |
Channel ID (2 bytes) |
||||
0x00: Lock. 0x01: Unlock. |
0x0001 to 0xFFFE | ASCII code | 0x0000: Remote unlocking by unknown methods. 0x0001: Remote unlocking by app. 0x0002: Remote unlocking by voice. 0x0003: Unlocking by a remote control. |
0x0000 to 0xFFFF | ||||||||
Report | 9 | raw | len | Return value (1 byte) |
Member ID (2 bytes) |
Channel ID (2 bytes) |
||||||
0x00: Success. 0x01: Failure. 0x02: The key is invalid. 0x03: The access times run out. 0x04: The current time is not in the validity period. 0x05: Key comparison does not pass. |
0x0001 to 0xFFFE | Same as above. |
Feature | Data transmission | dp_id (1 byte) |
dp_type (1 byte) |
dp_data_len (2 bytes) |
dp_data_value |
---|---|---|---|---|---|
Single/combined unlocking | Send/Report | 25 | enum | 0x01 | Combined unlocking methods (1 byte) |
0x00: Single unlocking method 0x01: Fingerprint + Password 0x02: Fingerprint + Door card 0x03: Fingerprint + Face 0x04: Password + Door card 0x05: Password + Face 0x06: Door card + Face |
|||||
Alarm volume | Send/Report | 26 | enum | 0x01 | Volume (1 byte) |
0x00: Mute 0x01: Low 0x02: Medium 0x03: High |
|||||
System language | Send/Report | 27 | enum | 0x01 | Languages (1 byte) |
0x00: Simplified Chinese 0x01: English 0x02: Japanese … 0x09: Traditional Chinese 0x0A: Korean |
|||||
Auto-locking delay | Send/Report | 31 | value | 0x04 | Delay time (4 bytes) |
Unit: Seconds | |||||
Auto-locking | Send/Report | 30 | bool | 0x01 | Status (1 byte) |
0x00: Turn off. 0x01: Turn on. |
|||||
Unlocking speed | Send/Report | 32 | enum | 0x01 | Unlocking speed |
0x00: Low 0x01: Medium 0x02: High |
|||||
Opening percentage | Send/Report | 33 | value | 0x04 | Percentage (4 bytes) |
Increment with a step of 5%. | |||||
Duration of alarm sound | Send/Report | 34 | value | 0x04 | Duration (4 bytes) |
The value ranges from 0 to 30 minutes, defaulting to 3 minutes. |
Feature | Data transmission | dp_id (1 byte) |
dp_type (1 byte) |
dp_data_len (2 bytes) |
dp_data_value | |||
---|---|---|---|---|---|---|---|---|
Always-on toggle | Send/Report | 28 | bool | 0x01 | Status (1 byte) | |||
0x00: Turn off. 0x01: Turn on. |
||||||||
Always-on period | Send/Report | 29 | raw | len | Validity (1 byte) | Weekly schedule (1 byte) | Number of time periods (1 byte) | Time periods (n bytes) |
0x00: Time-limited. 0x01: Permanent. |
For more information, see Appendix 1. |
Number of time periods | For more information, see Appendix 3. |
Feature | Data transmission | dp_id (1 byte) |
dp_type (1 byte) |
dp_data_len (2 bytes) |
dp_data_value |
---|---|---|---|---|---|
Remote unlocking request | Send/Report | 24 | raw | len | Multi-channel call |
See Appendix 2: Channel protocol. Value sent from device to cloud: 0x00: Unlocking request Value sent from cloud to device: 0x00: Unlock the door 0x01: Decline unlocking |
|||||
Capture again | Send/Report | 36 | bool | 0x01 | Specify whether to capture an image again (1 byte) |
0x01: Yes 0x00: No |
|||||
Voice prompts | Send/Report | 37 | enum | 0x01 | The audio to play (1 byte) |
0x00: The first audio clip. 0x01: The second audio clip. 0x02: The third audio clip. 0x03: The fourth audio clip. 0x04: The fifth audio clip. 0x05: The sixth audio clip. |
|||||
Alert dialog | Report | 38 | raw | len | Multi-channel alert |
See Appendix 2: Channel protocol. Valid values: 0x00: The alert is canceled locally. 0x01: An alert is triggered. |
|||||
Cancel alert | Send | 39 | raw | len | Multi-channel alert |
See Appendix 2: Channel protocol. Valid values: 0x00: Leave the alert as is. 0x01: Cancel the alert. |
|||||
Report | 39 | raw | len | See Appendix 2: Channel protocol. Valid values: 0x00: Failure. 0x01: Success. 0x02: Unknown. This might be because an invalid command is sent. For example, when no alert has been triggered, the app sends a command to cancel an alert. |
Feature | Data transmission | dp_id (1 byte) |
dp_type (1 byte) |
dp_data_len (2 bytes) |
dp_data_value |
---|---|---|---|---|---|
Door open/closed state | Report | 35 | raw | len | Multi-channel state (n bytes) |
See Appendix 2: Channel protocol. Door state: 0x01: Door is open. 0x02: Door is closed. |
Record Type | dp_id (1 byte) |
dp_type (1 byte) |
dp_data_len (2 bytes) |
dp_data_value | |
---|---|---|---|---|---|
Unlock with fingerprint | 10 | raw | 0x06 | Hardware ID (4 bytes) | Channel ID (2 bytes) |
0x0000 to 0xFFFE | 0x0000 to 0xFFFE Default value: 0xFFFF |
||||
Unlock with password | 11 | raw | 0x06 | Hardware ID (4 bytes) | Channel ID (2 bytes) |
0x0000 to 0xFFFE | Same as above. | ||||
Unlock with card | 12 | raw | 0x06 | Hardware ID (4 bytes) | Channel ID (2 bytes) |
0x0000 to 0xFFFE | Same as above. | ||||
Unlock with a remote | 14 | raw | 0x06 | Hardware ID (4 bytes) | Channel ID (2 bytes) |
0x0000 to 0xFFFE Default value: 0xFF |
Same as above. | ||||
Unlock with face recognition | 13 | raw | 0x06 | Hardware ID (4 bytes) | Channel ID (2 bytes) |
0x0000 to 0xFFFE | Same as above. | ||||
Unlock with offline password | 17 | raw | 0x12 | Offline password records | Channel ID (2 bytes) |
See the description of offline password records. | Same as above. | ||||
Empty all offline passwords | 19 | raw | 0x12 | Offline password records | Channel ID (2 bytes) |
See the description of offline password records. | Same as above. | ||||
Delete an offline password | 21 | raw | 0x12 | Offline password records | Channel ID (2 bytes) |
See the description of offline password records. | Same as above. | ||||
Unlock with temporary password | 16 | raw | 0x06 | Hardware ID (4 bytes) | Channel ID (2 bytes) |
0x0000 to 0xFFFE | Same as above. | ||||
Unlock remotely via app | 22 | raw | 0x06 | Member ID (4 bytes) | Channel ID (2 bytes) |
0x0000 to 0xFFFE | Same as above. |
Data transmission |
dp_id (1 byte) |
dp_type (1 byte) |
dp_data_len (2 bytes) |
dp_data_value | |||||
---|---|---|---|---|---|---|---|---|---|
Report | 23 | raw | 0x03 | Alert enum (1 byte) | Channel ID (2 bytes) | ||||
Value range | 0x0000 to 0xFFFE Default value: 0xFFFF |
Data transmission |
dp_id (1 byte) |
dp_type (1 byte) |
dp_data_len (2 bytes) |
dp_data_value | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Report | 15 | raw | 0x09 | Combined unlocking methods (1 byte) |
Unlocking method 1 (1 byte) |
Hardware ID 1 (2 bytes) |
Unlocking method 2 (1 byte) |
Hardware ID 2 (2 bytes) |
Channel ID (2 bytes) |
||||
0x00: Single locking method. 0x01: Combined unlocking method. |
0x01: Password 0x02: Card 0x03: Fingerprint 0x04: Face 0x05: Palm print 0x06: Finger vein 0xF0: Temporary password |
0x0000 to 0xFFFE |
0x01: Password 0x02: Card 0x03: Fingerprint 0x04: Face 0x05: Palm print 0x06: Finger vein 0xF0: Temporary password |
0x0000 to 0xFFFE |
0x0000 to 0xFFFE |
This section describes the offline passwords and dynamic passwords that are generated based on algorithms. How it works: The cloud and the lock run the same algorithm to generate and verify passwords. When the user enters the generated password, the lock unlocks the door if the password is verified successfully.
Scenarios:
The door lock user gets an offline password from the app and notifies the visitor of this password. The offline password can be the following types:
Limitations on clearing a single password or all passwords:
Usage: For more information, see Serial Communication Protocol. If you develop with the SDK, see the corresponding API reference.
Byte | Meaning | Description | Example | |||
---|---|---|---|---|---|---|
1 | Start date and time |
4-byte unsigned integer in big endian |
Example: 123-456-789 (Unix timestamp) = 0x075BCD15 (hex) If the validity is permanent, the start date and time is 0x00000000. |
7 | ||
2 | 5B | |||||
3 | CD | |||||
4 | 15 | |||||
5 | End date and time |
4-byte unsigned integer in big endian |
Example: 999-999-999 (Unix timestamp) = 0x3B9AC9FF (hex) If the validity is permanent, the end date and time is 0x7FFFFFFF. |
3B | ||
6 | 9A | |||||
7 | C9 | |||||
8 | FF | |||||
9 | Recurring patterns | 0x00: One-time | 0x01: Daily schedule | 0x02: Weekly schedule | 0x03: Monthly schedule | |
10 | Recurring bit 1 | For a one-time schedule, 10 to 17 bytes are 0. | Default to 0x00 | Default to 0x00 | Bit 7: Default to 0 Bit 6: The 31st of a month … Bit 0: The 25th of a month |
|
11 | Recurring bit 2 | Default to 0x00 | Default to 0x00 | Bit 7: The 24th of a month … Bit 0: The 17th of a month |
||
12 | Recurring bit 3 | Default to 0x00 | Default to 0x00 | Bit 7: The 16th of a month … Bit 0: The 9th of a month |
||
13 | Recurring bit 4 | Default to 0x00 | Bit 7: Default to 0 Bit 6: Saturday … Bit 1: Monday Bit 0: Sunday See the example of weekly schedules. |
Bit 7: The 8th of a month … Bit 0: The 1st of a month |
||
14 | The start time 1 (hour) of the day | Start time: 08:30 | 08 (decimal) | |||
15 | The start time 2 (minute) of the day | 30 (decimal) | ||||
16 | The end time 1 (hour) in a day | End time: 20:30 | 20 (decimal) | |||
17 | The end time 2 (minute) in a day | 30 (decimal) |
Example of weekly schedules:
Bit 7: Reserved | Bit 6: Saturday | Bit 5: Friday | Bit 4: Thursday | Bit 3: Wednesday | Bit 2: Tuesday | Bit 1: Monday | Bit 0: Sunday | Value |
---|---|---|---|---|---|---|---|---|
0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0x2A |
0 | 0 | 1 | 1 | 0 | 1 | 0 | 1 | 0x35 |
0 | 1 | 1 | 1 | 0 | 0 | 1 | 0 | 0x72 |
0 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 0x7F |
When the user adds or modifies unlocking methods, the recurring validity period and the access times are both applied. There are two use cases:
0x00
, this indicates permanent access. You only need to process the recurring pattern of the validity.0x00
, this indicates one-time access. You only need to process the access times.For example, schedule a password to be valid every Monday to Friday from 08:00 to 08:30 from 2018-01-26 08:00:00 to 2018-08-08 09:56:32
. The validity is 0x 5A6A6F80 5B6A4DD0 02 0000003E 0800 081E
.
2018-01-26 08:00:00
= 1516924800
(Unix timestamp) = 0x5A6A6F80
(hex)2018-08-08 09:56:32
= 1533693392
(Unix timestamp) = 0x5B6A4DD0
(hex)0x02
indicates a weekly schedule.0x08
. The start time 2 is 0x00
.0x08
. The end time 2 is 0x1E
.The multi-channel data format is defined as:
Total number of channels (1 byte) | Channel 1 information (1+n bytes) | … | Channel n information (1+n bytes) |
---|---|---|---|
0x00 to 0xFE | Channel ID + channel value | … | Channel ID + channel value |
Field description:
Example: A scene with 4 channels, with the value of a DP being one byte.
Scenes | Value of channel 1 (1 byte) | Value of channel 2 (1 byte) | Value of channel 3 (1 byte) | Value of channel 4 (1 byte) | Data to report/send |
---|---|---|---|---|---|
Send the values of three channels to the device | 0x21 | No command to send | 0x5B | 0x0B | Data sent to the device: 0x03 0x00 0x21 0x02 0x5B 0x03 0x0B |
Each time period is four bytes in size.
The first byte represents the hours of the start time.
The second byte represents the minutes of the start time.
The third byte represents the hours of the end time.
The fourth byte represents the minutes of the end time.
For example, if the start time is 08:30 and the end time is 20:30, the always-on time period is 0x08 0x1E 0x14 0x1E
.
Is this page helpful?
YesFeedbackIs this page helpful?
YesFeedback